@capgo/cli 8.33.5 → 8.34.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/app/list.d.ts +2 -0
- package/dist/src/sdk.js +1 -1
- package/dist/src/types/supabase.types.d.ts +14 -0
- package/dist/src/utils.d.ts +14 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67,7 +67,7 @@ ${X}
|
|
|
67
67
|
`}}}}).prompt();var hB=uA(()=>{R1A();R1A();U1A();W1A();Q_=AQ(q1A(),1);j1A=JHQ(),ZHQ=z6("◆","*"),wLA=z6("■","x"),PLA=z6("▲","x"),P1A=z6("◇","o"),XHQ=z6("┌","T"),E4=z6("│","|"),PF=z6("└","—"),rO0=z6("┐","T"),sO0=z6("┘","—"),w1A=z6("●",">"),mu=z6("○"," "),tO0=z6("◻","[•]"),eO0=z6("◼","[+]"),AM0=z6("◻","[ ]"),GHQ=z6("▪","•"),QM0=z6("─","-"),BM0=z6("╮","+"),$M0=z6("├","+"),JM0=z6("╯","+"),YM0=z6("╰","+"),ZM0=z6("╭","+"),KHQ=z6("●","•"),WHQ=z6("◆","*"),HHQ=z6("▲","!"),FHQ=z6("■","x");XM0=[`${V0("dim","↑/↓")} to navigate`,`${V0("dim","Space:")} select`,`${V0("dim","Enter:")} confirm`],v={message:(A=[],{symbol:Q=V0("gray",E4),secondarySymbol:B=V0("gray",E4),output:$=process.stdout,spacing:J=1,withGuide:Y}={})=>{let Z=[],X=Y??PJ.withGuide,G=X?B:"",K=X?`${Q} `:"",W=X?`${B} `:"";for(let U=0;U<J;U++)Z.push(G);let F=Array.isArray(A)?A:A.split(`
|
|
68
68
|
`);if(F.length>0){let[U,...z]=F;U.length>0?Z.push(`${K}${U}`):Z.push(X?Q:"");for(let q of z)q.length>0?Z.push(`${W}${q}`):Z.push(X?B:"")}$.write(`${Z.join(`
|
|
69
69
|
`)}
|
|
70
|
-
`)},info:(A,Q)=>{v.message(A,{...Q,symbol:V0("blue",KHQ)})},success:(A,Q)=>{v.message(A,{...Q,symbol:V0("green",WHQ)})},step:(A,Q)=>{v.message(A,{...Q,symbol:V0("green",P1A)})},warn:(A,Q)=>{v.message(A,{...Q,symbol:V0("yellow",HHQ)})},warning:(A,Q)=>{v.warn(A,Q)},error:(A,Q)=>{v.message(A,{...Q,symbol:V0("red",FHQ)})}},GM0={light:z6("─","-"),heavy:z6("━","="),block:z6("█","#")},IHQ=[`${V0("dim","↑/↓")} to navigate`,`${V0("dim","Enter:")} confirm`],KM0=`${V0("gray",E4)} `});var O6;var QX=uA(()=>{O6={name:"@capgo/cli",type:"module",version:"8.33.5",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:package-json-guard":"bun test/test-package-json-guard.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:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.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:ios-marketing-version":"bun test/test-ios-marketing-version.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:auto-bump-version && bun run test:auto-bump-ai-diff && 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:package-json-guard && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:wait-log && 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:ios-marketing-version && 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 && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","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","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},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.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.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.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",typescript:"6.0.3",ws:"^8.21.1"}}});function EHQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function RHQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function B_(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=EHQ(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=RHQ(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 xLA(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 wHQ}from"node:async_hooks";function ou(A,Q){return yLA.run(A,()=>Promise.resolve(Q()))}function PHQ(){return yLA.getStore()}function $_(){gLA=!0}function hLA(){return gLA}function mLA(A){uLA=A}function vLA(A){try{uLA?.(A)}catch{}}function dLA(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/",Z=B.indexOf(Y),X=Z>=0?B.slice(Z+Y.length):B.replace(/^\//,"");if(X.startsWith("rpc/"))return`rpc:${X.slice(4).split("/")[0]}`;let G=X.split("/")[0]||B;return`${Q} ${G}`}function _HQ(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 lLA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=PHQ(),Z=_HQ(B),X=Date.now();try{let G=await globalThis.fetch(Q,B);return vLA({url:J,method:$,status:G.status,ok:G.ok,durationMs:Date.now()-X,source:Y,apikey:Z}),G}catch(G){throw vLA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-X,source:Y,apikey:Z,error:G}),G}}}var yLA,gLA=!1,uLA,cLA=5000;var J_=uA(()=>{yLA=new wHQ});import{platform as THQ}from"node:os";import{version as kHQ}from"node:process";function iLA(A){pLA=A}function U8(A){return{capgo_api:SHQ,"x-cli-version":O6.version,"x-cli-command":pLA,"x-cli-node":kHQ,"x-cli-os":THQ(),...A}}var SHQ="2025-10-01",pLA="";var MY=uA(()=>{QX()});var eB;var CY=uA(()=>{eB=class eB extends Error{context;constructor(A,Q){super(A);this.name="CliUserError",this.context=Q}}});import{randomUUID as nLA}from"node:crypto";import{existsSync as bHQ,mkdirSync as xHQ,readFileSync as fHQ,writeFileSync as vHQ}from"node:fs";import{homedir as b1A,platform as yHQ,release as gHQ}from"node:os";import{join as aLA}from"node:path";import{arch as hHQ,cwd as oLA,env as BO,version as uHQ}from"node:process";function kK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function lHQ(){if(kK(BO.CAPGO_DISABLE_TELEMETRY)||kK(BO.CAPGO_DISABLE_POSTHOG))return;return BO.CAPGO_CLI_POSTHOG_API_KEY?.trim()||BO.POSTHOG_API_KEY?.trim()||cHQ}function pHQ(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 iHQ(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 nHQ(A){let Q=A,B=oLA(),$=b1A();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function aHQ(A){let Q=A,B=oLA(),$=b1A();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-]+){1,}\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 oHQ(A,Q){let B=A?.split(`
|
|
70
|
+
`)},info:(A,Q)=>{v.message(A,{...Q,symbol:V0("blue",KHQ)})},success:(A,Q)=>{v.message(A,{...Q,symbol:V0("green",WHQ)})},step:(A,Q)=>{v.message(A,{...Q,symbol:V0("green",P1A)})},warn:(A,Q)=>{v.message(A,{...Q,symbol:V0("yellow",HHQ)})},warning:(A,Q)=>{v.warn(A,Q)},error:(A,Q)=>{v.message(A,{...Q,symbol:V0("red",FHQ)})}},GM0={light:z6("─","-"),heavy:z6("━","="),block:z6("█","#")},IHQ=[`${V0("dim","↑/↓")} to navigate`,`${V0("dim","Enter:")} confirm`],KM0=`${V0("gray",E4)} `});var O6;var QX=uA(()=>{O6={name:"@capgo/cli",type:"module",version:"8.34.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:"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:package-json-guard":"bun test/test-package-json-guard.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:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.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:ios-marketing-version":"bun test/test-ios-marketing-version.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:auto-bump-version && bun run test:auto-bump-ai-diff && 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:package-json-guard && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:wait-log && 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:ios-marketing-version && 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 && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","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","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},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.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.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.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",typescript:"6.0.3",ws:"^8.21.1"}}});function EHQ(A){if(A&&typeof A==="object"&&"status"in A){let Q=A.status;if(typeof Q==="number")return Q}return}function RHQ(A){if(A instanceof Error)return A.message;if(typeof A==="string")return A;return""}function B_(A){if(A&&typeof A==="object"&&"code"in A){let $=A.code;if(typeof $==="string"&&$.startsWith("commander."))return"commander"}let Q=EHQ(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=RHQ(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 xLA(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 wHQ}from"node:async_hooks";function ou(A,Q){return yLA.run(A,()=>Promise.resolve(Q()))}function PHQ(){return yLA.getStore()}function $_(){gLA=!0}function hLA(){return gLA}function mLA(A){uLA=A}function vLA(A){try{uLA?.(A)}catch{}}function dLA(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/",Z=B.indexOf(Y),X=Z>=0?B.slice(Z+Y.length):B.replace(/^\//,"");if(X.startsWith("rpc/"))return`rpc:${X.slice(4).split("/")[0]}`;let G=X.split("/")[0]||B;return`${Q} ${G}`}function _HQ(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 lLA(){return async(Q,B)=>{let $=(B?.method??"GET").toUpperCase(),J=typeof Q==="string"?Q:Q instanceof URL?Q.href:Q.url,Y=PHQ(),Z=_HQ(B),X=Date.now();try{let G=await globalThis.fetch(Q,B);return vLA({url:J,method:$,status:G.status,ok:G.ok,durationMs:Date.now()-X,source:Y,apikey:Z}),G}catch(G){throw vLA({url:J,method:$,status:0,ok:!1,durationMs:Date.now()-X,source:Y,apikey:Z,error:G}),G}}}var yLA,gLA=!1,uLA,cLA=5000;var J_=uA(()=>{yLA=new wHQ});import{platform as THQ}from"node:os";import{version as kHQ}from"node:process";function iLA(A){pLA=A}function U8(A){return{capgo_api:SHQ,"x-cli-version":O6.version,"x-cli-command":pLA,"x-cli-node":kHQ,"x-cli-os":THQ(),...A}}var SHQ="2025-10-01",pLA="";var MY=uA(()=>{QX()});var eB;var CY=uA(()=>{eB=class eB extends Error{context;constructor(A,Q){super(A);this.name="CliUserError",this.context=Q}}});import{randomUUID as nLA}from"node:crypto";import{existsSync as bHQ,mkdirSync as xHQ,readFileSync as fHQ,writeFileSync as vHQ}from"node:fs";import{homedir as b1A,platform as yHQ,release as gHQ}from"node:os";import{join as aLA}from"node:path";import{arch as hHQ,cwd as oLA,env as BO,version as uHQ}from"node:process";function kK(A){return A==="1"||A?.toLowerCase()==="true"||A?.toLowerCase()==="yes"}function lHQ(){if(kK(BO.CAPGO_DISABLE_TELEMETRY)||kK(BO.CAPGO_DISABLE_POSTHOG))return;return BO.CAPGO_CLI_POSTHOG_API_KEY?.trim()||BO.POSTHOG_API_KEY?.trim()||cHQ}function pHQ(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 iHQ(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 nHQ(A){let Q=A,B=oLA(),$=b1A();if(B)Q=Q.replaceAll(B,"<cwd>");if($)Q=Q.replaceAll($,"~");return Q}function aHQ(A){let Q=A,B=oLA(),$=b1A();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-]+){1,}\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 oHQ(A,Q){let B=A?.split(`
|
|
71
71
|
`).slice(1).map(($)=>{let J=$.trim(),Y=J.startsWith("at ")?J.slice(3):J,Z=Q,X=Y,G=Y.lastIndexOf(" (");if(G!==-1&&Y.endsWith(")"))Z=Y.slice(0,G).trim()||Q,X=Y.slice(G+2,-1);else{let F=Y.lastIndexOf(" "),U=F===-1?"":Y.slice(F+1);if(/:\d+:\d+$/.test(U))Z=Y.slice(0,F).trim()||Q,X=U}let K=X.lastIndexOf(":"),W=K===-1?-1:X.lastIndexOf(":",K-1);if(K===-1||W===-1)return{function:Q,platform:"custom",lang:"javascript"};return{function:Z,filename:nHQ(X.slice(0,W)),lineno:Number.parseInt(X.slice(W+1,K),10),colno:Number.parseInt(X.slice(K+1),10),platform:"custom",lang:"javascript"}}).filter(Boolean);return B&&B.length>0?B:[{function:Q,platform:"custom",lang:"javascript"}]}function rHQ(A){if(!A||typeof A!=="object"||!("code"in A))return;let{code:Q}=A;return typeof Q==="string"?Q:void 0}function tHQ(A){if(!A||typeof A!=="object")return;let Q=A;if(typeof Q.status==="number")return Q.status;if(typeof Q.statusCode==="number")return Q.statusCode;let B=Q.context&&typeof Q.context==="object"?Q.context.status:void 0;return typeof B==="number"?B:void 0}function eHQ(A){let Q=(A instanceof Error?A.message:typeof A==="string"?A:"").toLowerCase();if(sHQ.some((B)=>Q.includes(B)))return!0;return tHQ(A)===401}function x1A(A){if(A instanceof eB||eHQ(A))return!1;return!rHQ(A)?.startsWith("commander.")}function ru(A){let Q=[],B=A;while(B?.parent){let $=B.name();if($)Q.push($);B=B.parent}return Q.reverse().join(" ")||"unknown"}function A3Q(A=aLA(b1A(),".capgo-credentials")){if(S1A)return S1A;let Q=aLA(A,"install-id"),B;try{let $=bHQ(Q)?fHQ(Q,"utf8").trim():"";if($)B=$;else B=nLA(),xHQ(A,{recursive:!0}),vHQ(Q,B,{encoding:"utf8",mode:384})}catch{B=nLA()}return S1A=B,B}async function f1A(A){let Q=lHQ();if(!Q)return!1;let B=BO.CAPGO_CLI_POSTHOG_API_HOST?.trim()||BO.POSTHOG_API_HOST?.trim()||mHQ,$;try{$=pHQ(B)}catch{return!1}let J=iHQ(A.error),Y=aHQ(J.message),Z=A3Q(),X=oHQ(J.stack,A.functionName),G=[A.functionName,A.kind,J.name||"Error",String(A.status??1)].join(":"),K={token:Q,event:"$exception",properties:{distinct_id:Z,$exception_list:[{type:J.name||"Error",value:Y,mechanism:{handled:!0,synthetic:!1},stacktrace:{type:"raw",frames:X}}],$exception_fingerprint:G,architecture:hHQ,cli_version:O6.version,error_kind:A.kind,function_name:A.functionName,is_ci:Boolean(BO.CI),node_version:uHQ,os_platform:yHQ(),os_release:gHQ(),runtime:"cli",status:A.status},timestamp:new Date().toISOString()};try{let W=new AbortController,F=setTimeout(()=>W.abort(),dHQ);try{return(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K),signal:W.signal})).ok}finally{clearTimeout(F)}}catch{return!1}}var mHQ="https://eu.i.posthog.com/i/v0/e/",cHQ="phc_NXDyDajQaTQVwb25DEhIVZfxVUn4R0Y348Z7vWYHZUi",dHQ=1500,sHQ,S1A;var Y_=uA(()=>{QX();CY();sHQ=["invalid_apikey","invalid apikey","no_key_provided","no key provided","invalid api key or insufficient permissions","does not exist, run first"]});import{existsSync as YZ}from"fs";var C2=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,Z=`${A}/yarn.lock`,X=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(YZ(B)||YZ($))return"bun";if(YZ(J)||YZ(Y))return"pnpm";if(YZ(Z))return"yarn";if(YZ(X)||YZ(G))return"npm";return Q},CN=(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"}},rLA=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,$=`${A}/bun.lock`,J=`${A}/pnpm-lock.yaml`,Y=`${A}/shrinkwrap.yaml`,Z=`${A}/yarn.lock`,X=`${A}/package-lock.json`,G=`${A}/npm-shrinkwrap.json`;if(YZ(B)||YZ($))return"bunx";if(YZ(J)||YZ(Y))return"pnpm exec";if(YZ(Z))return"yarn dlx";if(YZ(X)||YZ(G))return"npx";return Q};var su=()=>{};function tu(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function eLA(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function eu(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 y1A(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function ZZ(A){return A.split(".").filter(Boolean).map((Q)=>{if(J3Q.test(Q)){let B=Number(Q);if(y1A(B))return B}return Q})}function JH(A){return A.split(".").filter(Boolean)}function Qm(A,Q){let B=Number(A);if(!y1A(B))throw TypeError(Q);return B}function TF(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 LN="0|[1-9]\\d*",Q3Q="\\d*[a-zA-Z-][a-zA-Z0-9-]*",B3Q,sLA,ANA,tLA="[0-9A-Za-z-]+",QNA,BNA,$NA,JNA="(?:<|>)?=?",$3Q="x|X|\\*",v1A,Am,YNA,ZNA,g1A=256,J3Q;var BX=uA(()=>{B3Q=`(?<major>${LN})\\.(?<minor>${LN})\\.(?<patch>${LN})`,sLA=`(?:${LN}|${Q3Q})`,ANA=`(?:-(?<prerelease>${sLA}(?:\\.${sLA})*))`,QNA=`(?:\\+(?<buildmetadata>${tLA}(?:\\.${tLA})*))`,BNA=`v?${B3Q}${ANA}?${QNA}?`,$NA=new RegExp(`^${BNA}$`),v1A=`${LN}|${$3Q}`,Am=`[v=\\s]*(?<major>${v1A})(?:\\.(?<minor>${v1A})(?:\\.(?<patch>${v1A})${ANA}?${QNA}?)?)?`,YNA=new RegExp(`^(?<operator>~>?|\\^|${JNA})\\s*${Am}$`),ZNA=new RegExp(`^(?<operator>${JNA})\\s*(${BNA})$|^$`);J3Q=new RegExp(`^${LN}$`)});function Q7(A,Q){if(A===Q)return 0;return tu(A.major,Q.major)||tu(A.minor,Q.minor)||tu(A.patch,Q.patch)||eLA(A.prerelease,Q.prerelease)||eu(A.prerelease,Q.prerelease)}var $G=uA(()=>{BX()});function XNA(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(eu(A.prerelease,Q.prerelease)!==0)return"prerelease"}var GNA=uA(()=>{BX()});function h1A(A){return A.toFixed(0)}function v5(A){let Q=h1A(A.major),B=h1A(A.minor),$=h1A(A.patch),J=A.prerelease?.join(".")??"",Y=A.build?.join(".")??"";return[[`${Q}.${B}.${$}`,J].filter((G)=>G).join("-"),Y].filter((G)=>G).join("+")}function Y3Q(A,Q){if(TF(Q))return!0;let B=Q7(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 Bm(A,Q){for(let B of Q)if(!Y3Q(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(TF(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 $m=uA(()=>{BX();$G()});function Z_(A,Q){return Q.some((B)=>Bm(A,B))}var X_=uA(()=>{$m()});function Z3Q(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 G_(A=[],Q){let B=Z3Q(A);if(!Q)return B;let $=ZZ(Q);if($.every((J)=>typeof J==="string")){if($.every((J,Y)=>J===B[Y])&&typeof B[$.length]==="number")return B;$=[...$,0]}return $}function L2(A,Q,B={}){let $=B.build!==void 0?JH(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:G_(A.prerelease,B.prerelease),build:$};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:G_(A.prerelease,B.prerelease),build:$};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:G_(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:G_(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:G_(A.prerelease,B.prerelease),build:$};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var KNA=uA(()=>{BX()});var Jm,NN;var K_=uA(()=>{Jm={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},NN={operator:void 0,...Jm}});var u1A=uA(()=>{K_();BX()});function m1A(A,Q){return Q7(A,Q)>0}var c1A=uA(()=>{$G()});var WNA=uA(()=>{X_();c1A()});function XZ(A,Q){return Q7(A,Q)<0}var d1A=uA(()=>{$G()});var HNA=uA(()=>{X_();d1A()});function X3Q(A){let B=A.match(ZNA)?.groups;if(!B)return null;let{operator:$}=B;return{operator:$||void 0,...Jm}}function y6(A){return!A||A.toLowerCase()==="x"||A==="*"}function G3Q(A){if(y6(A.major))return;if(y6(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(y6(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?ZZ(A.prerelease):[],build:[]}}function K3Q(A){if(y6(A.major))return;if(y6(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(y6(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:ZZ(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function W3Q(A){let Q=A.match(new RegExp(`^${Am}`)),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,X=A.slice($+Y).match(new RegExp(`^${Am}\\s*$`))?.groups,G=G3Q(B),K=K3Q(X);return[G,K].filter(Boolean)}function H3Q(A){let Q=y6(A.major),B=y6(A.minor),$=y6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[NN];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 X=ZZ(A.prerelease??"");if(J===0){if(Y===0)return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y,patch:Z+1}];return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y+1,patch:0}]}return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J+1,minor:0,patch:0}]}function F3Q(A){let Q=y6(A.major),B=y6(A.minor),$=y6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[NN];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 X=ZZ(A.prerelease??"");return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X},{operator:"<",major:J,minor:Y+1,patch:0}]}function D3Q(A){let Q=y6(A.major),B=y6(A.minor),$=y6(A.patch),J=+A.major,Y=+A.minor,Z=+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 X=ZZ(A.prerelease??""),G=JH(A.build??"");return[{operator:"<",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function U3Q(A){let Q=y6(A.minor),B=y6(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 Z=ZZ(A.prerelease??""),X=JH(A.build??"");return[{operator:"<=",major:$,minor:J,patch:Y,prerelease:Z,build:X}]}function z3Q(A){let Q=y6(A.major),B=y6(A.minor),$=y6(A.patch),J=+A.major,Y=+A.minor,Z=+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 X=ZZ(A.prerelease??""),G=JH(A.build??"");return[{operator:">",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function q3Q(A){let Q=y6(A.major),B=y6(A.minor),$=y6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[NN];if(B)return[{operator:">=",major:J,minor:0,patch:0}];if($)return[{operator:">=",major:J,minor:Y,patch:0}];let X=ZZ(A.prerelease??""),G=JH(A.build??"");return[{operator:">=",major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function I3Q(A){let Q=y6(A.major),B=y6(A.minor),$=y6(A.patch),J=+A.major,Y=+A.minor,Z=+A.patch;if(Q)return[NN];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 X=ZZ(A.prerelease??""),G=JH(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:J,minor:Y,patch:Z,prerelease:X,build:G}]}function O3Q(A){let Q=A.match(YNA)?.groups;if(!Q)return X3Q(A);switch(Q.operator){case"^":return H3Q(Q);case"~":case"~>":return F3Q(Q);case"<":return D3Q(Q);case"<=":return U3Q(Q);case">":return z3Q(Q);case">=":return q3Q(Q);default:return I3Q(Q)}}function M3Q(A){return A.split(/\s+/).flatMap(O3Q)}function Ym(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>W3Q(B)||M3Q(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var l1A=uA(()=>{BX();K_()});function U1(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>g1A)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${g1A}`);A=A.trim();let Q=A.match($NA)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=Qm(Q.major,`Cannot parse version ${A}: invalid major version`),$=Qm(Q.minor,`Cannot parse version ${A}: invalid minor version`),J=Qm(Q.patch,`Cannot parse version ${A}: invalid patch version`),Y=Q.prerelease?ZZ(Q.prerelease):[],Z=Q.buildmetadata?JH(Q.buildmetadata):[];return{major:B,minor:$,patch:J,prerelease:Y,build:Z}}var Zm=uA(()=>{BX();BX()});function FNA(A,Q){let B=A.operator,$=Q.operator;if(B===void 0){if(TF(A))return!0;return Z_(A,[[Q]])}if($===void 0){if(TF(Q))return!0;return Z_(Q,[[A]])}let J=Q7(A,Q);return(B===">="||B===">")&&($===">="||$===">")||(B==="<="||B==="<")&&($==="<="||$==="<")||J===0&&((B===">="||B==="<=")&&($===">="||$==="<="))||J===-1&&(B===">="||B===">")&&($==="<="||$==="<")||J===1&&(B==="<="||B==="<")&&($===">="||$===">")}function C3Q(A){return A.every((Q)=>{return Q.some((B)=>L3Q(B))})}function L3Q(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let $ of A.slice(Q+1))if(!FNA(B,$))return!1}return!0}function DNA(A,Q){return C3Q([A,Q])&&A.some((B)=>{return Q.some(($)=>{return B.every((J)=>{return $.every((Y)=>FNA(J,Y))})})})}var UNA=uA(()=>{BX();$G();X_()});var zNA=uA(()=>{l1A()});var qNA=uA(()=>{K_();K_();u1A()});function W_(A){try{return U1(A),!0}catch{return!1}}var INA=uA(()=>{Zm()});var ONA=uA(()=>{Zm()});var MNA=uA(()=>{BX()});var CNA=uA(()=>{$G()});var LNA=uA(()=>{$G()});var NNA=uA(()=>{$m();BX();$G()});function p1A(A,Q){return Q7(A,Q)>=0}var VNA=uA(()=>{$G()});var ENA=uA(()=>{$m();BX();$G()});var RNA=uA(()=>{$G()});var SK=uA(()=>{$G();GNA();X_();KNA();u1A();WNA();HNA();l1A();Zm();UNA();zNA();qNA();INA();ONA();MNA();CNA();LNA();c1A();NNA();VNA();d1A();ENA();RNA()});var GZ=DA((iL0,Km)=>{var jNA,wNA,PNA,_NA,TNA,kNA,SNA,bNA,xNA,fNA,vNA,yNA,gNA,Xm,i1A,hNA,uNA,mNA,VN,cNA,dNA,lNA,pNA,iNA,nNA,aNA,oNA,rNA,Gm,sNA,tNA,eNA;(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 Km==="object"&&typeof iL0==="object")A(B(Q,B(iL0)));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,Z){return $[Y]=J?J(Y,Z):Z}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,Z){Y.__proto__=Z}||function(Y,Z){for(var X in Z)if(Object.prototype.hasOwnProperty.call(Z,X))Y[X]=Z[X]};jNA=function(Y,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Class extends value "+String(Z)+" is not a constructor or null");Q(Y,Z);function X(){this.constructor=Y}Y.prototype=Z===null?Object.create(Z):(X.prototype=Z.prototype,new X)},wNA=Object.assign||function(Y){for(var Z,X=1,G=arguments.length;X<G;X++){Z=arguments[X];for(var K in Z)if(Object.prototype.hasOwnProperty.call(Z,K))Y[K]=Z[K]}return Y},PNA=function(Y,Z){var X={};for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G)&&Z.indexOf(G)<0)X[G]=Y[G];if(Y!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var K=0,G=Object.getOwnPropertySymbols(Y);K<G.length;K++)if(Z.indexOf(G[K])<0&&Object.prototype.propertyIsEnumerable.call(Y,G[K]))X[G[K]]=Y[G[K]]}return X},_NA=function(Y,Z,X,G){var K=arguments.length,W=K<3?Z:G===null?G=Object.getOwnPropertyDescriptor(Z,X):G,F;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")W=Reflect.decorate(Y,Z,X,G);else for(var U=Y.length-1;U>=0;U--)if(F=Y[U])W=(K<3?F(W):K>3?F(Z,X,W):F(Z,X))||W;return K>3&&W&&Object.defineProperty(Z,X,W),W},TNA=function(Y,Z){return function(X,G){Z(X,G,Y)}},kNA=function(Y,Z,X,G,K,W){function F(j){if(j!==void 0&&typeof j!=="function")throw TypeError("Function expected");return j}var U=G.kind,z=U==="getter"?"get":U==="setter"?"set":"value",q=!Z&&Y?G.static?Y:Y.prototype:null,I=Z||(q?Object.getOwnPropertyDescriptor(q,G.name):{}),O,N=!1;for(var V=X.length-1;V>=0;V--){var C={};for(var L in G)C[L]=L==="access"?{}:G[L];for(var L in G.access)C.access[L]=G.access[L];C.addInitializer=function(j){if(N)throw TypeError("Cannot add initializers after decoration has completed");W.push(F(j||null))};var R=(0,X[V])(U==="accessor"?{get:I.get,set:I.set}:I[z],C);if(U==="accessor"){if(R===void 0)continue;if(R===null||typeof R!=="object")throw TypeError("Object expected");if(O=F(R.get))I.get=O;if(O=F(R.set))I.set=O;if(O=F(R.init))K.unshift(O)}else if(O=F(R))if(U==="field")K.unshift(O);else I[z]=O}if(q)Object.defineProperty(q,G.name,I);N=!0},SNA=function(Y,Z,X){var G=arguments.length>2;for(var K=0;K<Z.length;K++)X=G?Z[K].call(Y,X):Z[K].call(Y);return G?X:void 0},bNA=function(Y){return typeof Y==="symbol"?Y:"".concat(Y)},xNA=function(Y,Z,X){if(typeof Z==="symbol")Z=Z.description?"[".concat(Z.description,"]"):"";return Object.defineProperty(Y,"name",{configurable:!0,value:X?"".concat(X," ",Z):Z})},fNA=function(Y,Z){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(Y,Z)},vNA=function(Y,Z,X,G){function K(W){return W instanceof X?W:new X(function(F){F(W)})}return new(X||(X=Promise))(function(W,F){function U(I){try{q(G.next(I))}catch(O){F(O)}}function z(I){try{q(G.throw(I))}catch(O){F(O)}}function q(I){I.done?W(I.value):K(I.value).then(U,z)}q((G=G.apply(Y,Z||[])).next())})},yNA=function(Y,Z){var X={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},G,K,W,F=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return F.next=U(0),F.throw=U(1),F.return=U(2),typeof Symbol==="function"&&(F[Symbol.iterator]=function(){return this}),F;function U(q){return function(I){return z([q,I])}}function z(q){if(G)throw TypeError("Generator is already executing.");while(F&&(F=0,q[0]&&(X=0)),X)try{if(G=1,K&&(W=q[0]&2?K.return:q[0]?K.throw||((W=K.return)&&W.call(K),0):K.next)&&!(W=W.call(K,q[1])).done)return W;if(K=0,W)q=[q[0]&2,W.value];switch(q[0]){case 0:case 1:W=q;break;case 4:return X.label++,{value:q[1],done:!1};case 5:X.label++,K=q[1],q=[0];continue;case 7:q=X.ops.pop(),X.trys.pop();continue;default:if((W=X.trys,!(W=W.length>0&&W[W.length-1]))&&(q[0]===6||q[0]===2)){X=0;continue}if(q[0]===3&&(!W||q[1]>W[0]&&q[1]<W[3])){X.label=q[1];break}if(q[0]===6&&X.label<W[1]){X.label=W[1],W=q;break}if(W&&X.label<W[2]){X.label=W[2],X.ops.push(q);break}if(W[2])X.ops.pop();X.trys.pop();continue}q=Z.call(Y,X)}catch(I){q=[6,I],K=0}finally{G=W=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},gNA=function(Y,Z){for(var X in Y)if(X!=="default"&&!Object.prototype.hasOwnProperty.call(Z,X))Gm(Z,Y,X)},Gm=Object.create?function(Y,Z,X,G){if(G===void 0)G=X;var K=Object.getOwnPropertyDescriptor(Z,X);if(!K||("get"in K?!Z.__esModule:K.writable||K.configurable))K={enumerable:!0,get:function(){return Z[X]}};Object.defineProperty(Y,G,K)}:function(Y,Z,X,G){if(G===void 0)G=X;Y[G]=Z[X]},Xm=function(Y){var Z=typeof Symbol==="function"&&Symbol.iterator,X=Z&&Y[Z],G=0;if(X)return X.call(Y);if(Y&&typeof Y.length==="number")return{next:function(){if(Y&&G>=Y.length)Y=void 0;return{value:Y&&Y[G++],done:!Y}}};throw TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")},i1A=function(Y,Z){var X=typeof Symbol==="function"&&Y[Symbol.iterator];if(!X)return Y;var G=X.call(Y),K,W=[],F;try{while((Z===void 0||Z-- >0)&&!(K=G.next()).done)W.push(K.value)}catch(U){F={error:U}}finally{try{if(K&&!K.done&&(X=G.return))X.call(G)}finally{if(F)throw F.error}}return W},hNA=function(){for(var Y=[],Z=0;Z<arguments.length;Z++)Y=Y.concat(i1A(arguments[Z]));return Y},uNA=function(){for(var Y=0,Z=0,X=arguments.length;Z<X;Z++)Y+=arguments[Z].length;for(var G=Array(Y),K=0,Z=0;Z<X;Z++)for(var W=arguments[Z],F=0,U=W.length;F<U;F++,K++)G[K]=W[F];return G},mNA=function(Y,Z,X){if(X||arguments.length===2){for(var G=0,K=Z.length,W;G<K;G++)if(W||!(G in Z)){if(!W)W=Array.prototype.slice.call(Z,0,G);W[G]=Z[G]}}return Y.concat(W||Array.prototype.slice.call(Z))},VN=function(Y){return this instanceof VN?(this.v=Y,this):new VN(Y)},cNA=function(Y,Z,X){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var G=X.apply(Y,Z||[]),K,W=[];return K=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),U("next"),U("throw"),U("return",F),K[Symbol.asyncIterator]=function(){return this},K;function F(V){return function(C){return Promise.resolve(C).then(V,O)}}function U(V,C){if(G[V]){if(K[V]=function(L){return new Promise(function(R,j){W.push([V,L,R,j])>1||z(V,L)})},C)K[V]=C(K[V])}}function z(V,C){try{q(G[V](C))}catch(L){N(W[0][3],L)}}function q(V){V.value instanceof VN?Promise.resolve(V.value.v).then(I,O):N(W[0][2],V)}function I(V){z("next",V)}function O(V){z("throw",V)}function N(V,C){if(V(C),W.shift(),W.length)z(W[0][0],W[0][1])}},dNA=function(Y){var Z,X;return Z={},G("next"),G("throw",function(K){throw K}),G("return"),Z[Symbol.iterator]=function(){return this},Z;function G(K,W){Z[K]=Y[K]?function(F){return(X=!X)?{value:VN(Y[K](F)),done:!1}:W?W(F):F}:W}},lNA=function(Y){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Z=Y[Symbol.asyncIterator],X;return Z?Z.call(Y):(Y=typeof Xm==="function"?Xm(Y):Y[Symbol.iterator](),X={},G("next"),G("throw"),G("return"),X[Symbol.asyncIterator]=function(){return this},X);function G(W){X[W]=Y[W]&&function(F){return new Promise(function(U,z){F=Y[W](F),K(U,z,F.done,F.value)})}}function K(W,F,U,z){Promise.resolve(z).then(function(q){W({value:q,done:U})},F)}},pNA=function(Y,Z){if(Object.defineProperty)Object.defineProperty(Y,"raw",{value:Z});else Y.raw=Z;return Y};var B=Object.create?function(Y,Z){Object.defineProperty(Y,"default",{enumerable:!0,value:Z})}:function(Y,Z){Y.default=Z},$=function(Y){return $=Object.getOwnPropertyNames||function(Z){var X=[];for(var G in Z)if(Object.prototype.hasOwnProperty.call(Z,G))X[X.length]=G;return X},$(Y)};iNA=function(Y){if(Y&&Y.__esModule)return Y;var Z={};if(Y!=null){for(var X=$(Y),G=0;G<X.length;G++)if(X[G]!=="default")Gm(Z,Y,X[G])}return B(Z,Y),Z},nNA=function(Y){return Y&&Y.__esModule?Y:{default:Y}},aNA=function(Y,Z,X,G){if(X==="a"&&!G)throw TypeError("Private accessor was defined without a getter");if(typeof Z==="function"?Y!==Z||!G:!Z.has(Y))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?G:X==="a"?G.call(Y):G?G.value:Z.get(Y)},oNA=function(Y,Z,X,G,K){if(G==="m")throw TypeError("Private method is not writable");if(G==="a"&&!K)throw TypeError("Private accessor was defined without a setter");if(typeof Z==="function"?Y!==Z||!K:!Z.has(Y))throw TypeError("Cannot write private member to an object whose class did not declare it");return G==="a"?K.call(Y,X):K?K.value=X:Z.set(Y,X),X},rNA=function(Y,Z){if(Z===null||typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof Y==="function"?Z===Y:Y.has(Z)},sNA=function(Y,Z,X){if(Z!==null&&Z!==void 0){if(typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Object expected.");var G,K;if(X){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");G=Z[Symbol.asyncDispose]}if(G===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(G=Z[Symbol.dispose],X)K=G}if(typeof G!=="function")throw TypeError("Object not disposable.");if(K)G=function(){try{K.call(this)}catch(W){return Promise.reject(W)}};Y.stack.push({value:Z,dispose:G,async:X})}else if(X)Y.stack.push({async:!0});return Z};var J=typeof SuppressedError==="function"?SuppressedError:function(Y,Z,X){var G=Error(X);return G.name="SuppressedError",G.error=Y,G.suppressed=Z,G};tNA=function(Y){function Z(W){Y.error=Y.hasError?new J(W,Y.error,"An error was suppressed during disposal."):W,Y.hasError=!0}var X,G=0;function K(){while(X=Y.stack.pop())try{if(!X.async&&G===1)return G=0,Y.stack.push(X),Promise.resolve().then(K);if(X.dispose){var W=X.dispose.call(X.value);if(X.async)return G|=2,Promise.resolve(W).then(K,function(F){return Z(F),K()})}else G|=1}catch(F){Z(F)}if(G===1)return Y.hasError?Promise.reject(Y.error):Promise.resolve();if(Y.hasError)throw Y.error}return K()},eNA=function(Y,Z){if(typeof Y==="string"&&/^\.\.?\//.test(Y))return Y.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(X,G,K,W,F){return G?Z?".jsx":".js":K&&(!W||!F)?X:K+W+"."+F.toLowerCase()+"js"});return Y},A("__extends",jNA),A("__assign",wNA),A("__rest",PNA),A("__decorate",_NA),A("__param",TNA),A("__esDecorate",kNA),A("__runInitializers",SNA),A("__propKey",bNA),A("__setFunctionName",xNA),A("__metadata",fNA),A("__awaiter",vNA),A("__generator",yNA),A("__exportStar",gNA),A("__createBinding",Gm),A("__values",Xm),A("__read",i1A),A("__spread",hNA),A("__spreadArrays",uNA),A("__spreadArray",mNA),A("__await",VN),A("__asyncGenerator",cNA),A("__asyncDelegator",dNA),A("__asyncValues",lNA),A("__makeTemplateObject",pNA),A("__importStar",iNA),A("__importDefault",nNA),A("__classPrivateFieldGet",aNA),A("__classPrivateFieldSet",oNA),A("__classPrivateFieldIn",rNA),A("__addDisposableResource",sNA),A("__disposeResources",tNA),A("__rewriteRelativeImportExtension",eNA)})});var BVA=DA((AVA)=>{Object.defineProperty(AVA,"__esModule",{value:!0});AVA.resolveFetch=void 0;var N3Q=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};AVA.resolveFetch=N3Q});var n1A=DA((XVA)=>{Object.defineProperty(XVA,"__esModule",{value:!0});XVA.FunctionRegion=XVA.FunctionsHttpError=XVA.FunctionsRelayError=XVA.FunctionsFetchError=XVA.FunctionsError=void 0;class H_ 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}}}XVA.FunctionsError=H_;class JVA extends H_{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}XVA.FunctionsFetchError=JVA;class YVA extends H_{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}XVA.FunctionsRelayError=YVA;class ZVA extends H_{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}XVA.FunctionsHttpError=ZVA;var $VA;(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"})($VA||(XVA.FunctionRegion=$VA={}))});var FVA=DA((WVA)=>{Object.defineProperty(WVA,"__esModule",{value:!0});WVA.FunctionsClient=void 0;var w3Q=GZ(),P3Q=BVA(),EN=n1A();class KVA{constructor(A,{headers:Q={},customFetch:B,region:$=EN.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=$,this.fetch=(0,P3Q.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return w3Q.__awaiter(this,arguments,void 0,function*(Q,B={}){var $,J;let Y,Z,X;try{let{headers:G,method:K,body:W,signal:F,timeout:U}=B,z={},{region:q}=B;if(!q)q=this.region;let I=new URL(`${this.url}/${Q}`);if(q&&q!=="any")z["x-region"]=q,I.searchParams.set("forceFunctionRegion",q);let O,N=!!G&&Object.keys(G).some((w)=>w.toLowerCase()==="content-type");if(W&&!N)if(typeof Blob<"u"&&W instanceof Blob||W instanceof ArrayBuffer)z["Content-Type"]="application/octet-stream",O=W;else if(typeof W==="string")z["Content-Type"]="text/plain",O=W;else if(typeof FormData<"u"&&W instanceof FormData)O=W;else z["Content-Type"]="application/json",O=JSON.stringify(W);else if(W&&typeof W!=="string"&&!(typeof Blob<"u"&&W instanceof Blob)&&!(W instanceof ArrayBuffer)&&!(typeof FormData<"u"&&W instanceof FormData))O=JSON.stringify(W);else O=W;let V=F;if(U)if(Z=new AbortController,Y=setTimeout(()=>Z.abort(),U),F)V=Z.signal,X=()=>Z.abort(),F.addEventListener("abort",X);else V=Z.signal;let C=yield this.fetch(I.toString(),{method:K||"POST",headers:Object.assign(Object.assign(Object.assign({},z),this.headers),G),body:O,signal:V}).catch((w)=>{throw new EN.FunctionsFetchError(w)}),L=C.headers.get("x-relay-error");if(L&&L==="true")throw new EN.FunctionsRelayError(C);if(!C.ok)throw new EN.FunctionsHttpError(C);let R=(($=C.headers.get("Content-Type"))!==null&&$!==void 0?$:"text/plain").split(";")[0].trim().toLowerCase(),j;if(R==="application/json")j=yield C.json();else if(R==="application/octet-stream"||R==="application/pdf")j=yield C.blob();else if(R==="text/event-stream")j=C;else if(R==="multipart/form-data")j=yield C.formData();else j=yield C.text();return{data:j,error:null,response:C}}catch(G){return{data:null,error:G,response:G instanceof EN.FunctionsHttpError||G instanceof EN.FunctionsRelayError?G.context:void 0}}finally{if(Y)clearTimeout(Y);if(X)(J=B.signal)===null||J===void 0||J.removeEventListener("abort",X)}})}}WVA.FunctionsClient=KVA});var DVA=DA((N2)=>{Object.defineProperty(N2,"__esModule",{value:!0});N2.FunctionRegion=N2.FunctionsRelayError=N2.FunctionsHttpError=N2.FunctionsFetchError=N2.FunctionsError=N2.FunctionsClient=void 0;var _3Q=FVA();Object.defineProperty(N2,"FunctionsClient",{enumerable:!0,get:function(){return _3Q.FunctionsClient}});var F_=n1A();Object.defineProperty(N2,"FunctionsError",{enumerable:!0,get:function(){return F_.FunctionsError}});Object.defineProperty(N2,"FunctionsFetchError",{enumerable:!0,get:function(){return F_.FunctionsFetchError}});Object.defineProperty(N2,"FunctionsHttpError",{enumerable:!0,get:function(){return F_.FunctionsHttpError}});Object.defineProperty(N2,"FunctionsRelayError",{enumerable:!0,get:function(){return F_.FunctionsRelayError}});Object.defineProperty(N2,"FunctionRegion",{enumerable:!0,get:function(){return F_.FunctionRegion}})});function zVA(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 S3Q(A,Q,B,$){if(!$||B>=3)return!1;if(!OVA.includes(A))return!1;if(!k3Q.includes(Q))return!1;return!0}function D_(A){return D_=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},D_(A)}function v3Q(A,Q){if(D_(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var $=B.call(A,Q||"default");if(D_($)!="object")return $;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function y3Q(A){var Q=v3Q(A,"string");return D_(Q)=="symbol"?Q:Q+""}function g3Q(A,Q,B){return(Q=y3Q(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function IVA(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 Wm(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?IVA(Object(B),!0).forEach(function($){g3Q(A,$,B[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):IVA(Object(B)).forEach(function($){Object.defineProperty(A,$,Object.getOwnPropertyDescriptor(B,$))})}return A}var UVA=(A)=>Math.min(1000*2**A,30000),k3Q,OVA,a1A,b3Q=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 Z=this.headers.get("Accept");if(Z==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!Z||Z==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let $=this.fetch,Y=(async()=>{let Z=0;while(!0){let K={};if(B.headers.forEach((F,U)=>{K[U]=F}),Z>0)K["X-Retry-Count"]=String(Z);let W;try{W=await $(B.url.toString(),{method:B.method,headers:K,body:JSON.stringify(B.body,(F,U)=>typeof U==="bigint"?U.toString():U),signal:B.signal})}catch(F){if((F===null||F===void 0?void 0:F.name)==="AbortError"||(F===null||F===void 0?void 0:F.code)==="ABORT_ERR")throw F;if(!OVA.includes(B.method))throw F;if(B.retryEnabled&&Z<3){let U=UVA(Z);Z++,await zVA(U,B.signal);continue}throw F}if(S3Q(B.method,W.status,Z,B.retryEnabled)){var X,G;let F=(X=(G=W.headers)===null||G===void 0?void 0:G.get("Retry-After"))!==null&&X!==void 0?X:null,U=F!==null?Math.max(0,parseInt(F,10)||0)*1000:UVA(Z);await W.text(),Z++,await zVA(U,B.signal);continue}return await B.processResponse(W)}})();if(!this.shouldThrowOnError)Y=Y.catch((Z)=>{var X;let G="",K="",W="",F=Z===null||Z===void 0?void 0:Z.cause;if(F){var U,z,q,I;let V=(U=F===null||F===void 0?void 0:F.message)!==null&&U!==void 0?U:"",C=(z=F===null||F===void 0?void 0:F.code)!==null&&z!==void 0?z:"";if(G=`${(q=Z===null||Z===void 0?void 0:Z.name)!==null&&q!==void 0?q:"FetchError"}: ${Z===null||Z===void 0?void 0:Z.message}`,G+=`
|
|
72
72
|
|
|
73
73
|
Caused by: ${(I=F===null||F===void 0?void 0:F.name)!==null&&I!==void 0?I:"Error"}: ${V}`,C)G+=` (${C})`;if(F===null||F===void 0?void 0:F.stack)G+=`
|
package/dist/package.json
CHANGED
package/dist/src/app/list.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function listAppInternal(options: OptionsBase, silent?: boolean):
|
|
|
22
22
|
rollout_paused_version_names: string[];
|
|
23
23
|
name: string | null;
|
|
24
24
|
need_onboarding: boolean;
|
|
25
|
+
onboarding: import("../types/supabase.types").Json;
|
|
25
26
|
onboarding_completed_at: string | null;
|
|
26
27
|
owner_org: string;
|
|
27
28
|
retention: number;
|
|
@@ -54,6 +55,7 @@ export declare function listApp(options: OptionsBase, silent?: boolean): Promise
|
|
|
54
55
|
rollout_paused_version_names: string[];
|
|
55
56
|
name: string | null;
|
|
56
57
|
need_onboarding: boolean;
|
|
58
|
+
onboarding: import("../types/supabase.types").Json;
|
|
57
59
|
onboarding_completed_at: string | null;
|
|
58
60
|
owner_org: string;
|
|
59
61
|
retention: number;
|
package/dist/src/sdk.js
CHANGED
|
@@ -64,7 +64,7 @@ ${F}
|
|
|
64
64
|
`}}}}).prompt();var Z1=t(()=>{sL();sL();dL();hL();SZ=A1(w$(),1);eL=eM0(),Dw0=$$("◆","*"),wy=$$("■","x"),By=$$("▲","x"),DM=$$("◇","o"),Jw0=$$("┌","T"),u1=$$("│","|"),c9=$$("└","—"),bM1=$$("┐","T"),gM1=$$("┘","—"),$M=$$("●",">"),Uq=$$("○"," "),mM1=$$("◻","[•]"),dM1=$$("◼","[+]"),cM1=$$("◻","[ ]"),Qw0=$$("▪","•"),lM1=$$("─","-"),nM1=$$("╮","+"),pM1=$$("├","+"),iM1=$$("╯","+"),rM1=$$("╰","+"),oM1=$$("╭","+"),Xw0=$$("●","•"),Yw0=$$("◆","*"),Zw0=$$("▲","!"),Fw0=$$("■","x");aM1=[`${w0("dim","↑/↓")} to navigate`,`${w0("dim","Space:")} select`,`${w0("dim","Enter:")} confirm`],P={message:($=[],{symbol:D=w0("gray",u1),secondarySymbol:J=w0("gray",u1),output:Q=process.stdout,spacing:X=1,withGuide:Y}={})=>{let Z=[],F=Y??GD.withGuide,G=F?J:"",U=F?`${D} `:"",q=F?`${J} `:"";for(let z=0;z<X;z++)Z.push(G);let W=Array.isArray($)?$:$.split(`
|
|
65
65
|
`);if(W.length>0){let[z,...H]=W;z.length>0?Z.push(`${U}${z}`):Z.push(F?D:"");for(let K of H)K.length>0?Z.push(`${q}${K}`):Z.push(F?J:"")}Q.write(`${Z.join(`
|
|
66
66
|
`)}
|
|
67
|
-
`)},info:($,D)=>{P.message($,{...D,symbol:w0("blue",Xw0)})},success:($,D)=>{P.message($,{...D,symbol:w0("green",Yw0)})},step:($,D)=>{P.message($,{...D,symbol:w0("green",DM)})},warn:($,D)=>{P.message($,{...D,symbol:w0("yellow",Zw0)})},warning:($,D)=>{P.warn($,D)},error:($,D)=>{P.message($,{...D,symbol:w0("red",Fw0)})}},tM1={light:$$("─","-"),heavy:$$("━","="),block:$$("█","#")},zw0=[`${w0("dim","↑/↓")} to navigate`,`${w0("dim","Enter:")} confirm`],sM1=`${w0("gray",u1)} `});var JD;var J8=t(()=>{JD={name:"@capgo/cli",type:"module",version:"8.33.5",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:package-json-guard":"bun test/test-package-json-guard.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:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.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:ios-marketing-version":"bun test/test-ios-marketing-version.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:auto-bump-version && bun run test:auto-bump-ai-diff && 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:package-json-guard && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:wait-log && 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:ios-marketing-version && 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 && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","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","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},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.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.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.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",typescript:"6.0.3",ws:"^8.21.1"}}});import{platform as Kw0}from"node:os";import{version as Vw0}from"node:process";function f1($){return{capgo_api:Ow0,"x-cli-version":JD.version,"x-cli-command":Nw0,"x-cli-node":Vw0,"x-cli-os":Kw0(),...$}}var Ow0="2025-10-01",Nw0="";var _6=t(()=>{J8()});import{existsSync as K6}from"fs";var xZ=($=".",D="unknown")=>{let J=`${$}/bun.lockb`,Q=`${$}/bun.lock`,X=`${$}/pnpm-lock.yaml`,Y=`${$}/shrinkwrap.yaml`,Z=`${$}/yarn.lock`,F=`${$}/package-lock.json`,G=`${$}/npm-shrinkwrap.json`;if(K6(J)||K6(Q))return"bun";if(K6(X)||K6(Y))return"pnpm";if(K6(Z))return"yarn";if(K6(F)||K6(G))return"npm";return D},Wq=($=xZ(),D=!1)=>{switch($){case"bun":return D?"bun install":"install";case"pnpm":return D?"pnpm install":"install";case"yarn":return D?"yarn install":"install";case"npm":return D?"npm install":"install";case"unknown":return D?"unknown unknown":"unknown";default:return D?"npm install":"install"}},Ey=($=".",D="npx")=>{let J=`${$}/bun.lockb`,Q=`${$}/bun.lock`,X=`${$}/pnpm-lock.yaml`,Y=`${$}/shrinkwrap.yaml`,Z=`${$}/yarn.lock`,F=`${$}/package-lock.json`,G=`${$}/npm-shrinkwrap.json`;if(K6(J)||K6(Q))return"bunx";if(K6(X)||K6(Y))return"pnpm exec";if(K6(Z))return"yarn dlx";if(K6(F)||K6(G))return"npx";return D};var Ay=()=>{};function zq($,D){if(isNaN($)||isNaN(D))throw Error("Cannot compare against non-numbers");return $===D?0:$<D?-1:1}function Ty($=[],D=[]){if($.length&&!D.length)return-1;if(!$.length&&D.length)return 1;return 0}function QM($=[],D=[]){let J=Math.max($.length,D.length);for(let Q=0;Q<J;Q++){let X=$[Q],Y=D[Q];if(X===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(X===void 0)return-1;if(typeof X==="string"&&typeof Y==="number")return 1;if(typeof X==="number"&&typeof Y==="string")return-1;if(X<Y)return-1;if(X>Y)return 1}return 0}function XM($){return typeof $==="number"&&!Number.isNaN($)&&(!Number.isFinite($)||0<=$&&$<=Number.MAX_SAFE_INTEGER)}function V6($){return $.split(".").filter(Boolean).map((D)=>{if(Bw0.test(D)){let J=Number(D);if(XM(J))return J}return D})}function Q8($){return $.split(".").filter(Boolean)}function Kq($,D){let J=Number($);if(!XM(J))throw TypeError(D);return J}function e8($){return Number.isNaN($.major)&&Number.isNaN($.minor)&&Number.isNaN($.patch)&&($.prerelease===void 0||$.prerelease.length===0)&&($.build===void 0||$.build.length===0)}var JQ="0|[1-9]\\d*",Lw0="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Mw0,jy,Cy,Iy="[0-9A-Za-z-]+",Py,Sy,xy,vy="(?:<|>)?=?",ww0="x|X|\\*",JM,Hq,_y,ky,YM=256,Bw0;var k6=t(()=>{Mw0=`(?<major>${JQ})\\.(?<minor>${JQ})\\.(?<patch>${JQ})`,jy=`(?:${JQ}|${Lw0})`,Cy=`(?:-(?<prerelease>${jy}(?:\\.${jy})*))`,Py=`(?:\\+(?<buildmetadata>${Iy}(?:\\.${Iy})*))`,Sy=`v?${Mw0}${Cy}?${Py}?`,xy=new RegExp(`^${Sy}$`),JM=`${JQ}|${ww0}`,Hq=`[v=\\s]*(?<major>${JM})(?:\\.(?<minor>${JM})(?:\\.(?<patch>${JM})${Cy}?${Py}?)?)?`,_y=new RegExp(`^(?<operator>~>?|\\^|${vy})\\s*${Hq}$`),ky=new RegExp(`^(?<operator>${vy})\\s*(${Sy})$|^$`);Bw0=new RegExp(`^${JQ}$`)});function dD($,D){if($===D)return 0;return zq($.major,D.major)||zq($.minor,D.minor)||zq($.patch,D.patch)||Ty($.prerelease,D.prerelease)||QM($.prerelease,D.prerelease)}var a6=t(()=>{k6()});var yy=t(()=>{k6()});function ZM($){return $.toFixed(0)}function S4($){let D=ZM($.major),J=ZM($.minor),Q=ZM($.patch),X=$.prerelease?.join(".")??"",Y=$.build?.join(".")??"";return[[`${D}.${J}.${Q}`,X].filter((G)=>G).join("-"),Y].filter((G)=>G).join("+")}function Rw0($,D){if(e8(D))return!0;let J=dD($,D);switch(D.operator){case"=":case void 0:return J===0;case"!=":return J!==0;case">":return J>0;case"<":return J<0;case">=":return J>=0;case"<=":return J<=0}}function Vq($,D){for(let J of D)if(!Rw0($,J))return!1;if(!$.prerelease?.length)return!0;for(let J of D){if(e8(J))continue;if(!J.prerelease?.length)continue;let{major:Q,minor:X,patch:Y}=J;if($.major===Q&&$.minor===X&&$.patch===Y)return!0}return!1}var Oq=t(()=>{k6();a6()});function vZ($,D){return D.some((J)=>Vq($,J))}var _Z=t(()=>{Oq()});function Ew0($=[]){let D=[...$],J=D.length;while(J>=0){let Q=D[J];if(typeof Q==="number"){D[J]=Q+1;break}J-=1}if(J===-1)D.push(0);return D}function kZ($=[],D){let J=Ew0($);if(!D)return J;let Q=V6(D);if(Q.every((X)=>typeof X==="string")){if(Q.every((X,Y)=>X===J[Y])&&typeof J[Q.length]==="number")return J;Q=[...Q,0]}return Q}function yZ($,D,J={}){let Q=J.build!==void 0?Q8(J.build):$.build??[];switch(D){case"premajor":return{major:$.major+1,minor:0,patch:0,prerelease:kZ($.prerelease,J.prerelease),build:Q};case"preminor":return{major:$.major,minor:$.minor+1,patch:0,prerelease:kZ($.prerelease,J.prerelease),build:Q};case"prepatch":return{major:$.major,minor:$.minor,patch:$.patch+1,prerelease:kZ($.prerelease,J.prerelease),build:Q};case"prerelease":{let Y=($.prerelease??[]).length===0?$.patch+1:$.patch;return{major:$.major,minor:$.minor,patch:Y,prerelease:kZ($.prerelease,J.prerelease),build:Q}}case"major":return{major:($.prerelease??[]).length===0||$.minor!==0||$.patch!==0?$.major+1:$.major,minor:0,patch:0,prerelease:[],build:Q};case"minor":{let Y=($.prerelease??[]).length===0||$.patch!==0?$.minor+1:$.minor;return{major:$.major,minor:Y,patch:0,prerelease:[],build:Q}}case"patch":{let Y=($.prerelease??[]).length===0?$.patch+1:$.patch;return{major:$.major,minor:$.minor,patch:Y,prerelease:[],build:Q}}case"pre":return{major:$.major,minor:$.minor,patch:$.patch,prerelease:kZ($.prerelease,J.prerelease),build:Q};default:throw TypeError(`Cannot increment version: invalid argument ${D}`)}}var uy=t(()=>{k6()});var Nq,QQ;var uZ=t(()=>{Nq={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},QQ={operator:void 0,...Nq}});var FM=t(()=>{uZ();k6()});function GM($,D){return dD($,D)>0}var UM=t(()=>{a6()});var fy=t(()=>{_Z();UM()});function zJ($,D){return dD($,D)<0}var qM=t(()=>{a6()});var hy=t(()=>{_Z();qM()});function Aw0($){let J=$.match(ky)?.groups;if(!J)return null;let{operator:Q}=J;return{operator:Q||void 0,...Nq}}function U$($){return!$||$.toLowerCase()==="x"||$==="*"}function jw0($){if(U$($.major))return;if(U$($.minor))return{operator:">=",major:+$.major,minor:0,patch:0,prerelease:[],build:[]};if(U$($.patch))return{operator:">=",major:+$.major,minor:+$.minor,patch:0,prerelease:[],build:[]};return{operator:">=",major:+$.major,minor:+$.minor,patch:+$.patch,prerelease:$.prerelease?V6($.prerelease):[],build:[]}}function Iw0($){if(U$($.major))return;if(U$($.minor))return{operator:"<",major:+$.major+1,minor:0,patch:0,prerelease:[],build:[]};if(U$($.patch))return{operator:"<",major:+$.major,minor:+$.minor+1,patch:0,prerelease:[],build:[]};if($.prerelease)return{operator:"<=",major:+$.major,minor:+$.minor,patch:+$.patch,prerelease:V6($.prerelease),build:[]};return{operator:"<=",major:+$.major,minor:+$.minor,patch:+$.patch,prerelease:[],build:[]}}function Tw0($){let D=$.match(new RegExp(`^${Hq}`)),J=D?.groups;if(!J)return null;let Q=D[0].length,X=$.slice(Q).match(/^\s+-\s+/);if(!X)return null;let Y=X[0].length,F=$.slice(Q+Y).match(new RegExp(`^${Hq}\\s*$`))?.groups,G=jw0(J),U=Iw0(F);return[G,U].filter(Boolean)}function Cw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0},{operator:"<",major:X+1,minor:0,patch:0}];if(Q){if(X===0)return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X,minor:Y+1,patch:0}];return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X+1,minor:0,patch:0}]}let F=V6($.prerelease??"");if(X===0){if(Y===0)return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X,minor:Y,patch:Z+1}];return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X,minor:Y+1,patch:0}]}return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X+1,minor:0,patch:0}]}function Pw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0},{operator:"<",major:X+1,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X,minor:Y+1,patch:0}];let F=V6($.prerelease??"");return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X,minor:Y+1,patch:0}]}function Sw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[{operator:"<",major:0,minor:0,patch:0}];if(J){if(Q)return[{operator:"<",major:X,minor:0,patch:0}];return[{operator:"<",major:X,minor:0,patch:0}]}if(Q)return[{operator:"<",major:X,minor:Y,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:"<",major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function xw0($){let D=U$($.minor),J=U$($.patch),Q=+$.major,X=+$.minor,Y=+$.patch;if(D)return[{operator:"<",major:Q+1,minor:0,patch:0}];if(J)return[{operator:"<",major:Q,minor:X+1,patch:0}];let Z=V6($.prerelease??""),F=Q8($.build??"");return[{operator:"<=",major:Q,minor:X,patch:Y,prerelease:Z,build:F}]}function vw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[{operator:"<",major:0,minor:0,patch:0}];if(J)return[{operator:">=",major:X+1,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y+1,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:">",major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function _w0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function kw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0},{operator:"<",major:X+1,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X,minor:Y+1,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:$.operator==="="?"=":void 0,major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function yw0($){let D=$.match(_y)?.groups;if(!D)return Aw0($);switch(D.operator){case"^":return Cw0(D);case"~":case"~>":return Pw0(D);case"<":return Sw0(D);case"<=":return xw0(D);case">":return vw0(D);case">=":return _w0(D);default:return kw0(D)}}function uw0($){return $.split(/\s+/).flatMap(yw0)}function Lq($){let D=$.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((J)=>Tw0(J)||uw0(J));if(D.some((J)=>J.includes(null)))throw TypeError(`Cannot parse version range: range "${$}" is invalid`);return D}var WM=t(()=>{k6();uZ()});function a1($){if(typeof $!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof $}`);if($.length>YM)throw TypeError(`Cannot parse version as version length is too long: length is ${$.length}, max length is ${YM}`);$=$.trim();let D=$.match(xy)?.groups;if(!D)throw TypeError(`Cannot parse version: ${$}`);let J=Kq(D.major,`Cannot parse version ${$}: invalid major version`),Q=Kq(D.minor,`Cannot parse version ${$}: invalid minor version`),X=Kq(D.patch,`Cannot parse version ${$}: invalid patch version`),Y=D.prerelease?V6(D.prerelease):[],Z=D.buildmetadata?Q8(D.buildmetadata):[];return{major:J,minor:Q,patch:X,prerelease:Y,build:Z}}var Mq=t(()=>{k6();k6()});function by($,D){let J=$.operator,Q=D.operator;if(J===void 0){if(e8($))return!0;return vZ($,[[D]])}if(Q===void 0){if(e8(D))return!0;return vZ(D,[[$]])}let X=dD($,D);return(J===">="||J===">")&&(Q===">="||Q===">")||(J==="<="||J==="<")&&(Q==="<="||Q==="<")||X===0&&((J===">="||J==="<=")&&(Q===">="||Q==="<="))||X===-1&&(J===">="||J===">")&&(Q==="<="||Q==="<")||X===1&&(J==="<="||J==="<")&&(Q===">="||Q===">")}function fw0($){return $.every((D)=>{return D.some((J)=>hw0(J))})}function hw0($){for(let D=0;D<$.length-1;D++){let J=$[D];for(let Q of $.slice(D+1))if(!by(J,Q))return!1}return!0}function gy($,D){return fw0([$,D])&&$.some((J)=>{return D.some((Q)=>{return J.every((X)=>{return Q.every((Y)=>by(X,Y))})})})}var my=t(()=>{k6();a6();_Z()});var dy=t(()=>{WM()});var cy=t(()=>{uZ();uZ();FM()});function ly($){try{return a1($),!0}catch{return!1}}var ny=t(()=>{Mq()});var py=t(()=>{Mq()});var iy=t(()=>{k6()});var ry=t(()=>{a6()});var oy=t(()=>{a6()});var ay=t(()=>{Oq();k6();a6()});function zM($,D){return dD($,D)>=0}var ty=t(()=>{a6()});var sy=t(()=>{Oq();k6();a6()});var ey=t(()=>{a6()});var $9=t(()=>{a6();yy();_Z();uy();FM();fy();hy();WM();Mq();my();dy();cy();ny();py();iy();ry();oy();UM();ay();ty();qM();sy();ey()});var l1=E((oB1,Rq)=>{var $u,Du,Ju,Qu,Xu,Yu,Zu,Fu,Gu,Uu,qu,Wu,zu,wq,HM,Hu,Ku,Vu,XQ,Ou,Nu,Lu,Mu,wu,Bu,Ru,Eu,Au,Bq,ju,Iu,Tu;(function($){var D=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(Q){$(J(D,J(Q)))});else if(typeof Rq==="object"&&typeof oB1==="object")$(J(D,J(oB1)));else $(J(D));function J(Q,X){if(Q!==D)if(typeof Object.create==="function")Object.defineProperty(Q,"__esModule",{value:!0});else Q.__esModule=!0;return function(Y,Z){return Q[Y]=X?X(Y,Z):Z}}})(function($){var D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,Z){Y.__proto__=Z}||function(Y,Z){for(var F in Z)if(Object.prototype.hasOwnProperty.call(Z,F))Y[F]=Z[F]};$u=function(Y,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Class extends value "+String(Z)+" is not a constructor or null");D(Y,Z);function F(){this.constructor=Y}Y.prototype=Z===null?Object.create(Z):(F.prototype=Z.prototype,new F)},Du=Object.assign||function(Y){for(var Z,F=1,G=arguments.length;F<G;F++){Z=arguments[F];for(var U in Z)if(Object.prototype.hasOwnProperty.call(Z,U))Y[U]=Z[U]}return Y},Ju=function(Y,Z){var F={};for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G)&&Z.indexOf(G)<0)F[G]=Y[G];if(Y!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var U=0,G=Object.getOwnPropertySymbols(Y);U<G.length;U++)if(Z.indexOf(G[U])<0&&Object.prototype.propertyIsEnumerable.call(Y,G[U]))F[G[U]]=Y[G[U]]}return F},Qu=function(Y,Z,F,G){var U=arguments.length,q=U<3?Z:G===null?G=Object.getOwnPropertyDescriptor(Z,F):G,W;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")q=Reflect.decorate(Y,Z,F,G);else for(var z=Y.length-1;z>=0;z--)if(W=Y[z])q=(U<3?W(q):U>3?W(Z,F,q):W(Z,F))||q;return U>3&&q&&Object.defineProperty(Z,F,q),q},Xu=function(Y,Z){return function(F,G){Z(F,G,Y)}},Yu=function(Y,Z,F,G,U,q){function W(R){if(R!==void 0&&typeof R!=="function")throw TypeError("Function expected");return R}var z=G.kind,H=z==="getter"?"get":z==="setter"?"set":"value",K=!Z&&Y?G.static?Y:Y.prototype:null,V=Z||(K?Object.getOwnPropertyDescriptor(K,G.name):{}),O,M=!1;for(var B=F.length-1;B>=0;B--){var N={};for(var L in G)N[L]=L==="access"?{}:G[L];for(var L in G.access)N.access[L]=G.access[L];N.addInitializer=function(R){if(M)throw TypeError("Cannot add initializers after decoration has completed");q.push(W(R||null))};var w=(0,F[B])(z==="accessor"?{get:V.get,set:V.set}:V[H],N);if(z==="accessor"){if(w===void 0)continue;if(w===null||typeof w!=="object")throw TypeError("Object expected");if(O=W(w.get))V.get=O;if(O=W(w.set))V.set=O;if(O=W(w.init))U.unshift(O)}else if(O=W(w))if(z==="field")U.unshift(O);else V[H]=O}if(K)Object.defineProperty(K,G.name,V);M=!0},Zu=function(Y,Z,F){var G=arguments.length>2;for(var U=0;U<Z.length;U++)F=G?Z[U].call(Y,F):Z[U].call(Y);return G?F:void 0},Fu=function(Y){return typeof Y==="symbol"?Y:"".concat(Y)},Gu=function(Y,Z,F){if(typeof Z==="symbol")Z=Z.description?"[".concat(Z.description,"]"):"";return Object.defineProperty(Y,"name",{configurable:!0,value:F?"".concat(F," ",Z):Z})},Uu=function(Y,Z){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(Y,Z)},qu=function(Y,Z,F,G){function U(q){return q instanceof F?q:new F(function(W){W(q)})}return new(F||(F=Promise))(function(q,W){function z(V){try{K(G.next(V))}catch(O){W(O)}}function H(V){try{K(G.throw(V))}catch(O){W(O)}}function K(V){V.done?q(V.value):U(V.value).then(z,H)}K((G=G.apply(Y,Z||[])).next())})},Wu=function(Y,Z){var F={label:0,sent:function(){if(q[0]&1)throw q[1];return q[1]},trys:[],ops:[]},G,U,q,W=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return W.next=z(0),W.throw=z(1),W.return=z(2),typeof Symbol==="function"&&(W[Symbol.iterator]=function(){return this}),W;function z(K){return function(V){return H([K,V])}}function H(K){if(G)throw TypeError("Generator is already executing.");while(W&&(W=0,K[0]&&(F=0)),F)try{if(G=1,U&&(q=K[0]&2?U.return:K[0]?U.throw||((q=U.return)&&q.call(U),0):U.next)&&!(q=q.call(U,K[1])).done)return q;if(U=0,q)K=[K[0]&2,q.value];switch(K[0]){case 0:case 1:q=K;break;case 4:return F.label++,{value:K[1],done:!1};case 5:F.label++,U=K[1],K=[0];continue;case 7:K=F.ops.pop(),F.trys.pop();continue;default:if((q=F.trys,!(q=q.length>0&&q[q.length-1]))&&(K[0]===6||K[0]===2)){F=0;continue}if(K[0]===3&&(!q||K[1]>q[0]&&K[1]<q[3])){F.label=K[1];break}if(K[0]===6&&F.label<q[1]){F.label=q[1],q=K;break}if(q&&F.label<q[2]){F.label=q[2],F.ops.push(K);break}if(q[2])F.ops.pop();F.trys.pop();continue}K=Z.call(Y,F)}catch(V){K=[6,V],U=0}finally{G=q=0}if(K[0]&5)throw K[1];return{value:K[0]?K[1]:void 0,done:!0}}},zu=function(Y,Z){for(var F in Y)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(Z,F))Bq(Z,Y,F)},Bq=Object.create?function(Y,Z,F,G){if(G===void 0)G=F;var U=Object.getOwnPropertyDescriptor(Z,F);if(!U||("get"in U?!Z.__esModule:U.writable||U.configurable))U={enumerable:!0,get:function(){return Z[F]}};Object.defineProperty(Y,G,U)}:function(Y,Z,F,G){if(G===void 0)G=F;Y[G]=Z[F]},wq=function(Y){var Z=typeof Symbol==="function"&&Symbol.iterator,F=Z&&Y[Z],G=0;if(F)return F.call(Y);if(Y&&typeof Y.length==="number")return{next:function(){if(Y&&G>=Y.length)Y=void 0;return{value:Y&&Y[G++],done:!Y}}};throw TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")},HM=function(Y,Z){var F=typeof Symbol==="function"&&Y[Symbol.iterator];if(!F)return Y;var G=F.call(Y),U,q=[],W;try{while((Z===void 0||Z-- >0)&&!(U=G.next()).done)q.push(U.value)}catch(z){W={error:z}}finally{try{if(U&&!U.done&&(F=G.return))F.call(G)}finally{if(W)throw W.error}}return q},Hu=function(){for(var Y=[],Z=0;Z<arguments.length;Z++)Y=Y.concat(HM(arguments[Z]));return Y},Ku=function(){for(var Y=0,Z=0,F=arguments.length;Z<F;Z++)Y+=arguments[Z].length;for(var G=Array(Y),U=0,Z=0;Z<F;Z++)for(var q=arguments[Z],W=0,z=q.length;W<z;W++,U++)G[U]=q[W];return G},Vu=function(Y,Z,F){if(F||arguments.length===2){for(var G=0,U=Z.length,q;G<U;G++)if(q||!(G in Z)){if(!q)q=Array.prototype.slice.call(Z,0,G);q[G]=Z[G]}}return Y.concat(q||Array.prototype.slice.call(Z))},XQ=function(Y){return this instanceof XQ?(this.v=Y,this):new XQ(Y)},Ou=function(Y,Z,F){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var G=F.apply(Y,Z||[]),U,q=[];return U=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),z("next"),z("throw"),z("return",W),U[Symbol.asyncIterator]=function(){return this},U;function W(B){return function(N){return Promise.resolve(N).then(B,O)}}function z(B,N){if(G[B]){if(U[B]=function(L){return new Promise(function(w,R){q.push([B,L,w,R])>1||H(B,L)})},N)U[B]=N(U[B])}}function H(B,N){try{K(G[B](N))}catch(L){M(q[0][3],L)}}function K(B){B.value instanceof XQ?Promise.resolve(B.value.v).then(V,O):M(q[0][2],B)}function V(B){H("next",B)}function O(B){H("throw",B)}function M(B,N){if(B(N),q.shift(),q.length)H(q[0][0],q[0][1])}},Nu=function(Y){var Z,F;return Z={},G("next"),G("throw",function(U){throw U}),G("return"),Z[Symbol.iterator]=function(){return this},Z;function G(U,q){Z[U]=Y[U]?function(W){return(F=!F)?{value:XQ(Y[U](W)),done:!1}:q?q(W):W}:q}},Lu=function(Y){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Z=Y[Symbol.asyncIterator],F;return Z?Z.call(Y):(Y=typeof wq==="function"?wq(Y):Y[Symbol.iterator](),F={},G("next"),G("throw"),G("return"),F[Symbol.asyncIterator]=function(){return this},F);function G(q){F[q]=Y[q]&&function(W){return new Promise(function(z,H){W=Y[q](W),U(z,H,W.done,W.value)})}}function U(q,W,z,H){Promise.resolve(H).then(function(K){q({value:K,done:z})},W)}},Mu=function(Y,Z){if(Object.defineProperty)Object.defineProperty(Y,"raw",{value:Z});else Y.raw=Z;return Y};var J=Object.create?function(Y,Z){Object.defineProperty(Y,"default",{enumerable:!0,value:Z})}:function(Y,Z){Y.default=Z},Q=function(Y){return Q=Object.getOwnPropertyNames||function(Z){var F=[];for(var G in Z)if(Object.prototype.hasOwnProperty.call(Z,G))F[F.length]=G;return F},Q(Y)};wu=function(Y){if(Y&&Y.__esModule)return Y;var Z={};if(Y!=null){for(var F=Q(Y),G=0;G<F.length;G++)if(F[G]!=="default")Bq(Z,Y,F[G])}return J(Z,Y),Z},Bu=function(Y){return Y&&Y.__esModule?Y:{default:Y}},Ru=function(Y,Z,F,G){if(F==="a"&&!G)throw TypeError("Private accessor was defined without a getter");if(typeof Z==="function"?Y!==Z||!G:!Z.has(Y))throw TypeError("Cannot read private member from an object whose class did not declare it");return F==="m"?G:F==="a"?G.call(Y):G?G.value:Z.get(Y)},Eu=function(Y,Z,F,G,U){if(G==="m")throw TypeError("Private method is not writable");if(G==="a"&&!U)throw TypeError("Private accessor was defined without a setter");if(typeof Z==="function"?Y!==Z||!U:!Z.has(Y))throw TypeError("Cannot write private member to an object whose class did not declare it");return G==="a"?U.call(Y,F):U?U.value=F:Z.set(Y,F),F},Au=function(Y,Z){if(Z===null||typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof Y==="function"?Z===Y:Y.has(Z)},ju=function(Y,Z,F){if(Z!==null&&Z!==void 0){if(typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Object expected.");var G,U;if(F){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");G=Z[Symbol.asyncDispose]}if(G===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(G=Z[Symbol.dispose],F)U=G}if(typeof G!=="function")throw TypeError("Object not disposable.");if(U)G=function(){try{U.call(this)}catch(q){return Promise.reject(q)}};Y.stack.push({value:Z,dispose:G,async:F})}else if(F)Y.stack.push({async:!0});return Z};var X=typeof SuppressedError==="function"?SuppressedError:function(Y,Z,F){var G=Error(F);return G.name="SuppressedError",G.error=Y,G.suppressed=Z,G};Iu=function(Y){function Z(q){Y.error=Y.hasError?new X(q,Y.error,"An error was suppressed during disposal."):q,Y.hasError=!0}var F,G=0;function U(){while(F=Y.stack.pop())try{if(!F.async&&G===1)return G=0,Y.stack.push(F),Promise.resolve().then(U);if(F.dispose){var q=F.dispose.call(F.value);if(F.async)return G|=2,Promise.resolve(q).then(U,function(W){return Z(W),U()})}else G|=1}catch(W){Z(W)}if(G===1)return Y.hasError?Promise.reject(Y.error):Promise.resolve();if(Y.hasError)throw Y.error}return U()},Tu=function(Y,Z){if(typeof Y==="string"&&/^\.\.?\//.test(Y))return Y.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(F,G,U,q,W){return G?Z?".jsx":".js":U&&(!q||!W)?F:U+q+"."+W.toLowerCase()+"js"});return Y},$("__extends",$u),$("__assign",Du),$("__rest",Ju),$("__decorate",Qu),$("__param",Xu),$("__esDecorate",Yu),$("__runInitializers",Zu),$("__propKey",Fu),$("__setFunctionName",Gu),$("__metadata",Uu),$("__awaiter",qu),$("__generator",Wu),$("__exportStar",zu),$("__createBinding",Bq),$("__values",wq),$("__read",HM),$("__spread",Hu),$("__spreadArrays",Ku),$("__spreadArray",Vu),$("__await",XQ),$("__asyncGenerator",Ou),$("__asyncDelegator",Nu),$("__asyncValues",Lu),$("__makeTemplateObject",Mu),$("__importStar",wu),$("__importDefault",Bu),$("__classPrivateFieldGet",Ru),$("__classPrivateFieldSet",Eu),$("__classPrivateFieldIn",Au),$("__addDisposableResource",ju),$("__disposeResources",Iu),$("__rewriteRelativeImportExtension",Tu)})});var Su=E((Cu)=>{Object.defineProperty(Cu,"__esModule",{value:!0});Cu.resolveFetch=void 0;var bw0=($)=>{if($)return(...D)=>$(...D);return(...D)=>fetch(...D)};Cu.resolveFetch=bw0});var KM=E((yu)=>{Object.defineProperty(yu,"__esModule",{value:!0});yu.FunctionRegion=yu.FunctionsHttpError=yu.FunctionsRelayError=yu.FunctionsFetchError=yu.FunctionsError=void 0;class fZ extends Error{constructor($,D="FunctionsError",J){super($);this.name=D,this.context=J}toJSON(){return{name:this.name,message:this.message,context:this.context}}}yu.FunctionsError=fZ;class vu extends fZ{constructor($){super("Failed to send a request to the Edge Function","FunctionsFetchError",$)}}yu.FunctionsFetchError=vu;class _u extends fZ{constructor($){super("Relay Error invoking the Edge Function","FunctionsRelayError",$)}}yu.FunctionsRelayError=_u;class ku extends fZ{constructor($){super("Edge Function returned a non-2xx status code","FunctionsHttpError",$)}}yu.FunctionsHttpError=ku;var xu;(function($){$.Any="any",$.ApNortheast1="ap-northeast-1",$.ApNortheast2="ap-northeast-2",$.ApSouth1="ap-south-1",$.ApSoutheast1="ap-southeast-1",$.ApSoutheast2="ap-southeast-2",$.CaCentral1="ca-central-1",$.EuCentral1="eu-central-1",$.EuWest1="eu-west-1",$.EuWest2="eu-west-2",$.EuWest3="eu-west-3",$.SaEast1="sa-east-1",$.UsEast1="us-east-1",$.UsWest1="us-west-1",$.UsWest2="us-west-2"})(xu||(yu.FunctionRegion=xu={}))});var gu=E((hu)=>{Object.defineProperty(hu,"__esModule",{value:!0});hu.FunctionsClient=void 0;var lw0=l1(),nw0=Su(),YQ=KM();class fu{constructor($,{headers:D={},customFetch:J,region:Q=YQ.FunctionRegion.Any}={}){this.url=$,this.headers=D,this.region=Q,this.fetch=(0,nw0.resolveFetch)(J)}setAuth($){this.headers.Authorization=`Bearer ${$}`}invoke($){return lw0.__awaiter(this,arguments,void 0,function*(D,J={}){var Q,X;let Y,Z,F;try{let{headers:G,method:U,body:q,signal:W,timeout:z}=J,H={},{region:K}=J;if(!K)K=this.region;let V=new URL(`${this.url}/${D}`);if(K&&K!=="any")H["x-region"]=K,V.searchParams.set("forceFunctionRegion",K);let O,M=!!G&&Object.keys(G).some((S)=>S.toLowerCase()==="content-type");if(q&&!M)if(typeof Blob<"u"&&q instanceof Blob||q instanceof ArrayBuffer)H["Content-Type"]="application/octet-stream",O=q;else if(typeof q==="string")H["Content-Type"]="text/plain",O=q;else if(typeof FormData<"u"&&q instanceof FormData)O=q;else H["Content-Type"]="application/json",O=JSON.stringify(q);else if(q&&typeof q!=="string"&&!(typeof Blob<"u"&&q instanceof Blob)&&!(q instanceof ArrayBuffer)&&!(typeof FormData<"u"&&q instanceof FormData))O=JSON.stringify(q);else O=q;let B=W;if(z)if(Z=new AbortController,Y=setTimeout(()=>Z.abort(),z),W)B=Z.signal,F=()=>Z.abort(),W.addEventListener("abort",F);else B=Z.signal;let N=yield this.fetch(V.toString(),{method:U||"POST",headers:Object.assign(Object.assign(Object.assign({},H),this.headers),G),body:O,signal:B}).catch((S)=>{throw new YQ.FunctionsFetchError(S)}),L=N.headers.get("x-relay-error");if(L&&L==="true")throw new YQ.FunctionsRelayError(N);if(!N.ok)throw new YQ.FunctionsHttpError(N);let w=((Q=N.headers.get("Content-Type"))!==null&&Q!==void 0?Q:"text/plain").split(";")[0].trim().toLowerCase(),R;if(w==="application/json")R=yield N.json();else if(w==="application/octet-stream"||w==="application/pdf")R=yield N.blob();else if(w==="text/event-stream")R=N;else if(w==="multipart/form-data")R=yield N.formData();else R=yield N.text();return{data:R,error:null,response:N}}catch(G){return{data:null,error:G,response:G instanceof YQ.FunctionsHttpError||G instanceof YQ.FunctionsRelayError?G.context:void 0}}finally{if(Y)clearTimeout(Y);if(F)(X=J.signal)===null||X===void 0||X.removeEventListener("abort",F)}})}}hu.FunctionsClient=fu});var mu=E((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});n9.FunctionRegion=n9.FunctionsRelayError=n9.FunctionsHttpError=n9.FunctionsFetchError=n9.FunctionsError=n9.FunctionsClient=void 0;var pw0=gu();Object.defineProperty(n9,"FunctionsClient",{enumerable:!0,get:function(){return pw0.FunctionsClient}});var hZ=KM();Object.defineProperty(n9,"FunctionsError",{enumerable:!0,get:function(){return hZ.FunctionsError}});Object.defineProperty(n9,"FunctionsFetchError",{enumerable:!0,get:function(){return hZ.FunctionsFetchError}});Object.defineProperty(n9,"FunctionsHttpError",{enumerable:!0,get:function(){return hZ.FunctionsHttpError}});Object.defineProperty(n9,"FunctionsRelayError",{enumerable:!0,get:function(){return hZ.FunctionsRelayError}});Object.defineProperty(n9,"FunctionRegion",{enumerable:!0,get:function(){return hZ.FunctionRegion}})});function cu($,D){return new Promise((J)=>{if(D===null||D===void 0?void 0:D.aborted){J();return}let Q=setTimeout(()=>{D===null||D===void 0||D.removeEventListener("abort",X),J()},$);function X(){clearTimeout(Q),J()}D===null||D===void 0||D.addEventListener("abort",X)})}function ow0($,D,J,Q){if(!Q||J>=3)return!1;if(!pu.includes($))return!1;if(!rw0.includes(D))return!1;return!0}function bZ($){return bZ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},bZ($)}function ew0($,D){if(bZ($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var Q=J.call($,D||"default");if(bZ(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}function $B0($){var D=ew0($,"string");return bZ(D)=="symbol"?D:D+""}function DB0($,D,J){return(D=$B0(D))in $?Object.defineProperty($,D,{value:J,enumerable:!0,configurable:!0,writable:!0}):$[D]=J,$}function nu($,D){var J=Object.keys($);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);D&&(Q=Q.filter(function(X){return Object.getOwnPropertyDescriptor($,X).enumerable})),J.push.apply(J,Q)}return J}function Eq($){for(var D=1;D<arguments.length;D++){var J=arguments[D]!=null?arguments[D]:{};D%2?nu(Object(J),!0).forEach(function(Q){DB0($,Q,J[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(J)):nu(Object(J)).forEach(function(Q){Object.defineProperty($,Q,Object.getOwnPropertyDescriptor(J,Q))})}return $}var du=($)=>Math.min(1000*2**$,30000),rw0,pu,Aq,aw0=class{constructor($){var D,J,Q,X,Y;if(this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=$.method,this.url=$.url,this.headers=new Headers($.headers),this.schema=$.schema,this.body=$.body,this.shouldThrowOnError=(D=$.shouldThrowOnError)!==null&&D!==void 0?D:!1,this.signal=$.signal,this.isMaybeSingle=(J=$.isMaybeSingle)!==null&&J!==void 0?J:!1,this.shouldStripNulls=(Q=$.shouldStripNulls)!==null&&Q!==void 0?Q:!1,this.urlLengthLimit=(X=$.urlLengthLimit)!==null&&X!==void 0?X:8000,this.retryEnabled=(Y=$.retry)!==null&&Y!==void 0?Y:!0,$.fetch)this.fetch=$.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($,D){return this.headers=new Headers(this.headers),this.headers.set($,D),this}retry($){return this.retryEnabled=$,this}then($,D){var J=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 Z=this.headers.get("Accept");if(Z==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!Z||Z==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let Q=this.fetch,Y=(async()=>{let Z=0;while(!0){let U={};if(J.headers.forEach((W,z)=>{U[z]=W}),Z>0)U["X-Retry-Count"]=String(Z);let q;try{q=await Q(J.url.toString(),{method:J.method,headers:U,body:JSON.stringify(J.body,(W,z)=>typeof z==="bigint"?z.toString():z),signal:J.signal})}catch(W){if((W===null||W===void 0?void 0:W.name)==="AbortError"||(W===null||W===void 0?void 0:W.code)==="ABORT_ERR")throw W;if(!pu.includes(J.method))throw W;if(J.retryEnabled&&Z<3){let z=du(Z);Z++,await cu(z,J.signal);continue}throw W}if(ow0(J.method,q.status,Z,J.retryEnabled)){var F,G;let W=(F=(G=q.headers)===null||G===void 0?void 0:G.get("Retry-After"))!==null&&F!==void 0?F:null,z=W!==null?Math.max(0,parseInt(W,10)||0)*1000:du(Z);await q.text(),Z++,await cu(z,J.signal);continue}return await J.processResponse(q)}})();if(!this.shouldThrowOnError)Y=Y.catch((Z)=>{var F;let G="",U="",q="",W=Z===null||Z===void 0?void 0:Z.cause;if(W){var z,H,K,V;let B=(z=W===null||W===void 0?void 0:W.message)!==null&&z!==void 0?z:"",N=(H=W===null||W===void 0?void 0:W.code)!==null&&H!==void 0?H:"";if(G=`${(K=Z===null||Z===void 0?void 0:Z.name)!==null&&K!==void 0?K:"FetchError"}: ${Z===null||Z===void 0?void 0:Z.message}`,G+=`
|
|
67
|
+
`)},info:($,D)=>{P.message($,{...D,symbol:w0("blue",Xw0)})},success:($,D)=>{P.message($,{...D,symbol:w0("green",Yw0)})},step:($,D)=>{P.message($,{...D,symbol:w0("green",DM)})},warn:($,D)=>{P.message($,{...D,symbol:w0("yellow",Zw0)})},warning:($,D)=>{P.warn($,D)},error:($,D)=>{P.message($,{...D,symbol:w0("red",Fw0)})}},tM1={light:$$("─","-"),heavy:$$("━","="),block:$$("█","#")},zw0=[`${w0("dim","↑/↓")} to navigate`,`${w0("dim","Enter:")} confirm`],sM1=`${w0("gray",u1)} `});var JD;var J8=t(()=>{JD={name:"@capgo/cli",type:"module",version:"8.34.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:"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:package-json-guard":"bun test/test-package-json-guard.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:wait-log":"bun test/test-wait-log.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:init-replay":"bun test/test-init-replay.mjs","test:capacitor-config-target":"bun test/test-capacitor-config-target.mjs","test:init-monorepo-targeting":"bun run test:capacitor-config-target && bun test/test-init-monorepo-targeting.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:ios-marketing-version":"bun test/test-ios-marketing-version.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:auto-bump-version && bun run test:auto-bump-ai-diff && 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:package-json-guard && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:wait-log && 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:ios-marketing-version && 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 && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation","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","test:app-permission-helper":"bun test/test-app-permission-helper.mjs","test:organization-set-api-host":"bun test/test-organization-set-api-host.mjs","test:trial-warning":"bun test/test-trial-warning.mjs","test:plan-validation":"bun test/test-plan-validation.mjs","test:auto-bump-version":"bun test/test-auto-bump-version.mjs","test:auto-bump-ai-diff":"bun test/test-auto-bump-ai-diff.mjs"},dependencies:{"@inkjs/ui":"^2.0.0","@rrweb/types":"^2.1.1","@xterm/addon-serialize":"^0.14.0","@xterm/headless":"^6.0.0","happy-dom":"^20.11.0",ink:"^7.1.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.4.0",qrcode:"^1.5.4",react:"^19.2.8","rrweb-snapshot":"^2.1.1","string-width":"^8.2.2",zod:"^4.4.3","@standard-schema/spec":"^1.1.0"},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.2.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.6","@capacitor/cli":"^8.4.2","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.7.0","@modelcontextprotocol/client":"^2.0.0-beta.5","@modelcontextprotocol/server":"^2.0.0-beta.5","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.110.8","@tanstack/intent":"^0.3.6","@types/adm-zip":"^0.5.8","@types/jsonwebtoken":"^9.0.10","@types/node":"^26.1.1","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^19.2.17","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260707.2","@vercel/ncc":"^0.44.1","@xterm/headless":"^6.0.0","adm-zip":"^0.6.0","ci-info":"^4.4.0",commander:"^15.0.0",eslint:"^10.7.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.75.0",partysocket:"^1.3.0",prettyjson:"^1.2.5",tmp:"^0.2.7","tus-js-client":"^4.3.1",typescript:"6.0.3",ws:"^8.21.1"}}});import{platform as Kw0}from"node:os";import{version as Vw0}from"node:process";function f1($){return{capgo_api:Ow0,"x-cli-version":JD.version,"x-cli-command":Nw0,"x-cli-node":Vw0,"x-cli-os":Kw0(),...$}}var Ow0="2025-10-01",Nw0="";var _6=t(()=>{J8()});import{existsSync as K6}from"fs";var xZ=($=".",D="unknown")=>{let J=`${$}/bun.lockb`,Q=`${$}/bun.lock`,X=`${$}/pnpm-lock.yaml`,Y=`${$}/shrinkwrap.yaml`,Z=`${$}/yarn.lock`,F=`${$}/package-lock.json`,G=`${$}/npm-shrinkwrap.json`;if(K6(J)||K6(Q))return"bun";if(K6(X)||K6(Y))return"pnpm";if(K6(Z))return"yarn";if(K6(F)||K6(G))return"npm";return D},Wq=($=xZ(),D=!1)=>{switch($){case"bun":return D?"bun install":"install";case"pnpm":return D?"pnpm install":"install";case"yarn":return D?"yarn install":"install";case"npm":return D?"npm install":"install";case"unknown":return D?"unknown unknown":"unknown";default:return D?"npm install":"install"}},Ey=($=".",D="npx")=>{let J=`${$}/bun.lockb`,Q=`${$}/bun.lock`,X=`${$}/pnpm-lock.yaml`,Y=`${$}/shrinkwrap.yaml`,Z=`${$}/yarn.lock`,F=`${$}/package-lock.json`,G=`${$}/npm-shrinkwrap.json`;if(K6(J)||K6(Q))return"bunx";if(K6(X)||K6(Y))return"pnpm exec";if(K6(Z))return"yarn dlx";if(K6(F)||K6(G))return"npx";return D};var Ay=()=>{};function zq($,D){if(isNaN($)||isNaN(D))throw Error("Cannot compare against non-numbers");return $===D?0:$<D?-1:1}function Ty($=[],D=[]){if($.length&&!D.length)return-1;if(!$.length&&D.length)return 1;return 0}function QM($=[],D=[]){let J=Math.max($.length,D.length);for(let Q=0;Q<J;Q++){let X=$[Q],Y=D[Q];if(X===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(X===void 0)return-1;if(typeof X==="string"&&typeof Y==="number")return 1;if(typeof X==="number"&&typeof Y==="string")return-1;if(X<Y)return-1;if(X>Y)return 1}return 0}function XM($){return typeof $==="number"&&!Number.isNaN($)&&(!Number.isFinite($)||0<=$&&$<=Number.MAX_SAFE_INTEGER)}function V6($){return $.split(".").filter(Boolean).map((D)=>{if(Bw0.test(D)){let J=Number(D);if(XM(J))return J}return D})}function Q8($){return $.split(".").filter(Boolean)}function Kq($,D){let J=Number($);if(!XM(J))throw TypeError(D);return J}function e8($){return Number.isNaN($.major)&&Number.isNaN($.minor)&&Number.isNaN($.patch)&&($.prerelease===void 0||$.prerelease.length===0)&&($.build===void 0||$.build.length===0)}var JQ="0|[1-9]\\d*",Lw0="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Mw0,jy,Cy,Iy="[0-9A-Za-z-]+",Py,Sy,xy,vy="(?:<|>)?=?",ww0="x|X|\\*",JM,Hq,_y,ky,YM=256,Bw0;var k6=t(()=>{Mw0=`(?<major>${JQ})\\.(?<minor>${JQ})\\.(?<patch>${JQ})`,jy=`(?:${JQ}|${Lw0})`,Cy=`(?:-(?<prerelease>${jy}(?:\\.${jy})*))`,Py=`(?:\\+(?<buildmetadata>${Iy}(?:\\.${Iy})*))`,Sy=`v?${Mw0}${Cy}?${Py}?`,xy=new RegExp(`^${Sy}$`),JM=`${JQ}|${ww0}`,Hq=`[v=\\s]*(?<major>${JM})(?:\\.(?<minor>${JM})(?:\\.(?<patch>${JM})${Cy}?${Py}?)?)?`,_y=new RegExp(`^(?<operator>~>?|\\^|${vy})\\s*${Hq}$`),ky=new RegExp(`^(?<operator>${vy})\\s*(${Sy})$|^$`);Bw0=new RegExp(`^${JQ}$`)});function dD($,D){if($===D)return 0;return zq($.major,D.major)||zq($.minor,D.minor)||zq($.patch,D.patch)||Ty($.prerelease,D.prerelease)||QM($.prerelease,D.prerelease)}var a6=t(()=>{k6()});var yy=t(()=>{k6()});function ZM($){return $.toFixed(0)}function S4($){let D=ZM($.major),J=ZM($.minor),Q=ZM($.patch),X=$.prerelease?.join(".")??"",Y=$.build?.join(".")??"";return[[`${D}.${J}.${Q}`,X].filter((G)=>G).join("-"),Y].filter((G)=>G).join("+")}function Rw0($,D){if(e8(D))return!0;let J=dD($,D);switch(D.operator){case"=":case void 0:return J===0;case"!=":return J!==0;case">":return J>0;case"<":return J<0;case">=":return J>=0;case"<=":return J<=0}}function Vq($,D){for(let J of D)if(!Rw0($,J))return!1;if(!$.prerelease?.length)return!0;for(let J of D){if(e8(J))continue;if(!J.prerelease?.length)continue;let{major:Q,minor:X,patch:Y}=J;if($.major===Q&&$.minor===X&&$.patch===Y)return!0}return!1}var Oq=t(()=>{k6();a6()});function vZ($,D){return D.some((J)=>Vq($,J))}var _Z=t(()=>{Oq()});function Ew0($=[]){let D=[...$],J=D.length;while(J>=0){let Q=D[J];if(typeof Q==="number"){D[J]=Q+1;break}J-=1}if(J===-1)D.push(0);return D}function kZ($=[],D){let J=Ew0($);if(!D)return J;let Q=V6(D);if(Q.every((X)=>typeof X==="string")){if(Q.every((X,Y)=>X===J[Y])&&typeof J[Q.length]==="number")return J;Q=[...Q,0]}return Q}function yZ($,D,J={}){let Q=J.build!==void 0?Q8(J.build):$.build??[];switch(D){case"premajor":return{major:$.major+1,minor:0,patch:0,prerelease:kZ($.prerelease,J.prerelease),build:Q};case"preminor":return{major:$.major,minor:$.minor+1,patch:0,prerelease:kZ($.prerelease,J.prerelease),build:Q};case"prepatch":return{major:$.major,minor:$.minor,patch:$.patch+1,prerelease:kZ($.prerelease,J.prerelease),build:Q};case"prerelease":{let Y=($.prerelease??[]).length===0?$.patch+1:$.patch;return{major:$.major,minor:$.minor,patch:Y,prerelease:kZ($.prerelease,J.prerelease),build:Q}}case"major":return{major:($.prerelease??[]).length===0||$.minor!==0||$.patch!==0?$.major+1:$.major,minor:0,patch:0,prerelease:[],build:Q};case"minor":{let Y=($.prerelease??[]).length===0||$.patch!==0?$.minor+1:$.minor;return{major:$.major,minor:Y,patch:0,prerelease:[],build:Q}}case"patch":{let Y=($.prerelease??[]).length===0?$.patch+1:$.patch;return{major:$.major,minor:$.minor,patch:Y,prerelease:[],build:Q}}case"pre":return{major:$.major,minor:$.minor,patch:$.patch,prerelease:kZ($.prerelease,J.prerelease),build:Q};default:throw TypeError(`Cannot increment version: invalid argument ${D}`)}}var uy=t(()=>{k6()});var Nq,QQ;var uZ=t(()=>{Nq={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},QQ={operator:void 0,...Nq}});var FM=t(()=>{uZ();k6()});function GM($,D){return dD($,D)>0}var UM=t(()=>{a6()});var fy=t(()=>{_Z();UM()});function zJ($,D){return dD($,D)<0}var qM=t(()=>{a6()});var hy=t(()=>{_Z();qM()});function Aw0($){let J=$.match(ky)?.groups;if(!J)return null;let{operator:Q}=J;return{operator:Q||void 0,...Nq}}function U$($){return!$||$.toLowerCase()==="x"||$==="*"}function jw0($){if(U$($.major))return;if(U$($.minor))return{operator:">=",major:+$.major,minor:0,patch:0,prerelease:[],build:[]};if(U$($.patch))return{operator:">=",major:+$.major,minor:+$.minor,patch:0,prerelease:[],build:[]};return{operator:">=",major:+$.major,minor:+$.minor,patch:+$.patch,prerelease:$.prerelease?V6($.prerelease):[],build:[]}}function Iw0($){if(U$($.major))return;if(U$($.minor))return{operator:"<",major:+$.major+1,minor:0,patch:0,prerelease:[],build:[]};if(U$($.patch))return{operator:"<",major:+$.major,minor:+$.minor+1,patch:0,prerelease:[],build:[]};if($.prerelease)return{operator:"<=",major:+$.major,minor:+$.minor,patch:+$.patch,prerelease:V6($.prerelease),build:[]};return{operator:"<=",major:+$.major,minor:+$.minor,patch:+$.patch,prerelease:[],build:[]}}function Tw0($){let D=$.match(new RegExp(`^${Hq}`)),J=D?.groups;if(!J)return null;let Q=D[0].length,X=$.slice(Q).match(/^\s+-\s+/);if(!X)return null;let Y=X[0].length,F=$.slice(Q+Y).match(new RegExp(`^${Hq}\\s*$`))?.groups,G=jw0(J),U=Iw0(F);return[G,U].filter(Boolean)}function Cw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0},{operator:"<",major:X+1,minor:0,patch:0}];if(Q){if(X===0)return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X,minor:Y+1,patch:0}];return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X+1,minor:0,patch:0}]}let F=V6($.prerelease??"");if(X===0){if(Y===0)return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X,minor:Y,patch:Z+1}];return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X,minor:Y+1,patch:0}]}return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X+1,minor:0,patch:0}]}function Pw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0},{operator:"<",major:X+1,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X,minor:Y+1,patch:0}];let F=V6($.prerelease??"");return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F},{operator:"<",major:X,minor:Y+1,patch:0}]}function Sw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[{operator:"<",major:0,minor:0,patch:0}];if(J){if(Q)return[{operator:"<",major:X,minor:0,patch:0}];return[{operator:"<",major:X,minor:0,patch:0}]}if(Q)return[{operator:"<",major:X,minor:Y,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:"<",major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function xw0($){let D=U$($.minor),J=U$($.patch),Q=+$.major,X=+$.minor,Y=+$.patch;if(D)return[{operator:"<",major:Q+1,minor:0,patch:0}];if(J)return[{operator:"<",major:Q,minor:X+1,patch:0}];let Z=V6($.prerelease??""),F=Q8($.build??"");return[{operator:"<=",major:Q,minor:X,patch:Y,prerelease:Z,build:F}]}function vw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[{operator:"<",major:0,minor:0,patch:0}];if(J)return[{operator:">=",major:X+1,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y+1,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:">",major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function _w0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:">=",major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function kw0($){let D=U$($.major),J=U$($.minor),Q=U$($.patch),X=+$.major,Y=+$.minor,Z=+$.patch;if(D)return[QQ];if(J)return[{operator:">=",major:X,minor:0,patch:0},{operator:"<",major:X+1,minor:0,patch:0}];if(Q)return[{operator:">=",major:X,minor:Y,patch:0},{operator:"<",major:X,minor:Y+1,patch:0}];let F=V6($.prerelease??""),G=Q8($.build??"");return[{operator:$.operator==="="?"=":void 0,major:X,minor:Y,patch:Z,prerelease:F,build:G}]}function yw0($){let D=$.match(_y)?.groups;if(!D)return Aw0($);switch(D.operator){case"^":return Cw0(D);case"~":case"~>":return Pw0(D);case"<":return Sw0(D);case"<=":return xw0(D);case">":return vw0(D);case">=":return _w0(D);default:return kw0(D)}}function uw0($){return $.split(/\s+/).flatMap(yw0)}function Lq($){let D=$.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((J)=>Tw0(J)||uw0(J));if(D.some((J)=>J.includes(null)))throw TypeError(`Cannot parse version range: range "${$}" is invalid`);return D}var WM=t(()=>{k6();uZ()});function a1($){if(typeof $!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof $}`);if($.length>YM)throw TypeError(`Cannot parse version as version length is too long: length is ${$.length}, max length is ${YM}`);$=$.trim();let D=$.match(xy)?.groups;if(!D)throw TypeError(`Cannot parse version: ${$}`);let J=Kq(D.major,`Cannot parse version ${$}: invalid major version`),Q=Kq(D.minor,`Cannot parse version ${$}: invalid minor version`),X=Kq(D.patch,`Cannot parse version ${$}: invalid patch version`),Y=D.prerelease?V6(D.prerelease):[],Z=D.buildmetadata?Q8(D.buildmetadata):[];return{major:J,minor:Q,patch:X,prerelease:Y,build:Z}}var Mq=t(()=>{k6();k6()});function by($,D){let J=$.operator,Q=D.operator;if(J===void 0){if(e8($))return!0;return vZ($,[[D]])}if(Q===void 0){if(e8(D))return!0;return vZ(D,[[$]])}let X=dD($,D);return(J===">="||J===">")&&(Q===">="||Q===">")||(J==="<="||J==="<")&&(Q==="<="||Q==="<")||X===0&&((J===">="||J==="<=")&&(Q===">="||Q==="<="))||X===-1&&(J===">="||J===">")&&(Q==="<="||Q==="<")||X===1&&(J==="<="||J==="<")&&(Q===">="||Q===">")}function fw0($){return $.every((D)=>{return D.some((J)=>hw0(J))})}function hw0($){for(let D=0;D<$.length-1;D++){let J=$[D];for(let Q of $.slice(D+1))if(!by(J,Q))return!1}return!0}function gy($,D){return fw0([$,D])&&$.some((J)=>{return D.some((Q)=>{return J.every((X)=>{return Q.every((Y)=>by(X,Y))})})})}var my=t(()=>{k6();a6();_Z()});var dy=t(()=>{WM()});var cy=t(()=>{uZ();uZ();FM()});function ly($){try{return a1($),!0}catch{return!1}}var ny=t(()=>{Mq()});var py=t(()=>{Mq()});var iy=t(()=>{k6()});var ry=t(()=>{a6()});var oy=t(()=>{a6()});var ay=t(()=>{Oq();k6();a6()});function zM($,D){return dD($,D)>=0}var ty=t(()=>{a6()});var sy=t(()=>{Oq();k6();a6()});var ey=t(()=>{a6()});var $9=t(()=>{a6();yy();_Z();uy();FM();fy();hy();WM();Mq();my();dy();cy();ny();py();iy();ry();oy();UM();ay();ty();qM();sy();ey()});var l1=E((oB1,Rq)=>{var $u,Du,Ju,Qu,Xu,Yu,Zu,Fu,Gu,Uu,qu,Wu,zu,wq,HM,Hu,Ku,Vu,XQ,Ou,Nu,Lu,Mu,wu,Bu,Ru,Eu,Au,Bq,ju,Iu,Tu;(function($){var D=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(Q){$(J(D,J(Q)))});else if(typeof Rq==="object"&&typeof oB1==="object")$(J(D,J(oB1)));else $(J(D));function J(Q,X){if(Q!==D)if(typeof Object.create==="function")Object.defineProperty(Q,"__esModule",{value:!0});else Q.__esModule=!0;return function(Y,Z){return Q[Y]=X?X(Y,Z):Z}}})(function($){var D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,Z){Y.__proto__=Z}||function(Y,Z){for(var F in Z)if(Object.prototype.hasOwnProperty.call(Z,F))Y[F]=Z[F]};$u=function(Y,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Class extends value "+String(Z)+" is not a constructor or null");D(Y,Z);function F(){this.constructor=Y}Y.prototype=Z===null?Object.create(Z):(F.prototype=Z.prototype,new F)},Du=Object.assign||function(Y){for(var Z,F=1,G=arguments.length;F<G;F++){Z=arguments[F];for(var U in Z)if(Object.prototype.hasOwnProperty.call(Z,U))Y[U]=Z[U]}return Y},Ju=function(Y,Z){var F={};for(var G in Y)if(Object.prototype.hasOwnProperty.call(Y,G)&&Z.indexOf(G)<0)F[G]=Y[G];if(Y!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var U=0,G=Object.getOwnPropertySymbols(Y);U<G.length;U++)if(Z.indexOf(G[U])<0&&Object.prototype.propertyIsEnumerable.call(Y,G[U]))F[G[U]]=Y[G[U]]}return F},Qu=function(Y,Z,F,G){var U=arguments.length,q=U<3?Z:G===null?G=Object.getOwnPropertyDescriptor(Z,F):G,W;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")q=Reflect.decorate(Y,Z,F,G);else for(var z=Y.length-1;z>=0;z--)if(W=Y[z])q=(U<3?W(q):U>3?W(Z,F,q):W(Z,F))||q;return U>3&&q&&Object.defineProperty(Z,F,q),q},Xu=function(Y,Z){return function(F,G){Z(F,G,Y)}},Yu=function(Y,Z,F,G,U,q){function W(R){if(R!==void 0&&typeof R!=="function")throw TypeError("Function expected");return R}var z=G.kind,H=z==="getter"?"get":z==="setter"?"set":"value",K=!Z&&Y?G.static?Y:Y.prototype:null,V=Z||(K?Object.getOwnPropertyDescriptor(K,G.name):{}),O,M=!1;for(var B=F.length-1;B>=0;B--){var N={};for(var L in G)N[L]=L==="access"?{}:G[L];for(var L in G.access)N.access[L]=G.access[L];N.addInitializer=function(R){if(M)throw TypeError("Cannot add initializers after decoration has completed");q.push(W(R||null))};var w=(0,F[B])(z==="accessor"?{get:V.get,set:V.set}:V[H],N);if(z==="accessor"){if(w===void 0)continue;if(w===null||typeof w!=="object")throw TypeError("Object expected");if(O=W(w.get))V.get=O;if(O=W(w.set))V.set=O;if(O=W(w.init))U.unshift(O)}else if(O=W(w))if(z==="field")U.unshift(O);else V[H]=O}if(K)Object.defineProperty(K,G.name,V);M=!0},Zu=function(Y,Z,F){var G=arguments.length>2;for(var U=0;U<Z.length;U++)F=G?Z[U].call(Y,F):Z[U].call(Y);return G?F:void 0},Fu=function(Y){return typeof Y==="symbol"?Y:"".concat(Y)},Gu=function(Y,Z,F){if(typeof Z==="symbol")Z=Z.description?"[".concat(Z.description,"]"):"";return Object.defineProperty(Y,"name",{configurable:!0,value:F?"".concat(F," ",Z):Z})},Uu=function(Y,Z){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(Y,Z)},qu=function(Y,Z,F,G){function U(q){return q instanceof F?q:new F(function(W){W(q)})}return new(F||(F=Promise))(function(q,W){function z(V){try{K(G.next(V))}catch(O){W(O)}}function H(V){try{K(G.throw(V))}catch(O){W(O)}}function K(V){V.done?q(V.value):U(V.value).then(z,H)}K((G=G.apply(Y,Z||[])).next())})},Wu=function(Y,Z){var F={label:0,sent:function(){if(q[0]&1)throw q[1];return q[1]},trys:[],ops:[]},G,U,q,W=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return W.next=z(0),W.throw=z(1),W.return=z(2),typeof Symbol==="function"&&(W[Symbol.iterator]=function(){return this}),W;function z(K){return function(V){return H([K,V])}}function H(K){if(G)throw TypeError("Generator is already executing.");while(W&&(W=0,K[0]&&(F=0)),F)try{if(G=1,U&&(q=K[0]&2?U.return:K[0]?U.throw||((q=U.return)&&q.call(U),0):U.next)&&!(q=q.call(U,K[1])).done)return q;if(U=0,q)K=[K[0]&2,q.value];switch(K[0]){case 0:case 1:q=K;break;case 4:return F.label++,{value:K[1],done:!1};case 5:F.label++,U=K[1],K=[0];continue;case 7:K=F.ops.pop(),F.trys.pop();continue;default:if((q=F.trys,!(q=q.length>0&&q[q.length-1]))&&(K[0]===6||K[0]===2)){F=0;continue}if(K[0]===3&&(!q||K[1]>q[0]&&K[1]<q[3])){F.label=K[1];break}if(K[0]===6&&F.label<q[1]){F.label=q[1],q=K;break}if(q&&F.label<q[2]){F.label=q[2],F.ops.push(K);break}if(q[2])F.ops.pop();F.trys.pop();continue}K=Z.call(Y,F)}catch(V){K=[6,V],U=0}finally{G=q=0}if(K[0]&5)throw K[1];return{value:K[0]?K[1]:void 0,done:!0}}},zu=function(Y,Z){for(var F in Y)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(Z,F))Bq(Z,Y,F)},Bq=Object.create?function(Y,Z,F,G){if(G===void 0)G=F;var U=Object.getOwnPropertyDescriptor(Z,F);if(!U||("get"in U?!Z.__esModule:U.writable||U.configurable))U={enumerable:!0,get:function(){return Z[F]}};Object.defineProperty(Y,G,U)}:function(Y,Z,F,G){if(G===void 0)G=F;Y[G]=Z[F]},wq=function(Y){var Z=typeof Symbol==="function"&&Symbol.iterator,F=Z&&Y[Z],G=0;if(F)return F.call(Y);if(Y&&typeof Y.length==="number")return{next:function(){if(Y&&G>=Y.length)Y=void 0;return{value:Y&&Y[G++],done:!Y}}};throw TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")},HM=function(Y,Z){var F=typeof Symbol==="function"&&Y[Symbol.iterator];if(!F)return Y;var G=F.call(Y),U,q=[],W;try{while((Z===void 0||Z-- >0)&&!(U=G.next()).done)q.push(U.value)}catch(z){W={error:z}}finally{try{if(U&&!U.done&&(F=G.return))F.call(G)}finally{if(W)throw W.error}}return q},Hu=function(){for(var Y=[],Z=0;Z<arguments.length;Z++)Y=Y.concat(HM(arguments[Z]));return Y},Ku=function(){for(var Y=0,Z=0,F=arguments.length;Z<F;Z++)Y+=arguments[Z].length;for(var G=Array(Y),U=0,Z=0;Z<F;Z++)for(var q=arguments[Z],W=0,z=q.length;W<z;W++,U++)G[U]=q[W];return G},Vu=function(Y,Z,F){if(F||arguments.length===2){for(var G=0,U=Z.length,q;G<U;G++)if(q||!(G in Z)){if(!q)q=Array.prototype.slice.call(Z,0,G);q[G]=Z[G]}}return Y.concat(q||Array.prototype.slice.call(Z))},XQ=function(Y){return this instanceof XQ?(this.v=Y,this):new XQ(Y)},Ou=function(Y,Z,F){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var G=F.apply(Y,Z||[]),U,q=[];return U=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),z("next"),z("throw"),z("return",W),U[Symbol.asyncIterator]=function(){return this},U;function W(B){return function(N){return Promise.resolve(N).then(B,O)}}function z(B,N){if(G[B]){if(U[B]=function(L){return new Promise(function(w,R){q.push([B,L,w,R])>1||H(B,L)})},N)U[B]=N(U[B])}}function H(B,N){try{K(G[B](N))}catch(L){M(q[0][3],L)}}function K(B){B.value instanceof XQ?Promise.resolve(B.value.v).then(V,O):M(q[0][2],B)}function V(B){H("next",B)}function O(B){H("throw",B)}function M(B,N){if(B(N),q.shift(),q.length)H(q[0][0],q[0][1])}},Nu=function(Y){var Z,F;return Z={},G("next"),G("throw",function(U){throw U}),G("return"),Z[Symbol.iterator]=function(){return this},Z;function G(U,q){Z[U]=Y[U]?function(W){return(F=!F)?{value:XQ(Y[U](W)),done:!1}:q?q(W):W}:q}},Lu=function(Y){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Z=Y[Symbol.asyncIterator],F;return Z?Z.call(Y):(Y=typeof wq==="function"?wq(Y):Y[Symbol.iterator](),F={},G("next"),G("throw"),G("return"),F[Symbol.asyncIterator]=function(){return this},F);function G(q){F[q]=Y[q]&&function(W){return new Promise(function(z,H){W=Y[q](W),U(z,H,W.done,W.value)})}}function U(q,W,z,H){Promise.resolve(H).then(function(K){q({value:K,done:z})},W)}},Mu=function(Y,Z){if(Object.defineProperty)Object.defineProperty(Y,"raw",{value:Z});else Y.raw=Z;return Y};var J=Object.create?function(Y,Z){Object.defineProperty(Y,"default",{enumerable:!0,value:Z})}:function(Y,Z){Y.default=Z},Q=function(Y){return Q=Object.getOwnPropertyNames||function(Z){var F=[];for(var G in Z)if(Object.prototype.hasOwnProperty.call(Z,G))F[F.length]=G;return F},Q(Y)};wu=function(Y){if(Y&&Y.__esModule)return Y;var Z={};if(Y!=null){for(var F=Q(Y),G=0;G<F.length;G++)if(F[G]!=="default")Bq(Z,Y,F[G])}return J(Z,Y),Z},Bu=function(Y){return Y&&Y.__esModule?Y:{default:Y}},Ru=function(Y,Z,F,G){if(F==="a"&&!G)throw TypeError("Private accessor was defined without a getter");if(typeof Z==="function"?Y!==Z||!G:!Z.has(Y))throw TypeError("Cannot read private member from an object whose class did not declare it");return F==="m"?G:F==="a"?G.call(Y):G?G.value:Z.get(Y)},Eu=function(Y,Z,F,G,U){if(G==="m")throw TypeError("Private method is not writable");if(G==="a"&&!U)throw TypeError("Private accessor was defined without a setter");if(typeof Z==="function"?Y!==Z||!U:!Z.has(Y))throw TypeError("Cannot write private member to an object whose class did not declare it");return G==="a"?U.call(Y,F):U?U.value=F:Z.set(Y,F),F},Au=function(Y,Z){if(Z===null||typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof Y==="function"?Z===Y:Y.has(Z)},ju=function(Y,Z,F){if(Z!==null&&Z!==void 0){if(typeof Z!=="object"&&typeof Z!=="function")throw TypeError("Object expected.");var G,U;if(F){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");G=Z[Symbol.asyncDispose]}if(G===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(G=Z[Symbol.dispose],F)U=G}if(typeof G!=="function")throw TypeError("Object not disposable.");if(U)G=function(){try{U.call(this)}catch(q){return Promise.reject(q)}};Y.stack.push({value:Z,dispose:G,async:F})}else if(F)Y.stack.push({async:!0});return Z};var X=typeof SuppressedError==="function"?SuppressedError:function(Y,Z,F){var G=Error(F);return G.name="SuppressedError",G.error=Y,G.suppressed=Z,G};Iu=function(Y){function Z(q){Y.error=Y.hasError?new X(q,Y.error,"An error was suppressed during disposal."):q,Y.hasError=!0}var F,G=0;function U(){while(F=Y.stack.pop())try{if(!F.async&&G===1)return G=0,Y.stack.push(F),Promise.resolve().then(U);if(F.dispose){var q=F.dispose.call(F.value);if(F.async)return G|=2,Promise.resolve(q).then(U,function(W){return Z(W),U()})}else G|=1}catch(W){Z(W)}if(G===1)return Y.hasError?Promise.reject(Y.error):Promise.resolve();if(Y.hasError)throw Y.error}return U()},Tu=function(Y,Z){if(typeof Y==="string"&&/^\.\.?\//.test(Y))return Y.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(F,G,U,q,W){return G?Z?".jsx":".js":U&&(!q||!W)?F:U+q+"."+W.toLowerCase()+"js"});return Y},$("__extends",$u),$("__assign",Du),$("__rest",Ju),$("__decorate",Qu),$("__param",Xu),$("__esDecorate",Yu),$("__runInitializers",Zu),$("__propKey",Fu),$("__setFunctionName",Gu),$("__metadata",Uu),$("__awaiter",qu),$("__generator",Wu),$("__exportStar",zu),$("__createBinding",Bq),$("__values",wq),$("__read",HM),$("__spread",Hu),$("__spreadArrays",Ku),$("__spreadArray",Vu),$("__await",XQ),$("__asyncGenerator",Ou),$("__asyncDelegator",Nu),$("__asyncValues",Lu),$("__makeTemplateObject",Mu),$("__importStar",wu),$("__importDefault",Bu),$("__classPrivateFieldGet",Ru),$("__classPrivateFieldSet",Eu),$("__classPrivateFieldIn",Au),$("__addDisposableResource",ju),$("__disposeResources",Iu),$("__rewriteRelativeImportExtension",Tu)})});var Su=E((Cu)=>{Object.defineProperty(Cu,"__esModule",{value:!0});Cu.resolveFetch=void 0;var bw0=($)=>{if($)return(...D)=>$(...D);return(...D)=>fetch(...D)};Cu.resolveFetch=bw0});var KM=E((yu)=>{Object.defineProperty(yu,"__esModule",{value:!0});yu.FunctionRegion=yu.FunctionsHttpError=yu.FunctionsRelayError=yu.FunctionsFetchError=yu.FunctionsError=void 0;class fZ extends Error{constructor($,D="FunctionsError",J){super($);this.name=D,this.context=J}toJSON(){return{name:this.name,message:this.message,context:this.context}}}yu.FunctionsError=fZ;class vu extends fZ{constructor($){super("Failed to send a request to the Edge Function","FunctionsFetchError",$)}}yu.FunctionsFetchError=vu;class _u extends fZ{constructor($){super("Relay Error invoking the Edge Function","FunctionsRelayError",$)}}yu.FunctionsRelayError=_u;class ku extends fZ{constructor($){super("Edge Function returned a non-2xx status code","FunctionsHttpError",$)}}yu.FunctionsHttpError=ku;var xu;(function($){$.Any="any",$.ApNortheast1="ap-northeast-1",$.ApNortheast2="ap-northeast-2",$.ApSouth1="ap-south-1",$.ApSoutheast1="ap-southeast-1",$.ApSoutheast2="ap-southeast-2",$.CaCentral1="ca-central-1",$.EuCentral1="eu-central-1",$.EuWest1="eu-west-1",$.EuWest2="eu-west-2",$.EuWest3="eu-west-3",$.SaEast1="sa-east-1",$.UsEast1="us-east-1",$.UsWest1="us-west-1",$.UsWest2="us-west-2"})(xu||(yu.FunctionRegion=xu={}))});var gu=E((hu)=>{Object.defineProperty(hu,"__esModule",{value:!0});hu.FunctionsClient=void 0;var lw0=l1(),nw0=Su(),YQ=KM();class fu{constructor($,{headers:D={},customFetch:J,region:Q=YQ.FunctionRegion.Any}={}){this.url=$,this.headers=D,this.region=Q,this.fetch=(0,nw0.resolveFetch)(J)}setAuth($){this.headers.Authorization=`Bearer ${$}`}invoke($){return lw0.__awaiter(this,arguments,void 0,function*(D,J={}){var Q,X;let Y,Z,F;try{let{headers:G,method:U,body:q,signal:W,timeout:z}=J,H={},{region:K}=J;if(!K)K=this.region;let V=new URL(`${this.url}/${D}`);if(K&&K!=="any")H["x-region"]=K,V.searchParams.set("forceFunctionRegion",K);let O,M=!!G&&Object.keys(G).some((S)=>S.toLowerCase()==="content-type");if(q&&!M)if(typeof Blob<"u"&&q instanceof Blob||q instanceof ArrayBuffer)H["Content-Type"]="application/octet-stream",O=q;else if(typeof q==="string")H["Content-Type"]="text/plain",O=q;else if(typeof FormData<"u"&&q instanceof FormData)O=q;else H["Content-Type"]="application/json",O=JSON.stringify(q);else if(q&&typeof q!=="string"&&!(typeof Blob<"u"&&q instanceof Blob)&&!(q instanceof ArrayBuffer)&&!(typeof FormData<"u"&&q instanceof FormData))O=JSON.stringify(q);else O=q;let B=W;if(z)if(Z=new AbortController,Y=setTimeout(()=>Z.abort(),z),W)B=Z.signal,F=()=>Z.abort(),W.addEventListener("abort",F);else B=Z.signal;let N=yield this.fetch(V.toString(),{method:U||"POST",headers:Object.assign(Object.assign(Object.assign({},H),this.headers),G),body:O,signal:B}).catch((S)=>{throw new YQ.FunctionsFetchError(S)}),L=N.headers.get("x-relay-error");if(L&&L==="true")throw new YQ.FunctionsRelayError(N);if(!N.ok)throw new YQ.FunctionsHttpError(N);let w=((Q=N.headers.get("Content-Type"))!==null&&Q!==void 0?Q:"text/plain").split(";")[0].trim().toLowerCase(),R;if(w==="application/json")R=yield N.json();else if(w==="application/octet-stream"||w==="application/pdf")R=yield N.blob();else if(w==="text/event-stream")R=N;else if(w==="multipart/form-data")R=yield N.formData();else R=yield N.text();return{data:R,error:null,response:N}}catch(G){return{data:null,error:G,response:G instanceof YQ.FunctionsHttpError||G instanceof YQ.FunctionsRelayError?G.context:void 0}}finally{if(Y)clearTimeout(Y);if(F)(X=J.signal)===null||X===void 0||X.removeEventListener("abort",F)}})}}hu.FunctionsClient=fu});var mu=E((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});n9.FunctionRegion=n9.FunctionsRelayError=n9.FunctionsHttpError=n9.FunctionsFetchError=n9.FunctionsError=n9.FunctionsClient=void 0;var pw0=gu();Object.defineProperty(n9,"FunctionsClient",{enumerable:!0,get:function(){return pw0.FunctionsClient}});var hZ=KM();Object.defineProperty(n9,"FunctionsError",{enumerable:!0,get:function(){return hZ.FunctionsError}});Object.defineProperty(n9,"FunctionsFetchError",{enumerable:!0,get:function(){return hZ.FunctionsFetchError}});Object.defineProperty(n9,"FunctionsHttpError",{enumerable:!0,get:function(){return hZ.FunctionsHttpError}});Object.defineProperty(n9,"FunctionsRelayError",{enumerable:!0,get:function(){return hZ.FunctionsRelayError}});Object.defineProperty(n9,"FunctionRegion",{enumerable:!0,get:function(){return hZ.FunctionRegion}})});function cu($,D){return new Promise((J)=>{if(D===null||D===void 0?void 0:D.aborted){J();return}let Q=setTimeout(()=>{D===null||D===void 0||D.removeEventListener("abort",X),J()},$);function X(){clearTimeout(Q),J()}D===null||D===void 0||D.addEventListener("abort",X)})}function ow0($,D,J,Q){if(!Q||J>=3)return!1;if(!pu.includes($))return!1;if(!rw0.includes(D))return!1;return!0}function bZ($){return bZ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},bZ($)}function ew0($,D){if(bZ($)!="object"||!$)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var Q=J.call($,D||"default");if(bZ(Q)!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)($)}function $B0($){var D=ew0($,"string");return bZ(D)=="symbol"?D:D+""}function DB0($,D,J){return(D=$B0(D))in $?Object.defineProperty($,D,{value:J,enumerable:!0,configurable:!0,writable:!0}):$[D]=J,$}function nu($,D){var J=Object.keys($);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);D&&(Q=Q.filter(function(X){return Object.getOwnPropertyDescriptor($,X).enumerable})),J.push.apply(J,Q)}return J}function Eq($){for(var D=1;D<arguments.length;D++){var J=arguments[D]!=null?arguments[D]:{};D%2?nu(Object(J),!0).forEach(function(Q){DB0($,Q,J[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(J)):nu(Object(J)).forEach(function(Q){Object.defineProperty($,Q,Object.getOwnPropertyDescriptor(J,Q))})}return $}var du=($)=>Math.min(1000*2**$,30000),rw0,pu,Aq,aw0=class{constructor($){var D,J,Q,X,Y;if(this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=$.method,this.url=$.url,this.headers=new Headers($.headers),this.schema=$.schema,this.body=$.body,this.shouldThrowOnError=(D=$.shouldThrowOnError)!==null&&D!==void 0?D:!1,this.signal=$.signal,this.isMaybeSingle=(J=$.isMaybeSingle)!==null&&J!==void 0?J:!1,this.shouldStripNulls=(Q=$.shouldStripNulls)!==null&&Q!==void 0?Q:!1,this.urlLengthLimit=(X=$.urlLengthLimit)!==null&&X!==void 0?X:8000,this.retryEnabled=(Y=$.retry)!==null&&Y!==void 0?Y:!0,$.fetch)this.fetch=$.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($,D){return this.headers=new Headers(this.headers),this.headers.set($,D),this}retry($){return this.retryEnabled=$,this}then($,D){var J=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 Z=this.headers.get("Accept");if(Z==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!Z||Z==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let Q=this.fetch,Y=(async()=>{let Z=0;while(!0){let U={};if(J.headers.forEach((W,z)=>{U[z]=W}),Z>0)U["X-Retry-Count"]=String(Z);let q;try{q=await Q(J.url.toString(),{method:J.method,headers:U,body:JSON.stringify(J.body,(W,z)=>typeof z==="bigint"?z.toString():z),signal:J.signal})}catch(W){if((W===null||W===void 0?void 0:W.name)==="AbortError"||(W===null||W===void 0?void 0:W.code)==="ABORT_ERR")throw W;if(!pu.includes(J.method))throw W;if(J.retryEnabled&&Z<3){let z=du(Z);Z++,await cu(z,J.signal);continue}throw W}if(ow0(J.method,q.status,Z,J.retryEnabled)){var F,G;let W=(F=(G=q.headers)===null||G===void 0?void 0:G.get("Retry-After"))!==null&&F!==void 0?F:null,z=W!==null?Math.max(0,parseInt(W,10)||0)*1000:du(Z);await q.text(),Z++,await cu(z,J.signal);continue}return await J.processResponse(q)}})();if(!this.shouldThrowOnError)Y=Y.catch((Z)=>{var F;let G="",U="",q="",W=Z===null||Z===void 0?void 0:Z.cause;if(W){var z,H,K,V;let B=(z=W===null||W===void 0?void 0:W.message)!==null&&z!==void 0?z:"",N=(H=W===null||W===void 0?void 0:W.code)!==null&&H!==void 0?H:"";if(G=`${(K=Z===null||Z===void 0?void 0:Z.name)!==null&&K!==void 0?K:"FetchError"}: ${Z===null||Z===void 0?void 0:Z.message}`,G+=`
|
|
68
68
|
|
|
69
69
|
Caused by: ${(V=W===null||W===void 0?void 0:W.name)!==null&&V!==void 0?V:"Error"}: ${B}`,N)G+=` (${N})`;if(W===null||W===void 0?void 0:W.stack)G+=`
|
|
70
70
|
${W.stack}`}else{var O;G=(O=Z===null||Z===void 0?void 0:Z.stack)!==null&&O!==void 0?O:""}let M=this.url.toString().length;if((Z===null||Z===void 0?void 0:Z.name)==="AbortError"||(Z===null||Z===void 0?void 0:Z.code)==="ABORT_ERR"){if(q="",U="Request was aborted (timeout or manual cancellation)",M>this.urlLengthLimit)U+=`. Note: Your request URL is ${M} 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((W===null||W===void 0?void 0:W.name)==="HeadersOverflowError"||(W===null||W===void 0?void 0:W.code)==="UND_ERR_HEADERS_OVERFLOW"){if(q="",U="HTTP headers exceeded server limits (typically 16KB)",M>this.urlLengthLimit)U+=`. Your request URL is ${M} 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=Z===null||Z===void 0?void 0:Z.name)!==null&&F!==void 0?F:"FetchError"}: ${Z===null||Z===void 0?void 0:Z.message}`,details:G,hint:U,code:q},data:null,count:null,status:0,statusText:""}});return Y.then($,D)}async processResponse($){var D=this;let J=null,Q=null,X=null,Y=$.status,Z=$.statusText;if($.ok){var F,G;if(D.method!=="HEAD"){var U;let z=await $.text();if(z==="");else if(D.headers.get("Accept")==="text/csv")Q=z;else if(D.headers.get("Accept")&&((U=D.headers.get("Accept"))===null||U===void 0?void 0:U.includes("application/vnd.pgrst.plan+text")))Q=z;else try{Q=JSON.parse(z)}catch(H){if(J={message:z},Q=null,D.shouldThrowOnError)throw new Aq({message:z,details:"",hint:"",code:""})}}let q=(F=D.headers.get("Prefer"))===null||F===void 0?void 0:F.match(/count=(exact|planned|estimated)/),W=(G=$.headers.get("content-range"))===null||G===void 0?void 0:G.split("/");if(q&&W&&W.length>1)X=parseInt(W[1]);if(D.isMaybeSingle&&Array.isArray(Q))if(Q.length>1)J={code:"PGRST116",details:`Results contain ${Q.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},Q=null,X=null,Y=406,Z="Not Acceptable";else if(Q.length===1)Q=Q[0];else Q=null}else{let q=await $.text();try{if(J=JSON.parse(q),Array.isArray(J)&&$.status===404)Q=[],J=null,Y=200,Z="OK"}catch(W){if($.status===404&&q==="")Y=204,Z="No Content";else J={message:q}}if(J&&D.shouldThrowOnError)throw new Aq(J)}return{success:J===null,error:J,data:Q,count:X,status:Y,statusText:Z}}returns(){return this}overrideTypes(){return this}},tw0,lu,ZQ,sw0=class{constructor($,{headers:D={},schema:J,fetch:Q,urlLengthLimit:X=8000,retry:Y}){this.url=$,this.headers=new Headers(D),this.schema=J,this.fetch=Q,this.urlLengthLimit=X,this.retry=Y}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select($,D){let{head:J=!1,count:Q}=D!==null&&D!==void 0?D:{},X=J?"HEAD":"GET",Y=!1,Z=($!==null&&$!==void 0?$:"*").split("").map((U)=>{if(/\s/.test(U)&&!Y)return"";if(U==='"')Y=!Y;return U}).join(""),{url:F,headers:G}=this.cloneRequestState();if(F.searchParams.set("select",Z),Q)G.append("Prefer",`count=${Q}`);return new ZQ({method:X,url:F,headers:G,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert($,{count:D,defaultToNull:J=!0}={}){var Q;let X="POST",{url:Y,headers:Z}=this.cloneRequestState();if(D)Z.append("Prefer",`count=${D}`);if(!J)Z.append("Prefer","missing=default");if(Array.isArray($)){let F=$.reduce((G,U)=>G.concat(Object.keys(U)),[]);if(F.length>0){let G=[...new Set(F)].map((U)=>`"${U}"`);Y.searchParams.set("columns",G.join(","))}}return new ZQ({method:"POST",url:Y,headers:Z,schema:this.schema,body:$,fetch:(Q=this.fetch)!==null&&Q!==void 0?Q:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert($,{onConflict:D,ignoreDuplicates:J=!1,count:Q,defaultToNull:X=!0}={}){var Y;let Z="POST",{url:F,headers:G}=this.cloneRequestState();if(G.append("Prefer",`resolution=${J?"ignore":"merge"}-duplicates`),D!==void 0)F.searchParams.set("on_conflict",D);if(Q)G.append("Prefer",`count=${Q}`);if(!X)G.append("Prefer","missing=default");if(Array.isArray($)){let U=$.reduce((q,W)=>q.concat(Object.keys(W)),[]);if(U.length>0){let q=[...new Set(U)].map((W)=>`"${W}"`);F.searchParams.set("columns",q.join(","))}}return new ZQ({method:"POST",url:F,headers:G,schema:this.schema,body:$,fetch:(Y=this.fetch)!==null&&Y!==void 0?Y:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update($,{count:D}={}){var J;let Q="PATCH",{url:X,headers:Y}=this.cloneRequestState();if(D)Y.append("Prefer",`count=${D}`);return new ZQ({method:"PATCH",url:X,headers:Y,schema:this.schema,body:$,fetch:(J=this.fetch)!==null&&J!==void 0?J:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:$}={}){var D;let J="DELETE",{url:Q,headers:X}=this.cloneRequestState();if($)X.append("Prefer",`count=${$}`);return new ZQ({method:"DELETE",url:Q,headers:X,schema:this.schema,fetch:(D=this.fetch)!==null&&D!==void 0?D:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},iu=class ${constructor(D,{headers:J={},schema:Q,fetch:X,timeout:Y,urlLengthLimit:Z=8000,retry:F}={}){this.url=D,this.headers=new Headers(J),this.schemaName=Q,this.urlLengthLimit=Z;let G=X!==null&&X!==void 0?X:globalThis.fetch;if(Y!==void 0&&Y>0)this.fetch=(U,q)=>{let W=new AbortController,z=setTimeout(()=>W.abort(),Y),H=q===null||q===void 0?void 0:q.signal;if(H){if(H.aborted)return clearTimeout(z),G(U,q);let K=()=>{clearTimeout(z),W.abort()};return H.addEventListener("abort",K,{once:!0}),G(U,Eq(Eq({},q),{},{signal:W.signal})).finally(()=>{clearTimeout(z),H.removeEventListener("abort",K)})}return G(U,Eq(Eq({},q),{},{signal:W.signal})).finally(()=>clearTimeout(z))};else this.fetch=G;this.retry=F}from(D){if(!D||typeof D!=="string"||D.trim()==="")throw Error("Invalid relation name: relation must be a non-empty string.");return new sw0(new URL(`${this.url}/${D}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(D){return new $(this.url,{headers:this.headers,schema:D,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(D,J={},{head:Q=!1,get:X=!1,count:Y}={}){var Z;let F,G=new URL(`${this.url}/rpc/${D}`),U,q=(H)=>H!==null&&typeof H==="object"&&(!Array.isArray(H)||H.some(q)),W=Q&&Object.values(J).some(q);if(W)F="POST",U=J;else if(Q||X)F=Q?"HEAD":"GET",Object.entries(J).filter(([H,K])=>K!==void 0).map(([H,K])=>[H,Array.isArray(K)?`{${K.join(",")}}`:`${K}`]).forEach(([H,K])=>{G.searchParams.append(H,K)});else F="POST",U=J;let z=new Headers(this.headers);if(W)z.set("Prefer",Y?`count=${Y},return=minimal`:"return=minimal");else if(Y)z.set("Prefer",`count=${Y}`);return new ZQ({method:F,url:G,headers:z,schema:this.schemaName,body:U,fetch:(Z=this.fetch)!==null&&Z!==void 0?Z:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};var ru=t(()=>{rw0=[520,503],pu=["GET","HEAD","OPTIONS"],Aq=class extends Error{constructor($){super($.message);this.name="PostgrestError",this.details=$.details,this.hint=$.hint,this.code=$.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};tw0=class extends aw0{throwOnError(){return super.throwOnError()}select($){let D=!1,J=($!==null&&$!==void 0?$:"*").split("").map((Q)=>{if(/\s/.test(Q)&&!D)return"";if(Q==='"')D=!D;return Q}).join("");return this.url.searchParams.set("select",J),this.headers.append("Prefer","return=representation"),this}order($,{ascending:D=!0,nullsFirst:J,foreignTable:Q,referencedTable:X=Q}={}){let Y=X?`${X}.order`:"order",Z=this.url.searchParams.get(Y);return this.url.searchParams.set(Y,`${Z?`${Z},`:""}${$}.${D?"asc":"desc"}${J===void 0?"":J?".nullsfirst":".nullslast"}`),this}limit($,{foreignTable:D,referencedTable:J=D}={}){let Q=typeof J>"u"?"limit":`${J}.limit`;return this.url.searchParams.set(Q,`${$}`),this}range($,D,{foreignTable:J,referencedTable:Q=J}={}){let X=typeof Q>"u"?"offset":`${Q}.offset`,Y=typeof Q>"u"?"limit":`${Q}.limit`;return this.url.searchParams.set(X,`${$}`),this.url.searchParams.set(Y,`${D-$+1}`),this}abortSignal($){return this.signal=$,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:$=!1,verbose:D=!1,settings:J=!1,buffers:Q=!1,wal:X=!1,format:Y="text"}={}){var Z;let F=[$?"analyze":null,D?"verbose":null,J?"settings":null,Q?"buffers":null,X?"wal":null].filter(Boolean).join("|"),G=(Z=this.headers.get("Accept"))!==null&&Z!==void 0?Z:"application/json";if(this.headers.set("Accept",`application/vnd.pgrst.plan+${Y}; for="${G}"; options=${F};`),Y==="json")return this;else return this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected($){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${$}`),this}},lu=new RegExp("[,()]"),ZQ=class extends tw0{throwOnError(){return super.throwOnError()}eq($,D){return this.url.searchParams.append($,`eq.${D}`),this}neq($,D){return this.url.searchParams.append($,`neq.${D}`),this}gt($,D){return this.url.searchParams.append($,`gt.${D}`),this}gte($,D){return this.url.searchParams.append($,`gte.${D}`),this}lt($,D){return this.url.searchParams.append($,`lt.${D}`),this}lte($,D){return this.url.searchParams.append($,`lte.${D}`),this}like($,D){return this.url.searchParams.append($,`like.${D}`),this}likeAllOf($,D){return this.url.searchParams.append($,`like(all).{${D.join(",")}}`),this}likeAnyOf($,D){return this.url.searchParams.append($,`like(any).{${D.join(",")}}`),this}ilike($,D){return this.url.searchParams.append($,`ilike.${D}`),this}ilikeAllOf($,D){return this.url.searchParams.append($,`ilike(all).{${D.join(",")}}`),this}ilikeAnyOf($,D){return this.url.searchParams.append($,`ilike(any).{${D.join(",")}}`),this}regexMatch($,D){return this.url.searchParams.append($,`match.${D}`),this}regexIMatch($,D){return this.url.searchParams.append($,`imatch.${D}`),this}is($,D){return this.url.searchParams.append($,`is.${D}`),this}isDistinct($,D){return this.url.searchParams.append($,`isdistinct.${D}`),this}in($,D){let J=Array.from(new Set(D)).map((Q)=>{if(typeof Q==="string"&&lu.test(Q))return`"${Q}"`;else return`${Q}`}).join(",");return this.url.searchParams.append($,`in.(${J})`),this}notIn($,D){let J=Array.from(new Set(D)).map((Q)=>{if(typeof Q==="string"&&lu.test(Q))return`"${Q}"`;else return`${Q}`}).join(",");return this.url.searchParams.append($,`not.in.(${J})`),this}contains($,D){if(typeof D==="string")this.url.searchParams.append($,`cs.${D}`);else if(Array.isArray(D))this.url.searchParams.append($,`cs.{${D.join(",")}}`);else this.url.searchParams.append($,`cs.${JSON.stringify(D)}`);return this}containedBy($,D){if(typeof D==="string")this.url.searchParams.append($,`cd.${D}`);else if(Array.isArray(D))this.url.searchParams.append($,`cd.{${D.join(",")}}`);else this.url.searchParams.append($,`cd.${JSON.stringify(D)}`);return this}rangeGt($,D){return this.url.searchParams.append($,`sr.${D}`),this}rangeGte($,D){return this.url.searchParams.append($,`nxl.${D}`),this}rangeLt($,D){return this.url.searchParams.append($,`sl.${D}`),this}rangeLte($,D){return this.url.searchParams.append($,`nxr.${D}`),this}rangeAdjacent($,D){return this.url.searchParams.append($,`adj.${D}`),this}overlaps($,D){if(typeof D==="string")this.url.searchParams.append($,`ov.${D}`);else this.url.searchParams.append($,`ov.{${D.join(",")}}`);return this}textSearch($,D,{config:J,type:Q}={}){let X="";if(Q==="plain")X="pl";else if(Q==="phrase")X="ph";else if(Q==="websearch")X="w";let Y=J===void 0?"":`(${J})`;return this.url.searchParams.append($,`${X}fts${Y}.${D}`),this}match($){return Object.entries($).filter(([D,J])=>J!==void 0).forEach(([D,J])=>{this.url.searchParams.append(D,`eq.${J}`)}),this}not($,D,J){return this.url.searchParams.append($,`not.${D}.${J}`),this}or($,{foreignTable:D,referencedTable:J=D}={}){let Q=J?`${J}.or`:"or";return this.url.searchParams.append(Q,`(${$})`),this}filter($,D,J){return this.url.searchParams.append($,`${D}.${J}`),this}}});var OM=E((ou)=>{Object.defineProperty(ou,"__esModule",{value:!0});ou.WebSocketFactory=void 0;class VM{constructor(){}static detectEnvironment(){var $;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};let D=globalThis;if(typeof globalThis<"u"&&typeof D.WebSocket<"u")return{type:"native",wsConstructor:D.WebSocket};let J=typeof global<"u"?global:void 0;if(J&&typeof J.WebSocket<"u")return{type:"native",wsConstructor:J.WebSocket};if(typeof globalThis<"u"&&typeof D.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&D.EdgeRuntime||typeof navigator<"u"&&(($=navigator.userAgent)===null||$===void 0?void 0:$.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};let Q=globalThis.process;if(Q){let X=Q.versions;if(X&&X.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){let $=this.detectEnvironment();if($.wsConstructor)return $.wsConstructor;let D=$.error||"WebSocket not supported in this environment.";if($.workaround)D+=`
|
|
@@ -322,6 +322,7 @@ export type Database = {
|
|
|
322
322
|
rollout_paused_version_names: string[];
|
|
323
323
|
name: string | null;
|
|
324
324
|
need_onboarding: boolean;
|
|
325
|
+
onboarding: Json;
|
|
325
326
|
onboarding_completed_at: string | null;
|
|
326
327
|
owner_org: string;
|
|
327
328
|
retention: number;
|
|
@@ -354,6 +355,7 @@ export type Database = {
|
|
|
354
355
|
rollout_paused_version_names?: string[];
|
|
355
356
|
name?: string | null;
|
|
356
357
|
need_onboarding?: boolean;
|
|
358
|
+
onboarding?: Json;
|
|
357
359
|
onboarding_completed_at?: string | null;
|
|
358
360
|
owner_org: string;
|
|
359
361
|
retention?: number;
|
|
@@ -386,6 +388,7 @@ export type Database = {
|
|
|
386
388
|
rollout_paused_version_names?: string[];
|
|
387
389
|
name?: string | null;
|
|
388
390
|
need_onboarding?: boolean;
|
|
391
|
+
onboarding?: Json;
|
|
389
392
|
onboarding_completed_at?: string | null;
|
|
390
393
|
owner_org?: string;
|
|
391
394
|
retention?: number;
|
|
@@ -1562,6 +1565,7 @@ export type Database = {
|
|
|
1562
1565
|
paying: number | null;
|
|
1563
1566
|
paying_monthly: number | null;
|
|
1564
1567
|
paying_yearly: number | null;
|
|
1568
|
+
plan_credits: number;
|
|
1565
1569
|
plan_enterprise: number | null;
|
|
1566
1570
|
plan_enterprise_conversion_rate: number;
|
|
1567
1571
|
plan_enterprise_monthly: number;
|
|
@@ -1656,6 +1660,7 @@ export type Database = {
|
|
|
1656
1660
|
paying?: number | null;
|
|
1657
1661
|
paying_monthly?: number | null;
|
|
1658
1662
|
paying_yearly?: number | null;
|
|
1663
|
+
plan_credits?: number;
|
|
1659
1664
|
plan_enterprise?: number | null;
|
|
1660
1665
|
plan_enterprise_conversion_rate?: number;
|
|
1661
1666
|
plan_enterprise_monthly?: number;
|
|
@@ -1750,6 +1755,7 @@ export type Database = {
|
|
|
1750
1755
|
paying?: number | null;
|
|
1751
1756
|
paying_monthly?: number | null;
|
|
1752
1757
|
paying_yearly?: number | null;
|
|
1758
|
+
plan_credits?: number;
|
|
1753
1759
|
plan_enterprise?: number | null;
|
|
1754
1760
|
plan_enterprise_conversion_rate?: number;
|
|
1755
1761
|
plan_enterprise_monthly?: number;
|
|
@@ -3783,6 +3789,7 @@ export type Database = {
|
|
|
3783
3789
|
manifest_bundle_count: number;
|
|
3784
3790
|
name: string | null;
|
|
3785
3791
|
need_onboarding: boolean;
|
|
3792
|
+
onboarding: Json;
|
|
3786
3793
|
onboarding_completed_at: string | null;
|
|
3787
3794
|
owner_org: string;
|
|
3788
3795
|
retention: number;
|
|
@@ -4736,6 +4743,13 @@ export type Database = {
|
|
|
4736
4743
|
};
|
|
4737
4744
|
Returns: string;
|
|
4738
4745
|
};
|
|
4746
|
+
mark_onboarding_feature_started: {
|
|
4747
|
+
Args: {
|
|
4748
|
+
p_app_id: string;
|
|
4749
|
+
p_feature_key: string;
|
|
4750
|
+
};
|
|
4751
|
+
Returns: Json;
|
|
4752
|
+
};
|
|
4739
4753
|
mass_edit_queue_messages_cf_ids: {
|
|
4740
4754
|
Args: {
|
|
4741
4755
|
updates: Database["public"]["CompositeTypes"]["message_update"][];
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -481,6 +481,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
481
481
|
rollout_paused_version_names: string[];
|
|
482
482
|
name: string | null;
|
|
483
483
|
need_onboarding: boolean;
|
|
484
|
+
onboarding: import("./types/supabase.types").Json;
|
|
484
485
|
onboarding_completed_at: string | null;
|
|
485
486
|
owner_org: string;
|
|
486
487
|
retention: number;
|
|
@@ -513,6 +514,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
513
514
|
rollout_paused_version_names?: string[];
|
|
514
515
|
name?: string | null;
|
|
515
516
|
need_onboarding?: boolean;
|
|
517
|
+
onboarding?: import("./types/supabase.types").Json;
|
|
516
518
|
onboarding_completed_at?: string | null;
|
|
517
519
|
owner_org: string;
|
|
518
520
|
retention?: number;
|
|
@@ -545,6 +547,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
545
547
|
rollout_paused_version_names?: string[];
|
|
546
548
|
name?: string | null;
|
|
547
549
|
need_onboarding?: boolean;
|
|
550
|
+
onboarding?: import("./types/supabase.types").Json;
|
|
548
551
|
onboarding_completed_at?: string | null;
|
|
549
552
|
owner_org?: string;
|
|
550
553
|
retention?: number;
|
|
@@ -1682,6 +1685,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1682
1685
|
paying: number | null;
|
|
1683
1686
|
paying_monthly: number | null;
|
|
1684
1687
|
paying_yearly: number | null;
|
|
1688
|
+
plan_credits: number;
|
|
1685
1689
|
plan_enterprise: number | null;
|
|
1686
1690
|
plan_enterprise_conversion_rate: number;
|
|
1687
1691
|
plan_enterprise_monthly: number;
|
|
@@ -1776,6 +1780,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1776
1780
|
paying?: number | null;
|
|
1777
1781
|
paying_monthly?: number | null;
|
|
1778
1782
|
paying_yearly?: number | null;
|
|
1783
|
+
plan_credits?: number;
|
|
1779
1784
|
plan_enterprise?: number | null;
|
|
1780
1785
|
plan_enterprise_conversion_rate?: number;
|
|
1781
1786
|
plan_enterprise_monthly?: number;
|
|
@@ -1870,6 +1875,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1870
1875
|
paying?: number | null;
|
|
1871
1876
|
paying_monthly?: number | null;
|
|
1872
1877
|
paying_yearly?: number | null;
|
|
1878
|
+
plan_credits?: number;
|
|
1873
1879
|
plan_enterprise?: number | null;
|
|
1874
1880
|
plan_enterprise_conversion_rate?: number;
|
|
1875
1881
|
plan_enterprise_monthly?: number;
|
|
@@ -3833,6 +3839,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3833
3839
|
manifest_bundle_count: number;
|
|
3834
3840
|
name: string | null;
|
|
3835
3841
|
need_onboarding: boolean;
|
|
3842
|
+
onboarding: import("./types/supabase.types").Json;
|
|
3836
3843
|
onboarding_completed_at: string | null;
|
|
3837
3844
|
owner_org: string;
|
|
3838
3845
|
retention: number;
|
|
@@ -4786,6 +4793,13 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
4786
4793
|
};
|
|
4787
4794
|
Returns: string;
|
|
4788
4795
|
};
|
|
4796
|
+
mark_onboarding_feature_started: {
|
|
4797
|
+
Args: {
|
|
4798
|
+
p_app_id: string;
|
|
4799
|
+
p_feature_key: string;
|
|
4800
|
+
};
|
|
4801
|
+
Returns: import("./types/supabase.types").Json;
|
|
4802
|
+
};
|
|
4789
4803
|
mass_edit_queue_messages_cf_ids: {
|
|
4790
4804
|
Args: {
|
|
4791
4805
|
updates: Database["public"]["CompositeTypes"]["message_update"][];
|