@capgo/cli 8.24.1 → 8.24.3
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 +363 -363
- 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||{},$=B.exitCode||1,J=B.code||"commander.error";this._exit($,J,A)}_parseOptionsEnv(){this.options.forEach((A)=>{if(A.envVar&&A.envVar in L$.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()}`,L$.env[A.envVar]);else this.emit(`optionEnv:${A.name()}`)}})}_parseOptionsImplied(){let A=new l3Q(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(($)=>!Q($)).forEach(($)=>{this.setOptionValueWithSource($,B.implied[$],"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=(Y)=>{let X=Y.attributeName(),G=this.getOptionValue(X),W=this.options.find((H)=>H.negate&&X===H.attributeName()),K=this.options.find((H)=>!H.negate&&X===H.attributeName());if(W&&(W.presetArg===void 0&&G===!1||W.presetArg!==void 0&&G===W.presetArg))return W;return K||Y},$=(Y)=>{let X=B(Y),G=X.attributeName();if(this.getOptionValueSource(G)==="env")return`environment variable '${X.envVar}'`;return`option '${X.flags}'`},J=`error: ${$(A)} cannot be used with ${$(Q)}`;this.error(J,{code:"commander.conflictingOption"})}unknownOption(A){if(this._allowUnknownOption)return;let Q="";if(A.startsWith("--")&&this._showSuggestionAfterError){let $=[],J=this;do{let Y=J.createHelp().visibleOptions(J).filter((X)=>X.long).map((X)=>X.long);$=$.concat(Y),J=J.parent}while(J&&!J._enablePositionalOptions);Q=ZMA(A,$)}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",J=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${Q} argument${B} but got ${A.length}.`;this.error(J,{code:"commander.excessArguments"})}unknownCommand(){let A=this.args[0],Q="";if(this._showSuggestionAfterError){let $=[];this.createHelp().visibleCommands(this).forEach((J)=>{if($.push(J.name()),J.alias())$.push(J.alias())}),Q=ZMA(A,$)}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 $=this.createOption(Q,B);return this._versionOptionName=$.attributeName(),this._registerOption($),this.on("option:"+$.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 $=[B.name()].concat(B.aliases()).join("|");throw Error(`cannot add alias '${A}' to command '${this.name()}' as already have command '${$}'`)}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 m3Q(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=Tq.basename(A,Tq.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 $=Q.formatHelp(this,Q);if(B.hasColors)return $;return this._outputConfiguration.stripColor($)}_getOutputContext(A){A=A||{};let Q=!!A.error,B,$,J;if(Q)B=(X)=>this._outputConfiguration.writeErr(X),$=this._outputConfiguration.getErrHasColors(),J=this._outputConfiguration.getErrHelpWidth();else B=(X)=>this._outputConfiguration.writeOut(X),$=this._outputConfiguration.getOutHasColors(),J=this._outputConfiguration.getOutHelpWidth();return{error:Q,write:(X)=>{if(!$)X=this._outputConfiguration.stripColor(X);return B(X)},hasColors:$,helpWidth:J}}outputHelp(A){let Q;if(typeof A==="function")Q=A,A=void 0;let B=this._getOutputContext(A),$={error:B.error,write:B.write,command:this};this._getCommandAndAncestors().reverse().forEach((Y)=>Y.emit("beforeAllHelp",$)),this.emit("beforeHelp",$);let J=this.helpInformation({error:B.error});if(Q){if(J=Q(J),typeof J!=="string"&&!Buffer.isBuffer(J))throw Error("outputHelp callback must return a string or a Buffer")}if(B.write(J),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",$),this._getCommandAndAncestors().forEach((Y)=>Y.emit("afterAllHelp",$))}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(L$.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 $=`${A}Help`;return this.on($,(J)=>{let Y;if(typeof Q==="function")Y=Q({error:J.error,command:J.command});else Y=Q;if(Y)J.write(`${Y}
|
|
94
|
-
`)}),this}_outputHelpIfRequested(A){let Q=this._getHelpOption();if(Q&&A.find(($)=>Q.is($)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function HMA(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,$="127.0.0.1",J="9229",Y;if((Y=Q.match(/^(--inspect(-brk)?)$/))!==null)B=Y[1];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=Y[1],/^\d+$/.test(Y[3]))J=Y[3];else $=Y[3];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=Y[1],$=Y[3],J=Y[4];if(B&&J!=="0")return`${B}=${$}:${parseInt(J)+1}`;return Q})}function c1A(){if(L$.env.NO_COLOR||L$.env.FORCE_COLOR==="0"||L$.env.FORCE_COLOR==="false")return!1;if(L$.env.FORCE_COLOR||L$.env.CLICOLOR_FORCE!==void 0)return!0;return}p3Q.Command=d1A;p3Q.useColor=c1A});var zMA=t((r3Q)=>{var{Argument:DMA}=Nm(),{Command:l1A}=qMA(),{CommanderError:a3Q,InvalidArgumentError:FMA}=WP(),{Help:o3Q}=y1A(),{Option:UMA}=h1A();r3Q.program=new l1A;r3Q.createCommand=(A)=>new l1A(A);r3Q.createOption=(A,Q)=>new UMA(A,Q);r3Q.createArgument=(A,Q)=>new DMA(A,Q);r3Q.Command=l1A;r3Q.Option=UMA;r3Q.Argument=DMA;r3Q.Help=o3Q;r3Q.CommanderError=a3Q;r3Q.InvalidArgumentError=FMA;r3Q.InvalidOptionArgumentError=FMA});var z4;var JW=fA(()=>{z4={name:"@capgo/cli",type:"module",version:"8.24.1",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:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","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:prescan":"bun test test/prescan/","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:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.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:init-replay":"bun test/test-init-replay.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.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:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && 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:fail-on-incompatible && bun run test:native-dependencies && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && 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:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.0.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.10.4",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6","rrweb-snapshot":"^2.0.1","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});function KqQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function ZqQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function KP(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=KqQ(A);if(Q!==void 0){if(Q===401)return"unauthorized";if(Q===403)return"forbidden";if(Q===404)return"not_found";if(Q===413)return"payload_too_large";if(Q>=500)return"server_error"}let B=ZqQ(A).toLowerCase();if(/econnrefused|enotfound|fetch failed|network|socket|dns/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function CMA(A){if(A===401)return"unauthorized";if(A===403)return"forbidden";if(A===404)return"not_found";if(A===408||A===504)return"timeout";if(A===413)return"payload_too_large";if(A===429)return"rate_limited";if(A===400||A===422)return"validation_error";if(A>=500)return"server_error";return"unknown"}import{AsyncLocalStorage as qqQ}from"node:async_hooks";function ZP(A,Q){return NMA.run(A,()=>Promise.resolve(Q()))}function DqQ(){return NMA.getStore()}function HP(){LMA=!0}function VMA(){return LMA}function RMA(A){EMA=A}function MMA(A){try{EMA?.(A)}catch{}}function wMA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length).replace(/^\/+|\/+$/g,"");return K?`${Q} functions:${K}`:`${Q} functions`}let Y="/rest/v1/",X=B.indexOf(Y),G=X>=0?B.slice(X+Y.length):B.replace(/^\//,"");if(G.startsWith("rpc/"))return`rpc:${G.slice(4).split("/")[0]}`;let W=G.split("/")[0]||B;return`${Q} ${W}`}function FqQ(A){let Q=A?.headers;if(!Q)return;let B=Q.get;if(typeof B==="function")return B.call(Q,"capgkey")??void 0;if(Array.isArray(Q))return Q.find(([$])=>$.toLowerCase()==="capgkey")?.[1];return Q.capgkey}function _MA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=DqQ(),X=FqQ(B),G=Date.now();try{let W=await globalThis.fetch(Q,B);return MMA({url:J,method:$,status:W.status,ok:W.ok,durationMs:Date.now()-G,source:Y,apikey:X}),W}catch(W){throw MMA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-G,source:Y,apikey:X,error:W}),W}}}var NMA,LMA=!1,EMA,jMA=5000;var qP=fA(()=>{NMA=new qqQ});import{homedir as PMA,platform as UqQ,release as zqQ}from"node:os";import{arch as IqQ,cwd as TMA,env as tI,version as CqQ}from"node:process";function SK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function LqQ(){if(SK(tI.CAPGO_DISABLE_TELEMETRY)||SK(tI.CAPGO_DISABLE_POSTHOG))return;return tI.CAPGO_CLI_POSTHOG_API_KEY?.trim()||tI.POSTHOG_API_KEY?.trim()||MqQ}function VqQ(A){let Q=A.replace(/\/+$/,"");if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function EqQ(A){if(A instanceof Error)return{cause:A.cause,message:A.message,name:A.name||"Error",stack:A.stack};if(typeof A==="string")return{message:A,name:"Error",stack:void 0};try{return{message:JSON.stringify(A)??String(A),name:"Error",stack:void 0}}catch{return{message:String(A),name:"Error",stack:void 0}}}function RqQ(A){let Q=A,B=TMA(),$=PMA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function jqQ(A){let Q=A,B=TMA(),$=PMA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){2,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function wqQ(A,Q){let B=A?.split(`
|
|
94
|
+
`)}),this}_outputHelpIfRequested(A){let Q=this._getHelpOption();if(Q&&A.find(($)=>Q.is($)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function HMA(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,$="127.0.0.1",J="9229",Y;if((Y=Q.match(/^(--inspect(-brk)?)$/))!==null)B=Y[1];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=Y[1],/^\d+$/.test(Y[3]))J=Y[3];else $=Y[3];else if((Y=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=Y[1],$=Y[3],J=Y[4];if(B&&J!=="0")return`${B}=${$}:${parseInt(J)+1}`;return Q})}function c1A(){if(L$.env.NO_COLOR||L$.env.FORCE_COLOR==="0"||L$.env.FORCE_COLOR==="false")return!1;if(L$.env.FORCE_COLOR||L$.env.CLICOLOR_FORCE!==void 0)return!0;return}p3Q.Command=d1A;p3Q.useColor=c1A});var zMA=t((r3Q)=>{var{Argument:DMA}=Nm(),{Command:l1A}=qMA(),{CommanderError:a3Q,InvalidArgumentError:FMA}=WP(),{Help:o3Q}=y1A(),{Option:UMA}=h1A();r3Q.program=new l1A;r3Q.createCommand=(A)=>new l1A(A);r3Q.createOption=(A,Q)=>new UMA(A,Q);r3Q.createArgument=(A,Q)=>new DMA(A,Q);r3Q.Command=l1A;r3Q.Option=UMA;r3Q.Argument=DMA;r3Q.Help=o3Q;r3Q.CommanderError=a3Q;r3Q.InvalidArgumentError=FMA;r3Q.InvalidOptionArgumentError=FMA});var z4;var JW=fA(()=>{z4={name:"@capgo/cli",type:"module",version:"8.24.3",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:"tsgo --project tsconfig.tsgo.json --noEmit",lint:"bun run lint:ox","lint:ox":"oxlint --config ../.oxlintrc.json src","lint:fix":"oxlint --config ../.oxlintrc.json --fix src","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:prescan":"bun test test/prescan/","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:fail-on-incompatible":"bun test/test-fail-on-incompatible.mjs","test:native-dependencies":"bun test/test-native-dependencies.mjs","test:credentials":"bun test/test-credentials.mjs","test:asc-key-protocol":"bun test/test-asc-key-protocol.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:android-service-account-validation":"bun test/test-android-service-account-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:build-needed":"bun test/test-build-needed.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:ci-secrets":"bun test/test-ci-secrets.mjs","test:android-onboarding-progress":"bun test/test-android-onboarding-progress.mjs","test:onboarding-telemetry":"bun test/test-onboarding-telemetry.mjs","test:v2-event-migration":"bun test/test-v2-event-migration.mjs","test:analytics":"bun test/test-analytics.mjs","test:analytics-error-category":"bun test/test-analytics-error-category.mjs","test:analytics-org-resolver":"bun test/test-analytics-org-resolver.mjs","test:supabase-perf":"bun test/test-supabase-perf.mjs","test:preview-qr":"bun test/test-preview-qr.mjs","test:mcp-analytics":"bun test/test-mcp-analytics.mjs","test:mcp-instructions":"bun test/test-mcp-instructions.mjs","test:mcp-stdout-guard":"bun test/test-mcp-stdout-guard.mjs","test:mcp-platform-select":"bun test/test-mcp-platform-select.mjs","test:mcp-explain-scopes":"bun test/test-mcp-explain-scopes.mjs","test:mcp-oauth-reopen":"bun test/test-mcp-oauth-reopen.mjs","test:mcp-broker-oauth":"bun test/test-mcp-broker-oauth.mjs","test:mcp-broker-session":"bun test/test-mcp-broker-session.mjs","test:mcp-credentials-manage":"bun test/test-mcp-credentials-manage.mjs","test:mcp-resume-prompt":"bun test/test-mcp-resume-prompt.mjs","test:mcp-build-job":"bun test/test-mcp-build-job.mjs","test:mcp-build-tools":"bun test/test-mcp-build-tools.mjs","test:app-created-source":"bun test/test-app-created-source.mjs","test:doctor-analytics":"bun test/test-doctor-analytics.mjs","test:posthog-exception":"bun test/test-posthog-exception.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-progress":"bun test/test-onboarding-progress.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:init-replay":"bun test/test-init-replay.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:auth-session":"bun test/test-auth-session.mjs","test:mcp":"node test/test-mcp.mjs","test:mcp-no-key-handshake":"node test/test-mcp-no-key-handshake.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:project-type-detection":"bun test/test-project-type-detection.mjs","test:payload-split":"bun test/test-payload-split.mjs","test:macos-signing":"bun test/test-macos-signing.mjs","test:helper-dce":"bash scripts/check-helper-dce.sh","test:apple-api-import-helpers":"bun test/test-apple-api-import-helpers.mjs","test:apple-api-verify-key":"bun test/test-apple-api-verify-key.mjs","test:bundle-id-detector":"bun test/test-bundle-id-detector.mjs","test:apple-api-app-list":"bun test/test-apple-api-app-list.mjs","test:apple-api-cert-create":"bun test/test-apple-api-cert-create.mjs","test:app-verification":"bun test/test-app-verification.mjs","test:pbxproj-parser":"bun test/test-pbxproj-parser.mjs","test:manifest-path-encoding":"bun test/test-manifest-path-encoding.mjs","test:self-update":"bun test/test-self-update.mjs","test:update-prompt":"bun test/test-update-prompt.mjs","test:android-tail-engine":"bun test/test-android-tail-engine.mjs","test:android-tail-render":"bun test/test-android-tail-render.mjs","test:android-tail-routing":"bun test/test-android-tail-routing.mjs","test:dev-gate-stripped":"bun test/test-dev-gate-stripped.mjs","test:frame-fit-ios-shared":"bun test/test-frame-fit-ios-shared.mjs","test:ios-confirm-app-id":"bun test/test-ios-confirm-app-id.mjs","test:ios-create-new":"bun test/test-ios-create-new.mjs","test:ios-e2e":"bun test/test-ios-e2e.mjs","test:ios-flow-contract":"bun test/test-ios-flow-contract.mjs","test:ios-import-discovery":"bun test/test-ios-import-discovery.mjs","test:ios-import-export":"bun test/test-ios-import-export.mjs","test:ios-import-pickers":"bun test/test-ios-import-pickers.mjs","test:ios-import-recovery":"bun test/test-ios-import-recovery.mjs","test:ios-recovery":"bun test/test-ios-recovery.mjs","test:ios-resume":"bun test/test-ios-resume.mjs","test:ios-tail-handoff":"bun test/test-ios-tail-handoff.mjs","test:ios-tui-render":"bun test/test-ios-tui-render.mjs","test:p8-error":"bun test/test-p8-error.mjs","test:ios-tui-routing":"bun test/test-ios-tui-routing.mjs","test:ios-updater-sync-validation":"bun test/test-ios-updater-sync-validation.mjs","test:ios-verify-app":"bun test/test-ios-verify-app.mjs","test:platform-flow-contract":"bun test/test-platform-flow-contract.mjs","test:tail-engine-shared":"bun test/test-tail-engine-shared.mjs",test:"bun run build && bun run test:helper-dce && 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:fail-on-incompatible && bun run test:native-dependencies && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && 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:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:cicd-failure-help && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode","test:build-platform-selection":"bun test/test-build-platform-selection.mjs","test:ai-log-capture":"bun test/test-ai-log-capture.mjs","test:ai-analyze-flow":"bun test/test-ai-analyze-flow.mjs","test:cicd-failure-help":"bun test/test-cicd-failure-help.mjs","test:ai-analyze-stream":"bun test/test-ai-analyze-stream.mjs","test:ai-sse-parser":"bun test/test-ai-sse-parser.mjs","test:ai-render-markdown":"bun test/test-ai-render-markdown.mjs","test:ai-onboarding-mode":"bun test/test-ai-onboarding-mode.mjs","test:ai-fit":"bun test/test-ai-fit.mjs","test:platform-layout":"bun test/test-platform-layout.mjs","test:frame-fit":"bun test/run-frame-fit.mjs","test:onboarding-min-size":"bun test/test-onboarding-min-size.mjs","test:min-size-gate":"bun test/test-min-size-gate.mjs","test:shell-size-gate":"bun test/test-shell-size-gate.mjs","test:build-log-sanitize":"bun test/test-build-log-sanitize.mjs","test:build-output-viewport":"bun test/test-build-output-viewport.mjs","test:diff-viewer-viewport":"bun test/test-diff-viewer-viewport.mjs","test:build-complete-exit":"bun test/test-build-complete-exit.mjs","test:ai-stream-markdown":"bun test/test-ai-stream-markdown.mjs","test:support-mailto":"bun test/test-support-mailto.mjs","test:support-redact":"bun test/test-support-redact.mjs","test:support-internal-log":"bun test/test-support-internal-log.mjs","test:support-help-menu":"bun test/test-support-help-menu.mjs","test:support-contact":"bun test/test-support-contact.mjs","test:support-upload-prompt":"bun test/test-support-upload-prompt.mjs","test:support-bundle-files":"bun test/test-support-bundle-files.mjs","test:mcp-live-update-onboarding":"bun test/test-mcp-live-update-onboarding.mjs","test:app-set-options":"bun test/test-app-set-options.mjs","test:android-reporting-api":"bun test/test-android-reporting-api.mjs","test:android-app-verification":"bun test/test-android-app-verification.mjs","test:android-rename":"bun test/test-android-rename.mjs","test:appflow-auth":"bun test/test-appflow-auth.mjs","test:appflow-api-map":"bun test/test-appflow-api-map.mjs","test:appflow-validate":"bun test/test-appflow-validate.mjs","test:appflow-flow":"bun test/test-appflow-flow.mjs","test:appflow-gapfill":"bun test/test-appflow-gapfill.mjs","test:appflow-engine":"bun test/test-appflow-engine.mjs","test:appflow-tail":"bun test/test-appflow-tail.mjs","test:appflow-fetch":"bun test/test-appflow-fetch.mjs","test:appflow-sa-decode":"bun test/test-appflow-sa-decode.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.0.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.10.4",ink:"^7.0.4","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.6","rrweb-snapshot":"^2.0.1","string-width":"^8.2.1"},optionalDependencies:{"@capgo/cli-helper-darwin-arm64":"^1.1.1","@capgo/cli-helper-darwin-x64":"^1.1.1","node-pty":"^1.1.0"},devDependencies:{"@antfu/eslint-config":"^9.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.3.4","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.4.0","@modelcontextprotocol/sdk":"^1.29.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.106.2","@tanstack/intent":"^0.0.41","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.9.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.15","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260526.1","@vercel/ncc":"^0.38.4","@xterm/headless":"^6.0.0","adm-zip":"^0.5.17","ci-info":"^4.4.0",commander:"^14.0.3",eslint:"^10.4.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.1",micromatch:"^4.0.8",open:"^11.0.0",oxlint:"^1.67.0",partysocket:"^1.1.19",prettyjson:"^1.2.5",tmp:"^0.2.6","tus-js-client":"^4.3.1",typescript:"^6.0.3",ws:"^8.21.0",zod:"^4.4.3"}}});function KqQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function ZqQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function KP(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=KqQ(A);if(Q!==void 0){if(Q===401)return"unauthorized";if(Q===403)return"forbidden";if(Q===404)return"not_found";if(Q===413)return"payload_too_large";if(Q>=500)return"server_error"}let B=ZqQ(A).toLowerCase();if(/econnrefused|enotfound|fetch failed|network|socket|dns/.test(B))return"network_error";if(/timed out|timeout|etimedout|aborted/.test(B))return"timeout";if(/invalid|must be|required|not allowed|malformed|validation/.test(B))return"validation_error";return"unknown"}function CMA(A){if(A===401)return"unauthorized";if(A===403)return"forbidden";if(A===404)return"not_found";if(A===408||A===504)return"timeout";if(A===413)return"payload_too_large";if(A===429)return"rate_limited";if(A===400||A===422)return"validation_error";if(A>=500)return"server_error";return"unknown"}import{AsyncLocalStorage as qqQ}from"node:async_hooks";function ZP(A,Q){return NMA.run(A,()=>Promise.resolve(Q()))}function DqQ(){return NMA.getStore()}function HP(){LMA=!0}function VMA(){return LMA}function RMA(A){EMA=A}function MMA(A){try{EMA?.(A)}catch{}}function wMA(A,Q){let B;try{B=new URL(A).pathname}catch{B=A.split("?")[0]}let $="/functions/v1/",J=B.indexOf($);if(J>=0){let K=B.slice(J+$.length).replace(/^\/+|\/+$/g,"");return K?`${Q} functions:${K}`:`${Q} functions`}let Y="/rest/v1/",X=B.indexOf(Y),G=X>=0?B.slice(X+Y.length):B.replace(/^\//,"");if(G.startsWith("rpc/"))return`rpc:${G.slice(4).split("/")[0]}`;let W=G.split("/")[0]||B;return`${Q} ${W}`}function FqQ(A){let Q=A?.headers;if(!Q)return;let B=Q.get;if(typeof B==="function")return B.call(Q,"capgkey")??void 0;if(Array.isArray(Q))return Q.find(([$])=>$.toLowerCase()==="capgkey")?.[1];return Q.capgkey}function _MA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=DqQ(),X=FqQ(B),G=Date.now();try{let W=await globalThis.fetch(Q,B);return MMA({url:J,method:$,status:W.status,ok:W.ok,durationMs:Date.now()-G,source:Y,apikey:X}),W}catch(W){throw MMA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-G,source:Y,apikey:X,error:W}),W}}}var NMA,LMA=!1,EMA,jMA=5000;var qP=fA(()=>{NMA=new qqQ});import{homedir as PMA,platform as UqQ,release as zqQ}from"node:os";import{arch as IqQ,cwd as TMA,env as tI,version as CqQ}from"node:process";function SK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function LqQ(){if(SK(tI.CAPGO_DISABLE_TELEMETRY)||SK(tI.CAPGO_DISABLE_POSTHOG))return;return tI.CAPGO_CLI_POSTHOG_API_KEY?.trim()||tI.POSTHOG_API_KEY?.trim()||MqQ}function VqQ(A){let Q=A.replace(/\/+$/,"");if(Q.endsWith("/i/v0/e"))return`${Q}/`;let B=Q.replace(/\/capture$/,"/");return new URL("i/v0/e/",B.endsWith("/")?B:`${B}/`).toString()}function EqQ(A){if(A instanceof Error)return{cause:A.cause,message:A.message,name:A.name||"Error",stack:A.stack};if(typeof A==="string")return{message:A,name:"Error",stack:void 0};try{return{message:JSON.stringify(A)??String(A),name:"Error",stack:void 0}}catch{return{message:String(A),name:"Error",stack:void 0}}}function RqQ(A){let Q=A,B=TMA(),$=PMA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function jqQ(A){let Q=A,B=TMA(),$=PMA();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q.replace(/<cwd>\/[^\s"',)]+/g,"<cwd>/<path>").replace(/~\/[^\s"',)]+/g,"~/<path>").replace(/[\w.%+-]+@[\w.-]+\.[A-Z]{2,}/gi,"<email>").replace(/(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi,"$1<redacted>@").replace(/\b[a-z][\w-]*(?:\.[\w-]+){2,}\b/gi,"<app_id>").replace(/\b[a-z]:\\[^\s"',)]+/gi,"<path>").replace(/(^|[\s"'(])\/[^\s"',)]+/g,"$1<path>").replace(/(--(?:token|api[-_]?key|key|password|secret|private[-_]?key|jwt|session|auth)(?:=|\s+))("[^"]+"|'[^']+'|\S+)/gi,"$1<redacted>").replace(/\b((?:token|api[-_]?key|password|secret|authorization)\s*[:=]\s*)[^\s,;]+/gi,"$1<redacted>")}function wqQ(A,Q){let B=A?.split(`
|
|
95
95
|
`).slice(1).map(($)=>{let J=$.trim(),Y=J.startsWith("at ")?J.slice(3):J,X=Q,G=Y,W=Y.lastIndexOf(" (");if(W!==-1&&Y.endsWith(")"))X=Y.slice(0,W).trim()||Q,G=Y.slice(W+2,-1);else{let D=Y.lastIndexOf(" "),F=D===-1?"":Y.slice(D+1);if(/:\d+:\d+$/.test(F))X=Y.slice(0,D).trim()||Q,G=F}let K=G.lastIndexOf(":"),H=K===-1?-1:G.lastIndexOf(":",K-1);if(K===-1||H===-1)return{function:Q,platform:"custom",lang:"javascript"};return{function:X,filename:RqQ(G.slice(0,H)),lineno:Number.parseInt(G.slice(H+1,K),10),colno:Number.parseInt(G.slice(K+1),10),platform:"custom",lang:"javascript"}}).filter(Boolean);return B&&B.length>0?B:[{function:Q,platform:"custom",lang:"javascript"}]}function _qQ(A){if(!A||typeof A!=="object"||!("code"in A))return;let{code:Q}=A;return typeof Q==="string"?Q:void 0}function kMA(A){return!_qQ(A)?.startsWith("commander.")}function p1A(A){let Q=[],B=A;while(B?.parent){let $=B.name();if($)Q.push($);B=B.parent}return Q.reverse().join(" ")||"unknown"}async function i1A(A){let Q=LqQ();if(!Q)return!1;let B=tI.CAPGO_CLI_POSTHOG_API_HOST?.trim()||tI.POSTHOG_API_HOST?.trim()||OqQ,$;try{$=VqQ(B)}catch{return!1}let J=EqQ(A.error),Y=jqQ(J.message),X=`cli:${z4.version}:${A.functionName}`,G=wqQ(J.stack,A.functionName),W=G[0],K=[X,A.kind,J.name||"Error",W?.function||A.functionName,W&&"filename"in W?W.filename:"unknown",String(A.status??1)].join(":"),H={token:Q,event:"$exception",properties:{distinct_id:X,$exception_list:[{type:J.name||"Error",value:Y,mechanism:{handled:!0,synthetic:!1},stacktrace:{type:"raw",frames:G}}],$exception_fingerprint:K,architecture:IqQ,cli_version:z4.version,error_kind:A.kind,function_name:A.functionName,is_ci:Boolean(tI.CI),node_version:CqQ,os_platform:UqQ(),os_release:zqQ(),runtime:"cli",status:A.status},timestamp:new Date().toISOString()};try{let D=new AbortController,F=setTimeout(()=>D.abort(),NqQ);try{return(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(H),signal:D.signal})).ok}finally{clearTimeout(F)}}catch{return!1}}var OqQ="https://eu.i.posthog.com/i/v0/e/",MqQ="phc_NXDyDajQaTQVwb25DEhIVZfxVUn4R0Y348Z7vWYHZUi",NqQ=1500;var DP=fA(()=>{JW()});import{existsSync as QX}from"fs";var C2=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,X=`${A}/yarn.lock`,G=`${A}/package-lock.json`,W=`${A}/npm-shrinkwrap.json`;if(QX(B)||QX($))return"bun";if(QX(J)||QX(Y))return"pnpm";if(QX(X))return"yarn";if(QX(G)||QX(W))return"npm";return Q},Em=(A=C2(),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"}},SMA=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,X=`${A}/yarn.lock`,G=`${A}/package-lock.json`,W=`${A}/npm-shrinkwrap.json`;if(QX(B)||QX($))return"bunx";if(QX(J)||QX(Y))return"pnpm exec";if(QX(X))return"yarn dlx";if(QX(G)||QX(W))return"npx";return Q};var n1A=()=>{};function Rm(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function fMA(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function jm(A=[],Q=[]){let B=Math.max(A.length,Q.length);for(let $=0;$<B;$++){let J=A[$],Y=Q[$];if(J===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(J===void 0)return-1;if(typeof J==="string"&&typeof Y==="number")return 1;if(typeof J==="number"&&typeof Y==="string")return-1;if(J<Y)return-1;if(J>Y)return 1}return 0}function o1A(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function BX(A){return A.split(".").filter(Boolean).map((Q)=>{if(SqQ.test(Q)){let B=Number(Q);if(o1A(B))return B}return Q})}function WH(A){return A.split(".").filter(Boolean)}function _m(A,Q){let B=Number(A);if(!o1A(B))throw TypeError(Q);return B}function kq(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 qL="0|[1-9]\\d*",PqQ="\\d*[a-zA-Z-][a-zA-Z0-9-]*",TqQ,xMA,vMA,bMA="[0-9A-Za-z-]+",gMA,yMA,hMA,uMA="(?:<|>)?=?",kqQ="x|X|\\*",a1A,wm,mMA,cMA,r1A=256,SqQ;var GG=fA(()=>{TqQ=`(?<major>${qL})\\.(?<minor>${qL})\\.(?<patch>${qL})`,xMA=`(?:${qL}|${PqQ})`,vMA=`(?:-(?<prerelease>${xMA}(?:\\.${xMA})*))`,gMA=`(?:\\+(?<buildmetadata>${bMA}(?:\\.${bMA})*))`,yMA=`v?${TqQ}${vMA}?${gMA}?`,hMA=new RegExp(`^${yMA}$`),a1A=`${qL}|${kqQ}`,wm=`[v=\\s]*(?<major>${a1A})(?:\\.(?<minor>${a1A})(?:\\.(?<patch>${a1A})${vMA}?${gMA}?)?)?`,mMA=new RegExp(`^(?<operator>~>?|\\^|${uMA})\\s*${wm}$`),cMA=new RegExp(`^(?<operator>${uMA})\\s*(${yMA})$|^$`);SqQ=new RegExp(`^${qL}$`)});function nY(A,Q){if(A===Q)return 0;return Rm(A.major,Q.major)||Rm(A.minor,Q.minor)||Rm(A.patch,Q.patch)||fMA(A.prerelease,Q.prerelease)||jm(A.prerelease,Q.prerelease)}var YW=fA(()=>{GG()});function dMA(A,Q){let B=A.prerelease?.length||Q.prerelease?.length;if(A.major!==Q.major)return B?"premajor":"major";if(A.minor!==Q.minor)return B?"preminor":"minor";if(A.patch!==Q.patch)return B?"prepatch":"patch";if(jm(A.prerelease,Q.prerelease)!==0)return"prerelease"}var lMA=fA(()=>{GG()});function s1A(A){return A.toFixed(0)}function F5(A){let Q=s1A(A.major),B=s1A(A.minor),$=s1A(A.patch),J=A.prerelease?.join(".")??"",Y=A.build?.join(".")??"";return[[`${Q}.${B}.${$}`,J].filter((W)=>W).join("-"),Y].filter((W)=>W).join("+")}function xqQ(A,Q){if(kq(Q))return!0;let B=nY(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 Pm(A,Q){for(let B of Q)if(!xqQ(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(kq(B))continue;if(!B.prerelease?.length)continue;let{major:$,minor:J,patch:Y}=B;if(A.major===$&&A.minor===J&&A.patch===Y)return!0}return!1}var Tm=fA(()=>{GG();YW()});function FP(A,Q){return Q.some((B)=>Pm(A,B))}var UP=fA(()=>{Tm()});function bqQ(A=[]){let Q=[...A],B=Q.length;while(B>=0){let $=Q[B];if(typeof $==="number"){Q[B]=$+1;break}B-=1}if(B===-1)Q.push(0);return Q}function zP(A=[],Q){let B=bqQ(A);if(!Q)return B;let $=BX(Q);if($.every((J)=>typeof J==="string")){if($.every((J,Y)=>J===B[Y])&&typeof B[$.length]==="number")return B;$=[...$,0]}return $}function O2(A,Q,B={}){let $=B.build!==void 0?WH(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:zP(A.prerelease,B.prerelease),build:$};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:zP(A.prerelease,B.prerelease),build:$};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:zP(A.prerelease,B.prerelease),build:$};case"prerelease":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:zP(A.prerelease,B.prerelease),build:$}}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:$};case"minor":{let Y=(A.prerelease??[]).length===0||A.patch!==0?A.minor+1:A.minor;return{major:A.major,minor:Y,patch:0,prerelease:[],build:$}}case"patch":{let Y=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:Y,prerelease:[],build:$}}case"pre":return{major:A.major,minor:A.minor,patch:A.patch,prerelease:zP(A.prerelease,B.prerelease),build:$};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var pMA=fA(()=>{GG()});var km,DL;var IP=fA(()=>{km={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},DL={operator:void 0,...km}});var t1A=fA(()=>{IP();GG()});function e1A(A,Q){return nY(A,Q)>0}var A8A=fA(()=>{YW()});var iMA=fA(()=>{UP();A8A()});function WG(A,Q){return nY(A,Q)<0}var Q8A=fA(()=>{YW()});var nMA=fA(()=>{UP();Q8A()});function fqQ(A){let B=A.match(cMA)?.groups;if(!B)return null;let{operator:$}=B;return{operator:$||void 0,...km}}function P4(A){return!A||A.toLowerCase()==="x"||A==="*"}function vqQ(A){if(P4(A.major))return;if(P4(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(P4(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?BX(A.prerelease):[],build:[]}}function gqQ(A){if(P4(A.major))return;if(P4(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(P4(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:BX(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function yqQ(A){let Q=A.match(new RegExp(`^${wm}`)),B=Q?.groups;if(!B)return null;let $=Q[0].length,J=A.slice($).match(/^\s+-\s+/);if(!J)return null;let Y=J[0].length,G=A.slice($+Y).match(new RegExp(`^${wm}\\s*$`))?.groups,W=vqQ(B),K=gqQ(G);return[W,K].filter(Boolean)}function hqQ(A){let Q=P4(A.major),B=P4(A.minor),$=P4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[DL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($){if(J===0)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J+1,minor:0,patch:0}]}let G=BX(A.prerelease??"");if(J===0){if(Y===0)return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J,minor:Y,patch:X+1}];return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J,minor:Y+1,patch:0}]}return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J+1,minor:0,patch:0}]}function uqQ(A){let Q=P4(A.major),B=P4(A.minor),$=P4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[DL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let G=BX(A.prerelease??"");return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G},{operator:"<",major:J,minor:Y+1,patch:0}]}function mqQ(A){let Q=P4(A.major),B=P4(A.minor),$=P4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B){if($)return[{operator:"<",major:J,minor:0,patch:0}];return[{operator:"<",major:J,minor:0,patch:0}]}if($)return[{operator:"<",major:J,minor:Y,patch:0}];let G=BX(A.prerelease??""),W=WH(A.build??"");return[{operator:"<",major:J,minor:Y,patch:X,prerelease:G,build:W}]}function cqQ(A){let Q=P4(A.minor),B=P4(A.patch),$=+A.major,J=+A.minor,Y=+A.patch;if(Q)return[{operator:"<",major:$+1,minor:0,patch:0}];if(B)return[{operator:"<",major:$,minor:J+1,patch:0}];let X=BX(A.prerelease??""),G=WH(A.build??"");return[{operator:"<=",major:$,minor:J,patch:Y,prerelease:X,build:G}]}function dqQ(A){let Q=P4(A.major),B=P4(A.minor),$=P4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B)return[{operator:">=",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y+1,patch:0}];let G=BX(A.prerelease??""),W=WH(A.build??"");return[{operator:">",major:J,minor:Y,patch:X,prerelease:G,build:W}]}function lqQ(A){let Q=P4(A.major),B=P4(A.minor),$=P4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[DL];if(B)return[{operator:">=",major:J,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0}];let G=BX(A.prerelease??""),W=WH(A.build??"");return[{operator:">=",major:J,minor:Y,patch:X,prerelease:G,build:W}]}function pqQ(A){let Q=P4(A.major),B=P4(A.minor),$=P4(A.patch),J=+A.major,Y=+A.minor,X=+A.patch;if(Q)return[DL];if(B)return[{operator:">=",major:J,minor:0,patch:0},{operator:"<",major:J+1,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0},{operator:"<",major:J,minor:Y+1,patch:0}];let G=BX(A.prerelease??""),W=WH(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:J,minor:Y,patch:X,prerelease:G,build:W}]}function iqQ(A){let Q=A.match(mMA)?.groups;if(!Q)return fqQ(A);switch(Q.operator){case"^":return hqQ(Q);case"~":case"~>":return uqQ(Q);case"<":return mqQ(Q);case"<=":return cqQ(Q);case">":return dqQ(Q);case">=":return lqQ(Q);default:return pqQ(Q)}}function nqQ(A){return A.split(/\s+/).flatMap(iqQ)}function Sm(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>yqQ(B)||nqQ(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var B8A=fA(()=>{GG();IP()});function J1(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>r1A)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${r1A}`);A=A.trim();let Q=A.match(hMA)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=_m(Q.major,`Cannot parse version ${A}: invalid major version`),$=_m(Q.minor,`Cannot parse version ${A}: invalid minor version`),J=_m(Q.patch,`Cannot parse version ${A}: invalid patch version`),Y=Q.prerelease?BX(Q.prerelease):[],X=Q.buildmetadata?WH(Q.buildmetadata):[];return{major:B,minor:$,patch:J,prerelease:Y,build:X}}var xm=fA(()=>{GG();GG()});function aMA(A,Q){let B=A.operator,$=Q.operator;if(B===void 0){if(kq(A))return!0;return FP(A,[[Q]])}if($===void 0){if(kq(Q))return!0;return FP(Q,[[A]])}let J=nY(A,Q);return(B===">="||B===">")&&($===">="||$===">")||(B==="<="||B==="<")&&($==="<="||$==="<")||J===0&&((B===">="||B==="<=")&&($===">="||$==="<="))||J===-1&&(B===">="||B===">")&&($==="<="||$==="<")||J===1&&(B==="<="||B==="<")&&($===">="||$===">")}function aqQ(A){return A.every((Q)=>{return Q.some((B)=>oqQ(B))})}function oqQ(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let $ of A.slice(Q+1))if(!aMA(B,$))return!1}return!0}function oMA(A,Q){return aqQ([A,Q])&&A.some((B)=>{return Q.some(($)=>{return B.every((J)=>{return $.every((Y)=>aMA(J,Y))})})})}var rMA=fA(()=>{GG();YW();UP()});var sMA=fA(()=>{B8A()});var tMA=fA(()=>{IP();IP();t1A()});function CP(A){try{return J1(A),!0}catch{return!1}}var eMA=fA(()=>{xm()});var ANA=fA(()=>{xm()});var QNA=fA(()=>{GG()});var BNA=fA(()=>{YW()});var $NA=fA(()=>{YW()});var JNA=fA(()=>{Tm();GG();YW()});function $8A(A,Q){return nY(A,Q)>=0}var YNA=fA(()=>{YW()});var XNA=fA(()=>{Tm();GG();YW()});var GNA=fA(()=>{YW()});var xK=fA(()=>{YW();lMA();UP();pMA();t1A();iMA();nMA();B8A();xm();rMA();sMA();tMA();eMA();ANA();QNA();BNA();$NA();A8A();JNA();YNA();Q8A();XNA();GNA()});var $X=t((sj0,vm)=>{var WNA,KNA,ZNA,HNA,qNA,DNA,FNA,UNA,zNA,INA,CNA,ONA,MNA,bm,J8A,NNA,LNA,VNA,FL,ENA,RNA,jNA,wNA,_NA,PNA,TNA,kNA,SNA,fm,xNA,bNA,fNA;(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($){A(B(Q,B($)))});else if(typeof vm==="object"&&typeof sj0==="object")A(B(Q,B(sj0)));else A(B(Q));function B($,J){if($!==Q)if(typeof Object.create==="function")Object.defineProperty($,"__esModule",{value:!0});else $.__esModule=!0;return function(Y,X){return $[Y]=J?J(Y,X):X}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,X){Y.__proto__=X}||function(Y,X){for(var G in X)if(Object.prototype.hasOwnProperty.call(X,G))Y[G]=X[G]};WNA=function(Y,X){if(typeof X!=="function"&&X!==null)throw TypeError("Class extends value "+String(X)+" is not a constructor or null");Q(Y,X);function G(){this.constructor=Y}Y.prototype=X===null?Object.create(X):(G.prototype=X.prototype,new G)},KNA=Object.assign||function(Y){for(var X,G=1,W=arguments.length;G<W;G++){X=arguments[G];for(var K in X)if(Object.prototype.hasOwnProperty.call(X,K))Y[K]=X[K]}return Y},ZNA=function(Y,X){var G={};for(var W in Y)if(Object.prototype.hasOwnProperty.call(Y,W)&&X.indexOf(W)<0)G[W]=Y[W];if(Y!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var K=0,W=Object.getOwnPropertySymbols(Y);K<W.length;K++)if(X.indexOf(W[K])<0&&Object.prototype.propertyIsEnumerable.call(Y,W[K]))G[W[K]]=Y[W[K]]}return G},HNA=function(Y,X,G,W){var K=arguments.length,H=K<3?X:W===null?W=Object.getOwnPropertyDescriptor(X,G):W,D;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")H=Reflect.decorate(Y,X,G,W);else for(var F=Y.length-1;F>=0;F--)if(D=Y[F])H=(K<3?D(H):K>3?D(X,G,H):D(X,G))||H;return K>3&&H&&Object.defineProperty(X,G,H),H},qNA=function(Y,X){return function(G,W){X(G,W,Y)}},DNA=function(Y,X,G,W,K,H){function D(T){if(T!==void 0&&typeof T!=="function")throw TypeError("Function expected");return T}var F=W.kind,U=F==="getter"?"get":F==="setter"?"set":"value",z=!X&&Y?W.static?Y:Y.prototype:null,I=X||(z?Object.getOwnPropertyDescriptor(z,W.name):{}),O,V=!1;for(var E=G.length-1;E>=0;E--){var M={};for(var N in W)M[N]=N==="access"?{}:W[N];for(var N in W.access)M.access[N]=W.access[N];M.addInitializer=function(T){if(V)throw TypeError("Cannot add initializers after decoration has completed");H.push(D(T||null))};var R=(0,G[E])(F==="accessor"?{get:I.get,set:I.set}:I[U],M);if(F==="accessor"){if(R===void 0)continue;if(R===null||typeof R!=="object")throw TypeError("Object expected");if(O=D(R.get))I.get=O;if(O=D(R.set))I.set=O;if(O=D(R.init))K.unshift(O)}else if(O=D(R))if(F==="field")K.unshift(O);else I[U]=O}if(z)Object.defineProperty(z,W.name,I);V=!0},FNA=function(Y,X,G){var W=arguments.length>2;for(var K=0;K<X.length;K++)G=W?X[K].call(Y,G):X[K].call(Y);return W?G:void 0},UNA=function(Y){return typeof Y==="symbol"?Y:"".concat(Y)},zNA=function(Y,X,G){if(typeof X==="symbol")X=X.description?"[".concat(X.description,"]"):"";return Object.defineProperty(Y,"name",{configurable:!0,value:G?"".concat(G," ",X):X})},INA=function(Y,X){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(Y,X)},CNA=function(Y,X,G,W){function K(H){return H instanceof G?H:new G(function(D){D(H)})}return new(G||(G=Promise))(function(H,D){function F(I){try{z(W.next(I))}catch(O){D(O)}}function U(I){try{z(W.throw(I))}catch(O){D(O)}}function z(I){I.done?H(I.value):K(I.value).then(F,U)}z((W=W.apply(Y,X||[])).next())})},ONA=function(Y,X){var G={label:0,sent:function(){if(H[0]&1)throw H[1];return H[1]},trys:[],ops:[]},W,K,H,D=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return D.next=F(0),D.throw=F(1),D.return=F(2),typeof Symbol==="function"&&(D[Symbol.iterator]=function(){return this}),D;function F(z){return function(I){return U([z,I])}}function U(z){if(W)throw TypeError("Generator is already executing.");while(D&&(D=0,z[0]&&(G=0)),G)try{if(W=1,K&&(H=z[0]&2?K.return:z[0]?K.throw||((H=K.return)&&H.call(K),0):K.next)&&!(H=H.call(K,z[1])).done)return H;if(K=0,H)z=[z[0]&2,H.value];switch(z[0]){case 0:case 1:H=z;break;case 4:return G.label++,{value:z[1],done:!1};case 5:G.label++,K=z[1],z=[0];continue;case 7:z=G.ops.pop(),G.trys.pop();continue;default:if((H=G.trys,!(H=H.length>0&&H[H.length-1]))&&(z[0]===6||z[0]===2)){G=0;continue}if(z[0]===3&&(!H||z[1]>H[0]&&z[1]<H[3])){G.label=z[1];break}if(z[0]===6&&G.label<H[1]){G.label=H[1],H=z;break}if(H&&G.label<H[2]){G.label=H[2],G.ops.push(z);break}if(H[2])G.ops.pop();G.trys.pop();continue}z=X.call(Y,G)}catch(I){z=[6,I],K=0}finally{W=H=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}},MNA=function(Y,X){for(var G in Y)if(G!=="default"&&!Object.prototype.hasOwnProperty.call(X,G))fm(X,Y,G)},fm=Object.create?function(Y,X,G,W){if(W===void 0)W=G;var K=Object.getOwnPropertyDescriptor(X,G);if(!K||("get"in K?!X.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return X[G]}};Object.defineProperty(Y,W,K)}:function(Y,X,G,W){if(W===void 0)W=G;Y[W]=X[G]},bm=function(Y){var X=typeof Symbol==="function"&&Symbol.iterator,G=X&&Y[X],W=0;if(G)return G.call(Y);if(Y&&typeof Y.length==="number")return{next:function(){if(Y&&W>=Y.length)Y=void 0;return{value:Y&&Y[W++],done:!Y}}};throw TypeError(X?"Object is not iterable.":"Symbol.iterator is not defined.")},J8A=function(Y,X){var G=typeof Symbol==="function"&&Y[Symbol.iterator];if(!G)return Y;var W=G.call(Y),K,H=[],D;try{while((X===void 0||X-- >0)&&!(K=W.next()).done)H.push(K.value)}catch(F){D={error:F}}finally{try{if(K&&!K.done&&(G=W.return))G.call(W)}finally{if(D)throw D.error}}return H},NNA=function(){for(var Y=[],X=0;X<arguments.length;X++)Y=Y.concat(J8A(arguments[X]));return Y},LNA=function(){for(var Y=0,X=0,G=arguments.length;X<G;X++)Y+=arguments[X].length;for(var W=Array(Y),K=0,X=0;X<G;X++)for(var H=arguments[X],D=0,F=H.length;D<F;D++,K++)W[K]=H[D];return W},VNA=function(Y,X,G){if(G||arguments.length===2){for(var W=0,K=X.length,H;W<K;W++)if(H||!(W in X)){if(!H)H=Array.prototype.slice.call(X,0,W);H[W]=X[W]}}return Y.concat(H||Array.prototype.slice.call(X))},FL=function(Y){return this instanceof FL?(this.v=Y,this):new FL(Y)},ENA=function(Y,X,G){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var W=G.apply(Y,X||[]),K,H=[];return K=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),F("next"),F("throw"),F("return",D),K[Symbol.asyncIterator]=function(){return this},K;function D(E){return function(M){return Promise.resolve(M).then(E,O)}}function F(E,M){if(W[E]){if(K[E]=function(N){return new Promise(function(R,T){H.push([E,N,R,T])>1||U(E,N)})},M)K[E]=M(K[E])}}function U(E,M){try{z(W[E](M))}catch(N){V(H[0][3],N)}}function z(E){E.value instanceof FL?Promise.resolve(E.value.v).then(I,O):V(H[0][2],E)}function I(E){U("next",E)}function O(E){U("throw",E)}function V(E,M){if(E(M),H.shift(),H.length)U(H[0][0],H[0][1])}},RNA=function(Y){var X,G;return X={},W("next"),W("throw",function(K){throw K}),W("return"),X[Symbol.iterator]=function(){return this},X;function W(K,H){X[K]=Y[K]?function(D){return(G=!G)?{value:FL(Y[K](D)),done:!1}:H?H(D):D}:H}},jNA=function(Y){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var X=Y[Symbol.asyncIterator],G;return X?X.call(Y):(Y=typeof bm==="function"?bm(Y):Y[Symbol.iterator](),G={},W("next"),W("throw"),W("return"),G[Symbol.asyncIterator]=function(){return this},G);function W(H){G[H]=Y[H]&&function(D){return new Promise(function(F,U){D=Y[H](D),K(F,U,D.done,D.value)})}}function K(H,D,F,U){Promise.resolve(U).then(function(z){H({value:z,done:F})},D)}},wNA=function(Y,X){if(Object.defineProperty)Object.defineProperty(Y,"raw",{value:X});else Y.raw=X;return Y};var B=Object.create?function(Y,X){Object.defineProperty(Y,"default",{enumerable:!0,value:X})}:function(Y,X){Y.default=X},$=function(Y){return $=Object.getOwnPropertyNames||function(X){var G=[];for(var W in X)if(Object.prototype.hasOwnProperty.call(X,W))G[G.length]=W;return G},$(Y)};_NA=function(Y){if(Y&&Y.__esModule)return Y;var X={};if(Y!=null){for(var G=$(Y),W=0;W<G.length;W++)if(G[W]!=="default")fm(X,Y,G[W])}return B(X,Y),X},PNA=function(Y){return Y&&Y.__esModule?Y:{default:Y}},TNA=function(Y,X,G,W){if(G==="a"&&!W)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?Y!==X||!W:!X.has(Y))throw TypeError("Cannot read private member from an object whose class did not declare it");return G==="m"?W:G==="a"?W.call(Y):W?W.value:X.get(Y)},kNA=function(Y,X,G,W,K){if(W==="m")throw TypeError("Private method is not writable");if(W==="a"&&!K)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?Y!==X||!K:!X.has(Y))throw TypeError("Cannot write private member to an object whose class did not declare it");return W==="a"?K.call(Y,G):K?K.value=G:X.set(Y,G),G},SNA=function(Y,X){if(X===null||typeof X!=="object"&&typeof X!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof Y==="function"?X===Y:Y.has(X)},xNA=function(Y,X,G){if(X!==null&&X!==void 0){if(typeof X!=="object"&&typeof X!=="function")throw TypeError("Object expected.");var W,K;if(G){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");W=X[Symbol.asyncDispose]}if(W===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(W=X[Symbol.dispose],G)K=W}if(typeof W!=="function")throw TypeError("Object not disposable.");if(K)W=function(){try{K.call(this)}catch(H){return Promise.reject(H)}};Y.stack.push({value:X,dispose:W,async:G})}else if(G)Y.stack.push({async:!0});return X};var J=typeof SuppressedError==="function"?SuppressedError:function(Y,X,G){var W=Error(G);return W.name="SuppressedError",W.error=Y,W.suppressed=X,W};bNA=function(Y){function X(H){Y.error=Y.hasError?new J(H,Y.error,"An error was suppressed during disposal."):H,Y.hasError=!0}var G,W=0;function K(){while(G=Y.stack.pop())try{if(!G.async&&W===1)return W=0,Y.stack.push(G),Promise.resolve().then(K);if(G.dispose){var H=G.dispose.call(G.value);if(G.async)return W|=2,Promise.resolve(H).then(K,function(D){return X(D),K()})}else W|=1}catch(D){X(D)}if(W===1)return Y.hasError?Promise.reject(Y.error):Promise.resolve();if(Y.hasError)throw Y.error}return K()},fNA=function(Y,X){if(typeof Y==="string"&&/^\.\.?\//.test(Y))return Y.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(G,W,K,H,D){return W?X?".jsx":".js":K&&(!H||!D)?G:K+H+"."+D.toLowerCase()+"js"});return Y},A("__extends",WNA),A("__assign",KNA),A("__rest",ZNA),A("__decorate",HNA),A("__param",qNA),A("__esDecorate",DNA),A("__runInitializers",FNA),A("__propKey",UNA),A("__setFunctionName",zNA),A("__metadata",INA),A("__awaiter",CNA),A("__generator",ONA),A("__exportStar",MNA),A("__createBinding",fm),A("__values",bm),A("__read",J8A),A("__spread",NNA),A("__spreadArrays",LNA),A("__spreadArray",VNA),A("__await",FL),A("__asyncGenerator",ENA),A("__asyncDelegator",RNA),A("__asyncValues",jNA),A("__makeTemplateObject",wNA),A("__importStar",_NA),A("__importDefault",PNA),A("__classPrivateFieldGet",TNA),A("__classPrivateFieldSet",kNA),A("__classPrivateFieldIn",SNA),A("__addDisposableResource",xNA),A("__disposeResources",bNA),A("__rewriteRelativeImportExtension",fNA)})});var yNA=t((vNA)=>{Object.defineProperty(vNA,"__esModule",{value:!0});vNA.resolveFetch=void 0;var rqQ=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};vNA.resolveFetch=rqQ});var Y8A=t((dNA)=>{Object.defineProperty(dNA,"__esModule",{value:!0});dNA.FunctionRegion=dNA.FunctionsHttpError=dNA.FunctionsRelayError=dNA.FunctionsFetchError=dNA.FunctionsError=void 0;class OP 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}}}dNA.FunctionsError=OP;class uNA extends OP{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}dNA.FunctionsFetchError=uNA;class mNA extends OP{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}dNA.FunctionsRelayError=mNA;class cNA extends OP{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}dNA.FunctionsHttpError=cNA;var hNA;(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"})(hNA||(dNA.FunctionRegion=hNA={}))});var aNA=t((iNA)=>{Object.defineProperty(iNA,"__esModule",{value:!0});iNA.FunctionsClient=void 0;var QDQ=$X(),BDQ=yNA(),UL=Y8A();class pNA{constructor(A,{headers:Q={},customFetch:B,region:$=UL.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=$,this.fetch=(0,BDQ.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return QDQ.__awaiter(this,arguments,void 0,function*(Q,B={}){var $;let J,Y;try{let{headers:X,method:G,body:W,signal:K,timeout:H}=B,D={},{region:F}=B;if(!F)F=this.region;let U=new URL(`${this.url}/${Q}`);if(F&&F!=="any")D["x-region"]=F,U.searchParams.set("forceFunctionRegion",F);let z;if(W&&(X&&!Object.prototype.hasOwnProperty.call(X,"Content-Type")||!X))if(typeof Blob<"u"&&W instanceof Blob||W instanceof ArrayBuffer)D["Content-Type"]="application/octet-stream",z=W;else if(typeof W==="string")D["Content-Type"]="text/plain",z=W;else if(typeof FormData<"u"&&W instanceof FormData)z=W;else D["Content-Type"]="application/json",z=JSON.stringify(W);else if(W&&typeof W!=="string"&&!(typeof Blob<"u"&&W instanceof Blob)&&!(W instanceof ArrayBuffer)&&!(typeof FormData<"u"&&W instanceof FormData))z=JSON.stringify(W);else z=W;let I=K;if(H)if(Y=new AbortController,J=setTimeout(()=>Y.abort(),H),K)I=Y.signal,K.addEventListener("abort",()=>Y.abort());else I=Y.signal;let O=yield this.fetch(U.toString(),{method:G||"POST",headers:Object.assign(Object.assign(Object.assign({},D),this.headers),X),body:z,signal:I}).catch((N)=>{throw new UL.FunctionsFetchError(N)}),V=O.headers.get("x-relay-error");if(V&&V==="true")throw new UL.FunctionsRelayError(O);if(!O.ok)throw new UL.FunctionsHttpError(O);let E=(($=O.headers.get("Content-Type"))!==null&&$!==void 0?$:"text/plain").split(";")[0].trim(),M;if(E==="application/json")M=yield O.json();else if(E==="application/octet-stream"||E==="application/pdf")M=yield O.blob();else if(E==="text/event-stream")M=O;else if(E==="multipart/form-data")M=yield O.formData();else M=yield O.text();return{data:M,error:null,response:O}}catch(X){return{data:null,error:X,response:X instanceof UL.FunctionsHttpError||X instanceof UL.FunctionsRelayError?X.context:void 0}}finally{if(J)clearTimeout(J)}})}}iNA.FunctionsClient=pNA});var oNA=t((M2)=>{Object.defineProperty(M2,"__esModule",{value:!0});M2.FunctionRegion=M2.FunctionsRelayError=M2.FunctionsHttpError=M2.FunctionsFetchError=M2.FunctionsError=M2.FunctionsClient=void 0;var $DQ=aNA();Object.defineProperty(M2,"FunctionsClient",{enumerable:!0,get:function(){return $DQ.FunctionsClient}});var MP=Y8A();Object.defineProperty(M2,"FunctionsError",{enumerable:!0,get:function(){return MP.FunctionsError}});Object.defineProperty(M2,"FunctionsFetchError",{enumerable:!0,get:function(){return MP.FunctionsFetchError}});Object.defineProperty(M2,"FunctionsHttpError",{enumerable:!0,get:function(){return MP.FunctionsHttpError}});Object.defineProperty(M2,"FunctionsRelayError",{enumerable:!0,get:function(){return MP.FunctionsRelayError}});Object.defineProperty(M2,"FunctionRegion",{enumerable:!0,get:function(){return MP.FunctionRegion}})});function sNA(A,Q){return new Promise((B)=>{if(Q===null||Q===void 0?void 0:Q.aborted){B();return}let $=setTimeout(()=>{Q===null||Q===void 0||Q.removeEventListener("abort",J),B()},A);function J(){clearTimeout($),B()}Q===null||Q===void 0||Q.addEventListener("abort",J)})}function XDQ(A,Q,B,$){if(!$||B>=3)return!1;if(!ALA.includes(A))return!1;if(!YDQ.includes(Q))return!1;return!0}function NP(A){return NP=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},NP(A)}function ZDQ(A,Q){if(NP(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var $=B.call(A,Q||"default");if(NP($)!="object")return $;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function HDQ(A){var Q=ZDQ(A,"string");return NP(Q)=="symbol"?Q:Q+""}function qDQ(A,Q,B){return(Q=HDQ(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function eNA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(A);Q&&($=$.filter(function(J){return Object.getOwnPropertyDescriptor(A,J).enumerable})),B.push.apply(B,$)}return B}function gm(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?eNA(Object(B),!0).forEach(function($){qDQ(A,$,B[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):eNA(Object(B)).forEach(function($){Object.defineProperty(A,$,Object.getOwnPropertyDescriptor(B,$))})}return A}var rNA=(A)=>Math.min(1000*2**A,30000),YDQ,ALA,X8A,GDQ=class{constructor(A){var Q,B,$,J,Y;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=($=A.shouldStripNulls)!==null&&$!==void 0?$:!1,this.urlLengthLimit=(J=A.urlLengthLimit)!==null&&J!==void 0?J:8000,this.retryEnabled=(Y=A.retry)!==null&&Y!==void 0?Y:!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 X=this.headers.get("Accept");if(X==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!X||X==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let $=this.fetch,Y=(async()=>{let X=0;while(!0){let K={};if(B.headers.forEach((D,F)=>{K[F]=D}),X>0)K["X-Retry-Count"]=String(X);let H;try{H=await $(B.url.toString(),{method:B.method,headers:K,body:JSON.stringify(B.body,(D,F)=>typeof F==="bigint"?F.toString():F),signal:B.signal})}catch(D){if((D===null||D===void 0?void 0:D.name)==="AbortError"||(D===null||D===void 0?void 0:D.code)==="ABORT_ERR")throw D;if(!ALA.includes(B.method))throw D;if(B.retryEnabled&&X<3){let F=rNA(X);X++,await sNA(F,B.signal);continue}throw D}if(XDQ(B.method,H.status,X,B.retryEnabled)){var G,W;let D=(G=(W=H.headers)===null||W===void 0?void 0:W.get("Retry-After"))!==null&&G!==void 0?G:null,F=D!==null?Math.max(0,parseInt(D,10)||0)*1000:rNA(X);await H.text(),X++,await sNA(F,B.signal);continue}return await B.processResponse(H)}})();if(!this.shouldThrowOnError)Y=Y.catch((X)=>{var G;let W="",K="",H="",D=X===null||X===void 0?void 0:X.cause;if(D){var F,U,z,I;let E=(F=D===null||D===void 0?void 0:D.message)!==null&&F!==void 0?F:"",M=(U=D===null||D===void 0?void 0:D.code)!==null&&U!==void 0?U:"";if(W=`${(z=X===null||X===void 0?void 0:X.name)!==null&&z!==void 0?z:"FetchError"}: ${X===null||X===void 0?void 0:X.message}`,W+=`
|
|
96
96
|
|
|
97
97
|
Caused by: ${(I=D===null||D===void 0?void 0:D.name)!==null&&I!==void 0?I:"Error"}: ${E}`,M)W+=` (${M})`;if(D===null||D===void 0?void 0:D.stack)W+=`
|