{"version":3,"file":"app-B3nCJori.mjs","names":["styles","red","green","blue","process","prefix","flag","argv","env","sign","version","string","prefix","supportsColor","chalk","ansiStyles","open","string","list","__importDefault","chalk_1","config","message","option","extendType","base","type_1","__createBinding","m","__setModuleDefault","__importStar","o","__importDefault","chalk_1","Result","findOption_1","type_1","types_1","config","_a","env","message","__createBinding","m","__setModuleDefault","__importStar","o","Result","effects_1","flag_1","types_1","message","version","__importDefault","flatMap","strip_ansi_1","__importDefault","chalk_1","utils_1","__createBinding","m","__setModuleDefault","__importStar","o","__importDefault","chalk_1","Result","types_1","config","_a","_b","_c","positional","__createBinding","m","__setModuleDefault","__importStar","o","__importDefault","subcommands","chalk_1","Result","circuitbreaker_1","helpFormatter_1","positional_1","config","cmd","option","_a","array","__createBinding","m","__setModuleDefault","__importStar","o","Result","helpFormatter_1","utils_1","config","option","__createBinding","m","__setModuleDefault","__importStar","o","__importDefault","chalk_1","Result","findOption_1","types_1","config","_a","env","option","message","__importDefault","chalk_1","utils_1","s","option","prefix","message","__importDefault","parse","debug","token","string","run","parse","__createBinding","m","__setModuleDefault","__importStar","o","Result","config","positional","__createBinding","m","__setModuleDefault","__importStar","o","Result","flag_1","findOption_1","config","option","__createBinding","m","__setModuleDefault","__importStar","o","__importDefault","Result","config","message","option","__createBinding","m","__setModuleDefault","__importStar","o","Result","type_1","node_util_1","__createBinding","m","o","config","m","exports","parse","match","ms","cmd","string","match","chalk","cmd","token","args","token","args","args","string","rest","array","string","args","rest","normalize","defaultOptions","defaultLocale","maxWidths: number[]","chalk","d","args","filtered: string[]","fs","process","fs","configFilePath","fsConstants","isWsl","process","execFileAsync","process","execFileAsync","process","execFileAsync","defaultBrowser","match","string","process","windows","execFile","path","process","Buffer","array","app","isWsl","command","platform","fsConstants","binary","spinners","isUnicodeSupported","process","chalk","isUnicodeSupported","string","isUnicodeSupported","process","env","TERM","process","process","indent","isUnicodeSupported","cliSpinners","chalk","logSymbols","prefix","err","c","debug","s","open","chalk","error: Error | undefined","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","version","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","digest","token","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","import_get_context","token","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","getVercelOidcToken","import_promises","import_exchange_vercel_oidc_token","import_get_context","import_get_vercel_oidc_token_sync","token","err","message","node_crypto_1","digest_js_1","node_buffer_1","buffer_utils_js_1","message","node_crypto_1","bitLength","errors_js_1","random_js_1","errors_js_1","iv_js_1","util","errors_js_1","is_key_object_js_1","node_crypto_1","buffer_utils_js_1","crypto","getNamedCurve","types","node_crypto_1","webcrypto_js_1","is_key_object_js_1","node_crypto_1","check_iv_length_js_1","check_cek_length_js_1","buffer_utils_js_1","errors_js_1","cbc_tag_js_1","webcrypto_js_1","crypto_key_js_1","is_key_object_js_1","invalid_key_input_js_1","ciphers_js_1","is_key_like_js_1","tag","decrypt","proto","node_buffer_1","node_crypto_1","errors_js_1","buffer_utils_js_1","webcrypto_js_1","crypto_key_js_1","is_key_object_js_1","invalid_key_input_js_1","ciphers_js_1","is_key_like_js_1","ensureKeyObject","wrap","unwrap","is_object_js_1","node_crypto_1","errors_js_1","webcrypto_js_1","is_key_object_js_1","invalid_key_input_js_1","is_key_like_js_1","is_jwk_js_1","node_crypto_1","node_util_1","get_named_curve_js_1","buffer_utils_js_1","errors_js_1","webcrypto_js_1","crypto_key_js_1","is_key_object_js_1","invalid_key_input_js_1","is_key_like_js_1","generateKeyPair","errors_js_1","p2s","node_util_1","node_crypto_1","random_js_1","buffer_utils_js_1","base64url_js_1","aeskw_js_1","webcrypto_js_1","crypto_key_js_1","is_key_object_js_1","invalid_key_input_js_1","is_key_like_js_1","encrypt","p2s","decrypt","node_crypto_1","node_crypto_1","node_util_1","check_key_length_js_1","webcrypto_js_1","crypto_key_js_1","is_key_object_js_1","invalid_key_input_js_1","is_key_like_js_1","encrypt","errors_js_1","random_js_1","node_crypto_1","webcrypto_js_1","is_key_object_js_1","invalid_key_input_js_1","is_key_like_js_1","node_crypto_1","base64url_js_1","asn1_js_1","errors_js_1","is_object_js_1","jwk","invalid_key_input_js_1","is_key_like_js_1","jwk","node_crypto_1","buffer_utils_js_1","webcrypto_js_1","crypto_key_js_1","is_key_object_js_1","invalid_key_input_js_1","errors_js_1","is_key_like_js_1","encrypt_js_1","decrypt_js_1","base64url_js_1","tag","aeskw_js_1","ECDH","pbes2kw_js_1","rsaes_js_1","base64url_js_1","normalize_key_js_1","errors_js_1","cek_js_1","import_js_1","check_key_type_js_1","is_object_js_1","aesgcmkw_js_1","p2s","tag","errors_js_1","s","option","base64url_js_1","decrypt_js_1","errors_js_1","is_disjoint_js_1","is_object_js_1","buffer_utils_js_1","cek_js_1","validate_crit_js_1","validate_algorithms_js_1","protectedHeader","err","tag","decrypt_js_1","errors_js_1","buffer_utils_js_1","tag","decrypt_js_1","errors_js_1","is_object_js_1","node_crypto_1","base64url_js_1","errors_js_1","webcrypto_js_1","invalid_key_input_js_1","is_key_like_js_1","base64url_js_1","cek_js_1","errors_js_1","export_js_1","check_key_type_js_1","y","p2s","base64url_js_1","private_symbols_js_1","encrypt_js_1","encrypt_key_management_js_1","errors_js_1","is_disjoint_js_1","buffer_utils_js_1","validate_crit_js_1","tag","encrypt_js_1","errors_js_1","is_disjoint_js_1","base64url_js_1","validate_crit_js_1","args","jwe","errors_js_1","node_crypto_1","errors_js_1","isJWK","errors_js_1","node_crypto_1","crypto","node_util_1","dsa_digest_js_1","node_key_js_1","get_sign_verify_key_js_1","crypto","node_util_1","sign_js_1","base64url_js_1","verify_js_1","errors_js_1","buffer_utils_js_1","is_disjoint_js_1","is_object_js_1","check_key_type_js_1","validate_crit_js_1","import_js_1","verify_js_1","errors_js_1","buffer_utils_js_1","verify_js_1","errors_js_1","is_object_js_1","errors_js_1","buffer_utils_js_1","epoch_js_1","secs_js_1","is_object_js_1","verify_js_1","jwt_claims_set_js_1","errors_js_1","decrypt_js_1","jwt_claims_set_js_1","errors_js_1","encrypt_js_1","base64url_js_1","sign_js_1","errors_js_1","buffer_utils_js_1","sign_js_1","sign_js_1","errors_js_1","args","rest","is_object_js_1","sign_js_1","errors_js_1","buffer_utils_js_1","produce_js_1","encrypt_js_1","buffer_utils_js_1","produce_js_1","base64url_js_1","errors_js_1","buffer_utils_js_1","is_object_js_1","jwk","import_js_1","is_object_js_1","errors_js_1","token","import_js_1","errors_js_1","is_object_js_1","clone","token","jwk","errors_js_1","buffer_utils_js_1","get","errors_js_1","local_js_1","is_object_js_1","token","err","base64url","buffer_utils_js_1","errors_js_1","base64url_js_1","buffer_utils_js_1","is_object_js_1","token","errors_js_1","generateSecret","generateKeyPair","generate_js_1","runtime_js_1","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","token","env","option","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","__toCommonJS","src_exports","debug","freshTokenAcquiredAt: number | undefined","cmd","chalk","AccessTokenMissingError","RefreshAccessTokenFailedError","message","z","err: any","err","path","string","fs","debug","inferScope","token","team","debug","status: number | undefined","debug","cmd","team: typeof scopeParser","scope","team","scope: ArgParser<{\n  token: string;\n  project: string;\n  team: string;\n  projectSlug?: string;\n  teamSlug?: string;\n}> &\n  ProvidesHelp","projectSlug: string | undefined","teamSlug: string | undefined","inferScope","err","chalk","chalk","message","debug","z","message","chalk","os","isWinOS","path","base","env","windows","path","windows","os","s","tmpdir","env","options","getGlobalPathConfig","getConfigFilePath","determineAgent","agentNamePromise: Promise<string | undefined> | undefined","debug","path","sandboxClient: Pick<\n  typeof Sandbox,\n  \"get\" | \"list\" | \"create\" | \"fork\"\n>","snapshotClient: Pick<\n  typeof Snapshot,\n  \"get\" | \"list\" | \"tree\"\n>","driveClient: Pick<typeof Drive, \"get\" | \"getOrCreate\" | \"list\"> & {\n  fork(drive: Drive, params: Parameters<Drive[\"fork\"]>[0]): Promise<Drive>;\n  delete(drive: Drive): Promise<void>;\n}","fetchWithUserAgent: typeof globalThis.fetch","init","cmd","s","chalk","cmd","chalk","string","cmd","cmd","s","chalk","debug","timeout","setTimeout","nextTick","debug","s","command","args","execution: [string, ...string[]]","client: WebSocket","token","chalk","err","env","chalk","command","args","cmd","rest","obj: Record<string, string>","missingVars: string[]","plural","chalk","args","cmd","chalk","sandboxName","timeout","project","team","command","cmd","chalk","networkPolicy","chalk","args","allowedDomains","allowedCIDRs","deniedCIDRs","keepLastSnapshots","keepLastSnapshotsFor","deleteEvictedSnapshots","chalk","scope","chalk","cmd","mounts: DriveMounts","mounts","SIZE_MULTIPLIERS: Record<string, number>","match","region","path","rest","validModes: SandboxMountMode[]","chalk","controller: AbortController | undefined","timeout","chalk","c","cmd","region","cmd","networkId","agents: Record<(typeof agentNames)[number], Agent>","args","cmd","networkPolicyMode","runtime","snapshot","networkPolicy","vcpus","mounts","scope","timeout","snapshotExpiration","chalk","connect","check","args","Create.args","rest","args","cmd","networkPolicyMode","networkPolicy","allowedDomains","allowedCIDRs","deniedCIDRs","scope","chalk","timeout","vcpus","region","failoverRegions","networkId","snapshotExpiration","connect","args","Create.args","Exec.args","rest","sandbox: Sandbox","digest","cmd","chalk","_spinner","s","team","project","columns: Record<string, Column>","formatMounts","SandboxStatusColor: Record<Sandbox[\"status\"], ChalkInstance>","mounts","path","Exec.args","args","widths: number[]","prefix","chalk","snapshot","sandboxName","team","project","project","team","chalk","EventEmitter","args","EventEmitter","tty","string","open","colors","rfdc","handler","clone","EventEmitter","args","string","message","output","prefix","m","output$1","DefaultRenderer","wrap","s","SimpleRenderer","TestRenderer","VerboseRenderer","randomUUID","err","sandboxName","team","project","path","chalk","cmd","sourceFile: Buffer<ArrayBufferLike> | null","err","scope","chalk","cmd","sandboxName","stop","chalk","project","team","snapshot","chalk","ms","lines: string[]","list","cmd","_spinner","s","team","project","snapshots","chalk","snapshot","remove","snapshotId","list","cmd","project","team","_spinner","s","sessions","columns: Record<string, Column>","chalk","SessionStatusColor: Record<Sandbox[\"status\"], ChalkInstance>","project","team","chalk","cmd","snapshotId","route","prefix","region","failoverRegions","networkId","mountsOption","mounts","_spinner","s","networkPolicy","networkPolicyModeType","sandboxName","networkPolicyMode","allowedDomains","allowedCIDRs","deniedCIDRs","entries","keepLastSnapshots","path","list","cmd","_spinner","s","team","project","drives","chalk","fork","remove","driveName","drive","chalk"],"sources":["../../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/vendor/ansi-styles/index.js","../../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/vendor/supports-color/index.js","../../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/utilities.js","../../../node_modules/.pnpm/chalk@5.6.0/node_modules/chalk/source/index.js","../../../node_modules/.pnpm/didyoumean@1.2.2/node_modules/didyoumean/didYouMean-1.2.1.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/Result.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/effects.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/newparser/findOption.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/from.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/type.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/types.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/flag.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/circuitbreaker.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/utils.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/helpFormatter.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/positional.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/subcommands.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/binary.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/command.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/option.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/errorBox.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/newparser/parser.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/newparser/tokenizer.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/runner.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/restPositionals.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/multiflag.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/multioption.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/union.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/oneOf.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/rest.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/index.js","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../src/args/runtime.ts","../src/types/duration.ts","../src/args/timeout.ts","../src/args/vcpus.ts","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getRoundingMethod.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/compareAsc.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/formatDistanceStrict.js","../src/util/output.ts","../../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js","../../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js","../../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js","../../../node_modules/.pnpm/wsl-utils@0.1.0/node_modules/wsl-utils/index.js","../../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js","../../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js","../../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js","../../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js","../../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/windows.js","../../../node_modules/.pnpm/default-browser@5.2.1/node_modules/default-browser/index.js","../../../node_modules/.pnpm/open@10.2.0/node_modules/open/index.js","../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json","../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js","../../../node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js","../../../node_modules/.pnpm/log-symbols@6.0.0/node_modules/log-symbols/index.js","../../../node_modules/.pnpm/ansi-regex@6.2.0/node_modules/ansi-regex/index.js","../../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js","../../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js","../../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js","../../../node_modules/.pnpm/stdin-discarder@0.2.2/node_modules/stdin-discarder/index.js","../../../node_modules/.pnpm/ora@8.2.0/node_modules/ora/index.js","../src/util/abort-controller.ts","../src/util/disposables.ts","../src/commands/login.ts","../../../node_modules/.pnpm/@vercel+oidc@4.0.0/node_modules/@vercel/oidc/dist/version.js","../../../node_modules/.pnpm/@vercel+oidc@4.0.0/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js","../../../node_modules/.pnpm/@vercel+oidc@4.0.0/node_modules/@vercel/oidc/dist/get-context.js","../../../node_modules/.pnpm/@vercel+oidc@4.0.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js","../../../node_modules/.pnpm/@vercel+oidc@4.0.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js","../../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js","../../../node_modules/.pnpm/@vercel+oidc@4.0.0/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js","../../../node_modules/.pnpm/@vercel+oidc@4.0.0/node_modules/@vercel/oidc/dist/index.js","../src/args/auth.ts","../src/util/zod.ts","../src/util/project-configuration.ts","../src/util/infer-scope.ts","../src/util/fresh-auth-retry.ts","../src/args/scope.ts","../package.json","../src/error.ts","../src/util/format-error.ts","../../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js","../../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js","../../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js","../../../node_modules/.pnpm/@vercel+cli-config@0.2.4/node_modules/@vercel/cli-config/dist/paths.js","../../../node_modules/.pnpm/@vercel+detect-agent@1.2.5/node_modules/@vercel/detect-agent/dist/index.js","../src/telemetry/agent.ts","../src/telemetry/index.ts","../src/client.ts","../src/args/snapshot-id.ts","../src/args/ports.ts","../src/types/snapshot-expiration.ts","../src/args/snapshot-retention.ts","../src/args/sandbox-name.ts","../src/interactive-shell/extend-sandbox-timeout.ts","../src/interactive-shell/interactive-shell.ts","../src/util/print-command.ts","../src/args/key-value-pair.ts","../src/commands/exec.ts","../src/args/network-policy.ts","../src/util/network-policy.ts","../src/util/keep-last-snapshots.ts","../src/util/print-sandbox-summary.ts","../src/args/drive.ts","../src/util/check-latest-version.ts","../src/args/region.ts","../src/args/network-id.ts","../src/interactive-shell/default-shell.ts","../src/commands/agents.ts","../src/commands/create.ts","../src/util/omit.ts","../src/commands/sh.ts","../src/commands/fork.ts","../src/commands/run.ts","../src/commands/list.ts","../src/commands/connect.ts","../src/commands/stop.ts","../src/commands/extend.ts","../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js","../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs","../../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.js","../../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js","../../../node_modules/.pnpm/listr2@9.0.3/node_modules/listr2/dist/index.js","../src/commands/remove.ts","../src/commands/cp.ts","../src/commands/logout.ts","../src/commands/snapshot.ts","../src/util/snapshot-tree.ts","../src/commands/snapshots.ts","../src/commands/sessions.ts","../src/commands/config.ts","../src/commands/drives.ts","../src/commands/telemetry.ts","../src/app.ts"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","/*\n\ndidYouMean.js - A simple JavaScript matching engine\n===================================================\n\n[Available on GitHub](https://github.com/dcporter/didyoumean.js).\n\nA super-simple, highly optimized JS library for matching human-quality input to a list of potential\nmatches. You can use it to suggest a misspelled command-line utility option to a user, or to offer\nlinks to nearby valid URLs on your 404 page. (The examples below are taken from a personal project,\nmy [HTML5 business card](http://dcporter.aws.af.cm/me), which uses didYouMean.js to suggest correct\nURLs from misspelled ones, such as [dcporter.aws.af.cm/me/instagarm](http://dcporter.aws.af.cm/me/instagarm).)\nUses the [Levenshtein distance algorithm](https://en.wikipedia.org/wiki/Levenshtein_distance).\n\ndidYouMean.js works in the browser as well as in node.js. To install it for use in node:\n\n```\nnpm install didyoumean\n```\n\n\nExamples\n--------\n\nMatching against a list of strings:\n```\nvar input = 'insargrm'\nvar list = ['facebook', 'twitter', 'instagram', 'linkedin'];\nconsole.log(didYouMean(input, list));\n> 'instagram'\n// The method matches 'insargrm' to 'instagram'.\n\ninput = 'google plus';\nconsole.log(didYouMean(input, list));\n> null\n// The method was unable to find 'google plus' in the list of options.\n```\n\nMatching against a list of objects:\n```\nvar input = 'insargrm';\nvar list = [ { id: 'facebook' }, { id: 'twitter' }, { id: 'instagram' }, { id: 'linkedin' } ];\nvar key = 'id';\nconsole.log(didYouMean(input, list, key));\n> 'instagram'\n// The method returns the matching value.\n\ndidYouMean.returnWinningObject = true;\nconsole.log(didYouMean(input, list, key));\n> { id: 'instagram' }\n// The method returns the matching object.\n```\n\n\ndidYouMean(str, list, [key])\n----------------------------\n\n- str: The string input to match.\n- list: An array of strings or objects to match against.\n- key (OPTIONAL): If your list array contains objects, you must specify the key which contains the string\n  to match against.\n\nReturns: the closest matching string, or null if no strings exceed the threshold.\n\n\nOptions\n-------\n\nOptions are set on the didYouMean function object. You may change them at any time.\n\n### threshold\n\n  By default, the method will only return strings whose edit distance is less than 40% (0.4x) of their length.\n  For example, if a ten-letter string is five edits away from its nearest match, the method will return null.\n\n  You can control this by setting the \"threshold\" value on the didYouMean function. For example, to set the\n  edit distance threshold to 50% of the input string's length:\n\n  ```\n  didYouMean.threshold = 0.5;\n  ```\n\n  To return the nearest match no matter the threshold, set this value to null.\n\n### thresholdAbsolute\n\n  This option behaves the same as threshold, but instead takes an integer number of edit steps. For example,\n  if thresholdAbsolute is set to 20 (the default), then the method will only return strings whose edit distance\n  is less than 20. Both options apply.\n\n### caseSensitive\n\n  By default, the method will perform case-insensitive comparisons. If you wish to force case sensitivity, set\n  the \"caseSensitive\" value to true:\n\n  ```\n  didYouMean.caseSensitive = true;\n  ```\n\n### nullResultValue\n\n  By default, the method will return null if there is no sufficiently close match. You can change this value here.\n\n### returnWinningObject\n\n  By default, the method will return the winning string value (if any). If your list contains objects rather\n  than strings, you may set returnWinningObject to true.\n  \n  ```\n  didYouMean.returnWinningObject = true;\n  ```\n  \n  This option has no effect on lists of strings.\n\n### returnFirstMatch\n  \n  By default, the method will search all values and return the closest match. If you're simply looking for a \"good-\n  enough\" match, you can set your thresholds appropriately and set returnFirstMatch to true to substantially speed\n  things up.\n\n\nLicense\n-------\n\ndidYouMean copyright (c) 2013-2014 Dave Porter.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License\n[here](http://www.apache.org/licenses/LICENSE-2.0).\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n*/\n(function() {\n  \"use strict\";\n\n  // The didYouMean method.\n  function didYouMean(str, list, key) {\n    if (!str) return null;\n\n    // If we're running a case-insensitive search, smallify str.\n    if (!didYouMean.caseSensitive) { str = str.toLowerCase(); }\n\n    // Calculate the initial value (the threshold) if present.\n    var thresholdRelative = didYouMean.threshold === null ? null : didYouMean.threshold * str.length,\n        thresholdAbsolute = didYouMean.thresholdAbsolute,\n        winningVal;\n    if (thresholdRelative !== null && thresholdAbsolute !== null) winningVal = Math.min(thresholdRelative, thresholdAbsolute);\n    else if (thresholdRelative !== null) winningVal = thresholdRelative;\n    else if (thresholdAbsolute !== null) winningVal = thresholdAbsolute;\n    else winningVal = null;\n\n    // Get the edit distance to each option. If the closest one is less than 40% (by default) of str's length,\n    // then return it.\n    var winner, candidate, testCandidate, val,\n        i, len = list.length;\n    for (i = 0; i < len; i++) {\n      // Get item.\n      candidate = list[i];\n      // If there's a key, get the candidate value out of the object.\n      if (key) { candidate = candidate[key]; }\n      // Gatekeep.\n      if (!candidate) { continue; }\n      // If we're running a case-insensitive search, smallify the candidate.\n      if (!didYouMean.caseSensitive) { testCandidate = candidate.toLowerCase(); }\n      else { testCandidate = candidate; }\n      // Get and compare edit distance.\n      val = getEditDistance(str, testCandidate, winningVal);\n      // If this value is smaller than our current winning value, OR if we have no winning val yet (i.e. the\n      // threshold option is set to null, meaning the caller wants a match back no matter how bad it is), then\n      // this is our new winner.\n      if (winningVal === null || val < winningVal) {\n        winningVal = val;\n        // Set the winner to either the value or its object, depending on the returnWinningObject option.\n        if (key && didYouMean.returnWinningObject) winner = list[i];\n        else winner = candidate;\n        // If we're returning the first match, return it now.\n        if (didYouMean.returnFirstMatch) return winner;\n      }\n    }\n\n    // If we have a winner, return it.\n    return winner || didYouMean.nullResultValue;\n  }\n\n  // Set default options.\n  didYouMean.threshold = 0.4;\n  didYouMean.thresholdAbsolute = 20;\n  didYouMean.caseSensitive = false;\n  didYouMean.nullResultValue = null;\n  didYouMean.returnWinningObject = null;\n  didYouMean.returnFirstMatch = false;\n\n  // Expose.\n  // In node...\n  if (typeof module !== 'undefined' && module.exports) {\n    module.exports = didYouMean;\n  }\n  // Otherwise...\n  else {\n    window.didYouMean = didYouMean;\n  }\n\n  var MAX_INT = Math.pow(2,32) - 1; // We could probably go higher than this, but for practical reasons let's not.\n  function getEditDistance(a, b, max) {\n    // Handle null or undefined max.\n    max = max || max === 0 ? max : MAX_INT;\n\n    var lena = a.length;\n    var lenb = b.length;\n\n    // Fast path - no A or B.\n    if (lena === 0) return Math.min(max + 1, lenb);\n    if (lenb === 0) return Math.min(max + 1, lena);\n\n    // Fast path - length diff larger than max.\n    if (Math.abs(lena - lenb) > max) return max + 1;\n\n    // Slow path.\n    var matrix = [],\n        i, j, colMin, minJ, maxJ;\n\n    // Set up the first row ([0, 1, 2, 3, etc]).\n    for (i = 0; i <= lenb; i++) { matrix[i] = [i]; }\n\n    // Set up the first column (same).\n    for (j = 0; j <= lena; j++) { matrix[0][j] = j; }\n\n    // Loop over the rest of the columns.\n    for (i = 1; i <= lenb; i++) {\n      colMin = MAX_INT;\n      minJ = 1;\n      if (i > max) minJ = i - max;\n      maxJ = lenb + 1;\n      if (maxJ > max + i) maxJ = max + i;\n      // Loop over the rest of the rows.\n      for (j = 1; j <= lena; j++) {\n        // If j is out of bounds, just put a large value in the slot.\n        if (j < minJ || j > maxJ) {\n          matrix[i][j] = max + 1;\n        }\n\n        // Otherwise do the normal Levenshtein thing.\n        else {\n          // If the characters are the same, there's no change in edit distance.\n          if (b.charAt(i - 1) === a.charAt(j - 1)) {\n            matrix[i][j] = matrix[i - 1][j - 1];\n          }\n          // Otherwise, see if we're substituting, inserting or deleting.\n          else {\n            matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // Substitute\n                                    Math.min(matrix[i][j - 1] + 1, // Insert\n                                    matrix[i - 1][j] + 1)); // Delete\n          }\n        }\n\n        // Either way, update colMin.\n        if (matrix[i][j] < colMin) colMin = matrix[i][j];\n      }\n\n      // If this column's minimum is greater than the allowed maximum, there's no point\n      // in going on with life.\n      if (colMin > max) return max + 1;\n    }\n    // If we made it this far without running into the max, then return the final matrix value.\n    return matrix[lenb][lena];\n  }\n\n})();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ok = ok;\nexports.err = err;\nexports.isOk = isOk;\nexports.isErr = isErr;\nexports.safeAsync = safeAsync;\nfunction ok(value) {\n    return { _tag: \"ok\", value };\n}\nfunction err(error) {\n    return { _tag: \"error\", error };\n}\n/**\n * Checks whether a value is an `Ok`.\n * Handy with TypeScript guards\n */\nfunction isOk(result) {\n    return result._tag === \"ok\";\n}\n/**\n * Checks whether a value is an `Err`.\n * Handy with TypeScript guards\n */\nfunction isErr(either) {\n    return either._tag === \"error\";\n}\n/**\n * Convert a `Promise<T>` into a `Promise<Result<Error, T>>`,\n * therefore catching the errors and being able to handle them explicitly\n */\nasync function safeAsync(promise) {\n    try {\n        const value = await promise;\n        return ok(value);\n    }\n    catch (e) {\n        return err(e);\n    }\n}\n//# sourceMappingURL=Result.js.map","\"use strict\";\n/**\n * \"Effects\" are custom exceptions that can do stuff.\n * The concept comes from React, where they throw a `Promise` to provide the ability to write\n * async code with synchronous syntax.\n *\n * These effects _should stay an implementation detail_ and not leak out of the library.\n *\n * @packageDocumentation\n */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Exit = void 0;\nconst chalk_1 = __importDefault(require(\"chalk\"));\n/**\n * An effect to exit the program with a message\n *\n * **Why this is an effect?**\n *\n * Using `process.exit` in a program is both a problem:\n * * in tests, because it needs to be mocked somehow\n * * in browser usage, because it does not have `process` at all\n *\n * Also, using `console.log` is something we'd rather avoid and return strings, and if returning strings\n * would be harmful for performance we might ask for a stream to write to:\n * Printing to stdout and stderr means that we don't control the values and it ties us to only use `cmd-ts`\n * with a command line, and again, to mock `stdout` and `stderr` it if we want to test it.\n */\nclass Exit {\n    constructor(config) {\n        this.config = config;\n    }\n    run() {\n        const output = this.output();\n        output(this.config.message);\n        process.exit(this.config.exitCode);\n    }\n    dryRun() {\n        const { into, message, exitCode } = this.config;\n        const coloredExit = chalk_1.default.dim(`process exited with status ${exitCode} (${into})`);\n        return `${message}\\n\\n${coloredExit}`;\n    }\n    output() {\n        if (this.config.into === \"stderr\") {\n            return console.error;\n        }\n        return console.log;\n    }\n}\nexports.Exit = Exit;\n//# sourceMappingURL=effects.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findOption = findOption;\n/**\n * A utility function to find an option in the AST\n *\n * @param nodes AST node list\n * @param opts Long and short names to look up\n */\nfunction findOption(nodes, opts) {\n    const result = [];\n    for (const node of nodes) {\n        if (node.type === \"longOption\" && opts.longNames.includes(node.key)) {\n            result.push(node);\n            continue;\n        }\n        if (node.type === \"shortOptions\" && opts.shortNames.length) {\n            for (const option of node.options) {\n                if (opts.shortNames.includes(option.key)) {\n                    result.push(option);\n                }\n            }\n        }\n    }\n    return result;\n}\n//# sourceMappingURL=findOption.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identity = identity;\n/**\n * A type \"conversion\" from any type to itself\n */\nfunction identity() {\n    return {\n        async from(a) {\n            return a;\n        },\n    };\n}\n//# sourceMappingURL=from.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identity = void 0;\nexports.typeDef = typeDef;\nexports.fromFn = fromFn;\nexports.extendType = extendType;\nvar from_1 = require(\"./from\");\nObject.defineProperty(exports, \"identity\", { enumerable: true, get: function () { return from_1.identity; } });\n/**\n * Get the type definitions or an empty object from a type or a decoding function\n */\nfunction typeDef(from) {\n    if (typeof from === \"function\") {\n        return {};\n    }\n    return from;\n}\n/**\n * Get the decoding function from a type or a function\n */\nfunction fromFn(t) {\n    if (typeof t === \"function\") {\n        return t;\n    }\n    return t.from;\n}\n/**\n * Extend a type: take a type and use it as a base for another type. Much like using the spread operator:\n * ```\n * const newType = { ...oldType }\n * ```\n * but composes the `from` arguments\n *\n * @param base A base type from `InputA` to `OutputA`\n * @param nextTypeOrDecodingFunction Either an entire `Type<OutputA, AnyOutput>` or just a decoding function from `OutputA` to any type\n */\nfunction extendType(base, nextTypeOrDecodingFunction) {\n    const { defaultValue: _defaultValue, onMissing: _onMissing, from: _from, ...t1WithoutDefault } = base;\n    const t2Object = typeDef(nextTypeOrDecodingFunction);\n    const t2From = fromFn(nextTypeOrDecodingFunction);\n    return {\n        ...t1WithoutDefault,\n        ...t2Object,\n        async from(a) {\n            const f1Result = await base.from(a);\n            return await t2From(f1Result);\n        },\n    };\n}\n//# sourceMappingURL=type.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolean = exports.string = exports.number = void 0;\nexports.optional = optional;\nexports.array = array;\nconst type_1 = require(\"./type\");\n/**\n * A number type to be used with `option`\n *\n * Throws an error when the provided string is not a number\n */\nexports.number = {\n    async from(str) {\n        const decoded = Number.parseFloat(str);\n        if (Number.isNaN(decoded)) {\n            throw new Error(\"Not a number\");\n        }\n        return decoded;\n    },\n    displayName: \"number\",\n    description: \"a number\",\n};\n/**\n * A string type to be used with `option`.\n */\nexports.string = {\n    ...(0, type_1.identity)(),\n    description: \"a string\",\n    displayName: \"str\",\n};\n/**\n * A boolean type to be used with `flag`.\n */\nexports.boolean = {\n    ...(0, type_1.identity)(),\n    description: \"a boolean\",\n    displayName: \"true/false\",\n    defaultValue() {\n        return false;\n    },\n};\n/**\n * Makes any type optional, by defaulting to `undefined`.\n */\nfunction optional(t) {\n    return {\n        ...t,\n        defaultValue() {\n            return undefined;\n        },\n    };\n}\n/**\n * Transforms any type into an array, useful for `multioption` and `multiflag`.\n */\nfunction array(t) {\n    return {\n        ...t,\n        async from(inputs) {\n            return Promise.all(inputs.map((input) => t.from(input)));\n        },\n    };\n}\n//# sourceMappingURL=types.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolean = void 0;\nexports.fullFlag = fullFlag;\nexports.flag = flag;\nconst chalk_1 = __importDefault(require(\"chalk\"));\nconst Result = __importStar(require(\"./Result\"));\nconst findOption_1 = require(\"./newparser/findOption\");\nconst type_1 = require(\"./type\");\nconst types_1 = require(\"./types\");\n/**\n * A decoder from `string` to `boolean`\n * works for `true` and `false` only.\n */\nexports.boolean = {\n    async from(str) {\n        if (str === \"true\")\n            return true;\n        if (str === \"false\")\n            return false;\n        throw new Error(`expected value to be either \"true\" or \"false\". got: \"${str}\"`);\n    },\n    displayName: \"true/false\",\n    defaultValue: () => false,\n};\nfunction fullFlag(config) {\n    var _a;\n    const decoder = (0, type_1.extendType)(exports.boolean, config.type);\n    return {\n        description: (_a = config.description) !== null && _a !== void 0 ? _a : config.type.description,\n        helpTopics() {\n            var _a, _b;\n            let usage = `--${config.long}`;\n            if (config.short) {\n                usage += `, -${config.short}`;\n            }\n            const defaults = [];\n            if (config.env) {\n                const env = process.env[config.env] === undefined\n                    ? \"\"\n                    : `=${chalk_1.default.italic(process.env[config.env])}`;\n                defaults.push(`env: ${config.env}${env}`);\n            }\n            if (config.defaultValue) {\n                try {\n                    const defaultValue = config.defaultValue();\n                    if (config.defaultValueIsSerializable) {\n                        defaults.push(`default: ${chalk_1.default.italic(defaultValue)}`);\n                    }\n                    else {\n                        defaults.push(\"optional\");\n                    }\n                }\n                catch (e) { }\n            }\n            else if (config.type.defaultValue) {\n                try {\n                    const defaultValue = config.type.defaultValue();\n                    if (config.type.defaultValueIsSerializable) {\n                        defaults.push(`default: ${chalk_1.default.italic(defaultValue)}`);\n                    }\n                    else {\n                        defaults.push(\"optional\");\n                    }\n                }\n                catch (e) { }\n            }\n            else if (config.onMissing || config.type.onMissing) {\n                defaults.push(\"optional\");\n            }\n            return [\n                {\n                    category: \"flags\",\n                    usage,\n                    defaults,\n                    description: (_b = (_a = config.description) !== null && _a !== void 0 ? _a : config.type.description) !== null && _b !== void 0 ? _b : \"self explanatory\",\n                },\n            ];\n        },\n        register(opts) {\n            opts.forceFlagLongNames.add(config.long);\n            if (config.short) {\n                opts.forceFlagShortNames.add(config.short);\n            }\n        },\n        async parse({ nodes, visitedNodes, }) {\n            var _a, _b;\n            const options = (0, findOption_1.findOption)(nodes, {\n                longNames: [config.long],\n                shortNames: config.short ? [config.short] : [],\n            }).filter((x) => !visitedNodes.has(x));\n            options.forEach((opt) => visitedNodes.add(opt));\n            if (options.length > 1) {\n                return Result.err({\n                    errors: [\n                        {\n                            nodes: options,\n                            message: `Expected 1 occurence, got ${options.length}`,\n                        },\n                    ],\n                });\n            }\n            const valueFromEnv = config.env ? process.env[config.env] : undefined;\n            const onMissingFn = config.onMissing || config.type.onMissing;\n            let rawValue;\n            let envPrefix = \"\";\n            if (options.length === 0 && valueFromEnv !== undefined) {\n                rawValue = valueFromEnv;\n                envPrefix = `env[${chalk_1.default.italic(config.env)}]: `;\n            }\n            else if (options.length === 0 && config.defaultValue) {\n                try {\n                    const defaultValue = config.defaultValue();\n                    return Result.ok(defaultValue);\n                }\n                catch (e) {\n                    const message = `Default value not found for '--${config.long}': ${e.message}`;\n                    return Result.err({\n                        errors: [{ message, nodes: [] }],\n                    });\n                }\n            }\n            else if (options.length === 0 && onMissingFn) {\n                try {\n                    const missingValue = await onMissingFn();\n                    return Result.ok(missingValue);\n                }\n                catch (e) {\n                    const message = `Failed to get missing value for '--${config.long}': ${e.message}`;\n                    return Result.err({\n                        errors: [{ message, nodes: [] }],\n                    });\n                }\n            }\n            else if (options.length === 0 && config.type.defaultValue) {\n                try {\n                    const defaultValue = config.type.defaultValue();\n                    return Result.ok(defaultValue);\n                }\n                catch (e) {\n                    const message = `Default value not found for '--${config.long}': ${e.message}`;\n                    return Result.err({\n                        errors: [{ message, nodes: [] }],\n                    });\n                }\n            }\n            else if (options.length === 1) {\n                rawValue = (_b = (_a = options[0].value) === null || _a === void 0 ? void 0 : _a.node.raw) !== null && _b !== void 0 ? _b : \"true\";\n            }\n            else {\n                return Result.err({\n                    errors: [\n                        { nodes: [], message: `No value provided for --${config.long}` },\n                    ],\n                });\n            }\n            const decoded = await Result.safeAsync(decoder.from(rawValue));\n            if (Result.isErr(decoded)) {\n                return Result.err({\n                    errors: [\n                        {\n                            nodes: options,\n                            message: envPrefix + decoded.error.message,\n                        },\n                    ],\n                });\n            }\n            return decoded;\n        },\n    };\n}\nfunction flag(config) {\n    return fullFlag({\n        type: types_1.boolean,\n        ...config,\n    });\n}\n//# sourceMappingURL=flag.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.versionFlag = exports.helpFlag = void 0;\nexports.handleCircuitBreaker = handleCircuitBreaker;\nexports.createCircuitBreaker = createCircuitBreaker;\nconst Result = __importStar(require(\"./Result\"));\nconst effects_1 = require(\"./effects\");\nconst flag_1 = require(\"./flag\");\nconst types_1 = require(\"./types\");\nexports.helpFlag = (0, flag_1.flag)({\n    long: \"help\",\n    short: \"h\",\n    type: types_1.boolean,\n    description: \"show help\",\n});\nexports.versionFlag = (0, flag_1.flag)({\n    long: \"version\",\n    short: \"v\",\n    type: types_1.boolean,\n    description: \"print the version\",\n});\nfunction handleCircuitBreaker(context, value, breaker) {\n    if (Result.isErr(breaker)) {\n        return;\n    }\n    if (breaker.value === \"help\") {\n        const message = value.printHelp(context);\n        throw new effects_1.Exit({ exitCode: 0, message, into: \"stdout\" });\n    }\n    if (breaker.value === \"version\") {\n        const message = value.version || \"0.0.0\";\n        throw new effects_1.Exit({ exitCode: 0, message, into: \"stdout\" });\n    }\n}\n/**\n * Helper flags that are being used in `command` and `subcommands`:\n * `--help, -h` to show help\n * `--version, -v` to show the current version\n *\n * It is called circuitbreaker because if you have `--help` or `--version`\n * anywhere in your argument list, you'll see the version and the help for the closest command\n */\nfunction createCircuitBreaker(withVersion) {\n    return {\n        register(opts) {\n            exports.helpFlag.register(opts);\n            if (withVersion) {\n                exports.versionFlag.register(opts);\n            }\n        },\n        helpTopics() {\n            const helpTopics = exports.helpFlag.helpTopics();\n            if (withVersion) {\n                helpTopics.push(...exports.versionFlag.helpTopics());\n            }\n            return helpTopics;\n        },\n        async parse(context) {\n            const help = await exports.helpFlag.parse(context);\n            const version = withVersion\n                ? await exports.versionFlag.parse(context)\n                : undefined;\n            if (Result.isErr(help) || (version && Result.isErr(version))) {\n                const helpErrors = Result.isErr(help) ? help.error.errors : [];\n                const versionErrors = version && Result.isErr(version) ? version.error.errors : [];\n                return Result.err({ errors: [...helpErrors, ...versionErrors] });\n            }\n            if (help.value) {\n                return Result.ok(\"help\");\n            }\n            if (version === null || version === void 0 ? void 0 : version.value) {\n                return Result.ok(\"version\");\n            }\n            return Result.err({\n                errors: [\n                    {\n                        nodes: [],\n                        message: \"Neither help nor version\",\n                    },\n                ],\n            });\n        },\n    };\n}\n//# sourceMappingURL=circuitbreaker.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.padNoAnsi = padNoAnsi;\nexports.groupBy = groupBy;\nexports.entries = entries;\nexports.enumerate = enumerate;\nexports.flatMap = flatMap;\nexports.flatten = flatten;\nconst strip_ansi_1 = __importDefault(require(\"strip-ansi\"));\n/**\n * @ignore\n */\nfunction padNoAnsi(str, length, place) {\n    const noAnsiStr = (0, strip_ansi_1.default)(str);\n    if (length < noAnsiStr.length)\n        return str;\n    const pad = Array(length - noAnsiStr.length + 1).join(\" \");\n    if (place === \"end\") {\n        return str + pad;\n    }\n    return pad + str;\n}\n/**\n * Group an array by a function that returns the key\n *\n * @ignore\n */\nfunction groupBy(objs, f) {\n    var _a;\n    const result = {};\n    for (const obj of objs) {\n        const key = f(obj);\n        result[key] = (_a = result[key]) !== null && _a !== void 0 ? _a : [];\n        result[key].push(obj);\n    }\n    return result;\n}\n/**\n * A better typed version of `Object.entries`\n *\n * @ignore\n */\nfunction entries(obj) {\n    return Object.entries(obj);\n}\n/**\n * Enumerate over a list, to get a pair of [index, value]\n *\n * @ignore\n */\nfunction* enumerate(arr) {\n    for (let i = 0; i < arr.length; i++) {\n        yield [i, arr[i]];\n    }\n}\n/**\n * Array#flatMap polyfill\n *\n * @ignore\n */\nfunction flatMap(xs, fn) {\n    const results = [];\n    for (const x of xs) {\n        results.push(...fn(x));\n    }\n    return results;\n}\n/**\n * Flatten an array\n *\n * @ignore\n */\nfunction flatten(xs) {\n    const results = [];\n    for (const x of xs) {\n        results.push(...x);\n    }\n    return results;\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultHelpFormatter = void 0;\nexports.setDefaultHelpFormatter = setDefaultHelpFormatter;\nexports.resetHelpFormatter = resetHelpFormatter;\nexports.getHelpFormatter = getHelpFormatter;\nconst chalk_1 = __importDefault(require(\"chalk\"));\nconst utils_1 = require(\"./utils\");\n// Global formatter storage\nlet currentFormatter = null;\n/**\n * Set a custom help formatter to be used for all commands.\n *\n * @example\n * ```ts\n * import { setDefaultHelpFormatter } from \"cmd-ts\";\n *\n * setDefaultHelpFormatter({\n *   formatCommand(data, context) {\n *     return `My CLI ${data.version}\\n${data.description}`;\n *   },\n *   formatSubcommands(data, context) {\n *     return `Commands: ${data.commands.map(c => c.name).join(\", \")}`;\n *   },\n * });\n * ```\n */\nfunction setDefaultHelpFormatter(formatter) {\n    currentFormatter = formatter;\n}\n/**\n * Reset the help formatter to the default.\n * Useful for testing.\n */\nfunction resetHelpFormatter() {\n    currentFormatter = null;\n}\n/**\n * Get the current help formatter (custom or default).\n * @internal\n */\nfunction getHelpFormatter() {\n    return currentFormatter !== null && currentFormatter !== void 0 ? currentFormatter : exports.defaultHelpFormatter;\n}\n/**\n * The default help formatter that matches cmd-ts's original output style.\n */\nexports.defaultHelpFormatter = {\n    formatCommand(data, _context) {\n        const lines = [];\n        let name = data.path.length > 0 ? data.path.join(\" \") : data.name;\n        name = chalk_1.default.bold(name);\n        if (data.version) {\n            name += ` ${chalk_1.default.dim(data.version)}`;\n        }\n        lines.push(name);\n        if (data.description) {\n            lines.push(chalk_1.default.dim(\"> \") + data.description);\n        }\n        const usageBreakdown = (0, utils_1.groupBy)(data.helpTopics, (x) => x.category);\n        for (const [category, helpTopics] of (0, utils_1.entries)(usageBreakdown)) {\n            lines.push(\"\");\n            lines.push(`${category.toUpperCase()}:`);\n            const widestUsage = helpTopics.reduce((len, curr) => {\n                return Math.max(len, curr.usage.length);\n            }, 0);\n            for (const helpTopic of helpTopics) {\n                let line = \"\";\n                line += `  ${(0, utils_1.padNoAnsi)(helpTopic.usage, widestUsage, \"end\")}`;\n                line += \" - \";\n                line += helpTopic.description;\n                for (const defaultValue of helpTopic.defaults) {\n                    line += chalk_1.default.dim(` [${defaultValue}]`);\n                }\n                lines.push(line);\n            }\n        }\n        if (data.examples && data.examples.length > 0) {\n            lines.push(\"\");\n            lines.push(\"EXAMPLES:\");\n            for (const example of data.examples) {\n                lines.push(\"\");\n                lines.push(`  ${example.description}`);\n                lines.push(chalk_1.default.dim(`  $ ${example.command}`));\n            }\n        }\n        return lines.join(\"\\n\");\n    },\n    formatSubcommands(data, _context) {\n        var _a, _b;\n        const lines = [];\n        const argsSoFar = data.path.length > 0 ? data.path.join(\" \") : data.name;\n        lines.push(chalk_1.default.bold(argsSoFar + chalk_1.default.italic(\" <subcommand>\")));\n        if (data.description) {\n            lines.push(chalk_1.default.dim(\"> \") + data.description);\n        }\n        lines.push(\"\");\n        lines.push(`where ${chalk_1.default.italic(\"<subcommand>\")} can be one of:`);\n        lines.push(\"\");\n        for (const cmd of data.commands) {\n            let description = (_a = cmd.description) !== null && _a !== void 0 ? _a : \"\";\n            description = description && ` - ${description} `;\n            if ((_b = cmd.aliases) === null || _b === void 0 ? void 0 : _b.length) {\n                const aliasTxt = cmd.aliases.length === 1 ? \"alias\" : \"aliases\";\n                const aliases = cmd.aliases.join(\", \");\n                description += chalk_1.default.dim(`[${aliasTxt}: ${aliases}]`);\n            }\n            const row = chalk_1.default.dim(\"- \") + cmd.name + description;\n            lines.push(row.trim());\n        }\n        const helpCommand = chalk_1.default.yellow(`${argsSoFar} <subcommand> --help`);\n        lines.push(\"\");\n        lines.push(chalk_1.default.dim(`For more help, try running \\`${helpCommand}\\``));\n        if (data.examples && data.examples.length > 0) {\n            lines.push(\"\");\n            lines.push(\"EXAMPLES:\");\n            for (const example of data.examples) {\n                lines.push(\"\");\n                lines.push(`  ${example.description}`);\n                lines.push(chalk_1.default.dim(`  $ ${example.command}`));\n            }\n        }\n        return lines.join(\"\\n\");\n    },\n};\n//# sourceMappingURL=helpFormatter.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.positional = positional;\nconst chalk_1 = __importDefault(require(\"chalk\"));\nconst Result = __importStar(require(\"./Result\"));\nconst types_1 = require(\"./types\");\nfunction fullPositional(config) {\n    var _a, _b, _c;\n    const displayName = (_b = (_a = config.displayName) !== null && _a !== void 0 ? _a : config.type.displayName) !== null && _b !== void 0 ? _b : \"arg\";\n    return {\n        description: (_c = config.description) !== null && _c !== void 0 ? _c : config.type.description,\n        helpTopics() {\n            var _a, _b, _c, _d;\n            const defaults = [];\n            const defaultValueFn = (_a = config.defaultValue) !== null && _a !== void 0 ? _a : config.type.defaultValue;\n            if (defaultValueFn) {\n                try {\n                    const defaultValue = defaultValueFn();\n                    if ((_b = config.defaultValueIsSerializable) !== null && _b !== void 0 ? _b : config.type.defaultValueIsSerializable) {\n                        defaults.push(`default: ${chalk_1.default.italic(defaultValue)}`);\n                    }\n                    else {\n                        defaults.push(\"optional\");\n                    }\n                }\n                catch (e) { }\n            }\n            const usage = defaults.length > 0 ? `[${displayName}]` : `<${displayName}>`;\n            return [\n                {\n                    category: \"arguments\",\n                    usage,\n                    description: (_d = (_c = config.description) !== null && _c !== void 0 ? _c : config.type.description) !== null && _d !== void 0 ? _d : \"self explanatory\",\n                    defaults,\n                },\n            ];\n        },\n        register(_opts) { },\n        async parse({ nodes, visitedNodes, }) {\n            var _a;\n            const positionals = nodes.filter((node) => node.type === \"positionalArgument\" && !visitedNodes.has(node));\n            const defaultValueFn = (_a = config.defaultValue) !== null && _a !== void 0 ? _a : config.type.defaultValue;\n            const positional = positionals[0];\n            if (!positional) {\n                if (defaultValueFn) {\n                    return Result.ok(defaultValueFn());\n                }\n                return Result.err({\n                    errors: [\n                        {\n                            nodes: [],\n                            message: `No value provided for ${displayName}`,\n                        },\n                    ],\n                });\n            }\n            visitedNodes.add(positional);\n            const decoded = await Result.safeAsync(config.type.from(positional.raw));\n            if (Result.isErr(decoded)) {\n                return Result.err({\n                    errors: [\n                        {\n                            nodes: [positional],\n                            message: decoded.error.message,\n                        },\n                    ],\n                });\n            }\n            return Result.ok(decoded.value);\n        },\n    };\n}\nfunction positional(config) {\n    return fullPositional({\n        type: types_1.string,\n        ...config,\n    });\n}\n//# sourceMappingURL=positional.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.subcommands = subcommands;\nconst chalk_1 = __importDefault(require(\"chalk\"));\nconst didyoumean_1 = __importDefault(require(\"didyoumean\"));\nconst Result = __importStar(require(\"./Result\"));\nconst circuitbreaker_1 = require(\"./circuitbreaker\");\nconst helpFormatter_1 = require(\"./helpFormatter\");\nconst positional_1 = require(\"./positional\");\n/**\n * Combine multiple `command`s into one\n */\nfunction subcommands(config) {\n    const circuitbreaker = (0, circuitbreaker_1.createCircuitBreaker)(!!config.version);\n    const type = {\n        async from(str) {\n            const commands = Object.entries(config.cmds).map(([name, cmd]) => {\n                var _a;\n                return {\n                    cmdName: name,\n                    names: [name, ...((_a = cmd.aliases) !== null && _a !== void 0 ? _a : [])],\n                };\n            });\n            const cmd = commands.find((x) => x.names.includes(str));\n            if (cmd) {\n                return cmd.cmdName;\n            }\n            let errorMessage = \"Not a valid subcommand name\";\n            const closeOptions = (0, didyoumean_1.default)(str, flatMap(commands, (x) => x.names));\n            if (closeOptions) {\n                const option = Array.isArray(closeOptions)\n                    ? closeOptions[0]\n                    : closeOptions;\n                errorMessage += `\\nDid you mean ${chalk_1.default.italic(option)}?`;\n            }\n            throw new Error(errorMessage);\n        },\n    };\n    const subcommand = (0, positional_1.positional)({\n        displayName: \"subcommand\",\n        description: `one of ${Object.keys(config.cmds).join(\", \")}`,\n        type,\n    });\n    function normalizeContext(context) {\n        var _a;\n        if (((_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.length) === 0) {\n            context.hotPath.push(config.name);\n        }\n        // Called without any arguments? We default to subcommand help.\n        if (!context.nodes.some((n) => !context.visitedNodes.has(n))) {\n            context.nodes.push({\n                type: \"longOption\",\n                index: 0,\n                key: \"help\",\n                raw: \"--help\",\n            });\n        }\n    }\n    return {\n        version: config.version,\n        description: config.description,\n        name: config.name,\n        handler: (value) => {\n            const cmd = config.cmds[value.command];\n            return cmd.handler(value.args);\n        },\n        register(opts) {\n            for (const cmd of Object.values(config.cmds)) {\n                cmd.register(opts);\n            }\n            circuitbreaker.register(opts);\n        },\n        printHelp(context) {\n            var _a;\n            const data = {\n                name: config.name,\n                path: (_a = context.hotPath) !== null && _a !== void 0 ? _a : [config.name],\n                version: config.version,\n                description: config.description,\n                commands: Object.entries(config.cmds).map(([name, cmd]) => {\n                    var _a, _b;\n                    return ({\n                        name,\n                        description: cmd.description,\n                        aliases: cmd.aliases,\n                        helpTopics: (_b = (_a = cmd.helpTopics) === null || _a === void 0 ? void 0 : _a.call(cmd)) !== null && _b !== void 0 ? _b : [],\n                    });\n                }),\n                examples: config.examples,\n            };\n            return (0, helpFormatter_1.getHelpFormatter)().formatSubcommands(data, context);\n        },\n        async parse(context) {\n            var _a;\n            normalizeContext(context);\n            const parsed = await subcommand.parse(context);\n            if (Result.isErr(parsed)) {\n                return Result.err({\n                    errors: parsed.error.errors,\n                    partialValue: {},\n                });\n            }\n            (_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.push(parsed.value);\n            const cmd = config.cmds[parsed.value];\n            const parsedCommand = await cmd.parse(context);\n            if (Result.isErr(parsedCommand)) {\n                return Result.err({\n                    errors: parsedCommand.error.errors,\n                    partialValue: {\n                        command: parsed.value,\n                        args: parsedCommand.error.partialValue,\n                    },\n                });\n            }\n            return Result.ok({\n                args: parsedCommand.value,\n                command: parsed.value,\n            });\n        },\n        async run(context) {\n            var _a;\n            normalizeContext(context);\n            const parsedSubcommand = await subcommand.parse(context);\n            if (Result.isErr(parsedSubcommand)) {\n                const breaker = await circuitbreaker.parse(context);\n                (0, circuitbreaker_1.handleCircuitBreaker)(context, this, breaker);\n                return Result.err({ ...parsedSubcommand.error, partialValue: {} });\n            }\n            (_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.push(parsedSubcommand.value);\n            const cmd = config.cmds[parsedSubcommand.value];\n            const commandRun = await cmd.run(context);\n            if (Result.isOk(commandRun)) {\n                return Result.ok({\n                    command: parsedSubcommand.value,\n                    value: commandRun.value,\n                });\n            }\n            return Result.err({\n                ...commandRun.error,\n                partialValue: {\n                    command: parsedSubcommand.value,\n                    value: commandRun.error.partialValue,\n                },\n            });\n        },\n    };\n}\nfunction flatMap(array, f) {\n    const rs = [];\n    for (const item of array) {\n        rs.push(...f(item));\n    }\n    return rs;\n}\n//# sourceMappingURL=subcommands.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.binary = binary;\n/**\n * A small helper to easily use `process.argv` without dropping context\n *\n * @param cmd a command line parser\n */\nfunction binary(cmd) {\n    return {\n        ...cmd,\n        run(context) {\n            var _a;\n            const name = cmd.name || context.nodes[1].raw;\n            (_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.push(name);\n            context.nodes.splice(0, 1);\n            context.nodes[0].raw = name;\n            context.visitedNodes.add(context.nodes[0]);\n            return cmd.run(context);\n        },\n    };\n}\n//# sourceMappingURL=binary.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.command = command;\nconst Result = __importStar(require(\"./Result\"));\nconst circuitbreaker_1 = require(\"./circuitbreaker\");\nconst helpFormatter_1 = require(\"./helpFormatter\");\nconst utils_1 = require(\"./utils\");\n/**\n * A command line utility.\n *\n * A combination of multiple flags, options and arguments\n * with a common name and a handler that expects them as input.\n */\nfunction command(config) {\n    const argEntries = (0, utils_1.entries)(config.args);\n    const circuitbreaker = (0, circuitbreaker_1.createCircuitBreaker)(!!config.version);\n    return {\n        name: config.name,\n        aliases: config.aliases,\n        handler: config.handler,\n        description: config.description,\n        version: config.version,\n        helpTopics() {\n            return (0, utils_1.flatMap)(Object.values(config.args).concat([circuitbreaker]), (x) => { var _a, _b; return (_b = (_a = x.helpTopics) === null || _a === void 0 ? void 0 : _a.call(x)) !== null && _b !== void 0 ? _b : []; });\n        },\n        printHelp(context) {\n            var _a;\n            const data = {\n                name: config.name,\n                path: (_a = context.hotPath) !== null && _a !== void 0 ? _a : [config.name],\n                version: config.version,\n                description: config.description,\n                aliases: config.aliases,\n                helpTopics: this.helpTopics(),\n                examples: config.examples,\n            };\n            return (0, helpFormatter_1.getHelpFormatter)().formatCommand(data, context);\n        },\n        register(opts) {\n            var _a;\n            for (const [, arg] of argEntries) {\n                (_a = arg.register) === null || _a === void 0 ? void 0 : _a.call(arg, opts);\n            }\n        },\n        async parse(context) {\n            var _a;\n            if (((_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.length) === 0) {\n                context.hotPath.push(config.name);\n            }\n            const resultObject = {};\n            const errors = [];\n            for (const [argName, arg] of argEntries) {\n                const result = await arg.parse(context);\n                if (Result.isErr(result)) {\n                    errors.push(...result.error.errors);\n                }\n                else {\n                    resultObject[argName] = result.value;\n                }\n            }\n            const unknownArguments = [];\n            for (const node of context.nodes) {\n                if (context.visitedNodes.has(node)) {\n                    continue;\n                }\n                if (node.type === \"forcePositional\") {\n                }\n                else if (node.type === \"shortOptions\") {\n                    for (const option of node.options) {\n                        if (context.visitedNodes.has(option)) {\n                            continue;\n                        }\n                        unknownArguments.push(option);\n                    }\n                }\n                else {\n                    unknownArguments.push(node);\n                }\n            }\n            if (unknownArguments.length > 0) {\n                errors.push({\n                    message: \"Unknown arguments\",\n                    nodes: unknownArguments,\n                });\n            }\n            if (errors.length > 0) {\n                return Result.err({\n                    errors: errors,\n                    partialValue: resultObject,\n                });\n            }\n            return Result.ok(resultObject);\n        },\n        async run(context) {\n            const breaker = await circuitbreaker.parse(context);\n            (0, circuitbreaker_1.handleCircuitBreaker)(context, this, breaker);\n            const parsed = await this.parse(context);\n            if (Result.isErr(parsed)) {\n                return Result.err(parsed.error);\n            }\n            return Result.ok(await this.handler(parsed.value));\n        },\n    };\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.option = option;\nconst chalk_1 = __importDefault(require(\"chalk\"));\nconst Result = __importStar(require(\"./Result\"));\nconst findOption_1 = require(\"./newparser/findOption\");\nconst types_1 = require(\"./types\");\nfunction fullOption(config) {\n    var _a;\n    return {\n        description: (_a = config.description) !== null && _a !== void 0 ? _a : config.type.description,\n        helpTopics() {\n            var _a, _b, _c;\n            const displayName = (_a = config.type.displayName) !== null && _a !== void 0 ? _a : \"value\";\n            let usage = `--${config.long}`;\n            if (config.short) {\n                usage += `, -${config.short}`;\n            }\n            usage += ` <${displayName}>`;\n            const defaults = [];\n            if (config.env) {\n                const env = process.env[config.env] === undefined\n                    ? \"\"\n                    : `=${chalk_1.default.italic(process.env[config.env])}`;\n                defaults.push(`env: ${config.env}${env}`);\n            }\n            if (config.defaultValue) {\n                try {\n                    const defaultValue = config.defaultValue();\n                    if (config.defaultValueIsSerializable) {\n                        defaults.push(`default: ${chalk_1.default.italic(defaultValue)}`);\n                    }\n                    else {\n                        defaults.push(\"optional\");\n                    }\n                }\n                catch (e) { }\n            }\n            else if (config.type.defaultValue) {\n                try {\n                    const defaultValue = config.type.defaultValue();\n                    if (config.type.defaultValueIsSerializable) {\n                        defaults.push(`default: ${chalk_1.default.italic(defaultValue)}`);\n                    }\n                    else {\n                        defaults.push(\"optional\");\n                    }\n                }\n                catch (e) { }\n            }\n            else if (config.onMissing || config.type.onMissing) {\n                defaults.push(\"optional\");\n            }\n            return [\n                {\n                    category: \"options\",\n                    usage,\n                    defaults,\n                    description: (_c = (_b = config.description) !== null && _b !== void 0 ? _b : config.type.description) !== null && _c !== void 0 ? _c : \"self explanatory\",\n                },\n            ];\n        },\n        register(opts) {\n            opts.forceOptionLongNames.add(config.long);\n            if (config.short) {\n                opts.forceOptionShortNames.add(config.short);\n            }\n        },\n        async parse({ nodes, visitedNodes, }) {\n            const options = (0, findOption_1.findOption)(nodes, {\n                longNames: [config.long],\n                shortNames: config.short ? [config.short] : [],\n            }).filter((x) => !visitedNodes.has(x));\n            options.forEach((opt) => visitedNodes.add(opt));\n            if (options.length > 1) {\n                const error = {\n                    message: `Too many times provided. Expected 1, got: ${options.length}`,\n                    nodes: options,\n                };\n                return Result.err({ errors: [error] });\n            }\n            const valueFromEnv = config.env ? process.env[config.env] : undefined;\n            const defaultValueFn = config.defaultValue || config.type.defaultValue;\n            const onMissingFn = config.onMissing || config.type.onMissing;\n            const option = options[0];\n            let rawValue;\n            let envPrefix = \"\";\n            if (option === null || option === void 0 ? void 0 : option.value) {\n                rawValue = option.value.node.raw;\n            }\n            else if (valueFromEnv !== undefined) {\n                rawValue = valueFromEnv;\n                envPrefix = `env[${chalk_1.default.italic(config.env)}]: `;\n            }\n            else if (defaultValueFn) {\n                try {\n                    const defaultValue = defaultValueFn();\n                    return Result.ok(defaultValue);\n                }\n                catch (e) {\n                    const message = `Default value not found for '--${config.long}': ${e.message}`;\n                    return Result.err({\n                        errors: [\n                            {\n                                nodes: [],\n                                message,\n                            },\n                        ],\n                    });\n                }\n            }\n            else if (onMissingFn) {\n                try {\n                    const missingValue = await onMissingFn();\n                    return Result.ok(missingValue);\n                }\n                catch (e) {\n                    const message = `Failed to get missing value for '--${config.long}': ${e.message}`;\n                    return Result.err({\n                        errors: [\n                            {\n                                nodes: [],\n                                message,\n                            },\n                        ],\n                    });\n                }\n            }\n            else {\n                // If we reach here, no default or prompt value was available\n                const raw = (option === null || option === void 0 ? void 0 : option.type) === \"shortOption\"\n                    ? `-${option === null || option === void 0 ? void 0 : option.key}`\n                    : `--${config.long}`;\n                return Result.err({\n                    errors: [\n                        {\n                            nodes: options,\n                            message: `No value provided for ${raw}`,\n                        },\n                    ],\n                });\n            }\n            const decoded = await Result.safeAsync(config.type.from(rawValue));\n            if (Result.isErr(decoded)) {\n                return Result.err({\n                    errors: [\n                        { nodes: options, message: envPrefix + decoded.error.message },\n                    ],\n                });\n            }\n            return Result.ok(decoded.value);\n        },\n    };\n}\nfunction option(config) {\n    return fullOption({\n        type: types_1.string,\n        ...config,\n    });\n}\n//# sourceMappingURL=option.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorBox = errorBox;\nconst chalk_1 = __importDefault(require(\"chalk\"));\nconst strip_ansi_1 = __importDefault(require(\"strip-ansi\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Get the input as highlighted keywords to show to the user\n * with the error that was generated from parsing the input.\n *\n * @param nodes AST nodes\n * @param error A parsing error\n */\nfunction highlight(nodes, error) {\n    const strings = [];\n    let errorIndex = undefined;\n    function foundError() {\n        if (errorIndex !== undefined)\n            return;\n        errorIndex = (0, strip_ansi_1.default)(strings.join(\" \")).length;\n    }\n    if (error.nodes.length === 0)\n        return;\n    nodes.forEach((node) => {\n        if (error.nodes.includes(node)) {\n            foundError();\n            return strings.push(chalk_1.default.red(node.raw));\n        }\n        if (node.type === \"shortOptions\") {\n            let failed = false;\n            let s = \"\";\n            for (const option of node.options) {\n                if (error.nodes.includes(option)) {\n                    s += chalk_1.default.red(option.raw);\n                    failed = true;\n                }\n                else {\n                    s += chalk_1.default.dim(option.raw);\n                }\n            }\n            const prefix = failed ? chalk_1.default.red(\"-\") : chalk_1.default.dim(\"-\");\n            if (failed) {\n                foundError();\n            }\n            return strings.push(prefix + s);\n        }\n        return strings.push(chalk_1.default.dim(node.raw));\n    });\n    return { colorized: strings.join(\" \"), errorIndex: errorIndex !== null && errorIndex !== void 0 ? errorIndex : 0 };\n}\n/**\n * An error UI\n *\n * @param breadcrumbs The command breadcrumbs to print with the error\n */\nfunction errorBox(nodes, errors, breadcrumbs) {\n    const withHighlight = [];\n    const errorMessages = [];\n    for (const error of errors) {\n        const highlighted = highlight(nodes, error);\n        withHighlight.push({ message: error.message, highlighted });\n    }\n    let number = 1;\n    const maxNumberWidth = String(withHighlight.length).length;\n    errorMessages.push(`${chalk_1.default.red.bold(\"error: \")}found ${chalk_1.default.yellow(withHighlight.length)} error${withHighlight.length > 1 ? \"s\" : \"\"}`);\n    errorMessages.push(\"\");\n    withHighlight\n        .filter((x) => x.highlighted)\n        .forEach((x) => {\n        if (!x.highlighted) {\n            throw new Error(\"WELP\");\n        }\n        const pad = \"\".padStart(x.highlighted.errorIndex);\n        errorMessages.push(`  ${x.highlighted.colorized}`);\n        for (const [index, line] of (0, utils_1.enumerate)(x.message.split(\"\\n\"))) {\n            const prefix = index === 0 ? chalk_1.default.bold(\"^\") : \" \";\n            const msg = chalk_1.default.red(`  ${pad} ${prefix} ${line}`);\n            errorMessages.push(msg);\n        }\n        errorMessages.push(\"\");\n        number++;\n    });\n    const withNoHighlight = withHighlight.filter((x) => !x.highlighted);\n    if (number > 1) {\n        if (withNoHighlight.length === 1) {\n            errorMessages.push(\"Along with the following error:\");\n        }\n        else if (withNoHighlight.length > 1) {\n            errorMessages.push(\"Along with the following errors:\");\n        }\n    }\n    withNoHighlight.forEach(({ message }) => {\n        var _a;\n        const num = chalk_1.default.red.bold(`${(0, utils_1.padNoAnsi)(number.toString(), maxNumberWidth, \"start\")}.`);\n        const lines = message.split(\"\\n\");\n        errorMessages.push(`  ${num} ${chalk_1.default.red((_a = lines[0]) !== null && _a !== void 0 ? _a : \"\")}`);\n        for (const line of lines.slice(1)) {\n            errorMessages.push(` ${\"\".padStart(maxNumberWidth + 1)}  ${chalk_1.default.red(line)}`);\n        }\n        number++;\n    });\n    const helpCmd = chalk_1.default.yellow(`${breadcrumbs.join(\" \")} --help`);\n    errorMessages.push(\"\");\n    errorMessages.push(`${chalk_1.default.red.bold(\"hint: \")}for more information, try '${helpCmd}'`);\n    return errorMessages.join(\"\\n\");\n}\n//# sourceMappingURL=errorBox.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parse = parse;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst debug = (0, debug_1.default)(\"cmd-ts:parser\");\n/**\n * Create an AST from a token list\n *\n * @param tokens A token list, coming from `tokenizer.ts`\n * @param forceFlag Keys to force as flag. {@see ForceFlag} to read more about it.\n */\nfunction parse(tokens, forceFlag) {\n    if (debug.enabled) {\n        const registered = {\n            shortFlags: [...forceFlag.forceFlagShortNames],\n            longFlags: [...forceFlag.forceFlagLongNames],\n            shortOptions: [...forceFlag.forceOptionShortNames],\n            longOptions: [...forceFlag.forceOptionLongNames],\n        };\n        debug(\"Registered:\", JSON.stringify(registered));\n    }\n    const nodes = [];\n    let index = 0;\n    let forcedPositional = false;\n    function getToken() {\n        return tokens[index++];\n    }\n    function peekToken() {\n        return tokens[index];\n    }\n    while (index < tokens.length) {\n        const currentToken = getToken();\n        if (!currentToken)\n            break;\n        if (currentToken.type === \"argumentDivider\") {\n            continue;\n        }\n        if (forcedPositional) {\n            let str = currentToken.raw;\n            let nextToken = getToken();\n            while (nextToken && (nextToken === null || nextToken === void 0 ? void 0 : nextToken.type) !== \"argumentDivider\") {\n                str += nextToken.raw;\n                nextToken = getToken();\n            }\n            nodes.push({\n                type: \"positionalArgument\",\n                index: currentToken.index,\n                raw: str,\n            });\n            continue;\n        }\n        if (currentToken.type === \"char\") {\n            let str = currentToken.raw;\n            let nextToken = getToken();\n            while (nextToken && (nextToken === null || nextToken === void 0 ? void 0 : nextToken.type) !== \"argumentDivider\") {\n                str += nextToken.raw;\n                nextToken = getToken();\n            }\n            nodes.push({\n                type: \"positionalArgument\",\n                index: currentToken.index,\n                raw: str,\n            });\n            continue;\n        }\n        if (currentToken.type === \"longPrefix\") {\n            let nextToken = getToken();\n            if ((nextToken === null || nextToken === void 0 ? void 0 : nextToken.type) === \"argumentDivider\" || !nextToken) {\n                nodes.push({\n                    type: \"forcePositional\",\n                    index: currentToken.index,\n                    raw: \"--\",\n                });\n                forcedPositional = true;\n                continue;\n            }\n            let key = \"\";\n            while (nextToken &&\n                (nextToken === null || nextToken === void 0 ? void 0 : nextToken.raw) !== \"=\" &&\n                (nextToken === null || nextToken === void 0 ? void 0 : nextToken.type) !== \"argumentDivider\") {\n                key += nextToken.raw;\n                nextToken = getToken();\n            }\n            const parsedValue = parseOptionValue({\n                key,\n                delimiterToken: nextToken,\n                forceFlag: forceFlag.forceFlagLongNames,\n                getToken,\n                peekToken,\n                forceOption: forceFlag.forceOptionLongNames,\n            });\n            let raw = `--${key}`;\n            if (parsedValue) {\n                raw += parsedValue.raw;\n            }\n            nodes.push({\n                type: \"longOption\",\n                key,\n                index: currentToken.index,\n                raw,\n                value: parsedValue,\n            });\n            continue;\n        }\n        if (currentToken.type === \"shortPrefix\") {\n            const keys = [];\n            let nextToken = getToken();\n            if ((nextToken === null || nextToken === void 0 ? void 0 : nextToken.type) === \"argumentDivider\" || !nextToken) {\n                nodes.push({\n                    type: \"positionalArgument\",\n                    index: currentToken.index,\n                    raw: \"-\",\n                });\n                continue;\n            }\n            while (nextToken &&\n                (nextToken === null || nextToken === void 0 ? void 0 : nextToken.type) !== \"argumentDivider\" &&\n                (nextToken === null || nextToken === void 0 ? void 0 : nextToken.raw) !== \"=\") {\n                keys.push(nextToken);\n                nextToken = getToken();\n            }\n            // biome-ignore lint/style/noNonNullAssertion: migration\n            const lastKey = keys.pop();\n            const parsedValue = parseOptionValue({\n                key: lastKey.raw,\n                delimiterToken: nextToken,\n                forceFlag: forceFlag.forceFlagShortNames,\n                forceOption: forceFlag.forceOptionShortNames,\n                getToken,\n                peekToken,\n            });\n            const options = [];\n            for (const key of keys) {\n                options.push({\n                    type: \"shortOption\",\n                    index: key.index,\n                    raw: key.raw,\n                    key: key.raw,\n                });\n            }\n            let lastKeyRaw = lastKey.raw;\n            if (parsedValue) {\n                lastKeyRaw += parsedValue.raw;\n            }\n            options.push({\n                type: \"shortOption\",\n                index: lastKey.index,\n                raw: lastKeyRaw,\n                value: parsedValue,\n                key: lastKey.raw,\n            });\n            let optionsRaw = `-${keys.map((x) => x.raw).join(\"\")}${lastKey.raw}`;\n            if (parsedValue) {\n                optionsRaw += parsedValue.raw;\n            }\n            const shortOptions = {\n                type: \"shortOptions\",\n                index: currentToken.index,\n                raw: optionsRaw,\n                options,\n            };\n            nodes.push(shortOptions);\n            continue;\n        }\n        index++;\n    }\n    if (debug.enabled) {\n        const objectNodes = nodes.map((node) => ({ [node.type]: node.raw }));\n        debug(\"Parsed items:\", JSON.stringify(objectNodes));\n    }\n    return nodes;\n}\nfunction parseOptionValue(opts) {\n    var _a;\n    const { getToken, delimiterToken, forceFlag, key, forceOption } = opts;\n    const shouldReadKeyAsOption = forceOption.has(key);\n    const shouldReadKeyAsFlag = !shouldReadKeyAsOption &&\n        (forceFlag.has(key) || ((_a = opts.peekToken()) === null || _a === void 0 ? void 0 : _a.type) !== \"char\");\n    if (!delimiterToken || (delimiterToken.raw !== \"=\" && shouldReadKeyAsFlag)) {\n        return;\n    }\n    const delimiter = delimiterToken.raw === \"=\" ? \"=\" : \" \";\n    const delimiterIndex = delimiterToken.index;\n    let nextToken = getToken();\n    if (!nextToken) {\n        return;\n    }\n    let value = \"\";\n    const valueIndex = nextToken.index;\n    while (nextToken && (nextToken === null || nextToken === void 0 ? void 0 : nextToken.type) !== \"argumentDivider\") {\n        value += nextToken.raw;\n        nextToken = getToken();\n    }\n    return {\n        type: \"optionValue\",\n        index: delimiterToken.index,\n        delimiter: { type: \"delimiter\", raw: delimiter, index: delimiterIndex },\n        node: { type: \"value\", raw: value, index: valueIndex },\n        raw: `${delimiter}${value}`,\n    };\n}\n//# sourceMappingURL=parser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tokenize = tokenize;\nconst utils_1 = require(\"../utils\");\n/**\n * Tokenize a list of arguments\n *\n * @param strings arguments, based on `process.argv`\n */\nfunction tokenize(strings) {\n    const tokens = [];\n    let overallIndex = 0;\n    const push = (token) => {\n        tokens.push(token);\n        overallIndex += token.raw.length;\n    };\n    for (const [stringIndex, string] of (0, utils_1.enumerate)(strings)) {\n        const chars = [...string];\n        for (let i = 0; i < chars.length; i++) {\n            if (chars[i] === \"-\" && chars[i + 1] === \"-\") {\n                push({ type: \"longPrefix\", raw: \"--\", index: overallIndex });\n                i++;\n            }\n            else if (chars[i] === \"-\") {\n                push({ type: \"shortPrefix\", raw: \"-\", index: overallIndex });\n            }\n            else {\n                push({ type: \"char\", raw: chars[i], index: overallIndex });\n            }\n        }\n        if (stringIndex + 1 !== strings.length) {\n            push({ type: \"argumentDivider\", raw: \" \", index: overallIndex });\n        }\n    }\n    return tokens;\n}\n//# sourceMappingURL=tokenizer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.run = run;\nexports.runSafely = runSafely;\nexports.dryRun = dryRun;\nexports.parse = parse;\nconst Result_1 = require(\"./Result\");\nconst effects_1 = require(\"./effects\");\nconst errorBox_1 = require(\"./errorBox\");\nconst parser_1 = require(\"./newparser/parser\");\nconst tokenizer_1 = require(\"./newparser/tokenizer\");\nasync function run(ap, strings) {\n    const result = await runSafely(ap, strings);\n    if ((0, Result_1.isErr)(result)) {\n        return result.error.run();\n    }\n    return result.value;\n}\n/**\n * Runs a command but does not apply any effect\n */\nasync function runSafely(ap, strings) {\n    const hotPath = [];\n    const nodes = parseCommon(ap, strings);\n    try {\n        const result = await ap.run({ nodes, visitedNodes: new Set(), hotPath });\n        if ((0, Result_1.isErr)(result)) {\n            throw new effects_1.Exit({\n                message: (0, errorBox_1.errorBox)(nodes, result.error.errors, hotPath),\n                exitCode: 1,\n                into: \"stderr\",\n            });\n        }\n        return (0, Result_1.ok)(result.value);\n    }\n    catch (e) {\n        if (e instanceof effects_1.Exit) {\n            return (0, Result_1.err)(e);\n        }\n        throw e;\n    }\n}\n/**\n * Run a command but don't quit. Returns an `Result` instead.\n */\nasync function dryRun(ap, strings) {\n    const result = await runSafely(ap, strings);\n    if ((0, Result_1.isErr)(result)) {\n        return (0, Result_1.err)(result.error.dryRun());\n    }\n    return result;\n}\n/**\n * Parse the command as if to run it, but only return the parse result and don't run the command.\n */\nfunction parse(ap, strings) {\n    const hotPath = [];\n    const nodes = parseCommon(ap, strings);\n    return ap.parse({ nodes, visitedNodes: new Set(), hotPath });\n}\nfunction parseCommon(ap, strings) {\n    const longFlagKeys = new Set();\n    const shortFlagKeys = new Set();\n    const longOptionKeys = new Set();\n    const shortOptionKeys = new Set();\n    const registerContext = {\n        forceFlagShortNames: shortFlagKeys,\n        forceFlagLongNames: longFlagKeys,\n        forceOptionShortNames: shortOptionKeys,\n        forceOptionLongNames: longOptionKeys,\n    };\n    ap.register(registerContext);\n    const tokens = (0, tokenizer_1.tokenize)(strings);\n    return (0, parser_1.parse)(tokens, registerContext);\n}\n//# sourceMappingURL=runner.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.restPositionals = restPositionals;\nconst Result = __importStar(require(\"./Result\"));\nconst types_1 = require(\"./types\");\n/**\n * Read all the positionals and decode them using the type provided.\n * Works best when it is the last item on the `command` construct, to be\n * used like the `...rest` operator in JS and TypeScript.\n */\nfunction fullRestPositionals(config) {\n    return {\n        helpTopics() {\n            var _a, _b, _c, _d;\n            const displayName = (_b = (_a = config.displayName) !== null && _a !== void 0 ? _a : config.type.displayName) !== null && _b !== void 0 ? _b : \"arg\";\n            return [\n                {\n                    usage: `[...${displayName}]`,\n                    category: \"arguments\",\n                    defaults: [],\n                    description: (_d = (_c = config.description) !== null && _c !== void 0 ? _c : config.type.description) !== null && _d !== void 0 ? _d : \"\",\n                },\n            ];\n        },\n        register(_opts) { },\n        async parse({ nodes, visitedNodes, }) {\n            const positionals = nodes.filter((node) => node.type === \"positionalArgument\" && !visitedNodes.has(node));\n            const results = [];\n            const errors = [];\n            for (const positional of positionals) {\n                visitedNodes.add(positional);\n                const decoded = await Result.safeAsync(config.type.from(positional.raw));\n                if (Result.isOk(decoded)) {\n                    results.push(decoded.value);\n                }\n                else {\n                    errors.push({\n                        nodes: [positional],\n                        message: decoded.error.message,\n                    });\n                }\n            }\n            if (errors.length > 0) {\n                return Result.err({\n                    errors,\n                });\n            }\n            return Result.ok(results);\n        },\n    };\n}\nfunction restPositionals(config) {\n    return fullRestPositionals({\n        type: types_1.string,\n        ...config,\n    });\n}\n//# sourceMappingURL=restPositionals.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.multiflag = multiflag;\nconst Result = __importStar(require(\"./Result\"));\nconst flag_1 = require(\"./flag\");\nconst findOption_1 = require(\"./newparser/findOption\");\n/**\n * Like `option`, but can accept multiple options, and expects a decoder from a list of strings.\n * An error will highlight all option occurences.\n */\nfunction multiflag(config) {\n    return {\n        helpTopics() {\n            var _a;\n            let usage = `--${config.long}`;\n            if (config.short) {\n                usage += `, -${config.short}`;\n            }\n            return [\n                {\n                    category: \"flags\",\n                    usage,\n                    defaults: [],\n                    description: (_a = config.description) !== null && _a !== void 0 ? _a : \"self explanatory\",\n                },\n            ];\n        },\n        register(opts) {\n            opts.forceFlagLongNames.add(config.long);\n            if (config.short) {\n                opts.forceFlagShortNames.add(config.short);\n            }\n        },\n        async parse({ nodes, visitedNodes, }) {\n            var _a, _b;\n            const options = (0, findOption_1.findOption)(nodes, {\n                longNames: [config.long],\n                shortNames: config.short ? [config.short] : [],\n            }).filter((x) => !visitedNodes.has(x));\n            for (const option of options) {\n                visitedNodes.add(option);\n            }\n            const optionValues = [];\n            const errors = [];\n            for (const option of options) {\n                const decoded = await Result.safeAsync(flag_1.boolean.from((_b = (_a = option.value) === null || _a === void 0 ? void 0 : _a.node.raw) !== null && _b !== void 0 ? _b : \"true\"));\n                if (Result.isErr(decoded)) {\n                    errors.push({ nodes: [option], message: decoded.error.message });\n                }\n                else {\n                    optionValues.push(decoded.value);\n                }\n            }\n            if (errors.length > 0) {\n                return Result.err({\n                    errors,\n                });\n            }\n            const multiDecoded = await Result.safeAsync(config.type.from(optionValues));\n            if (Result.isErr(multiDecoded)) {\n                return Result.err({\n                    errors: [\n                        {\n                            nodes: options,\n                            message: multiDecoded.error.message,\n                        },\n                    ],\n                });\n            }\n            return multiDecoded;\n        },\n    };\n}\n//# sourceMappingURL=multiflag.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.multioption = multioption;\nconst chalk_1 = __importDefault(require(\"chalk\"));\nconst Result = __importStar(require(\"./Result\"));\nconst findOption_1 = require(\"./newparser/findOption\");\n/**\n * Like `option`, but can accept multiple options, and expects a decoder from a list of strings.\n * An error will highlight all option occurences.\n */\nfunction multioption(config) {\n    return {\n        helpTopics() {\n            var _a, _b;\n            const displayName = (_a = config.type.displayName) !== null && _a !== void 0 ? _a : \"value\";\n            let usage = `--${config.long} <${displayName}>`;\n            if (config.short) {\n                usage += `, -${config.short}=<${displayName}>`;\n            }\n            const defaults = [];\n            if (config.defaultValue) {\n                try {\n                    const defaultValue = config.defaultValue();\n                    if (config.defaultValueIsSerializable) {\n                        defaults.push(`default: ${chalk_1.default.italic(defaultValue)}`);\n                    }\n                    else {\n                        defaults.push(\"[...optional]\");\n                    }\n                }\n                catch (e) { }\n            }\n            else if (config.type.defaultValue) {\n                try {\n                    const defaultValue = config.type.defaultValue();\n                    if (config.type.defaultValueIsSerializable) {\n                        defaults.push(`default: ${chalk_1.default.italic(defaultValue)}`);\n                    }\n                    else {\n                        defaults.push(\"[...optional]\");\n                    }\n                }\n                catch (e) { }\n            }\n            else if (config.onMissing || config.type.onMissing) {\n                defaults.push(\"[...optional]\");\n            }\n            return [\n                {\n                    category: \"options\",\n                    usage,\n                    defaults,\n                    description: (_b = config.description) !== null && _b !== void 0 ? _b : \"self explanatory\",\n                },\n            ];\n        },\n        register(opts) {\n            opts.forceOptionLongNames.add(config.long);\n            if (config.short) {\n                opts.forceOptionShortNames.add(config.short);\n            }\n        },\n        async parse({ nodes, visitedNodes, }) {\n            var _a;\n            const options = (0, findOption_1.findOption)(nodes, {\n                longNames: [config.long],\n                shortNames: config.short ? [config.short] : [],\n            }).filter((x) => !visitedNodes.has(x));\n            const defaultValueFn = config.defaultValue || config.type.defaultValue;\n            const onMissingFn = config.onMissing || config.type.onMissing;\n            if (options.length === 0 && defaultValueFn) {\n                try {\n                    const defaultValue = defaultValueFn();\n                    return Result.ok(defaultValue);\n                }\n                catch (e) {\n                    const message = `Failed to resolve default value for '--${config.long}': ${e.message}`;\n                    return Result.err({\n                        errors: [\n                            {\n                                nodes: [],\n                                message,\n                            },\n                        ],\n                    });\n                }\n            }\n            else if (options.length === 0 && onMissingFn) {\n                try {\n                    const missingValue = await onMissingFn();\n                    return Result.ok(missingValue);\n                }\n                catch (e) {\n                    const message = `Failed to get missing value for '--${config.long}': ${e.message}`;\n                    return Result.err({\n                        errors: [\n                            {\n                                nodes: [],\n                                message,\n                            },\n                        ],\n                    });\n                }\n            }\n            for (const option of options) {\n                visitedNodes.add(option);\n            }\n            const optionValues = [];\n            const errors = [];\n            const flagNodes = [];\n            for (const option of options) {\n                const providedValue = (_a = option.value) === null || _a === void 0 ? void 0 : _a.node.raw;\n                if (providedValue === undefined) {\n                    flagNodes.push(option);\n                    continue;\n                }\n                optionValues.push(providedValue);\n            }\n            if (flagNodes.length > 0) {\n                errors.push({\n                    nodes: flagNodes,\n                    message: \"Expected to get a value, found a flag\",\n                });\n            }\n            if (errors.length > 0) {\n                return Result.err({ errors });\n            }\n            const multiDecoded = await Result.safeAsync(config.type.from(optionValues));\n            if (Result.isErr(multiDecoded)) {\n                return Result.err({\n                    errors: [{ nodes: options, message: multiDecoded.error.message }],\n                });\n            }\n            return multiDecoded;\n        },\n    };\n}\n//# sourceMappingURL=multioption.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.union = union;\nconst Result = __importStar(require(\"./Result\"));\nconst type_1 = require(\"./type\");\n/**\n * Take one of the types. Merge the metadata from left to right.\n * If nothing matches, prints all the errors.\n */\nfunction union(ts, { combineErrors = (errors) => errors.join(\"\\n\"), } = {}) {\n    const merged = Object.assign({}, ...ts.map((x) => (0, type_1.typeDef)(x)));\n    return {\n        ...merged,\n        async from(input) {\n            const errors = [];\n            for (const t of ts) {\n                const decoded = await Result.safeAsync((0, type_1.fromFn)(t)(input));\n                if (Result.isOk(decoded)) {\n                    return decoded.value;\n                }\n                errors.push(decoded.error.message);\n            }\n            throw new Error(combineErrors(errors));\n        },\n    };\n}\n//# sourceMappingURL=union.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.oneOf = oneOf;\nconst node_util_1 = require(\"node:util\");\n/**\n * A union of literals. When you want to take an exact enum value.\n */\nfunction oneOf(literals) {\n    const examples = literals.map((x) => (0, node_util_1.inspect)(x)).join(\", \");\n    return {\n        async from(str) {\n            const value = literals.find((x) => x === str);\n            if (!value) {\n                throw new Error(`Invalid value '${str}'. Expected one of: ${examples}`);\n            }\n            return value;\n        },\n        description: `One of ${examples}`,\n    };\n}\n//# sourceMappingURL=oneOf.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rest = rest;\nconst Result = __importStar(require(\"./Result\"));\nfunction rest(config) {\n    return {\n        helpTopics() {\n            var _a, _b;\n            const displayName = (_a = config === null || config === void 0 ? void 0 : config.displayName) !== null && _a !== void 0 ? _a : \"arg\";\n            return [\n                {\n                    usage: `[...${displayName}]`,\n                    category: \"arguments\",\n                    defaults: [],\n                    description: (_b = config === null || config === void 0 ? void 0 : config.description) !== null && _b !== void 0 ? _b : \"catches the rest of the values\",\n                },\n            ];\n        },\n        register() { },\n        async parse(context) {\n            const visitedNodeIndices = [...context.visitedNodes]\n                .map((x) => context.nodes.indexOf(x))\n                .filter((x) => x > -1);\n            const strings = [];\n            const maxIndex = Math.max(-1, ...visitedNodeIndices);\n            const restItems = context.nodes.slice(maxIndex + 1);\n            for (const node of restItems) {\n                switch (node.type) {\n                    case \"positionalArgument\": {\n                        strings.push(node.raw);\n                        context.visitedNodes.add(node);\n                        break;\n                    }\n                    case \"longOption\": {\n                        strings.push(...getOriginal(node));\n                        context.visitedNodes.add(node);\n                        break;\n                    }\n                    case \"shortOption\": {\n                        strings.push(...getOriginal(node));\n                        context.visitedNodes.add(node);\n                        break;\n                    }\n                    case \"forcePositional\": {\n                        strings.push(node.raw);\n                        context.visitedNodes.add(node);\n                        break;\n                    }\n                    case \"shortOptions\": {\n                        const last = node.options.at(-1);\n                        context.visitedNodes.add(node);\n                        strings.push(...getOriginal({ ...node, value: last === null || last === void 0 ? void 0 : last.value }));\n                        break;\n                    }\n                }\n            }\n            return Result.ok(strings);\n        },\n    };\n}\nfunction getOriginal(node) {\n    if (!node.value) {\n        return [node.raw];\n    }\n    if (node.value.delimiter.raw === \" \") {\n        return [\n            node.raw.slice(0, node.value.index - node.index),\n            node.value.node.raw,\n        ];\n    }\n    return [node.raw];\n}\n//# sourceMappingURL=rest.js.map","\"use strict\";\n/**\n * The index module: the entrance to the world of cmd-ts 😎\n *\n * @packageDocumentation\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rest = exports.oneOf = exports.union = exports.multioption = exports.multiflag = exports.restPositionals = exports.parse = exports.run = exports.runSafely = exports.dryRun = exports.positional = exports.option = exports.defaultHelpFormatter = exports.resetHelpFormatter = exports.setDefaultHelpFormatter = exports.flag = exports.command = exports.binary = exports.extendType = exports.subcommands = void 0;\nvar subcommands_1 = require(\"./subcommands\");\nObject.defineProperty(exports, \"subcommands\", { enumerable: true, get: function () { return subcommands_1.subcommands; } });\nvar type_1 = require(\"./type\");\nObject.defineProperty(exports, \"extendType\", { enumerable: true, get: function () { return type_1.extendType; } });\n__exportStar(require(\"./types\"), exports);\nvar binary_1 = require(\"./binary\");\nObject.defineProperty(exports, \"binary\", { enumerable: true, get: function () { return binary_1.binary; } });\nvar command_1 = require(\"./command\");\nObject.defineProperty(exports, \"command\", { enumerable: true, get: function () { return command_1.command; } });\nvar flag_1 = require(\"./flag\");\nObject.defineProperty(exports, \"flag\", { enumerable: true, get: function () { return flag_1.flag; } });\nvar helpFormatter_1 = require(\"./helpFormatter\");\nObject.defineProperty(exports, \"setDefaultHelpFormatter\", { enumerable: true, get: function () { return helpFormatter_1.setDefaultHelpFormatter; } });\nObject.defineProperty(exports, \"resetHelpFormatter\", { enumerable: true, get: function () { return helpFormatter_1.resetHelpFormatter; } });\nObject.defineProperty(exports, \"defaultHelpFormatter\", { enumerable: true, get: function () { return helpFormatter_1.defaultHelpFormatter; } });\nvar option_1 = require(\"./option\");\nObject.defineProperty(exports, \"option\", { enumerable: true, get: function () { return option_1.option; } });\nvar positional_1 = require(\"./positional\");\nObject.defineProperty(exports, \"positional\", { enumerable: true, get: function () { return positional_1.positional; } });\nvar runner_1 = require(\"./runner\");\nObject.defineProperty(exports, \"dryRun\", { enumerable: true, get: function () { return runner_1.dryRun; } });\nObject.defineProperty(exports, \"runSafely\", { enumerable: true, get: function () { return runner_1.runSafely; } });\nObject.defineProperty(exports, \"run\", { enumerable: true, get: function () { return runner_1.run; } });\nObject.defineProperty(exports, \"parse\", { enumerable: true, get: function () { return runner_1.parse; } });\nvar restPositionals_1 = require(\"./restPositionals\");\nObject.defineProperty(exports, \"restPositionals\", { enumerable: true, get: function () { return restPositionals_1.restPositionals; } });\nvar multiflag_1 = require(\"./multiflag\");\nObject.defineProperty(exports, \"multiflag\", { enumerable: true, get: function () { return multiflag_1.multiflag; } });\nvar multioption_1 = require(\"./multioption\");\nObject.defineProperty(exports, \"multioption\", { enumerable: true, get: function () { return multioption_1.multioption; } });\nvar union_1 = require(\"./union\");\nObject.defineProperty(exports, \"union\", { enumerable: true, get: function () { return union_1.union; } });\nvar oneOf_1 = require(\"./oneOf\");\nObject.defineProperty(exports, \"oneOf\", { enumerable: true, get: function () { return oneOf_1.oneOf; } });\nvar rest_1 = require(\"./rest\");\nObject.defineProperty(exports, \"rest\", { enumerable: true, get: function () { return rest_1.rest; } });\n//# sourceMappingURL=index.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isFinite(val)) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'weeks':\n    case 'week':\n    case 'w':\n      return n * w;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (msAbs >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (msAbs >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (msAbs >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return plural(ms, msAbs, d, 'day');\n  }\n  if (msAbs >= h) {\n    return plural(ms, msAbs, h, 'hour');\n  }\n  if (msAbs >= m) {\n    return plural(ms, msAbs, m, 'minute');\n  }\n  if (msAbs >= s) {\n    return plural(ms, msAbs, s, 'second');\n  }\n  return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n  var isPlural = msAbs >= n * 1.5;\n  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","import * as cmd from \"cmd-ts\";\n\nexport const runtimeType = {\n  ...cmd.oneOf([\"node22\", \"node24\", \"node26\", \"python3.13\"] as const),\n  displayName: \"runtime\",\n};\n\nexport const runtime = cmd.option({\n  long: \"runtime\",\n  description: \"Deprecated. Use --image instead.\",\n  type: cmd.optional(runtimeType),\n});\n","import { extendType, string } from \"cmd-ts\";\nimport type { StringValue } from \"ms\";\nimport chalk from \"chalk\";\n\nexport const Duration = extendType(string, {\n  displayName: \"num UNIT\",\n  description: \"A duration, e.g. 5m, 10s, 1h\",\n  async from(string): Promise<StringValue> {\n    const match = string.match(\n      /^(\\d+) ?(ms|milliseconds?|msecs?|s(?:econds?)?|m(?:inutes?)?|h(?:ours?)?|d(?:ays?)?)?$/,\n    );\n\n    if (!match) {\n      throw new Error(\n        [\n          `Malformed duration: \"${string}\".`,\n          `${chalk.bold(\"hint:\")} Use a number followed by a unit: s (seconds), m (minutes), h (hours), d (days).`,\n          \"╰▶ Examples: 30s, 5m, 2h, 1d\",\n        ].join(\"\\n\"),\n      );\n    }\n\n    return match[0] as unknown as StringValue;\n  },\n});\n","import { Duration } from \"../types/duration\";\nimport * as cmd from \"cmd-ts\";\n\nexport const timeout = cmd.option({\n  long: \"timeout\",\n  type: Duration,\n  description: \"The maximum duration a sandbox can run for. Example: 5m, 30m\",\n  defaultValue: () => \"5 minutes\" as const,\n  defaultValueIsSerializable: true,\n});\n","import * as cmd from \"cmd-ts\";\n\nexport const vcpusType = cmd.extendType(cmd.number, {\n  displayName: \"COUNT\",\n  async from(n) {\n    if (!Number.isInteger(n) || n < 1) {\n      throw new Error(\n        `Invalid vCPU count: ${n}. Must be a positive integer.`,\n      );\n    }\n    return n;\n  },\n});\n\nexport const vcpus = cmd.option({\n  long: \"vcpus\",\n  type: cmd.optional(vcpusType),\n  description:\n    \"Number of vCPUs to allocate (each vCPU includes 2048 MB of memory)\",\n});\n","const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"less than a second\",\n    other: \"less than {{count}} seconds\",\n  },\n\n  xSeconds: {\n    one: \"1 second\",\n    other: \"{{count}} seconds\",\n  },\n\n  halfAMinute: \"half a minute\",\n\n  lessThanXMinutes: {\n    one: \"less than a minute\",\n    other: \"less than {{count}} minutes\",\n  },\n\n  xMinutes: {\n    one: \"1 minute\",\n    other: \"{{count}} minutes\",\n  },\n\n  aboutXHours: {\n    one: \"about 1 hour\",\n    other: \"about {{count}} hours\",\n  },\n\n  xHours: {\n    one: \"1 hour\",\n    other: \"{{count}} hours\",\n  },\n\n  xDays: {\n    one: \"1 day\",\n    other: \"{{count}} days\",\n  },\n\n  aboutXWeeks: {\n    one: \"about 1 week\",\n    other: \"about {{count}} weeks\",\n  },\n\n  xWeeks: {\n    one: \"1 week\",\n    other: \"{{count}} weeks\",\n  },\n\n  aboutXMonths: {\n    one: \"about 1 month\",\n    other: \"about {{count}} months\",\n  },\n\n  xMonths: {\n    one: \"1 month\",\n    other: \"{{count}} months\",\n  },\n\n  aboutXYears: {\n    one: \"about 1 year\",\n    other: \"about {{count}} years\",\n  },\n\n  xYears: {\n    one: \"1 year\",\n    other: \"{{count}} years\",\n  },\n\n  overXYears: {\n    one: \"over 1 year\",\n    other: \"over {{count}} years\",\n  },\n\n  almostXYears: {\n    one: \"almost 1 year\",\n    other: \"almost {{count}} years\",\n  },\n};\n\nexport const formatDistance = (token, count, options) => {\n  let result;\n\n  const tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === \"string\") {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", count.toString());\n  }\n\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"in \" + result;\n    } else {\n      return result + \" ago\";\n    }\n  }\n\n  return result;\n};\n","export function buildFormatLongFn(args) {\n  return (options = {}) => {\n    // TODO: Remove String()\n    const width = options.width ? String(options.width) : args.defaultWidth;\n    const format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n  full: \"EEEE, MMMM do, y\",\n  long: \"MMMM do, y\",\n  medium: \"MMM d, y\",\n  short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n  full: \"h:mm:ss a zzzz\",\n  long: \"h:mm:ss a z\",\n  medium: \"h:mm:ss a\",\n  short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: \"{{date}}, {{time}}\",\n  short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: \"full\",\n  }),\n\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: \"full\",\n  }),\n\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: \"full\",\n  }),\n};\n","const formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n  formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n  return (value, options) => {\n    const context = options?.context ? String(options.context) : \"standalone\";\n\n    let valuesArray;\n    if (context === \"formatting\" && args.formattingValues) {\n      const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      const width = options?.width ? String(options.width) : defaultWidth;\n\n      valuesArray =\n        args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      const defaultWidth = args.defaultWidth;\n      const width = options?.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[width] || args.values[defaultWidth];\n    }\n    const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n    // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n  narrow: [\"B\", \"A\"],\n  abbreviated: [\"BC\", \"AD\"],\n  wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n  narrow: [\"1\", \"2\", \"3\", \"4\"],\n  abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n  wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n  narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n  abbreviated: [\n    \"Jan\",\n    \"Feb\",\n    \"Mar\",\n    \"Apr\",\n    \"May\",\n    \"Jun\",\n    \"Jul\",\n    \"Aug\",\n    \"Sep\",\n    \"Oct\",\n    \"Nov\",\n    \"Dec\",\n  ],\n\n  wide: [\n    \"January\",\n    \"February\",\n    \"March\",\n    \"April\",\n    \"May\",\n    \"June\",\n    \"July\",\n    \"August\",\n    \"September\",\n    \"October\",\n    \"November\",\n    \"December\",\n  ],\n};\n\nconst dayValues = {\n  narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n  short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n  abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  wide: [\n    \"Sunday\",\n    \"Monday\",\n    \"Tuesday\",\n    \"Wednesday\",\n    \"Thursday\",\n    \"Friday\",\n    \"Saturday\",\n  ],\n};\n\nconst dayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n};\n\nconst formattingDayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n  const number = Number(dirtyNumber);\n\n  // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  const rem100 = number % 100;\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + \"st\";\n      case 2:\n        return number + \"nd\";\n      case 3:\n        return number + \"rd\";\n    }\n  }\n  return number + \"th\";\n};\n\nexport const localize = {\n  ordinalNumber,\n\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: \"wide\",\n  }),\n\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: \"wide\",\n    argumentCallback: (quarter) => quarter - 1,\n  }),\n\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: \"wide\",\n  }),\n\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: \"wide\",\n  }),\n\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: \"wide\",\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: \"wide\",\n  }),\n};\n","export function buildMatchFn(args) {\n  return (string, options = {}) => {\n    const width = options.width;\n\n    const matchPattern =\n      (width && args.matchPatterns[width]) ||\n      args.matchPatterns[args.defaultMatchWidth];\n    const matchResult = string.match(matchPattern);\n\n    if (!matchResult) {\n      return null;\n    }\n    const matchedString = matchResult[0];\n\n    const parsePatterns =\n      (width && args.parsePatterns[width]) ||\n      args.parsePatterns[args.defaultParseWidth];\n\n    const key = Array.isArray(parsePatterns)\n      ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n      : // [TODO] -- I challenge you to fix the type\n        findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n    let value;\n\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback\n      ? // [TODO] -- I challenge you to fix the type\n        options.valueCallback(value)\n      : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n\nfunction findKey(object, predicate) {\n  for (const key in object) {\n    if (\n      Object.prototype.hasOwnProperty.call(object, key) &&\n      predicate(object[key])\n    ) {\n      return key;\n    }\n  }\n  return undefined;\n}\n\nfunction findIndex(array, predicate) {\n  for (let key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n  return undefined;\n}\n","export function buildMatchPatternFn(args) {\n  return (string, options = {}) => {\n    const matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    const matchedString = matchResult[0];\n\n    const parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    let value = args.valueCallback\n      ? args.valueCallback(parseResult[0])\n      : parseResult[0];\n\n    // [TODO] I challenge you to fix the type\n    value = options.valueCallback ? options.valueCallback(value) : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n  narrow: [\n    /^j/i,\n    /^f/i,\n    /^m/i,\n    /^a/i,\n    /^m/i,\n    /^j/i,\n    /^j/i,\n    /^a/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n\n  any: [\n    /^ja/i,\n    /^f/i,\n    /^mar/i,\n    /^ap/i,\n    /^may/i,\n    /^jun/i,\n    /^jul/i,\n    /^au/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n};\n\nconst matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i,\n  },\n};\n\nexport const match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: (value) => parseInt(value, 10),\n  }),\n\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: \"any\",\n    valueCallback: (index) => index + 1,\n  }),\n\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: \"any\",\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: \"any\",\n  }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n  code: \"en-US\",\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1,\n  },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\n}\n","export function getRoundingMethod(method) {\n  return (number) => {\n    const round = method ? Math[method] : Math.trunc;\n    const result = round(number);\n    // Prevent negative zero\n    return result === 0 ? 0 : result;\n  };\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n *   return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n *   return constructFrom(\n *     date, // Use constructor from the given date\n *     date.getTime() // Use the date value to create a new date\n *   );\n * }\n */\nexport function constructFrom(date, value) {\n  if (typeof date === \"function\") return date(value);\n\n  if (date && typeof date === \"object\" && constructFromSymbol in date)\n    return date[constructFromSymbol](value);\n\n  if (date instanceof Date) return new date.constructor(value);\n\n  return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n  // [TODO] Get rid of `toDate` or `constructFrom`?\n  return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n  const _date = toDate(date);\n  const utcDate = new Date(\n    Date.UTC(\n      _date.getFullYear(),\n      _date.getMonth(),\n      _date.getDate(),\n      _date.getHours(),\n      _date.getMinutes(),\n      _date.getSeconds(),\n      _date.getMilliseconds(),\n    ),\n  );\n  utcDate.setUTCFullYear(_date.getFullYear());\n  return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n  const normalize = constructFrom.bind(\n    null,\n    context || dates.find((date) => typeof date === \"object\"),\n  );\n  return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n *   new Date(1995, 6, 2),\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * //   Wed Feb 11 1987 00:00:00,\n * //   Mon Jul 10 1989 00:00:00,\n * //   Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n  const diff = +toDate(dateLeft) - +toDate(dateRight);\n\n  if (diff < 0) return -1;\n  else if (diff > 0) return 1;\n\n  // Return 0 if diff is 0; return NaN if diff is NaN\n  return diff;\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport {\n  millisecondsInMinute,\n  minutesInDay,\n  minutesInMonth,\n  minutesInYear,\n} from \"./constants.js\";\n\n/**\n * The {@link formatDistanceStrict} function options.\n */\n\n/**\n * The unit used to format the distance in {@link formatDistanceStrict}.\n */\n\n/**\n * @name formatDistanceStrict\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result              |\n * |------------------------|---------------------|\n * | 0 ... 59 secs          | [0..59] seconds     |\n * | 1 ... 59 mins          | [1..59] minutes     |\n * | 1 ... 23 hrs           | [1..23] hours       |\n * | 1 ... 29 days          | [1..29] days        |\n * | 1 ... 11 months        | [1..11] months      |\n * | 1 ... N years          | [1..N]  years       |\n *\n * @param laterDate - The date\n * @param earlierDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * const result = formatDistanceStrict(\n *   new Date(2015, 0, 1, 0, 0, 15),\n *   new Date(2015, 0, 1, 0, 0, 0)\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n *   addSuffix: true\n * })\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), {\n *   unit: 'minute'\n * })\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2015\n * // to 28 January 2015, in months, rounded up?\n * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), {\n *   unit: 'month',\n *   roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n *   locale: eoLocale\n * })\n * //=> '1 jaro'\n */\n\nexport function formatDistanceStrict(laterDate, earlierDate, options) {\n  const defaultOptions = getDefaultOptions();\n  const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n  const comparison = compareAsc(laterDate, earlierDate);\n\n  if (isNaN(comparison)) {\n    throw new RangeError(\"Invalid time value\");\n  }\n\n  const localizeOptions = Object.assign({}, options, {\n    addSuffix: options?.addSuffix,\n    comparison: comparison,\n  });\n\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    ...(comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]),\n  );\n\n  const roundingMethod = getRoundingMethod(options?.roundingMethod ?? \"round\");\n\n  const milliseconds = earlierDate_.getTime() - laterDate_.getTime();\n  const minutes = milliseconds / millisecondsInMinute;\n\n  const timezoneOffset =\n    getTimezoneOffsetInMilliseconds(earlierDate_) -\n    getTimezoneOffsetInMilliseconds(laterDate_);\n\n  // Use DST-normalized difference in minutes for years, months and days;\n  // use regular difference in minutes for hours, minutes and seconds.\n  const dstNormalizedMinutes =\n    (milliseconds - timezoneOffset) / millisecondsInMinute;\n\n  const defaultUnit = options?.unit;\n  let unit;\n  if (!defaultUnit) {\n    if (minutes < 1) {\n      unit = \"second\";\n    } else if (minutes < 60) {\n      unit = \"minute\";\n    } else if (minutes < minutesInDay) {\n      unit = \"hour\";\n    } else if (dstNormalizedMinutes < minutesInMonth) {\n      unit = \"day\";\n    } else if (dstNormalizedMinutes < minutesInYear) {\n      unit = \"month\";\n    } else {\n      unit = \"year\";\n    }\n  } else {\n    unit = defaultUnit;\n  }\n\n  // 0 up to 60 seconds\n  if (unit === \"second\") {\n    const seconds = roundingMethod(milliseconds / 1000);\n    return locale.formatDistance(\"xSeconds\", seconds, localizeOptions);\n\n    // 1 up to 60 mins\n  } else if (unit === \"minute\") {\n    const roundedMinutes = roundingMethod(minutes);\n    return locale.formatDistance(\"xMinutes\", roundedMinutes, localizeOptions);\n\n    // 1 up to 24 hours\n  } else if (unit === \"hour\") {\n    const hours = roundingMethod(minutes / 60);\n    return locale.formatDistance(\"xHours\", hours, localizeOptions);\n\n    // 1 up to 30 days\n  } else if (unit === \"day\") {\n    const days = roundingMethod(dstNormalizedMinutes / minutesInDay);\n    return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n    // 1 up to 12 months\n  } else if (unit === \"month\") {\n    const months = roundingMethod(dstNormalizedMinutes / minutesInMonth);\n    return months === 12 && defaultUnit !== \"month\"\n      ? locale.formatDistance(\"xYears\", 1, localizeOptions)\n      : locale.formatDistance(\"xMonths\", months, localizeOptions);\n\n    // 1 year up to max Date\n  } else {\n    const years = roundingMethod(dstNormalizedMinutes / minutesInYear);\n    return locale.formatDistance(\"xYears\", years, localizeOptions);\n  }\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceStrict;\n","import { formatDistanceStrict } from \"date-fns/formatDistanceStrict\";\nimport chalk, { ChalkInstance } from \"chalk\";\nimport { stripVTControlCharacters } from \"node:util\";\n\nexport const output = {\n  print: console.log,\n  error: console.error,\n  link(text: string, href: string) {\n    return `\\u001B]8;;${href}\\u001B\\\\${text}\\u001B]8;;\\u001B\\\\`;\n  },\n};\n\nexport function formatBytes(bytes: number) {\n  const units = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\"];\n  let value = bytes;\n  let unitIndex = 0;\n  while (value >= 1024 && unitIndex < units.length - 1) {\n    value /= 1024;\n    unitIndex += 1;\n  }\n  const formatter = new Intl.NumberFormat(undefined, {\n    maximumFractionDigits: value < 10 && unitIndex > 0 ? 1 : 0,\n  });\n  return `${formatter.format(value)} ${units[unitIndex]}`;\n}\n\nexport function timeAgo(date: string | number | Date | undefined) {\n  if (date === undefined) {\n    return '-';\n  }\n\n  return formatDistanceStrict(date, new Date(), {\n    addSuffix: true,\n  });\n}\n\nexport function table<T extends object>(opts: {\n  rows: T[];\n  columns: Record<\n    string,\n    {\n      value: (row: T) => string | number;\n      color?: (row: T) => ChalkInstance;\n    }\n  >;\n}) {\n  const titles = Object.keys(opts.columns);\n  const visibleLength = (value: string) =>\n    stripVTControlCharacters(value).length;\n  const maxWidths: number[] = titles.map((title) => visibleLength(title));\n  const data = opts.rows.map((row) => {\n    return titles.map((title, i) => {\n      let value = String(opts.columns[title].value(row));\n      const width = visibleLength(value);\n      if (width > maxWidths[i]) {\n        maxWidths[i] = width;\n      }\n      if (opts.columns[title].color) {\n        value = opts.columns[title].color(row)(value);\n      }\n      return value;\n    });\n  });\n  const padded = (value: string, i: number) => {\n    const padding = maxWidths[i] - visibleLength(value);\n    return padding > 0 ? `${value}${\" \".repeat(padding)}` : value;\n  };\n  const space = \"   \";\n  return [\n    chalk.bold(titles.map(padded).join(space)),\n    ...data.map((row) => row.map(padded).join(space)),\n  ].join(\"\\n\");\n}\n\nexport function formatRunDuration(d: number): string {\n  if (d < 1000) {\n    return `${d}ms`;\n  }\n  return `${d/1000}s`\n}\n\nexport function formatNextCursorHint(cursor: string): string {\n  const args = process.argv.slice(2);\n  const filtered: string[] = [];\n\n  for (let i = 0; i < args.length; i++) {\n    // Ignore `--cursor` parameter. We will overwrite it.\n    if (args[i] === \"--cursor\") {\n      i++;\n      continue;\n    }\n    if (args[i].startsWith(\"--cursor=\")) {\n      continue;\n    }\n\n    filtered.push(args[i]);\n  }\n  return `\\nMore results: sandbox ${filtered.join(\" \")} --cursor ${cursor}`;\n}","import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n","import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n","import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\treturn fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')\n\t\t\t? !isInsideContainer() : false;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n","import process from 'node:process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport isWsl from 'is-wsl';\n\nexport const wslDrivesMountPoint = (() => {\n\t// Default value for \"root\" param\n\t// according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config\n\tconst defaultMountPoint = '/mnt/';\n\n\tlet mountPoint;\n\n\treturn async function () {\n\t\tif (mountPoint) {\n\t\t\t// Return memoized mount point value\n\t\t\treturn mountPoint;\n\t\t}\n\n\t\tconst configFilePath = '/etc/wsl.conf';\n\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs.access(configFilePath, fsConstants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\n\t\tif (!isConfigFileExists) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tconst configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});\n\t\tconst configMountPoint = /(?<!#.*)root\\s*=\\s*(?<mountPoint>.*)/g.exec(configContent);\n\n\t\tif (!configMountPoint) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tmountPoint = configMountPoint.groups.mountPoint.trim();\n\t\tmountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;\n\n\t\treturn mountPoint;\n\t};\n})();\n\nexport const powerShellPathFromWsl = async () => {\n\tconst mountPoint = await wslDrivesMountPoint();\n\treturn `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n};\n\nexport const powerShellPath = async () => {\n\tif (isWsl) {\n\t\treturn powerShellPathFromWsl();\n\t}\n\n\treturn `${process.env.SYSTEMROOT || process.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`;\n};\n\nexport {default as isWsl} from 'is-wsl';\n","export default function defineLazyProperty(object, propertyName, valueGetter) {\n\tconst define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});\n\n\tObject.defineProperty(object, propertyName, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget() {\n\t\t\tconst result = valueGetter();\n\t\t\tdefine(result);\n\t\t\treturn result;\n\t\t},\n\t\tset(value) {\n\t\t\tdefine(value);\n\t\t}\n\t});\n\n\treturn object;\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport default async function defaultBrowserId() {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst {stdout} = await execFileAsync('defaults', ['read', 'com.apple.LaunchServices/com.apple.launchservices.secure', 'LSHandlers']);\n\n\t// `(?!-)` is to prevent matching `LSHandlerRoleAll = \"-\";`.\n\tconst match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n\n\treturn match?.groups.id ?? 'com.apple.Safari';\n}\n","import process from 'node:process';\nimport {promisify} from 'node:util';\nimport {execFile, execFileSync} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport async function runAppleScript(script, {humanReadableOutput = true, signal} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst execOptions = {};\n\tif (signal) {\n\t\texecOptions.signal = signal;\n\t}\n\n\tconst {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments], execOptions);\n\treturn stdout.trim();\n}\n\nexport function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {\n\t\tencoding: 'utf8',\n\t\tstdio: ['ignore', 'pipe', 'ignore'],\n\t\ttimeout: 500,\n\t});\n\n\treturn stdout.trim();\n}\n","import {runAppleScript} from 'run-applescript';\n\nexport default async function bundleName(bundleId) {\n\treturn runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n","import {promisify} from 'node:util';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\n// Windows doesn't have browser IDs in the same way macOS/Linux does so we give fake\n// ones that look real and match the macOS/Linux versions for cross-platform apps.\nconst windowsBrowserProgIds = {\n\tAppXq0fevzme2pys62n3e0fbqa7peapykr8v: {name: 'Edge', id: 'com.microsoft.edge.old'},\n\tMSEdgeDHTML: {name: 'Edge', id: 'com.microsoft.edge'}, // On macOS, it's \"com.microsoft.edgemac\"\n\tMSEdgeHTM: {name: 'Edge', id: 'com.microsoft.edge'}, // Newer Edge/Win10 releases\n\t'IE.HTTP': {name: 'Internet Explorer', id: 'com.microsoft.ie'},\n\tFirefoxURL: {name: 'Firefox', id: 'org.mozilla.firefox'},\n\tChromeHTML: {name: 'Chrome', id: 'com.google.chrome'},\n\tBraveHTML: {name: 'Brave', id: 'com.brave.Browser'},\n\tBraveBHTML: {name: 'Brave Beta', id: 'com.brave.Browser.beta'},\n\tBraveSSHTM: {name: 'Brave Nightly', id: 'com.brave.Browser.nightly'},\n};\n\nexport class UnknownBrowserError extends Error {}\n\nexport default async function defaultBrowser(_execFileAsync = execFileAsync) {\n\tconst {stdout} = await _execFileAsync('reg', [\n\t\t'QUERY',\n\t\t' HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice',\n\t\t'/v',\n\t\t'ProgId',\n\t]);\n\n\tconst match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n\tif (!match) {\n\t\tthrow new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n\t}\n\n\tconst {id} = match.groups;\n\n\tconst browser = windowsBrowserProgIds[id];\n\tif (!browser) {\n\t\tthrow new UnknownBrowserError(`Unknown browser ID: ${id}`);\n\t}\n\n\treturn browser;\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\nimport defaultBrowserId from 'default-browser-id';\nimport bundleName from 'bundle-name';\nimport windows from './windows.js';\n\nconst execFileAsync = promisify(execFile);\n\n// Inlined: https://github.com/sindresorhus/titleize/blob/main/index.js\nconst titleize = string => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, x => x.toUpperCase());\n\nexport default async function defaultBrowser() {\n\tif (process.platform === 'darwin') {\n\t\tconst id = await defaultBrowserId();\n\t\tconst name = await bundleName(id);\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'linux') {\n\t\tconst {stdout} = await execFileAsync('xdg-mime', ['query', 'default', 'x-scheme-handler/http']);\n\t\tconst id = stdout.trim();\n\t\tconst name = titleize(id.replace(/.desktop$/, '').replace('-', ' '));\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn windows();\n\t}\n\n\tthrow new Error('Only macOS, Linux, and Windows are supported');\n}\n","import process from 'node:process';\nimport {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport {isWsl, powerShellPath} from 'wsl-utils';\nimport defineLazyProperty from 'define-lazy-prop';\nimport defaultBrowser from 'default-browser';\nimport isInsideContainer from 'is-inside-container';\n\nconst execFile = promisify(childProcess.execFile);\n\n// Path to included `xdg-open`.\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\nconst localXdgOpenPath = path.join(__dirname, 'xdg-open');\n\nconst {platform, arch} = process;\n\n/**\nGet the default browser name in Windows from WSL.\n\n@returns {Promise<string>} Browser name.\n*/\nasync function getWindowsDefaultBrowserFromWsl() {\n\tconst powershellPath = await powerShellPath();\n\tconst rawCommand = String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`;\n\tconst encodedCommand = Buffer.from(rawCommand, 'utf16le').toString('base64');\n\n\tconst {stdout} = await execFile(\n\t\tpowershellPath,\n\t\t[\n\t\t\t'-NoProfile',\n\t\t\t'-NonInteractive',\n\t\t\t'-ExecutionPolicy',\n\t\t\t'Bypass',\n\t\t\t'-EncodedCommand',\n\t\t\tencodedCommand,\n\t\t],\n\t\t{encoding: 'utf8'},\n\t);\n\n\tconst progId = stdout.trim();\n\n\t// Map ProgId to browser IDs\n\tconst browserMap = {\n\t\tChromeHTML: 'com.google.chrome',\n\t\tBraveHTML: 'com.brave.Browser',\n\t\tMSEdgeHTM: 'com.microsoft.edge',\n\t\tFirefoxURL: 'org.mozilla.firefox',\n\t};\n\n\treturn browserMap[progId] ? {id: browserMap[progId]} : {};\n}\n\nconst pTryEach = async (array, mapper) => {\n\tlet latestError;\n\n\tfor (const item of array) {\n\t\ttry {\n\t\t\treturn await mapper(item); // eslint-disable-line no-await-in-loop\n\t\t} catch (error) {\n\t\t\tlatestError = error;\n\t\t}\n\t}\n\n\tthrow latestError;\n};\n\n// eslint-disable-next-line complexity\nconst baseOpen = async options => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(options.app)) {\n\t\treturn pTryEach(options.app, singleApp => baseOpen({\n\t\t\t...options,\n\t\t\tapp: singleApp,\n\t\t}));\n\t}\n\n\tlet {name: app, arguments: appArguments = []} = options.app ?? {};\n\tappArguments = [...appArguments];\n\n\tif (Array.isArray(app)) {\n\t\treturn pTryEach(app, appName => baseOpen({\n\t\t\t...options,\n\t\t\tapp: {\n\t\t\t\tname: appName,\n\t\t\t\targuments: appArguments,\n\t\t\t},\n\t\t}));\n\t}\n\n\tif (app === 'browser' || app === 'browserPrivate') {\n\t\t// IDs from default-browser for macOS and windows are the same\n\t\tconst ids = {\n\t\t\t'com.google.chrome': 'chrome',\n\t\t\t'google-chrome.desktop': 'chrome',\n\t\t\t'com.brave.Browser': 'brave',\n\t\t\t'org.mozilla.firefox': 'firefox',\n\t\t\t'firefox.desktop': 'firefox',\n\t\t\t'com.microsoft.msedge': 'edge',\n\t\t\t'com.microsoft.edge': 'edge',\n\t\t\t'com.microsoft.edgemac': 'edge',\n\t\t\t'microsoft-edge.desktop': 'edge',\n\t\t};\n\n\t\t// Incognito flags for each browser in `apps`.\n\t\tconst flags = {\n\t\t\tchrome: '--incognito',\n\t\t\tbrave: '--incognito',\n\t\t\tfirefox: '--private-window',\n\t\t\tedge: '--inPrivate',\n\t\t};\n\n\t\tconst browser = isWsl ? await getWindowsDefaultBrowserFromWsl() : await defaultBrowser();\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id];\n\n\t\t\tif (app === 'browserPrivate') {\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\n\tif (platform === 'darwin') {\n\t\tcommand = 'open';\n\n\t\tif (options.wait) {\n\t\t\tcliArguments.push('--wait-apps');\n\t\t}\n\n\t\tif (options.background) {\n\t\t\tcliArguments.push('--background');\n\t\t}\n\n\t\tif (options.newInstance) {\n\t\t\tcliArguments.push('--new');\n\t\t}\n\n\t\tif (app) {\n\t\t\tcliArguments.push('-a', app);\n\t\t}\n\t} else if (platform === 'win32' || (isWsl && !isInsideContainer() && !app)) {\n\t\tcommand = await powerShellPath();\n\n\t\tcliArguments.push(\n\t\t\t'-NoProfile',\n\t\t\t'-NonInteractive',\n\t\t\t'-ExecutionPolicy',\n\t\t\t'Bypass',\n\t\t\t'-EncodedCommand',\n\t\t);\n\n\t\tif (!isWsl) {\n\t\t\tchildProcessOptions.windowsVerbatimArguments = true;\n\t\t}\n\n\t\tconst encodedArguments = ['Start'];\n\n\t\tif (options.wait) {\n\t\t\tencodedArguments.push('-Wait');\n\t\t}\n\n\t\tif (app) {\n\t\t\t// Double quote with double quotes to ensure the inner quotes are passed through.\n\t\t\t// Inner quotes are delimited for PowerShell interpretation with backticks.\n\t\t\tencodedArguments.push(`\"\\`\"${app}\\`\"\"`);\n\t\t\tif (options.target) {\n\t\t\t\tappArguments.push(options.target);\n\t\t\t}\n\t\t} else if (options.target) {\n\t\t\tencodedArguments.push(`\"${options.target}\"`);\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map(argument => `\"\\`\"${argument}\\`\"\"`);\n\t\t\tencodedArguments.push('-ArgumentList', appArguments.join(','));\n\t\t}\n\n\t\t// Using Base64-encoded command, accepted by PowerShell, to allow special characters.\n\t\toptions.target = Buffer.from(encodedArguments.join(' '), 'utf16le').toString('base64');\n\t} else {\n\t\tif (app) {\n\t\t\tcommand = app;\n\t\t} else {\n\t\t\t// When bundled by Webpack, there's no actual package file path and no local `xdg-open`.\n\t\t\tconst isBundled = !__dirname || __dirname === '/';\n\n\t\t\t// Check if local `xdg-open` exists and is executable.\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs.access(localXdgOpenPath, fsConstants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\n\t\t\tconst useSystemXdgOpen = process.versions.electron\n\t\t\t\t?? (platform === 'android' || isBundled || !exeLocalXdgOpen);\n\t\t\tcommand = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tcliArguments.push(...appArguments);\n\t\t}\n\n\t\tif (!options.wait) {\n\t\t\t// `xdg-open` will block the process unless stdio is ignored\n\t\t\t// and it's detached from the parent even if it's unref'd.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\n\tif (platform === 'darwin' && appArguments.length > 0) {\n\t\tcliArguments.push('--args', ...appArguments);\n\t}\n\n\t// This has to come after `--args`.\n\tif (options.target) {\n\t\tcliArguments.push(options.target);\n\t}\n\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\n\tif (options.wait) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\tif (!options.allowNonzeroExitCode && exitCode > 0) {\n\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(subprocess);\n\t\t\t});\n\t\t});\n\t}\n\n\tsubprocess.unref();\n\n\treturn subprocess;\n};\n\nconst open = (target, options) => {\n\tif (typeof target !== 'string') {\n\t\tthrow new TypeError('Expected a `target`');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget,\n\t});\n};\n\nexport const openApp = (name, options) => {\n\tif (typeof name !== 'string' && !Array.isArray(name)) {\n\t\tthrow new TypeError('Expected a valid `name`');\n\t}\n\n\tconst {arguments: appArguments = []} = options ?? {};\n\tif (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {\n\t\tthrow new TypeError('Expected `appArguments` as Array type');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname,\n\t\t\targuments: appArguments,\n\t\t},\n\t});\n};\n\nfunction detectArchBinary(binary) {\n\tif (typeof binary === 'string' || Array.isArray(binary)) {\n\t\treturn binary;\n\t}\n\n\tconst {[arch]: archBinary} = binary;\n\n\tif (!archBinary) {\n\t\tthrow new Error(`${arch} is not supported`);\n\t}\n\n\treturn archBinary;\n}\n\nfunction detectPlatformBinary({[platform]: platformBinary}, {wsl}) {\n\tif (wsl && isWsl) {\n\t\treturn detectArchBinary(wsl);\n\t}\n\n\tif (!platformBinary) {\n\t\tthrow new Error(`${platform} is not supported`);\n\t}\n\n\treturn detectArchBinary(platformBinary);\n}\n\nexport const apps = {};\n\ndefineLazyProperty(apps, 'chrome', () => detectPlatformBinary({\n\tdarwin: 'google chrome',\n\twin32: 'chrome',\n\tlinux: ['google-chrome', 'google-chrome-stable', 'chromium'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',\n\t\tx64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'brave', () => detectPlatformBinary({\n\tdarwin: 'brave browser',\n\twin32: 'brave',\n\tlinux: ['brave-browser', 'brave'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe',\n\t\tx64: ['/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe', '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'firefox', () => detectPlatformBinary({\n\tdarwin: 'firefox',\n\twin32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n\tlinux: 'firefox',\n}, {\n\twsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe',\n}));\n\ndefineLazyProperty(apps, 'edge', () => detectPlatformBinary({\n\tdarwin: 'microsoft edge',\n\twin32: 'msedge',\n\tlinux: ['microsoft-edge', 'microsoft-edge-dev'],\n}, {\n\twsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',\n}));\n\ndefineLazyProperty(apps, 'browser', () => 'browser');\n\ndefineLazyProperty(apps, 'browserPrivate', () => 'browserPrivate');\n\nexport default open;\n","{\n\t\"dots\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⠋\",\n\t\t\t\"⠙\",\n\t\t\t\"⠹\",\n\t\t\t\"⠸\",\n\t\t\t\"⠼\",\n\t\t\t\"⠴\",\n\t\t\t\"⠦\",\n\t\t\t\"⠧\",\n\t\t\t\"⠇\",\n\t\t\t\"⠏\"\n\t\t]\n\t},\n\t\"dots2\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⣾\",\n\t\t\t\"⣽\",\n\t\t\t\"⣻\",\n\t\t\t\"⢿\",\n\t\t\t\"⡿\",\n\t\t\t\"⣟\",\n\t\t\t\"⣯\",\n\t\t\t\"⣷\"\n\t\t]\n\t},\n\t\"dots3\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⠋\",\n\t\t\t\"⠙\",\n\t\t\t\"⠚\",\n\t\t\t\"⠞\",\n\t\t\t\"⠖\",\n\t\t\t\"⠦\",\n\t\t\t\"⠴\",\n\t\t\t\"⠲\",\n\t\t\t\"⠳\",\n\t\t\t\"⠓\"\n\t\t]\n\t},\n\t\"dots4\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⠄\",\n\t\t\t\"⠆\",\n\t\t\t\"⠇\",\n\t\t\t\"⠋\",\n\t\t\t\"⠙\",\n\t\t\t\"⠸\",\n\t\t\t\"⠰\",\n\t\t\t\"⠠\",\n\t\t\t\"⠰\",\n\t\t\t\"⠸\",\n\t\t\t\"⠙\",\n\t\t\t\"⠋\",\n\t\t\t\"⠇\",\n\t\t\t\"⠆\"\n\t\t]\n\t},\n\t\"dots5\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⠋\",\n\t\t\t\"⠙\",\n\t\t\t\"⠚\",\n\t\t\t\"⠒\",\n\t\t\t\"⠂\",\n\t\t\t\"⠂\",\n\t\t\t\"⠒\",\n\t\t\t\"⠲\",\n\t\t\t\"⠴\",\n\t\t\t\"⠦\",\n\t\t\t\"⠖\",\n\t\t\t\"⠒\",\n\t\t\t\"⠐\",\n\t\t\t\"⠐\",\n\t\t\t\"⠒\",\n\t\t\t\"⠓\",\n\t\t\t\"⠋\"\n\t\t]\n\t},\n\t\"dots6\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⠁\",\n\t\t\t\"⠉\",\n\t\t\t\"⠙\",\n\t\t\t\"⠚\",\n\t\t\t\"⠒\",\n\t\t\t\"⠂\",\n\t\t\t\"⠂\",\n\t\t\t\"⠒\",\n\t\t\t\"⠲\",\n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t\"⠐\",\n\t\t\t\"⠒\",\n\t\t\t\"⠓\",\n\t\t\t\"⠋\",\n\t\t\t\"⠉\",\n\t\t\t\"⠈\",\n\t\t\t\"⠈\"\n\t\t]\n\t},\n\t\"dots9\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⢹\",\n\t\t\t\"⢺\",\n\t\t\t\"⢼\",\n\t\t\t\"⣸\",\n\t\t\t\"⣇\",\n\t\t\t\"⡧\",\n\t\t\t\"⡗\",\n\t\t\t\"⡏\"\n\t\t]\n\t},\n\t\"dots10\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⢄\",\n\t\t\t\"⢂\",\n\t\t\t\"⢁\",\n\t\t\t\"⡁\",\n\t\t\t\"⡈\",\n\t\t\t\"⡐\",\n\t\t\t\"⡠\"\n\t\t]\n\t},\n\t\"dots11\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"⠁\",\n\t\t\t\"⠂\",\n\t\t\t\"⠄\",\n\t\t\t\"⡀\",\n\t\t\t\"⢀\",\n\t\t\t\"⠠\",\n\t\t\t\"⠐\",\n\t\t\t\"⠈\"\n\t\t]\n\t},\n\t\"dots12\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⢀⠀\",\n\t\t\t\"⡀⠀\",\n\t\t\t\"⠄⠀\",\n\t\t\t\"⢂⠀\",\n\t\t\t\"⡂⠀\",\n\t\t\t\"⠅⠀\",\n\t\t\t\"⢃⠀\",\n\t\t\t\"⡃⠀\",\n\t\t\t\"⠍⠀\",\n\t\t\t\"⢋⠀\",\n\t\t\t\"⡋⠀\",\n\t\t\t\"⠍⠁\",\n\t\t\t\"⢋⠁\",\n\t\t\t\"⡋⠁\",\n\t\t\t\"⠍⠉\",\n\t\t\t\"⠋⠉\",\n\t\t\t\"⠋⠉\",\n\t\t\t\"⠉⠙\",\n\t\t\t\"⠉⠙\",\n\t\t\t\"⠉⠩\",\n\t\t\t\"⠈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t\"⡛\",\n\t\t\t\"⠛\",\n\t\t\t\"⠫\",\n\t\t\t\"⢋\",\n\t\t\t\"⠋\",\n\t\t\t\"⠍\",\n\t\t\t\"⡉\",\n\t\t\t\"⠉\",\n\t\t\t\"⠑\",\n\t\t\t\"⠡\",\n\t\t\t\"⢁\"\n\t\t]\n\t},\n\t\"line\": {\n\t\t\"interval\": 130,\n\t\t\"frames\": [\n\t\t\t\"-\",\n\t\t\t\"\\\\\",\n\t\t\t\"|\",\n\t\t\t\"/\"\n\t\t]\n\t},\n\t\"line2\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"⠂\",\n\t\t\t\"-\",\n\t\t\t\"–\",\n\t\t\t\"—\",\n\t\t\t\"–\",\n\t\t\t\"-\"\n\t\t]\n\t},\n\t\"pipe\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"┤\",\n\t\t\t\"┘\",\n\t\t\t\"┴\",\n\t\t\t\"└\",\n\t\t\t\"├\",\n\t\t\t\"┌\",\n\t\t\t\"┬\",\n\t\t\t\"┐\"\n\t\t]\n\t},\n\t\"simpleDots\": {\n\t\t\"interval\": 400,\n\t\t\"frames\": [\n\t\t\t\".  \",\n\t\t\t\".. \",\n\t\t\t\"...\",\n\t\t\t\"   \"\n\t\t]\n\t},\n\t\"simpleDotsScrolling\": {\n\t\t\"interval\": 200,\n\t\t\"frames\": [\n\t\t\t\".  \",\n\t\t\t\".. \",\n\t\t\t\"...\",\n\t\t\t\" ..\",\n\t\t\t\"  .\",\n\t\t\t\"   \"\n\t\t]\n\t},\n\t\"star\": {\n\t\t\"interval\": 70,\n\t\t\"frames\": [\n\t\t\t\"✶\",\n\t\t\t\"✸\",\n\t\t\t\"✹\",\n\t\t\t\"✺\",\n\t\t\t\"✹\",\n\t\t\t\"✷\"\n\t\t]\n\t},\n\t\"star2\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"+\",\n\t\t\t\"x\",\n\t\t\t\"*\"\n\t\t]\n\t},\n\t\"flip\": {\n\t\t\"interval\": 70,\n\t\t\"frames\": [\n\t\t\t\"_\",\n\t\t\t\"_\",\n\t\t\t\"_\",\n\t\t\t\"-\",\n\t\t\t\"`\",\n\t\t\t\"`\",\n\t\t\t\"'\",\n\t\t\t\"´\",\n\t\t\t\"-\",\n\t\t\t\"_\",\n\t\t\t\"_\",\n\t\t\t\"_\"\n\t\t]\n\t},\n\t\"hamburger\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"☱\",\n\t\t\t\"☲\",\n\t\t\t\"☴\"\n\t\t]\n\t},\n\t\"growVertical\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"▁\",\n\t\t\t\"▃\",\n\t\t\t\"▄\",\n\t\t\t\"▅\",\n\t\t\t\"▆\",\n\t\t\t\"▇\",\n\t\t\t\"▆\",\n\t\t\t\"▅\",\n\t\t\t\"▄\",\n\t\t\t\"▃\"\n\t\t]\n\t},\n\t\"growHorizontal\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"▏\",\n\t\t\t\"▎\",\n\t\t\t\"▍\",\n\t\t\t\"▌\",\n\t\t\t\"▋\",\n\t\t\t\"▊\",\n\t\t\t\"▉\",\n\t\t\t\"▊\",\n\t\t\t\"▋\",\n\t\t\t\"▌\",\n\t\t\t\"▍\",\n\t\t\t\"▎\"\n\t\t]\n\t},\n\t\"balloon\": {\n\t\t\"interval\": 140,\n\t\t\"frames\": [\n\t\t\t\" \",\n\t\t\t\".\",\n\t\t\t\"o\",\n\t\t\t\"O\",\n\t\t\t\"@\",\n\t\t\t\"*\",\n\t\t\t\" \"\n\t\t]\n\t},\n\t\"balloon2\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\".\",\n\t\t\t\"o\",\n\t\t\t\"O\",\n\t\t\t\"°\",\n\t\t\t\"O\",\n\t\t\t\"o\",\n\t\t\t\".\"\n\t\t]\n\t},\n\t\"noise\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"▓\",\n\t\t\t\"▒\",\n\t\t\t\"░\"\n\t\t]\n\t},\n\t\"bounce\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"⠁\",\n\t\t\t\"⠂\",\n\t\t\t\"⠄\",\n\t\t\t\"⠂\"\n\t\t]\n\t},\n\t\"boxBounce\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"▖\",\n\t\t\t\"▘\",\n\t\t\t\"▝\",\n\t\t\t\"▗\"\n\t\t]\n\t},\n\t\"boxBounce2\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"▌\",\n\t\t\t\"▀\",\n\t\t\t\"▐\",\n\t\t\t\"▄\"\n\t\t]\n\t},\n\t\"triangle\": {\n\t\t\"interval\": 50,\n\t\t\"frames\": [\n\t\t\t\"◢\",\n\t\t\t\"◣\",\n\t\t\t\"◤\",\n\t\t\t\"◥\"\n\t\t]\n\t},\n\t\"binary\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"010010\",\n            \"001100\",\n            \"100101\",\n            \"111010\",\n            \"111101\",\n            \"010111\",\n\t\t\t\"101011\",\n\t\t\t\"111000\",\n\t\t\t\"110011\",\n\t\t\t\"110101\"\n\t\t]\n\t},\n\t\"arc\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"◜\",\n\t\t\t\"◠\",\n\t\t\t\"◝\",\n\t\t\t\"◞\",\n\t\t\t\"◡\",\n\t\t\t\"◟\"\n\t\t]\n\t},\n\t\"circle\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"◡\",\n\t\t\t\"⊙\",\n\t\t\t\"◠\"\n\t\t]\n\t},\n\t\"squareCorners\": {\n\t\t\"interval\": 180,\n\t\t\"frames\": [\n\t\t\t\"◰\",\n\t\t\t\"◳\",\n\t\t\t\"◲\",\n\t\t\t\"◱\"\n\t\t]\n\t},\n\t\"circleQuarters\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"◴\",\n\t\t\t\"◷\",\n\t\t\t\"◶\",\n\t\t\t\"◵\"\n\t\t]\n\t},\n\t\"circleHalves\": {\n\t\t\"interval\": 50,\n\t\t\"frames\": [\n\t\t\t\"◐\",\n\t\t\t\"◓\",\n\t\t\t\"◑\",\n\t\t\t\"◒\"\n\t\t]\n\t},\n\t\"squish\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"╫\",\n\t\t\t\"╪\"\n\t\t]\n\t},\n\t\"toggle\": {\n\t\t\"interval\": 250,\n\t\t\"frames\": [\n\t\t\t\"⊶\",\n\t\t\t\"⊷\"\n\t\t]\n\t},\n\t\"toggle2\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"▫\",\n\t\t\t\"▪\"\n\t\t]\n\t},\n\t\"toggle3\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"□\",\n\t\t\t\"■\"\n\t\t]\n\t},\n\t\"toggle4\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"■\",\n\t\t\t\"□\",\n\t\t\t\"▪\",\n\t\t\t\"▫\"\n\t\t]\n\t},\n\t\"toggle5\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"▮\",\n\t\t\t\"▯\"\n\t\t]\n\t},\n\t\"toggle6\": {\n\t\t\"interval\": 300,\n\t\t\"frames\": [\n\t\t\t\"ဝ\",\n\t\t\t\"၀\"\n\t\t]\n\t},\n\t\"toggle7\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⦾\",\n\t\t\t\"⦿\"\n\t\t]\n\t},\n\t\"toggle8\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"◍\",\n\t\t\t\"◌\"\n\t\t]\n\t},\n\t\"toggle9\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"◉\",\n\t\t\t\"◎\"\n\t\t]\n\t},\n\t\"toggle10\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"㊂\",\n\t\t\t\"㊀\",\n\t\t\t\"㊁\"\n\t\t]\n\t},\n\t\"toggle11\": {\n\t\t\"interval\": 50,\n\t\t\"frames\": [\n\t\t\t\"⧇\",\n\t\t\t\"⧆\"\n\t\t]\n\t},\n\t\"toggle12\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"☗\",\n\t\t\t\"☖\"\n\t\t]\n\t},\n\t\"toggle13\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"=\",\n\t\t\t\"*\",\n\t\t\t\"-\"\n\t\t]\n\t},\n\t\"arrow\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"←\",\n\t\t\t\"↖\",\n\t\t\t\"↑\",\n\t\t\t\"↗\",\n\t\t\t\"→\",\n\t\t\t\"↘\",\n\t\t\t\"↓\",\n\t\t\t\"↙\"\n\t\t]\n\t},\n\t\"arrow2\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"⬆️ \",\n\t\t\t\"↗️ \",\n\t\t\t\"➡️ \",\n\t\t\t\"↘️ \",\n\t\t\t\"⬇️ \",\n\t\t\t\"↙️ \",\n\t\t\t\"⬅️ \",\n\t\t\t\"↖️ \"\n\t\t]\n\t},\n\t\"arrow3\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"▹▹▹▹▹\",\n\t\t\t\"▸▹▹▹▹\",\n\t\t\t\"▹▸▹▹▹\",\n\t\t\t\"▹▹▸▹▹\",\n\t\t\t\"▹▹▹▸▹\",\n\t\t\t\"▹▹▹▹▸\"\n\t\t]\n\t},\n\t\"bouncingBar\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"[    ]\",\n\t\t\t\"[=   ]\",\n\t\t\t\"[==  ]\",\n\t\t\t\"[=== ]\",\n\t\t\t\"[====]\",\n\t\t\t\"[ ===]\",\n\t\t\t\"[  ==]\",\n\t\t\t\"[   =]\",\n\t\t\t\"[    ]\",\n\t\t\t\"[   =]\",\n\t\t\t\"[  ==]\",\n\t\t\t\"[ ===]\",\n\t\t\t\"[====]\",\n\t\t\t\"[=== ]\",\n\t\t\t\"[==  ]\",\n\t\t\t\"[=   ]\"\n\t\t]\n\t},\n\t\"bouncingBall\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"( ●    )\",\n\t\t\t\"(  ●   )\",\n\t\t\t\"(   ●  )\",\n\t\t\t\"(    ● )\",\n\t\t\t\"(     ●)\",\n\t\t\t\"(    ● )\",\n\t\t\t\"(   ●  )\",\n\t\t\t\"(  ●   )\",\n\t\t\t\"( ●    )\",\n\t\t\t\"(●     )\"\n\t\t]\n\t},\n\t\"smiley\": {\n\t\t\"interval\": 200,\n\t\t\"frames\": [\n\t\t\t\"😄 \",\n\t\t\t\"😝 \"\n\t\t]\n\t},\n\t\"monkey\": {\n\t\t\"interval\": 300,\n\t\t\"frames\": [\n\t\t\t\"🙈 \",\n\t\t\t\"🙈 \",\n\t\t\t\"🙉 \",\n\t\t\t\"🙊 \"\n\t\t]\n\t},\n\t\"hearts\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"💛 \",\n\t\t\t\"💙 \",\n\t\t\t\"💜 \",\n\t\t\t\"💚 \",\n\t\t\t\"❤️ \"\n\t\t]\n\t},\n\t\"clock\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"🕛 \",\n\t\t\t\"🕐 \",\n\t\t\t\"🕑 \",\n\t\t\t\"🕒 \",\n\t\t\t\"🕓 \",\n\t\t\t\"🕔 \",\n\t\t\t\"🕕 \",\n\t\t\t\"🕖 \",\n\t\t\t\"🕗 \",\n\t\t\t\"🕘 \",\n\t\t\t\"🕙 \",\n\t\t\t\"🕚 \"\n\t\t]\n\t},\n\t\"earth\": {\n\t\t\"interval\": 180,\n\t\t\"frames\": [\n\t\t\t\"🌍 \",\n\t\t\t\"🌎 \",\n\t\t\t\"🌏 \"\n\t\t]\n\t},\n\t\"material\": {\n\t\t\"interval\": 17,\n\t\t\"frames\": [\n\t\t\t\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"███████▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"██████████▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"███████████▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"█████████████▁▁▁▁▁▁▁\",\n\t\t\t\"██████████████▁▁▁▁▁▁\",\n\t\t\t\"██████████████▁▁▁▁▁▁\",\n\t\t\t\"▁██████████████▁▁▁▁▁\",\n\t\t\t\"▁██████████████▁▁▁▁▁\",\n\t\t\t\"▁██████████████▁▁▁▁▁\",\n\t\t\t\"▁▁██████████████▁▁▁▁\",\n\t\t\t\"▁▁▁██████████████▁▁▁\",\n\t\t\t\"▁▁▁▁█████████████▁▁▁\",\n\t\t\t\"▁▁▁▁██████████████▁▁\",\n\t\t\t\"▁▁▁▁██████████████▁▁\",\n\t\t\t\"▁▁▁▁▁██████████████▁\",\n\t\t\t\"▁▁▁▁▁██████████████▁\",\n\t\t\t\"▁▁▁▁▁██████████████▁\",\n\t\t\t\"▁▁▁▁▁▁██████████████\",\n\t\t\t\"▁▁▁▁▁▁██████████████\",\n\t\t\t\"▁▁▁▁▁▁▁█████████████\",\n\t\t\t\"▁▁▁▁▁▁▁█████████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁████████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁████████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁███████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁███████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁██████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁██████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁████████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\n\t\t\t\"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\n\t\t\t\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\n\t\t\t\"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\n\t\t\t\"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\n\t\t\t\"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\n\t\t\t\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\n\t\t\t\"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\n\t\t\t\"██████▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\n\t\t\t\"████████▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"█████████▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"███████████▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"████████████▁▁▁▁▁▁▁▁\",\n\t\t\t\"████████████▁▁▁▁▁▁▁▁\",\n\t\t\t\"██████████████▁▁▁▁▁▁\",\n\t\t\t\"██████████████▁▁▁▁▁▁\",\n\t\t\t\"▁██████████████▁▁▁▁▁\",\n\t\t\t\"▁██████████████▁▁▁▁▁\",\n\t\t\t\"▁▁▁█████████████▁▁▁▁\",\n\t\t\t\"▁▁▁▁▁████████████▁▁▁\",\n\t\t\t\"▁▁▁▁▁████████████▁▁▁\",\n\t\t\t\"▁▁▁▁▁▁███████████▁▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁█████████▁▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁█████████▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁█████████▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁████████▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁███████▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁███████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\",\n\t\t\t\"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁\"\n\t\t]\n\t},\n\t\"moon\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"🌑 \",\n\t\t\t\"🌒 \",\n\t\t\t\"🌓 \",\n\t\t\t\"🌔 \",\n\t\t\t\"🌕 \",\n\t\t\t\"🌖 \",\n\t\t\t\"🌗 \",\n\t\t\t\"🌘 \"\n\t\t]\n\t},\n\t\"runner\": {\n\t\t\"interval\": 140,\n\t\t\"frames\": [\n\t\t\t\"🚶 \",\n\t\t\t\"🏃 \"\n\t\t]\n\t},\n\t\"pong\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"▐⠂       ▌\",\n\t\t\t\"▐⠈       ▌\",\n\t\t\t\"▐ ⠂      ▌\",\n\t\t\t\"▐ ⠠      ▌\",\n\t\t\t\"▐  ⡀     ▌\",\n\t\t\t\"▐  ⠠     ▌\",\n\t\t\t\"▐   ⠂    ▌\",\n\t\t\t\"▐   ⠈    ▌\",\n\t\t\t\"▐    ⠂   ▌\",\n\t\t\t\"▐    ⠠   ▌\",\n\t\t\t\"▐     ⡀  ▌\",\n\t\t\t\"▐     ⠠  ▌\",\n\t\t\t\"▐      ⠂ ▌\",\n\t\t\t\"▐      ⠈ ▌\",\n\t\t\t\"▐       ⠂▌\",\n\t\t\t\"▐       ⠠▌\",\n\t\t\t\"▐       ⡀▌\",\n\t\t\t\"▐      ⠠ ▌\",\n\t\t\t\"▐      ⠂ ▌\",\n\t\t\t\"▐     ⠈  ▌\",\n\t\t\t\"▐     ⠂  ▌\",\n\t\t\t\"▐    ⠠   ▌\",\n\t\t\t\"▐    ⡀   ▌\",\n\t\t\t\"▐   ⠠    ▌\",\n\t\t\t\"▐   ⠂    ▌\",\n\t\t\t\"▐  ⠈     ▌\",\n\t\t\t\"▐  ⠂     ▌\",\n\t\t\t\"▐ ⠠      ▌\",\n\t\t\t\"▐ ⡀      ▌\",\n\t\t\t\"▐⠠       ▌\"\n\t\t]\n\t},\n\t\"shark\": {\n\t\t\"interval\": 120,\n\t\t\"frames\": [\n\t\t\t\"▐|\\\\____________▌\",\n\t\t\t\"▐_|\\\\___________▌\",\n\t\t\t\"▐__|\\\\__________▌\",\n\t\t\t\"▐___|\\\\_________▌\",\n\t\t\t\"▐____|\\\\________▌\",\n\t\t\t\"▐_____|\\\\_______▌\",\n\t\t\t\"▐______|\\\\______▌\",\n\t\t\t\"▐_______|\\\\_____▌\",\n\t\t\t\"▐________|\\\\____▌\",\n\t\t\t\"▐_________|\\\\___▌\",\n\t\t\t\"▐__________|\\\\__▌\",\n\t\t\t\"▐___________|\\\\_▌\",\n\t\t\t\"▐____________|\\\\▌\",\n\t\t\t\"▐____________/|▌\",\n\t\t\t\"▐___________/|_▌\",\n\t\t\t\"▐__________/|__▌\",\n\t\t\t\"▐_________/|___▌\",\n\t\t\t\"▐________/|____▌\",\n\t\t\t\"▐_______/|_____▌\",\n\t\t\t\"▐______/|______▌\",\n\t\t\t\"▐_____/|_______▌\",\n\t\t\t\"▐____/|________▌\",\n\t\t\t\"▐___/|_________▌\",\n\t\t\t\"▐__/|__________▌\",\n\t\t\t\"▐_/|___________▌\",\n\t\t\t\"▐/|____________▌\"\n\t\t]\n\t},\n\t\"dqpb\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"d\",\n\t\t\t\"q\",\n\t\t\t\"p\",\n\t\t\t\"b\"\n\t\t]\n\t},\n\t\"weather\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"☀️ \",\n\t\t\t\"☀️ \",\n\t\t\t\"☀️ \",\n\t\t\t\"🌤 \",\n\t\t\t\"⛅️ \",\n\t\t\t\"🌥 \",\n\t\t\t\"☁️ \",\n\t\t\t\"🌧 \",\n\t\t\t\"🌨 \",\n\t\t\t\"🌧 \",\n\t\t\t\"🌨 \",\n\t\t\t\"🌧 \",\n\t\t\t\"🌨 \",\n\t\t\t\"⛈ \",\n\t\t\t\"🌨 \",\n\t\t\t\"🌧 \",\n\t\t\t\"🌨 \",\n\t\t\t\"☁️ \",\n\t\t\t\"🌥 \",\n\t\t\t\"⛅️ \",\n\t\t\t\"🌤 \",\n\t\t\t\"☀️ \",\n\t\t\t\"☀️ \"\n\t\t]\n\t},\n\t\"christmas\": {\n\t\t\"interval\": 400,\n\t\t\"frames\": [\n\t\t\t\"🌲\",\n\t\t\t\"🎄\"\n\t\t]\n\t},\n\t\"grenade\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"،  \",\n\t\t\t\"′  \",\n\t\t\t\" ´ \",\n\t\t\t\" ‾ \",\n\t\t\t\"  ⸌\",\n\t\t\t\"  ⸊\",\n\t\t\t\"  |\",\n\t\t\t\"  ⁎\",\n\t\t\t\"  ⁕\",\n\t\t\t\" ෴ \",\n\t\t\t\"  ⁓\",\n\t\t\t\"   \",\n\t\t\t\"   \",\n\t\t\t\"   \"\n\t\t]\n\t},\n\t\"point\": {\n\t\t\"interval\": 125,\n\t\t\"frames\": [\n\t\t\t\"∙∙∙\",\n\t\t\t\"●∙∙\",\n\t\t\t\"∙●∙\",\n\t\t\t\"∙∙●\",\n\t\t\t\"∙∙∙\"\n\t\t]\n\t},\n\t\"layer\": {\n\t\t\"interval\": 150,\n\t\t\"frames\": [\n\t\t\t\"-\",\n\t\t\t\"=\",\n\t\t\t\"≡\"\n\t\t]\n\t},\n\t\"betaWave\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"ρββββββ\",\n\t\t\t\"βρβββββ\",\n\t\t\t\"ββρββββ\",\n\t\t\t\"βββρβββ\",\n\t\t\t\"ββββρββ\",\n\t\t\t\"βββββρβ\",\n\t\t\t\"ββββββρ\"\n\t\t]\n\t},\n\t\"fingerDance\": {\n\t\t\"interval\": 160,\n\t\t\"frames\": [\n\t\t\t\"🤘 \",\n\t\t\t\"🤟 \",\n\t\t\t\"🖖 \",\n\t\t\t\"✋ \",\n\t\t\t\"🤚 \",\n\t\t\t\"👆 \"\n\t\t]\n\t},\n\t\"fistBump\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"🤜\\u3000\\u3000\\u3000\\u3000🤛 \",\n\t\t\t\"🤜\\u3000\\u3000\\u3000\\u3000🤛 \",\n\t\t\t\"🤜\\u3000\\u3000\\u3000\\u3000🤛 \",\n\t\t\t\"\\u3000🤜\\u3000\\u3000🤛\\u3000 \",\n\t\t\t\"\\u3000\\u3000🤜🤛\\u3000\\u3000 \",\n\t\t\t\"\\u3000🤜✨🤛\\u3000\\u3000 \",\n\t\t\t\"🤜\\u3000✨\\u3000🤛\\u3000 \"\n\t\t]\n\t},\n\t\"soccerHeader\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\" 🧑⚽️       🧑 \",\n\t\t\t\"🧑  ⚽️      🧑 \",\n\t\t\t\"🧑   ⚽️     🧑 \",\n\t\t\t\"🧑    ⚽️    🧑 \",\n\t\t\t\"🧑     ⚽️   🧑 \",\n\t\t\t\"🧑      ⚽️  🧑 \",\n\t\t\t\"🧑       ⚽️🧑  \",\n\t\t\t\"🧑      ⚽️  🧑 \",\n\t\t\t\"🧑     ⚽️   🧑 \",\n\t\t\t\"🧑    ⚽️    🧑 \",\n\t\t\t\"🧑   ⚽️     🧑 \",\n\t\t\t\"🧑  ⚽️      🧑 \"\n\t\t]\n\t},\n\t\"mindblown\": {\n\t\t\"interval\": 160,\n\t\t\"frames\": [\n\t\t\t\"😐 \",\n\t\t\t\"😐 \",\n\t\t\t\"😮 \",\n\t\t\t\"😮 \",\n\t\t\t\"😦 \",\n\t\t\t\"😦 \",\n\t\t\t\"😧 \",\n\t\t\t\"😧 \",\n\t\t\t\"🤯 \",\n\t\t\t\"💥 \",\n\t\t\t\"✨ \",\n\t\t\t\"\\u3000 \",\n\t\t\t\"\\u3000 \",\n\t\t\t\"\\u3000 \"\n\t\t]\n\t},\n\t\"speaker\": {\n\t\t\"interval\": 160,\n\t\t\"frames\": [\n\t\t\t\"🔈 \",\n\t\t\t\"🔉 \",\n\t\t\t\"🔊 \",\n\t\t\t\"🔉 \"\n\t\t]\n\t},\n\t\"orangePulse\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"🔸 \",\n\t\t\t\"🔶 \",\n\t\t\t\"🟠 \",\n\t\t\t\"🟠 \",\n\t\t\t\"🔶 \"\n\t\t]\n\t},\n\t\"bluePulse\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"🔹 \",\n\t\t\t\"🔷 \",\n\t\t\t\"🔵 \",\n\t\t\t\"🔵 \",\n\t\t\t\"🔷 \"\n\t\t]\n\t},\n\t\"orangeBluePulse\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"🔸 \",\n\t\t\t\"🔶 \",\n\t\t\t\"🟠 \",\n\t\t\t\"🟠 \",\n\t\t\t\"🔶 \",\n\t\t\t\"🔹 \",\n\t\t\t\"🔷 \",\n\t\t\t\"🔵 \",\n\t\t\t\"🔵 \",\n\t\t\t\"🔷 \"\n\t\t]\n\t},\n\t\"timeTravel\": {\n\t\t\"interval\": 100,\n\t\t\"frames\": [\n\t\t\t\"🕛 \",\n\t\t\t\"🕚 \",\n\t\t\t\"🕙 \",\n\t\t\t\"🕘 \",\n\t\t\t\"🕗 \",\n\t\t\t\"🕖 \",\n\t\t\t\"🕕 \",\n\t\t\t\"🕔 \",\n\t\t\t\"🕓 \",\n\t\t\t\"🕒 \",\n\t\t\t\"🕑 \",\n\t\t\t\"🕐 \"\n\t\t]\n\t},\n\t\"aesthetic\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\"▰▱▱▱▱▱▱\",\n\t\t\t\"▰▰▱▱▱▱▱\",\n\t\t\t\"▰▰▰▱▱▱▱\",\n\t\t\t\"▰▰▰▰▱▱▱\",\n\t\t\t\"▰▰▰▰▰▱▱\",\n\t\t\t\"▰▰▰▰▰▰▱\",\n\t\t\t\"▰▰▰▰▰▰▰\",\n\t\t\t\"▰▱▱▱▱▱▱\"\n\t\t]\n\t},\n\t\"dwarfFortress\": {\n\t\t\"interval\": 80,\n\t\t\"frames\": [\n\t\t\t\" ██████£££  \",\n\t\t\t\"☺██████£££  \",\n\t\t\t\"☺██████£££  \",\n\t\t\t\"☺▓█████£££  \",\n\t\t\t\"☺▓█████£££  \",\n\t\t\t\"☺▒█████£££  \",\n\t\t\t\"☺▒█████£££  \",\n\t\t\t\"☺░█████£££  \",\n\t\t\t\"☺░█████£££  \",\n\t\t\t\"☺ █████£££  \",\n\t\t\t\" ☺█████£££  \",\n\t\t\t\" ☺█████£££  \",\n\t\t\t\" ☺▓████£££  \",\n\t\t\t\" ☺▓████£££  \",\n\t\t\t\" ☺▒████£££  \",\n\t\t\t\" ☺▒████£££  \",\n\t\t\t\" ☺░████£££  \",\n\t\t\t\" ☺░████£££  \",\n\t\t\t\" ☺ ████£££  \",\n\t\t\t\"  ☺████£££  \",\n\t\t\t\"  ☺████£££  \",\n\t\t\t\"  ☺▓███£££  \",\n\t\t\t\"  ☺▓███£££  \",\n\t\t\t\"  ☺▒███£££  \",\n\t\t\t\"  ☺▒███£££  \",\n\t\t\t\"  ☺░███£££  \",\n\t\t\t\"  ☺░███£££  \",\n\t\t\t\"  ☺ ███£££  \",\n\t\t\t\"   ☺███£££  \",\n\t\t\t\"   ☺███£££  \",\n\t\t\t\"   ☺▓██£££  \",\n\t\t\t\"   ☺▓██£££  \",\n\t\t\t\"   ☺▒██£££  \",\n\t\t\t\"   ☺▒██£££  \",\n\t\t\t\"   ☺░██£££  \",\n\t\t\t\"   ☺░██£££  \",\n\t\t\t\"   ☺ ██£££  \",\n\t\t\t\"    ☺██£££  \",\n\t\t\t\"    ☺██£££  \",\n\t\t\t\"    ☺▓█£££  \",\n\t\t\t\"    ☺▓█£££  \",\n\t\t\t\"    ☺▒█£££  \",\n\t\t\t\"    ☺▒█£££  \",\n\t\t\t\"    ☺░█£££  \",\n\t\t\t\"    ☺░█£££  \",\n\t\t\t\"    ☺ █£££  \",\n\t\t\t\"     ☺█£££  \",\n\t\t\t\"     ☺█£££  \",\n\t\t\t\"     ☺▓£££  \",\n\t\t\t\"     ☺▓£££  \",\n\t\t\t\"     ☺▒£££  \",\n\t\t\t\"     ☺▒£££  \",\n\t\t\t\"     ☺░£££  \",\n\t\t\t\"     ☺░£££  \",\n\t\t\t\"     ☺ £££  \",\n\t\t\t\"      ☺£££  \",\n\t\t\t\"      ☺£££  \",\n\t\t\t\"      ☺▓££  \",\n\t\t\t\"      ☺▓££  \",\n\t\t\t\"      ☺▒££  \",\n\t\t\t\"      ☺▒££  \",\n\t\t\t\"      ☺░££  \",\n\t\t\t\"      ☺░££  \",\n\t\t\t\"      ☺ ££  \",\n\t\t\t\"       ☺££  \",\n\t\t\t\"       ☺££  \",\n\t\t\t\"       ☺▓£  \",\n\t\t\t\"       ☺▓£  \",\n\t\t\t\"       ☺▒£  \",\n\t\t\t\"       ☺▒£  \",\n\t\t\t\"       ☺░£  \",\n\t\t\t\"       ☺░£  \",\n\t\t\t\"       ☺ £  \",\n\t\t\t\"        ☺£  \",\n\t\t\t\"        ☺£  \",\n\t\t\t\"        ☺▓  \",\n\t\t\t\"        ☺▓  \",\n\t\t\t\"        ☺▒  \",\n\t\t\t\"        ☺▒  \",\n\t\t\t\"        ☺░  \",\n\t\t\t\"        ☺░  \",\n\t\t\t\"        ☺   \",\n\t\t\t\"        ☺  &\",\n\t\t\t\"        ☺ ☼&\",\n\t\t\t\"       ☺ ☼ &\",\n\t\t\t\"       ☺☼  &\",\n\t\t\t\"      ☺☼  & \",\n\t\t\t\"      ‼   & \",\n\t\t\t\"     ☺   &  \",\n\t\t\t\"    ‼    &  \",\n\t\t\t\"   ☺    &   \",\n\t\t\t\"  ‼     &   \",\n\t\t\t\" ☺     &    \",\n\t\t\t\"‼      &    \",\n\t\t\t\"      &     \",\n\t\t\t\"      &     \",\n\t\t\t\"     &   ░  \",\n\t\t\t\"     &   ▒  \",\n\t\t\t\"    &    ▓  \",\n\t\t\t\"    &    £  \",\n\t\t\t\"   &    ░£  \",\n\t\t\t\"   &    ▒£  \",\n\t\t\t\"  &     ▓£  \",\n\t\t\t\"  &     ££  \",\n\t\t\t\" &     ░££  \",\n\t\t\t\" &     ▒££  \",\n\t\t\t\"&      ▓££  \",\n\t\t\t\"&      £££  \",\n\t\t\t\"      ░£££  \",\n\t\t\t\"      ▒£££  \",\n\t\t\t\"      ▓£££  \",\n\t\t\t\"      █£££  \",\n\t\t\t\"     ░█£££  \",\n\t\t\t\"     ▒█£££  \",\n\t\t\t\"     ▓█£££  \",\n\t\t\t\"     ██£££  \",\n\t\t\t\"    ░██£££  \",\n\t\t\t\"    ▒██£££  \",\n\t\t\t\"    ▓██£££  \",\n\t\t\t\"    ███£££  \",\n\t\t\t\"   ░███£££  \",\n\t\t\t\"   ▒███£££  \",\n\t\t\t\"   ▓███£££  \",\n\t\t\t\"   ████£££  \",\n\t\t\t\"  ░████£££  \",\n\t\t\t\"  ▒████£££  \",\n\t\t\t\"  ▓████£££  \",\n\t\t\t\"  █████£££  \",\n\t\t\t\" ░█████£££  \",\n\t\t\t\" ▒█████£££  \",\n\t\t\t\" ▓█████£££  \",\n\t\t\t\" ██████£££  \",\n\t\t\t\" ██████£££  \"\n\t\t]\n\t}\n}\n","'use strict';\n\nconst spinners = Object.assign({}, require('./spinners.json')); // eslint-disable-line import/extensions\n\nconst spinnersList = Object.keys(spinners);\n\nObject.defineProperty(spinners, 'random', {\n\tget() {\n\t\tconst randomIndex = Math.floor(Math.random() * spinnersList.length);\n\t\tconst spinnerName = spinnersList[randomIndex];\n\t\treturn spinners[spinnerName];\n\t}\n});\n\nmodule.exports = spinners;\n","import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tif (process.platform !== 'win32') {\n\t\treturn process.env.TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(process.env.CI)\n\t\t|| Boolean(process.env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| process.env.TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| process.env.TERM_PROGRAM === 'vscode'\n\t\t|| process.env.TERM === 'xterm-256color'\n\t\t|| process.env.TERM === 'alacritty'\n\t\t|| process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import chalk from 'chalk';\nimport isUnicodeSupported from 'is-unicode-supported';\n\nconst main = {\n\tinfo: chalk.blue('ℹ'),\n\tsuccess: chalk.green('✔'),\n\twarning: chalk.yellow('⚠'),\n\terror: chalk.red('✖'),\n};\n\nconst fallback = {\n\tinfo: chalk.blue('i'),\n\tsuccess: chalk.green('√'),\n\twarning: chalk.yellow('‼'),\n\terror: chalk.red('×'),\n};\n\nconst logSymbols = isUnicodeSupported() ? main : fallback;\n\nexport default logSymbols;\n","export default function ansiRegex({onlyFirst = false} = {}) {\n\t// Valid string terminator sequences are BEL, ESC\\, and 0x9c\n\tconst ST = '(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C)';\n\n\t// OSC sequences only: ESC ] ... ST (non-greedy until the first ST)\n\tconst osc = `(?:\\\\u001B\\\\][\\\\s\\\\S]*?${ST})`;\n\n\t// CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte\n\tconst csi = '[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:\\\\d{1,4}(?:[;:]\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]';\n\n\tconst pattern = `${osc}|${csi}`;\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n}\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","export default function isInteractive({stream = process.stdout} = {}) {\n\treturn Boolean(\n\t\tstream && stream.isTTY &&\n\t\tprocess.env.TERM !== 'dumb' &&\n\t\t!('CI' in process.env)\n\t);\n}\n","import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tconst {env} = process;\n\tconst {TERM, TERM_PROGRAM} = env;\n\n\tif (process.platform !== 'win32') {\n\t\treturn TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| TERM_PROGRAM === 'vscode'\n\t\t|| TERM === 'xterm-256color'\n\t\t|| TERM === 'alacritty'\n\t\t|| TERM === 'rxvt-unicode'\n\t\t|| TERM === 'rxvt-unicode-256color'\n\t\t|| env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import process from 'node:process';\n\nconst ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code\n\nclass StdinDiscarder {\n\t#activeCount = 0;\n\n\tstart() {\n\t\tthis.#activeCount++;\n\n\t\tif (this.#activeCount === 1) {\n\t\t\tthis.#realStart();\n\t\t}\n\t}\n\n\tstop() {\n\t\tif (this.#activeCount <= 0) {\n\t\t\tthrow new Error('`stop` called more times than `start`');\n\t\t}\n\n\t\tthis.#activeCount--;\n\n\t\tif (this.#activeCount === 0) {\n\t\t\tthis.#realStop();\n\t\t}\n\t}\n\n\t#realStart() {\n\t\t// No known way to make it work reliably on Windows.\n\t\tif (process.platform === 'win32' || !process.stdin.isTTY) {\n\t\t\treturn;\n\t\t}\n\n\t\tprocess.stdin.setRawMode(true);\n\t\tprocess.stdin.on('data', this.#handleInput);\n\t\tprocess.stdin.resume();\n\t}\n\n\t#realStop() {\n\t\tif (!process.stdin.isTTY) {\n\t\t\treturn;\n\t\t}\n\n\t\tprocess.stdin.off('data', this.#handleInput);\n\t\tprocess.stdin.pause();\n\t\tprocess.stdin.setRawMode(false);\n\t}\n\n\t#handleInput(chunk) {\n\t\t// Allow Ctrl+C to gracefully exit.\n\t\tif (chunk[0] === ASCII_ETX_CODE) {\n\t\t\tprocess.emit('SIGINT');\n\t\t}\n\t}\n}\n\nconst stdinDiscarder = new StdinDiscarder();\n\nexport default stdinDiscarder;\n","import process from 'node:process';\nimport chalk from 'chalk';\nimport cliCursor from 'cli-cursor';\nimport cliSpinners from 'cli-spinners';\nimport logSymbols from 'log-symbols';\nimport stripAnsi from 'strip-ansi';\nimport stringWidth from 'string-width';\nimport isInteractive from 'is-interactive';\nimport isUnicodeSupported from 'is-unicode-supported';\nimport stdinDiscarder from 'stdin-discarder';\n\nclass Ora {\n\t#linesToClear = 0;\n\t#isDiscardingStdin = false;\n\t#lineCount = 0;\n\t#frameIndex = -1;\n\t#lastSpinnerFrameTime = 0;\n\t#options;\n\t#spinner;\n\t#stream;\n\t#id;\n\t#initialInterval;\n\t#isEnabled;\n\t#isSilent;\n\t#indent;\n\t#text;\n\t#prefixText;\n\t#suffixText;\n\tcolor;\n\n\tconstructor(options) {\n\t\tif (typeof options === 'string') {\n\t\t\toptions = {\n\t\t\t\ttext: options,\n\t\t\t};\n\t\t}\n\n\t\tthis.#options = {\n\t\t\tcolor: 'cyan',\n\t\t\tstream: process.stderr,\n\t\t\tdiscardStdin: true,\n\t\t\thideCursor: true,\n\t\t\t...options,\n\t\t};\n\n\t\t// Public\n\t\tthis.color = this.#options.color;\n\n\t\t// It's important that these use the public setters.\n\t\tthis.spinner = this.#options.spinner;\n\n\t\tthis.#initialInterval = this.#options.interval;\n\t\tthis.#stream = this.#options.stream;\n\t\tthis.#isEnabled = typeof this.#options.isEnabled === 'boolean' ? this.#options.isEnabled : isInteractive({stream: this.#stream});\n\t\tthis.#isSilent = typeof this.#options.isSilent === 'boolean' ? this.#options.isSilent : false;\n\n\t\t// Set *after* `this.#stream`.\n\t\t// It's important that these use the public setters.\n\t\tthis.text = this.#options.text;\n\t\tthis.prefixText = this.#options.prefixText;\n\t\tthis.suffixText = this.#options.suffixText;\n\t\tthis.indent = this.#options.indent;\n\n\t\tif (process.env.NODE_ENV === 'test') {\n\t\t\tthis._stream = this.#stream;\n\t\t\tthis._isEnabled = this.#isEnabled;\n\n\t\t\tObject.defineProperty(this, '_linesToClear', {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.#linesToClear;\n\t\t\t\t},\n\t\t\t\tset(newValue) {\n\t\t\t\t\tthis.#linesToClear = newValue;\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tObject.defineProperty(this, '_frameIndex', {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.#frameIndex;\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tObject.defineProperty(this, '_lineCount', {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.#lineCount;\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tget indent() {\n\t\treturn this.#indent;\n\t}\n\n\tset indent(indent = 0) {\n\t\tif (!(indent >= 0 && Number.isInteger(indent))) {\n\t\t\tthrow new Error('The `indent` option must be an integer from 0 and up');\n\t\t}\n\n\t\tthis.#indent = indent;\n\t\tthis.#updateLineCount();\n\t}\n\n\tget interval() {\n\t\treturn this.#initialInterval ?? this.#spinner.interval ?? 100;\n\t}\n\n\tget spinner() {\n\t\treturn this.#spinner;\n\t}\n\n\tset spinner(spinner) {\n\t\tthis.#frameIndex = -1;\n\t\tthis.#initialInterval = undefined;\n\n\t\tif (typeof spinner === 'object') {\n\t\t\tif (spinner.frames === undefined) {\n\t\t\t\tthrow new Error('The given spinner must have a `frames` property');\n\t\t\t}\n\n\t\t\tthis.#spinner = spinner;\n\t\t} else if (!isUnicodeSupported()) {\n\t\t\tthis.#spinner = cliSpinners.line;\n\t\t} else if (spinner === undefined) {\n\t\t\t// Set default spinner\n\t\t\tthis.#spinner = cliSpinners.dots;\n\t\t} else if (spinner !== 'default' && cliSpinners[spinner]) {\n\t\t\tthis.#spinner = cliSpinners[spinner];\n\t\t} else {\n\t\t\tthrow new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);\n\t\t}\n\t}\n\n\tget text() {\n\t\treturn this.#text;\n\t}\n\n\tset text(value = '') {\n\t\tthis.#text = value;\n\t\tthis.#updateLineCount();\n\t}\n\n\tget prefixText() {\n\t\treturn this.#prefixText;\n\t}\n\n\tset prefixText(value = '') {\n\t\tthis.#prefixText = value;\n\t\tthis.#updateLineCount();\n\t}\n\n\tget suffixText() {\n\t\treturn this.#suffixText;\n\t}\n\n\tset suffixText(value = '') {\n\t\tthis.#suffixText = value;\n\t\tthis.#updateLineCount();\n\t}\n\n\tget isSpinning() {\n\t\treturn this.#id !== undefined;\n\t}\n\n\t#getFullPrefixText(prefixText = this.#prefixText, postfix = ' ') {\n\t\tif (typeof prefixText === 'string' && prefixText !== '') {\n\t\t\treturn prefixText + postfix;\n\t\t}\n\n\t\tif (typeof prefixText === 'function') {\n\t\t\treturn prefixText() + postfix;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t#getFullSuffixText(suffixText = this.#suffixText, prefix = ' ') {\n\t\tif (typeof suffixText === 'string' && suffixText !== '') {\n\t\t\treturn prefix + suffixText;\n\t\t}\n\n\t\tif (typeof suffixText === 'function') {\n\t\t\treturn prefix + suffixText();\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t#updateLineCount() {\n\t\tconst columns = this.#stream.columns ?? 80;\n\t\tconst fullPrefixText = this.#getFullPrefixText(this.#prefixText, '-');\n\t\tconst fullSuffixText = this.#getFullSuffixText(this.#suffixText, '-');\n\t\tconst fullText = ' '.repeat(this.#indent) + fullPrefixText + '--' + this.#text + '--' + fullSuffixText;\n\n\t\tthis.#lineCount = 0;\n\t\tfor (const line of stripAnsi(fullText).split('\\n')) {\n\t\t\tthis.#lineCount += Math.max(1, Math.ceil(stringWidth(line, {countAnsiEscapeCodes: true}) / columns));\n\t\t}\n\t}\n\n\tget isEnabled() {\n\t\treturn this.#isEnabled && !this.#isSilent;\n\t}\n\n\tset isEnabled(value) {\n\t\tif (typeof value !== 'boolean') {\n\t\t\tthrow new TypeError('The `isEnabled` option must be a boolean');\n\t\t}\n\n\t\tthis.#isEnabled = value;\n\t}\n\n\tget isSilent() {\n\t\treturn this.#isSilent;\n\t}\n\n\tset isSilent(value) {\n\t\tif (typeof value !== 'boolean') {\n\t\t\tthrow new TypeError('The `isSilent` option must be a boolean');\n\t\t}\n\n\t\tthis.#isSilent = value;\n\t}\n\n\tframe() {\n\t\t// Ensure we only update the spinner frame at the wanted interval,\n\t\t// even if the render method is called more often.\n\t\tconst now = Date.now();\n\t\tif (this.#frameIndex === -1 || now - this.#lastSpinnerFrameTime >= this.interval) {\n\t\t\tthis.#frameIndex = ++this.#frameIndex % this.#spinner.frames.length;\n\t\t\tthis.#lastSpinnerFrameTime = now;\n\t\t}\n\n\t\tconst {frames} = this.#spinner;\n\t\tlet frame = frames[this.#frameIndex];\n\n\t\tif (this.color) {\n\t\t\tframe = chalk[this.color](frame);\n\t\t}\n\n\t\tconst fullPrefixText = (typeof this.#prefixText === 'string' && this.#prefixText !== '') ? this.#prefixText + ' ' : '';\n\t\tconst fullText = typeof this.text === 'string' ? ' ' + this.text : '';\n\t\tconst fullSuffixText = (typeof this.#suffixText === 'string' && this.#suffixText !== '') ? ' ' + this.#suffixText : '';\n\n\t\treturn fullPrefixText + frame + fullText + fullSuffixText;\n\t}\n\n\tclear() {\n\t\tif (!this.#isEnabled || !this.#stream.isTTY) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.#stream.cursorTo(0);\n\n\t\tfor (let index = 0; index < this.#linesToClear; index++) {\n\t\t\tif (index > 0) {\n\t\t\t\tthis.#stream.moveCursor(0, -1);\n\t\t\t}\n\n\t\t\tthis.#stream.clearLine(1);\n\t\t}\n\n\t\tif (this.#indent || this.lastIndent !== this.#indent) {\n\t\t\tthis.#stream.cursorTo(this.#indent);\n\t\t}\n\n\t\tthis.lastIndent = this.#indent;\n\t\tthis.#linesToClear = 0;\n\n\t\treturn this;\n\t}\n\n\trender() {\n\t\tif (this.#isSilent) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.clear();\n\t\tthis.#stream.write(this.frame());\n\t\tthis.#linesToClear = this.#lineCount;\n\n\t\treturn this;\n\t}\n\n\tstart(text) {\n\t\tif (text) {\n\t\t\tthis.text = text;\n\t\t}\n\n\t\tif (this.#isSilent) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (!this.#isEnabled) {\n\t\t\tif (this.text) {\n\t\t\t\tthis.#stream.write(`- ${this.text}\\n`);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\tif (this.isSpinning) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif (this.#options.hideCursor) {\n\t\t\tcliCursor.hide(this.#stream);\n\t\t}\n\n\t\tif (this.#options.discardStdin && process.stdin.isTTY) {\n\t\t\tthis.#isDiscardingStdin = true;\n\t\t\tstdinDiscarder.start();\n\t\t}\n\n\t\tthis.render();\n\t\tthis.#id = setInterval(this.render.bind(this), this.interval);\n\n\t\treturn this;\n\t}\n\n\tstop() {\n\t\tif (!this.#isEnabled) {\n\t\t\treturn this;\n\t\t}\n\n\t\tclearInterval(this.#id);\n\t\tthis.#id = undefined;\n\t\tthis.#frameIndex = 0;\n\t\tthis.clear();\n\t\tif (this.#options.hideCursor) {\n\t\t\tcliCursor.show(this.#stream);\n\t\t}\n\n\t\tif (this.#options.discardStdin && process.stdin.isTTY && this.#isDiscardingStdin) {\n\t\t\tstdinDiscarder.stop();\n\t\t\tthis.#isDiscardingStdin = false;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tsucceed(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.success, text});\n\t}\n\n\tfail(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.error, text});\n\t}\n\n\twarn(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.warning, text});\n\t}\n\n\tinfo(text) {\n\t\treturn this.stopAndPersist({symbol: logSymbols.info, text});\n\t}\n\n\tstopAndPersist(options = {}) {\n\t\tif (this.#isSilent) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst prefixText = options.prefixText ?? this.#prefixText;\n\t\tconst fullPrefixText = this.#getFullPrefixText(prefixText, ' ');\n\n\t\tconst symbolText = options.symbol ?? ' ';\n\n\t\tconst text = options.text ?? this.text;\n\t\tconst separatorText = symbolText ? ' ' : '';\n\t\tconst fullText = (typeof text === 'string') ? separatorText + text : '';\n\n\t\tconst suffixText = options.suffixText ?? this.#suffixText;\n\t\tconst fullSuffixText = this.#getFullSuffixText(suffixText, ' ');\n\n\t\tconst textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + '\\n';\n\n\t\tthis.stop();\n\t\tthis.#stream.write(textToWrite);\n\n\t\treturn this;\n\t}\n}\n\nexport default function ora(options) {\n\treturn new Ora(options);\n}\n\nexport async function oraPromise(action, options) {\n\tconst actionIsFunction = typeof action === 'function';\n\tconst actionIsPromise = typeof action.then === 'function';\n\n\tif (!actionIsFunction && !actionIsPromise) {\n\t\tthrow new TypeError('Parameter `action` must be a Function or a Promise');\n\t}\n\n\tconst {successText, failText} = typeof options === 'object'\n\t\t? options\n\t\t: {successText: undefined, failText: undefined};\n\n\tconst spinner = ora(options).start();\n\n\ttry {\n\t\tconst promise = actionIsFunction ? action(spinner) : action;\n\t\tconst result = await promise;\n\n\t\tspinner.succeed(\n\t\t\tsuccessText === undefined\n\t\t\t\t? undefined\n\t\t\t\t: (typeof successText === 'string' ? successText : successText(result)),\n\t\t);\n\n\t\treturn result;\n\t} catch (error) {\n\t\tspinner.fail(\n\t\t\tfailText === undefined\n\t\t\t\t? undefined\n\t\t\t\t: (typeof failText === 'string' ? failText : failText(error)),\n\t\t);\n\n\t\tthrow error;\n\t}\n}\n\nexport {default as spinners} from 'cli-spinners';\n","/**\n * When working with AbortSignals, it's common to encounter errors that are a result of the signal being aborted.\n * This utility function helps to ignore those specific errors, allowing the program to continue its execution without being interrupted by them.\n *\n * @example\n * const controller = new AbortController();\n * fetch(URL, { signal: controller.signal }).catch(\n *   ignoreAbortErrors(controller.signal) // we don't care if it errored as it was aborted\n * )\n */\nexport function ignoreAbortErrors(signal: AbortSignal) {\n  return (err: unknown) => {\n    if (signal.aborted) {\n      return;\n    }\n    throw err;\n  };\n}\n","import { ignoreAbortErrors } from \"./abort-controller\";\n\n/**\n * Utility function that allows to acquire a resource\n * colocated with its release logic\n *\n * @example\n * using resource = acquireRelease(\n *   () => new AbortController(),\n *   (c) => c.abort(),\n * );\n */\nexport function acquireRelease<T extends object>(\n  fn: () => T,\n  release: (t: NoInfer<T>) => void,\n): T & Disposable {\n  const value = fn();\n  return Object.assign(value, {\n    [Symbol.dispose]: () => release(value),\n  });\n}\n\n/**\n * Utility function that allows to create a disposable\n * with a custom dispose logic like Golang's `defer`\n * which allows us to avoid `try/finally` blocks.\n */\nexport function defer(fn: () => void) {\n  return { [Symbol.dispose]: fn };\n}\n\n/**\n * Creates an AbortController that is also disposable,\n * which aborts when disposed with a given reason.\n */\nexport function createAbortController(reason: string) {\n  return acquireRelease(\n    () => {\n      const controller = new AbortController();\n      return {\n        abort: (newReason?: string) => controller.abort(newReason ?? reason),\n        signal: controller.signal,\n        /**\n         * When working with AbortSignals, it's common to encounter errors that are a result of the signal being aborted.\n         * This utility function helps to ignore those specific errors, allowing the program to continue its execution without being interrupted by them.\n         *\n         * @example\n         * using controller = createAbortController(\"My reason\");\n         * fetch(URL, { signal: controller.signal }).catch(\n         *   controller.ignoreInterruptions // we don't care if it errored as it was aborted\n         * )\n         */\n        ignoreInterruptions: ignoreAbortErrors(controller.signal),\n      };\n    },\n    (c) => c.abort(reason),\n  );\n}\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\nimport { output } from \"../util/output\";\nimport { default as open } from \"open\";\nimport ora from \"ora\";\nimport { acquireRelease } from \"../util/disposables\";\nimport {\n  OAuth,\n  pollForToken,\n  getAuth,\n  inferScope,\n} from \"@vercel/sandbox/dist/auth/index.js\";\nimport createDebugger from \"debug\";\n\nconst debug = createDebugger(\"sandbox:login\");\n\nexport const login = cmd.command({\n  name: \"login\",\n  description: \"Log in to the Sandbox CLI\",\n  args: {},\n  async handler() {\n    using spinner = acquireRelease(\n      () => ora(\"Creating device authorization request...\").start(),\n      (s) => s.stop(),\n    );\n\n    const oauth = await OAuth();\n    const request = await oauth.deviceAuthorizationRequest();\n    const { user_code, verification_uri, verification_uri_complete } = request;\n\n    spinner.text = \"Waiting for you to authenticate...\";\n\n    // If we're in a TTY, we can listen for ENTER keypresses to open the browser\n    const subscribeToStdin = process.stdin.isTTY;\n\n    using _returnListener = acquireRelease(\n      () => {\n        const callback = async (char: Buffer) => {\n          if (char.toString() === \"\\r\") {\n            await open(verification_uri_complete);\n          }\n        };\n        const beforeExit = () => {\n          if (spinner.isSpinning) {\n            spinner.fail(\"Authentication cancelled.\");\n          }\n          process.off(\"SIGINT\", beforeExit);\n          process.emit(\"SIGINT\");\n        };\n        if (subscribeToStdin) {\n          process.stdin.on(\"data\", callback);\n          process.on(\"SIGINT\", beforeExit);\n        }\n        return () => {\n          process.stdin.off(\"data\", callback);\n          process.off(\"SIGINT\", beforeExit);\n        };\n      },\n      (unsubscribe) => unsubscribe(),\n    );\n\n    const verificationLink = output.link(\n      verification_uri.replace(\"https://\", \"\"),\n      verification_uri_complete,\n    );\n\n    let text = `Visit ${chalk.bold(verificationLink)} and enter ${chalk.bold(user_code)}`;\n    if (subscribeToStdin) {\n      text += chalk.grey(\"\\nℹ️ Press [ENTER] to open the browser\");\n    }\n\n    spinner.text = `Waiting for authentication...\\n${text}`;\n\n    let error: Error | undefined;\n    for await (const event of pollForToken({ request, oauth })) {\n      switch (event._tag) {\n        case \"Timeout\":\n          debug(\n            `Connection timeout. Slowing down, polling every ${event.newInterval / 1000}s...`,\n          );\n          break;\n        case \"SlowDown\":\n          debug(\n            `Authorization server requests to slow down. Polling every ${event.newInterval / 1000}s...`,\n          );\n          break;\n        case \"Response\":\n          debug(\"Device Access Token response:\", await event.response.text());\n          break;\n        case \"Error\":\n          error = event.error;\n          break;\n        default:\n          output.error(\n            chalk.yellow(\n              [\n                `${chalk.bold(\"warn:\")} unexpected polling event ignored.`,\n                `├▶ event: ${JSON.stringify(event satisfies never)}`,\n                `│  This indicates a version mismatch between CLI and SDK.`,\n                `╰▶ ${chalk.bold(\"help:\")} update @vercel/sandbox with \\`npm update @vercel/sandbox\\`.`,\n                `   If this persists, report at https://github.com/vercel/vercel/issues`,\n                `   with the above event details.`,\n              ].join(\"\\n\"),\n            ),\n          );\n      }\n    }\n\n    if (error) {\n      spinner.fail(`${chalk.red(\"error:\")} ${error.message}`);\n      process.exitCode = 1;\n    } else {\n      spinner.succeed(\n        `${chalk.cyan(\"Congratulations!\")} You are now signed in.`,\n      );\n\n      const auth = getAuth();\n      if (auth?.token) {\n        try {\n          const { teamId, teamSlug, projectId, projectSlug } =\n            await inferScope({\n              token: auth.token,\n            });\n          process.stderr.write(\n            chalk.dim(\"   │ \") +\n              \"team: \" +\n              chalk.cyan(teamSlug ?? teamId) +\n              \"\\n\",\n          );\n          process.stderr.write(\n            chalk.dim(\"   ╰ \") +\n              \"project: \" +\n              chalk.cyan(projectSlug ?? projectId) +\n              \"\\n\",\n          );\n        } catch {\n          // Scope inference is best-effort; don't fail the login\n        }\n      }\n    }\n  },\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar version_exports = {};\n__export(version_exports, {\n  version: () => version\n});\nmodule.exports = __toCommonJS(version_exports);\nconst version = \"4.0.0\";\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  version\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar exchange_vercel_oidc_token_exports = {};\n__export(exchange_vercel_oidc_token_exports, {\n  exchangeVercelOidcToken: () => exchangeVercelOidcToken\n});\nmodule.exports = __toCommonJS(exchange_vercel_oidc_token_exports);\nvar import_version = require(\"./version\");\nclass TokenCache {\n  constructor(maxEntries) {\n    this.maxEntries = maxEntries;\n    this.entries = /* @__PURE__ */ new Map();\n  }\n  /**\n   * Returns a cached token for the key when present and unexpired, refreshing\n   * its recency for LRU eviction. Expired entries are removed on access.\n   */\n  get(key) {\n    const entry = this.entries.get(key);\n    if (entry === void 0) {\n      return void 0;\n    }\n    if (entry.expiresAt <= Date.now()) {\n      this.entries.delete(key);\n      return void 0;\n    }\n    this.entries.delete(key);\n    this.entries.set(key, entry);\n    return entry.token;\n  }\n  /**\n   * Stores a token under the key and evicts the least-recently-used entries\n   * once the cache exceeds its size limit.\n   */\n  set({\n    key,\n    token,\n    expiresAt\n  }) {\n    this.entries.delete(key);\n    this.entries.set(key, { token, expiresAt });\n    while (this.entries.size > this.maxEntries) {\n      const oldest = this.entries.keys().next().value;\n      if (oldest === void 0) {\n        break;\n      }\n      this.entries.delete(oldest);\n    }\n  }\n}\nconst MAX_CACHE_ENTRIES = 1e3;\nconst tokenCache = new TokenCache(MAX_CACHE_ENTRIES);\nasync function getCacheKey(options) {\n  const input = JSON.stringify([options.token, options.audience, options.jti]);\n  const digest = await crypto.subtle.digest(\n    \"SHA-256\",\n    new TextEncoder().encode(input)\n  );\n  return Array.from(new Uint8Array(digest)).map((byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n}\nasync function exchangeVercelOidcToken(options) {\n  const cacheKey = await getCacheKey(options);\n  if (!options.skipCache) {\n    const cached = tokenCache.get(cacheKey);\n    if (cached !== void 0) {\n      return cached;\n    }\n  }\n  const response = await fetch(\"https://oidc.vercel.com/~token\", {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      Accept: \"application/json\",\n      \"User-Agent\": `@vercel/oidc@${import_version.version}`\n    },\n    body: JSON.stringify({\n      token: options.token,\n      aud: options.audience,\n      ...options.jti ? { jti: options.jti } : void 0\n    })\n  });\n  if (!response.ok) {\n    throw new Error(\n      `Failed to exchange token: ${await readErrorMessage(response)}`\n    );\n  }\n  let data;\n  try {\n    data = await response.json();\n  } catch (_error) {\n    throw new Error(\"Failed to exchange token: response was not valid JSON\");\n  }\n  if (!data || typeof data !== \"object\" || !(\"token\" in data) || typeof data.token !== \"string\") {\n    throw new Error(\n      \"Failed to exchange token: response did not contain a token\"\n    );\n  }\n  const { token } = data;\n  const expiry = \"expiry\" in data && typeof data.expiry === \"number\" ? data.expiry : void 0;\n  if (expiry !== void 0) {\n    const expiresAt = expiry * 1e3;\n    if (expiresAt > Date.now()) {\n      tokenCache.set({ key: cacheKey, token, expiresAt });\n    }\n  }\n  return token;\n}\nasync function readErrorMessage(response) {\n  try {\n    const data = await response.json();\n    if (data && typeof data === \"object\" && \"error\" in data && typeof data.error === \"string\") {\n      return data.error;\n    }\n  } catch (_error) {\n  }\n  return response.statusText || `HTTP ${response.status}`;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  exchangeVercelOidcToken\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar get_context_exports = {};\n__export(get_context_exports, {\n  SYMBOL_FOR_REQ_CONTEXT: () => SYMBOL_FOR_REQ_CONTEXT,\n  getContext: () => getContext\n});\nmodule.exports = __toCommonJS(get_context_exports);\nconst SYMBOL_FOR_REQ_CONTEXT = Symbol.for(\"@vercel/request-context\");\nfunction getContext() {\n  const fromSymbol = globalThis;\n  return fromSymbol[SYMBOL_FOR_REQ_CONTEXT]?.get?.() ?? {};\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  SYMBOL_FOR_REQ_CONTEXT,\n  getContext\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar get_vercel_oidc_token_sync_exports = {};\n__export(get_vercel_oidc_token_sync_exports, {\n  getVercelOidcTokenSync: () => getVercelOidcTokenSync\n});\nmodule.exports = __toCommonJS(get_vercel_oidc_token_sync_exports);\nvar import_get_context = require(\"./get-context\");\nfunction getVercelOidcTokenSync() {\n  const token = (0, import_get_context.getContext)().headers?.[\"x-vercel-oidc-token\"] ?? process.env.VERCEL_OIDC_TOKEN;\n  if (!token) {\n    throw new Error(\n      `The 'x-vercel-oidc-token' header is missing from the request.`\n    );\n  }\n  return token;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  getVercelOidcTokenSync\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar get_vercel_oidc_token_with_refresh_exports = {};\n__export(get_vercel_oidc_token_with_refresh_exports, {\n  getVercelOidcToken: () => getVercelOidcToken\n});\nmodule.exports = __toCommonJS(get_vercel_oidc_token_with_refresh_exports);\nvar import_promises = require(\"node:fs/promises\");\nvar import_exchange_vercel_oidc_token = require(\"./exchange-vercel-oidc-token\");\nvar import_get_context = require(\"./get-context\");\nvar import_get_vercel_oidc_token_sync = require(\"./get-vercel-oidc-token-sync\");\nvar import_token_error = require(\"./token-error\");\nasync function getVercelOidcToken(options) {\n  let token = \"\";\n  let err;\n  const tokenFromFile = (0, import_get_context.getContext)().headers?.[\"x-vercel-oidc-token\"] ? null : await tryOidcTokenFromFile();\n  try {\n    token = tokenFromFile ?? (0, import_get_vercel_oidc_token_sync.getVercelOidcTokenSync)();\n  } catch (error) {\n    err = error;\n  }\n  try {\n    const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([\n      await import(\"./token-util.js\"),\n      await import(\"./token.js\")\n    ]);\n    if (!token || isExpired(getTokenPayload(token), options?.expirationBufferMs)) {\n      await refreshToken(options);\n      token = (0, import_get_vercel_oidc_token_sync.getVercelOidcTokenSync)();\n    }\n  } catch (error) {\n    let message = err instanceof Error ? err.message : \"\";\n    if (error instanceof Error) {\n      message = `${message}\n${error.message}`;\n    }\n    if (message) {\n      throw new import_token_error.VercelOidcTokenError(message);\n    }\n    throw error;\n  }\n  if (options?.audience) {\n    token = await (0, import_exchange_vercel_oidc_token.exchangeVercelOidcToken)({\n      token,\n      audience: options.audience,\n      jti: options.jti,\n      skipCache: options.skipCache\n    });\n  }\n  return token;\n}\nasync function tryOidcTokenFromFile() {\n  const tokenFile = process.env.VERCEL_OIDC_TOKEN_FILE;\n  if (!tokenFile) {\n    return null;\n  }\n  const token = (await (0, import_promises.readFile)(tokenFile, \"utf8\")).trim();\n  if (!token) {\n    throw new import_token_error.VercelOidcTokenError(\n      `The Vercel OIDC token file is empty: ${tokenFile}`\n    );\n  }\n  return token;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  getVercelOidcToken\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nconst digest = (algorithm, data) => (0, node_crypto_1.createHash)(algorithm).update(data).digest();\nexports.default = digest;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decoder = exports.encoder = void 0;\nexports.concat = concat;\nexports.p2s = p2s;\nexports.uint64be = uint64be;\nexports.uint32be = uint32be;\nexports.lengthAndInput = lengthAndInput;\nexports.concatKdf = concatKdf;\nconst digest_js_1 = require(\"../runtime/digest.js\");\nexports.encoder = new TextEncoder();\nexports.decoder = new TextDecoder();\nconst MAX_INT32 = 2 ** 32;\nfunction concat(...buffers) {\n    const size = buffers.reduce((acc, { length }) => acc + length, 0);\n    const buf = new Uint8Array(size);\n    let i = 0;\n    for (const buffer of buffers) {\n        buf.set(buffer, i);\n        i += buffer.length;\n    }\n    return buf;\n}\nfunction p2s(alg, p2sInput) {\n    return concat(exports.encoder.encode(alg), new Uint8Array([0]), p2sInput);\n}\nfunction writeUInt32BE(buf, value, offset) {\n    if (value < 0 || value >= MAX_INT32) {\n        throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);\n    }\n    buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset);\n}\nfunction uint64be(value) {\n    const high = Math.floor(value / MAX_INT32);\n    const low = value % MAX_INT32;\n    const buf = new Uint8Array(8);\n    writeUInt32BE(buf, high, 0);\n    writeUInt32BE(buf, low, 4);\n    return buf;\n}\nfunction uint32be(value) {\n    const buf = new Uint8Array(4);\n    writeUInt32BE(buf, value);\n    return buf;\n}\nfunction lengthAndInput(input) {\n    return concat(uint32be(input.length), input);\n}\nasync function concatKdf(secret, bits, value) {\n    const iterations = Math.ceil((bits >> 3) / 32);\n    const res = new Uint8Array(iterations * 32);\n    for (let iter = 0; iter < iterations; iter++) {\n        const buf = new Uint8Array(4 + secret.length + value.length);\n        buf.set(uint32be(iter + 1));\n        buf.set(secret, 4);\n        buf.set(value, 4 + secret.length);\n        res.set(await (0, digest_js_1.default)('sha256', buf), iter * 32);\n    }\n    return res.slice(0, bits >> 3);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decode = exports.encode = exports.encodeBase64 = exports.decodeBase64 = void 0;\nconst node_buffer_1 = require(\"node:buffer\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nfunction normalize(input) {\n    let encoded = input;\n    if (encoded instanceof Uint8Array) {\n        encoded = buffer_utils_js_1.decoder.decode(encoded);\n    }\n    return encoded;\n}\nconst encode = (input) => node_buffer_1.Buffer.from(input).toString('base64url');\nexports.encode = encode;\nconst decodeBase64 = (input) => new Uint8Array(node_buffer_1.Buffer.from(input, 'base64'));\nexports.decodeBase64 = decodeBase64;\nconst encodeBase64 = (input) => node_buffer_1.Buffer.from(input).toString('base64');\nexports.encodeBase64 = encodeBase64;\nconst decode = (input) => new Uint8Array(node_buffer_1.Buffer.from(normalize(input), 'base64url'));\nexports.decode = decode;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JWSSignatureVerificationFailed = exports.JWKSTimeout = exports.JWKSMultipleMatchingKeys = exports.JWKSNoMatchingKey = exports.JWKSInvalid = exports.JWKInvalid = exports.JWTInvalid = exports.JWSInvalid = exports.JWEInvalid = exports.JWEDecryptionFailed = exports.JOSENotSupported = exports.JOSEAlgNotAllowed = exports.JWTExpired = exports.JWTClaimValidationFailed = exports.JOSEError = void 0;\nclass JOSEError extends Error {\n    static code = 'ERR_JOSE_GENERIC';\n    code = 'ERR_JOSE_GENERIC';\n    constructor(message, options) {\n        super(message, options);\n        this.name = this.constructor.name;\n        Error.captureStackTrace?.(this, this.constructor);\n    }\n}\nexports.JOSEError = JOSEError;\nclass JWTClaimValidationFailed extends JOSEError {\n    static code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n    code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n    claim;\n    reason;\n    payload;\n    constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n        super(message, { cause: { claim, reason, payload } });\n        this.claim = claim;\n        this.reason = reason;\n        this.payload = payload;\n    }\n}\nexports.JWTClaimValidationFailed = JWTClaimValidationFailed;\nclass JWTExpired extends JOSEError {\n    static code = 'ERR_JWT_EXPIRED';\n    code = 'ERR_JWT_EXPIRED';\n    claim;\n    reason;\n    payload;\n    constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n        super(message, { cause: { claim, reason, payload } });\n        this.claim = claim;\n        this.reason = reason;\n        this.payload = payload;\n    }\n}\nexports.JWTExpired = JWTExpired;\nclass JOSEAlgNotAllowed extends JOSEError {\n    static code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n    code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n}\nexports.JOSEAlgNotAllowed = JOSEAlgNotAllowed;\nclass JOSENotSupported extends JOSEError {\n    static code = 'ERR_JOSE_NOT_SUPPORTED';\n    code = 'ERR_JOSE_NOT_SUPPORTED';\n}\nexports.JOSENotSupported = JOSENotSupported;\nclass JWEDecryptionFailed extends JOSEError {\n    static code = 'ERR_JWE_DECRYPTION_FAILED';\n    code = 'ERR_JWE_DECRYPTION_FAILED';\n    constructor(message = 'decryption operation failed', options) {\n        super(message, options);\n    }\n}\nexports.JWEDecryptionFailed = JWEDecryptionFailed;\nclass JWEInvalid extends JOSEError {\n    static code = 'ERR_JWE_INVALID';\n    code = 'ERR_JWE_INVALID';\n}\nexports.JWEInvalid = JWEInvalid;\nclass JWSInvalid extends JOSEError {\n    static code = 'ERR_JWS_INVALID';\n    code = 'ERR_JWS_INVALID';\n}\nexports.JWSInvalid = JWSInvalid;\nclass JWTInvalid extends JOSEError {\n    static code = 'ERR_JWT_INVALID';\n    code = 'ERR_JWT_INVALID';\n}\nexports.JWTInvalid = JWTInvalid;\nclass JWKInvalid extends JOSEError {\n    static code = 'ERR_JWK_INVALID';\n    code = 'ERR_JWK_INVALID';\n}\nexports.JWKInvalid = JWKInvalid;\nclass JWKSInvalid extends JOSEError {\n    static code = 'ERR_JWKS_INVALID';\n    code = 'ERR_JWKS_INVALID';\n}\nexports.JWKSInvalid = JWKSInvalid;\nclass JWKSNoMatchingKey extends JOSEError {\n    static code = 'ERR_JWKS_NO_MATCHING_KEY';\n    code = 'ERR_JWKS_NO_MATCHING_KEY';\n    constructor(message = 'no applicable key found in the JSON Web Key Set', options) {\n        super(message, options);\n    }\n}\nexports.JWKSNoMatchingKey = JWKSNoMatchingKey;\nclass JWKSMultipleMatchingKeys extends JOSEError {\n    [Symbol.asyncIterator];\n    static code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n    code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n    constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {\n        super(message, options);\n    }\n}\nexports.JWKSMultipleMatchingKeys = JWKSMultipleMatchingKeys;\nclass JWKSTimeout extends JOSEError {\n    static code = 'ERR_JWKS_TIMEOUT';\n    code = 'ERR_JWKS_TIMEOUT';\n    constructor(message = 'request timed out', options) {\n        super(message, options);\n    }\n}\nexports.JWKSTimeout = JWKSTimeout;\nclass JWSSignatureVerificationFailed extends JOSEError {\n    static code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n    code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n    constructor(message = 'signature verification failed', options) {\n        super(message, options);\n    }\n}\nexports.JWSSignatureVerificationFailed = JWSSignatureVerificationFailed;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = void 0;\nvar node_crypto_1 = require(\"node:crypto\");\nObject.defineProperty(exports, \"default\", { enumerable: true, get: function () { return node_crypto_1.randomFillSync; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bitLength = bitLength;\nconst errors_js_1 = require(\"../util/errors.js\");\nconst random_js_1 = require(\"../runtime/random.js\");\nfunction bitLength(alg) {\n    switch (alg) {\n        case 'A128GCM':\n        case 'A128GCMKW':\n        case 'A192GCM':\n        case 'A192GCMKW':\n        case 'A256GCM':\n        case 'A256GCMKW':\n            return 96;\n        case 'A128CBC-HS256':\n        case 'A192CBC-HS384':\n        case 'A256CBC-HS512':\n            return 128;\n        default:\n            throw new errors_js_1.JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);\n    }\n}\nexports.default = (alg) => (0, random_js_1.default)(new Uint8Array(bitLength(alg) >> 3));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst errors_js_1 = require(\"../util/errors.js\");\nconst iv_js_1 = require(\"./iv.js\");\nconst checkIvLength = (enc, iv) => {\n    if (iv.length << 3 !== (0, iv_js_1.bitLength)(enc)) {\n        throw new errors_js_1.JWEInvalid('Invalid Initialization Vector length');\n    }\n};\nexports.default = checkIvLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util = require(\"node:util\");\nexports.default = (obj) => util.types.isKeyObject(obj);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst errors_js_1 = require(\"../util/errors.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst checkCekLength = (enc, cek) => {\n    let expected;\n    switch (enc) {\n        case 'A128CBC-HS256':\n        case 'A192CBC-HS384':\n        case 'A256CBC-HS512':\n            expected = parseInt(enc.slice(-3), 10);\n            break;\n        case 'A128GCM':\n        case 'A192GCM':\n        case 'A256GCM':\n            expected = parseInt(enc.slice(1, 4), 10);\n            break;\n        default:\n            throw new errors_js_1.JOSENotSupported(`Content Encryption Algorithm ${enc} is not supported either by JOSE or your javascript runtime`);\n    }\n    if (cek instanceof Uint8Array) {\n        const actual = cek.byteLength << 3;\n        if (actual !== expected) {\n            throw new errors_js_1.JWEInvalid(`Invalid Content Encryption Key length. Expected ${expected} bits, got ${actual} bits`);\n        }\n        return;\n    }\n    if ((0, is_key_object_js_1.default)(cek) && cek.type === 'secret') {\n        const actual = cek.symmetricKeySize << 3;\n        if (actual !== expected) {\n            throw new errors_js_1.JWEInvalid(`Invalid Content Encryption Key length. Expected ${expected} bits, got ${actual} bits`);\n        }\n        return;\n    }\n    throw new TypeError('Invalid Content Encryption Key type');\n};\nexports.default = checkCekLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nconst timingSafeEqual = node_crypto_1.timingSafeEqual;\nexports.default = timingSafeEqual;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = cbcTag;\nconst node_crypto_1 = require(\"node:crypto\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nfunction cbcTag(aad, iv, ciphertext, macSize, macKey, keySize) {\n    const macData = (0, buffer_utils_js_1.concat)(aad, iv, ciphertext, (0, buffer_utils_js_1.uint64be)(aad.length << 3));\n    const hmac = (0, node_crypto_1.createHmac)(`sha${macSize}`, macKey);\n    hmac.update(macData);\n    return hmac.digest().slice(0, keySize >> 3);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isCryptoKey = void 0;\nconst crypto = require(\"node:crypto\");\nconst util = require(\"node:util\");\nconst webcrypto = crypto.webcrypto;\nexports.default = webcrypto;\nconst isCryptoKey = (key) => util.types.isCryptoKey(key);\nexports.isCryptoKey = isCryptoKey;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkSigCryptoKey = checkSigCryptoKey;\nexports.checkEncCryptoKey = checkEncCryptoKey;\nfunction unusable(name, prop = 'algorithm.name') {\n    return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\n}\nfunction isAlgorithm(algorithm, name) {\n    return algorithm.name === name;\n}\nfunction getHashLength(hash) {\n    return parseInt(hash.name.slice(4), 10);\n}\nfunction getNamedCurve(alg) {\n    switch (alg) {\n        case 'ES256':\n            return 'P-256';\n        case 'ES384':\n            return 'P-384';\n        case 'ES512':\n            return 'P-521';\n        default:\n            throw new Error('unreachable');\n    }\n}\nfunction checkUsage(key, usages) {\n    if (usages.length && !usages.some((expected) => key.usages.includes(expected))) {\n        let msg = 'CryptoKey does not support this operation, its usages must include ';\n        if (usages.length > 2) {\n            const last = usages.pop();\n            msg += `one of ${usages.join(', ')}, or ${last}.`;\n        }\n        else if (usages.length === 2) {\n            msg += `one of ${usages[0]} or ${usages[1]}.`;\n        }\n        else {\n            msg += `${usages[0]}.`;\n        }\n        throw new TypeError(msg);\n    }\n}\nfunction checkSigCryptoKey(key, alg, ...usages) {\n    switch (alg) {\n        case 'HS256':\n        case 'HS384':\n        case 'HS512': {\n            if (!isAlgorithm(key.algorithm, 'HMAC'))\n                throw unusable('HMAC');\n            const expected = parseInt(alg.slice(2), 10);\n            const actual = getHashLength(key.algorithm.hash);\n            if (actual !== expected)\n                throw unusable(`SHA-${expected}`, 'algorithm.hash');\n            break;\n        }\n        case 'RS256':\n        case 'RS384':\n        case 'RS512': {\n            if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))\n                throw unusable('RSASSA-PKCS1-v1_5');\n            const expected = parseInt(alg.slice(2), 10);\n            const actual = getHashLength(key.algorithm.hash);\n            if (actual !== expected)\n                throw unusable(`SHA-${expected}`, 'algorithm.hash');\n            break;\n        }\n        case 'PS256':\n        case 'PS384':\n        case 'PS512': {\n            if (!isAlgorithm(key.algorithm, 'RSA-PSS'))\n                throw unusable('RSA-PSS');\n            const expected = parseInt(alg.slice(2), 10);\n            const actual = getHashLength(key.algorithm.hash);\n            if (actual !== expected)\n                throw unusable(`SHA-${expected}`, 'algorithm.hash');\n            break;\n        }\n        case 'EdDSA': {\n            if (key.algorithm.name !== 'Ed25519' && key.algorithm.name !== 'Ed448') {\n                throw unusable('Ed25519 or Ed448');\n            }\n            break;\n        }\n        case 'Ed25519': {\n            if (!isAlgorithm(key.algorithm, 'Ed25519'))\n                throw unusable('Ed25519');\n            break;\n        }\n        case 'ES256':\n        case 'ES384':\n        case 'ES512': {\n            if (!isAlgorithm(key.algorithm, 'ECDSA'))\n                throw unusable('ECDSA');\n            const expected = getNamedCurve(alg);\n            const actual = key.algorithm.namedCurve;\n            if (actual !== expected)\n                throw unusable(expected, 'algorithm.namedCurve');\n            break;\n        }\n        default:\n            throw new TypeError('CryptoKey does not support this operation');\n    }\n    checkUsage(key, usages);\n}\nfunction checkEncCryptoKey(key, alg, ...usages) {\n    switch (alg) {\n        case 'A128GCM':\n        case 'A192GCM':\n        case 'A256GCM': {\n            if (!isAlgorithm(key.algorithm, 'AES-GCM'))\n                throw unusable('AES-GCM');\n            const expected = parseInt(alg.slice(1, 4), 10);\n            const actual = key.algorithm.length;\n            if (actual !== expected)\n                throw unusable(expected, 'algorithm.length');\n            break;\n        }\n        case 'A128KW':\n        case 'A192KW':\n        case 'A256KW': {\n            if (!isAlgorithm(key.algorithm, 'AES-KW'))\n                throw unusable('AES-KW');\n            const expected = parseInt(alg.slice(1, 4), 10);\n            const actual = key.algorithm.length;\n            if (actual !== expected)\n                throw unusable(expected, 'algorithm.length');\n            break;\n        }\n        case 'ECDH': {\n            switch (key.algorithm.name) {\n                case 'ECDH':\n                case 'X25519':\n                case 'X448':\n                    break;\n                default:\n                    throw unusable('ECDH, X25519, or X448');\n            }\n            break;\n        }\n        case 'PBES2-HS256+A128KW':\n        case 'PBES2-HS384+A192KW':\n        case 'PBES2-HS512+A256KW':\n            if (!isAlgorithm(key.algorithm, 'PBKDF2'))\n                throw unusable('PBKDF2');\n            break;\n        case 'RSA-OAEP':\n        case 'RSA-OAEP-256':\n        case 'RSA-OAEP-384':\n        case 'RSA-OAEP-512': {\n            if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))\n                throw unusable('RSA-OAEP');\n            const expected = parseInt(alg.slice(9), 10) || 1;\n            const actual = getHashLength(key.algorithm.hash);\n            if (actual !== expected)\n                throw unusable(`SHA-${expected}`, 'algorithm.hash');\n            break;\n        }\n        default:\n            throw new TypeError('CryptoKey does not support this operation');\n    }\n    checkUsage(key, usages);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.withAlg = withAlg;\nfunction message(msg, actual, ...types) {\n    types = types.filter(Boolean);\n    if (types.length > 2) {\n        const last = types.pop();\n        msg += `one of type ${types.join(', ')}, or ${last}.`;\n    }\n    else if (types.length === 2) {\n        msg += `one of type ${types[0]} or ${types[1]}.`;\n    }\n    else {\n        msg += `of type ${types[0]}.`;\n    }\n    if (actual == null) {\n        msg += ` Received ${actual}`;\n    }\n    else if (typeof actual === 'function' && actual.name) {\n        msg += ` Received function ${actual.name}`;\n    }\n    else if (typeof actual === 'object' && actual != null) {\n        if (actual.constructor?.name) {\n            msg += ` Received an instance of ${actual.constructor.name}`;\n        }\n    }\n    return msg;\n}\nexports.default = (actual, ...types) => {\n    return message('Key must be ', actual, ...types);\n};\nfunction withAlg(alg, actual, ...types) {\n    return message(`Key for the ${alg} algorithm must be `, actual, ...types);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nlet ciphers;\nexports.default = (algorithm) => {\n    ciphers ||= new Set((0, node_crypto_1.getCiphers)());\n    return ciphers.has(algorithm);\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.types = void 0;\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nexports.default = (key) => (0, is_key_object_js_1.default)(key) || (0, webcrypto_js_1.isCryptoKey)(key);\nconst types = ['KeyObject'];\nexports.types = types;\nif (globalThis.CryptoKey || webcrypto_js_1.default?.CryptoKey) {\n    types.push('CryptoKey');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nconst check_iv_length_js_1 = require(\"../lib/check_iv_length.js\");\nconst check_cek_length_js_1 = require(\"./check_cek_length.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst timing_safe_equal_js_1 = require(\"./timing_safe_equal.js\");\nconst cbc_tag_js_1 = require(\"./cbc_tag.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst crypto_key_js_1 = require(\"../lib/crypto_key.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst ciphers_js_1 = require(\"./ciphers.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nfunction cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {\n    const keySize = parseInt(enc.slice(1, 4), 10);\n    if ((0, is_key_object_js_1.default)(cek)) {\n        cek = cek.export();\n    }\n    const encKey = cek.subarray(keySize >> 3);\n    const macKey = cek.subarray(0, keySize >> 3);\n    const macSize = parseInt(enc.slice(-3), 10);\n    const algorithm = `aes-${keySize}-cbc`;\n    if (!(0, ciphers_js_1.default)(algorithm)) {\n        throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`);\n    }\n    const expectedTag = (0, cbc_tag_js_1.default)(aad, iv, ciphertext, macSize, macKey, keySize);\n    let macCheckPassed;\n    try {\n        macCheckPassed = (0, timing_safe_equal_js_1.default)(tag, expectedTag);\n    }\n    catch {\n    }\n    if (!macCheckPassed) {\n        throw new errors_js_1.JWEDecryptionFailed();\n    }\n    let plaintext;\n    try {\n        const decipher = (0, node_crypto_1.createDecipheriv)(algorithm, encKey, iv);\n        plaintext = (0, buffer_utils_js_1.concat)(decipher.update(ciphertext), decipher.final());\n    }\n    catch {\n    }\n    if (!plaintext) {\n        throw new errors_js_1.JWEDecryptionFailed();\n    }\n    return plaintext;\n}\nfunction gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) {\n    const keySize = parseInt(enc.slice(1, 4), 10);\n    const algorithm = `aes-${keySize}-gcm`;\n    if (!(0, ciphers_js_1.default)(algorithm)) {\n        throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`);\n    }\n    try {\n        const decipher = (0, node_crypto_1.createDecipheriv)(algorithm, cek, iv, { authTagLength: 16 });\n        decipher.setAuthTag(tag);\n        if (aad.byteLength) {\n            decipher.setAAD(aad, { plaintextLength: ciphertext.length });\n        }\n        const plaintext = decipher.update(ciphertext);\n        decipher.final();\n        return plaintext;\n    }\n    catch {\n        throw new errors_js_1.JWEDecryptionFailed();\n    }\n}\nconst decrypt = (enc, cek, ciphertext, iv, tag, aad) => {\n    let key;\n    if ((0, webcrypto_js_1.isCryptoKey)(cek)) {\n        (0, crypto_key_js_1.checkEncCryptoKey)(cek, enc, 'decrypt');\n        key = node_crypto_1.KeyObject.from(cek);\n    }\n    else if (cek instanceof Uint8Array || (0, is_key_object_js_1.default)(cek)) {\n        key = cek;\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(cek, ...is_key_like_js_1.types, 'Uint8Array'));\n    }\n    if (!iv) {\n        throw new errors_js_1.JWEInvalid('JWE Initialization Vector missing');\n    }\n    if (!tag) {\n        throw new errors_js_1.JWEInvalid('JWE Authentication Tag missing');\n    }\n    (0, check_cek_length_js_1.default)(enc, key);\n    (0, check_iv_length_js_1.default)(enc, iv);\n    switch (enc) {\n        case 'A128CBC-HS256':\n        case 'A192CBC-HS384':\n        case 'A256CBC-HS512':\n            return cbcDecrypt(enc, key, ciphertext, iv, tag, aad);\n        case 'A128GCM':\n        case 'A192GCM':\n        case 'A256GCM':\n            return gcmDecrypt(enc, key, ciphertext, iv, tag, aad);\n        default:\n            throw new errors_js_1.JOSENotSupported('Unsupported JWE Content Encryption Algorithm');\n    }\n};\nexports.default = decrypt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst isDisjoint = (...headers) => {\n    const sources = headers.filter(Boolean);\n    if (sources.length === 0 || sources.length === 1) {\n        return true;\n    }\n    let acc;\n    for (const header of sources) {\n        const parameters = Object.keys(header);\n        if (!acc || acc.size === 0) {\n            acc = new Set(parameters);\n            continue;\n        }\n        for (const parameter of parameters) {\n            if (acc.has(parameter)) {\n                return false;\n            }\n            acc.add(parameter);\n        }\n    }\n    return true;\n};\nexports.default = isDisjoint;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = isObject;\nfunction isObjectLike(value) {\n    return typeof value === 'object' && value !== null;\n}\nfunction isObject(input) {\n    if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {\n        return false;\n    }\n    if (Object.getPrototypeOf(input) === null) {\n        return true;\n    }\n    let proto = input;\n    while (Object.getPrototypeOf(proto) !== null) {\n        proto = Object.getPrototypeOf(proto);\n    }\n    return Object.getPrototypeOf(input) === proto;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unwrap = exports.wrap = void 0;\nconst node_buffer_1 = require(\"node:buffer\");\nconst node_crypto_1 = require(\"node:crypto\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst crypto_key_js_1 = require(\"../lib/crypto_key.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst ciphers_js_1 = require(\"./ciphers.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nfunction checkKeySize(key, alg) {\n    if (key.symmetricKeySize << 3 !== parseInt(alg.slice(1, 4), 10)) {\n        throw new TypeError(`Invalid key size for alg: ${alg}`);\n    }\n}\nfunction ensureKeyObject(key, alg, usage) {\n    if ((0, is_key_object_js_1.default)(key)) {\n        return key;\n    }\n    if (key instanceof Uint8Array) {\n        return (0, node_crypto_1.createSecretKey)(key);\n    }\n    if ((0, webcrypto_js_1.isCryptoKey)(key)) {\n        (0, crypto_key_js_1.checkEncCryptoKey)(key, alg, usage);\n        return node_crypto_1.KeyObject.from(key);\n    }\n    throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array'));\n}\nconst wrap = (alg, key, cek) => {\n    const size = parseInt(alg.slice(1, 4), 10);\n    const algorithm = `aes${size}-wrap`;\n    if (!(0, ciphers_js_1.default)(algorithm)) {\n        throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n    }\n    const keyObject = ensureKeyObject(key, alg, 'wrapKey');\n    checkKeySize(keyObject, alg);\n    const cipher = (0, node_crypto_1.createCipheriv)(algorithm, keyObject, node_buffer_1.Buffer.alloc(8, 0xa6));\n    return (0, buffer_utils_js_1.concat)(cipher.update(cek), cipher.final());\n};\nexports.wrap = wrap;\nconst unwrap = (alg, key, encryptedKey) => {\n    const size = parseInt(alg.slice(1, 4), 10);\n    const algorithm = `aes${size}-wrap`;\n    if (!(0, ciphers_js_1.default)(algorithm)) {\n        throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n    }\n    const keyObject = ensureKeyObject(key, alg, 'unwrapKey');\n    checkKeySize(keyObject, alg);\n    const cipher = (0, node_crypto_1.createDecipheriv)(algorithm, keyObject, node_buffer_1.Buffer.alloc(8, 0xa6));\n    return (0, buffer_utils_js_1.concat)(cipher.update(encryptedKey), cipher.final());\n};\nexports.unwrap = unwrap;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isJWK = isJWK;\nexports.isPrivateJWK = isPrivateJWK;\nexports.isPublicJWK = isPublicJWK;\nexports.isSecretJWK = isSecretJWK;\nconst is_object_js_1 = require(\"./is_object.js\");\nfunction isJWK(key) {\n    return (0, is_object_js_1.default)(key) && typeof key.kty === 'string';\n}\nfunction isPrivateJWK(key) {\n    return key.kty !== 'oct' && typeof key.d === 'string';\n}\nfunction isPublicJWK(key) {\n    return key.kty !== 'oct' && typeof key.d === 'undefined';\n}\nfunction isSecretJWK(key) {\n    return isJWK(key) && key.kty === 'oct' && typeof key.k === 'string';\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.weakMap = void 0;\nconst node_crypto_1 = require(\"node:crypto\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nconst is_jwk_js_1 = require(\"../lib/is_jwk.js\");\nexports.weakMap = new WeakMap();\nconst namedCurveToJOSE = (namedCurve) => {\n    switch (namedCurve) {\n        case 'prime256v1':\n            return 'P-256';\n        case 'secp384r1':\n            return 'P-384';\n        case 'secp521r1':\n            return 'P-521';\n        case 'secp256k1':\n            return 'secp256k1';\n        default:\n            throw new errors_js_1.JOSENotSupported('Unsupported key curve for this operation');\n    }\n};\nconst getNamedCurve = (kee, raw) => {\n    let key;\n    if ((0, webcrypto_js_1.isCryptoKey)(kee)) {\n        key = node_crypto_1.KeyObject.from(kee);\n    }\n    else if ((0, is_key_object_js_1.default)(kee)) {\n        key = kee;\n    }\n    else if ((0, is_jwk_js_1.isJWK)(kee)) {\n        return kee.crv;\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(kee, ...is_key_like_js_1.types));\n    }\n    if (key.type === 'secret') {\n        throw new TypeError('only \"private\" or \"public\" type keys can be used for this operation');\n    }\n    switch (key.asymmetricKeyType) {\n        case 'ed25519':\n        case 'ed448':\n            return `Ed${key.asymmetricKeyType.slice(2)}`;\n        case 'x25519':\n        case 'x448':\n            return `X${key.asymmetricKeyType.slice(1)}`;\n        case 'ec': {\n            const namedCurve = key.asymmetricKeyDetails.namedCurve;\n            if (raw) {\n                return namedCurve;\n            }\n            return namedCurveToJOSE(namedCurve);\n        }\n        default:\n            throw new TypeError('Invalid asymmetric key type for this operation');\n    }\n};\nexports.default = getNamedCurve;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ecdhAllowed = void 0;\nexports.deriveKey = deriveKey;\nexports.generateEpk = generateEpk;\nconst node_crypto_1 = require(\"node:crypto\");\nconst node_util_1 = require(\"node:util\");\nconst get_named_curve_js_1 = require(\"./get_named_curve.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst crypto_key_js_1 = require(\"../lib/crypto_key.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nconst generateKeyPair = (0, node_util_1.promisify)(node_crypto_1.generateKeyPair);\nasync function deriveKey(publicKee, privateKee, algorithm, keyLength, apu = new Uint8Array(0), apv = new Uint8Array(0)) {\n    let publicKey;\n    if ((0, webcrypto_js_1.isCryptoKey)(publicKee)) {\n        (0, crypto_key_js_1.checkEncCryptoKey)(publicKee, 'ECDH');\n        publicKey = node_crypto_1.KeyObject.from(publicKee);\n    }\n    else if ((0, is_key_object_js_1.default)(publicKee)) {\n        publicKey = publicKee;\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(publicKee, ...is_key_like_js_1.types));\n    }\n    let privateKey;\n    if ((0, webcrypto_js_1.isCryptoKey)(privateKee)) {\n        (0, crypto_key_js_1.checkEncCryptoKey)(privateKee, 'ECDH', 'deriveBits');\n        privateKey = node_crypto_1.KeyObject.from(privateKee);\n    }\n    else if ((0, is_key_object_js_1.default)(privateKee)) {\n        privateKey = privateKee;\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(privateKee, ...is_key_like_js_1.types));\n    }\n    const value = (0, buffer_utils_js_1.concat)((0, buffer_utils_js_1.lengthAndInput)(buffer_utils_js_1.encoder.encode(algorithm)), (0, buffer_utils_js_1.lengthAndInput)(apu), (0, buffer_utils_js_1.lengthAndInput)(apv), (0, buffer_utils_js_1.uint32be)(keyLength));\n    const sharedSecret = (0, node_crypto_1.diffieHellman)({ privateKey, publicKey });\n    return (0, buffer_utils_js_1.concatKdf)(sharedSecret, keyLength, value);\n}\nasync function generateEpk(kee) {\n    let key;\n    if ((0, webcrypto_js_1.isCryptoKey)(kee)) {\n        key = node_crypto_1.KeyObject.from(kee);\n    }\n    else if ((0, is_key_object_js_1.default)(kee)) {\n        key = kee;\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(kee, ...is_key_like_js_1.types));\n    }\n    switch (key.asymmetricKeyType) {\n        case 'x25519':\n            return generateKeyPair('x25519');\n        case 'x448': {\n            return generateKeyPair('x448');\n        }\n        case 'ec': {\n            const namedCurve = (0, get_named_curve_js_1.default)(key);\n            return generateKeyPair('ec', { namedCurve });\n        }\n        default:\n            throw new errors_js_1.JOSENotSupported('Invalid or unsupported EPK');\n    }\n}\nconst ecdhAllowed = (key) => ['P-256', 'P-384', 'P-521', 'X25519', 'X448'].includes((0, get_named_curve_js_1.default)(key));\nexports.ecdhAllowed = ecdhAllowed;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = checkP2s;\nconst errors_js_1 = require(\"../util/errors.js\");\nfunction checkP2s(p2s) {\n    if (!(p2s instanceof Uint8Array) || p2s.length < 8) {\n        throw new errors_js_1.JWEInvalid('PBES2 Salt Input must be 8 or more octets');\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decrypt = exports.encrypt = void 0;\nconst node_util_1 = require(\"node:util\");\nconst node_crypto_1 = require(\"node:crypto\");\nconst random_js_1 = require(\"./random.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst base64url_js_1 = require(\"./base64url.js\");\nconst aeskw_js_1 = require(\"./aeskw.js\");\nconst check_p2s_js_1 = require(\"../lib/check_p2s.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst crypto_key_js_1 = require(\"../lib/crypto_key.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nconst pbkdf2 = (0, node_util_1.promisify)(node_crypto_1.pbkdf2);\nfunction getPassword(key, alg) {\n    if ((0, is_key_object_js_1.default)(key)) {\n        return key.export();\n    }\n    if (key instanceof Uint8Array) {\n        return key;\n    }\n    if ((0, webcrypto_js_1.isCryptoKey)(key)) {\n        (0, crypto_key_js_1.checkEncCryptoKey)(key, alg, 'deriveBits', 'deriveKey');\n        return node_crypto_1.KeyObject.from(key).export();\n    }\n    throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array'));\n}\nconst encrypt = async (alg, key, cek, p2c = 2048, p2s = (0, random_js_1.default)(new Uint8Array(16))) => {\n    (0, check_p2s_js_1.default)(p2s);\n    const salt = (0, buffer_utils_js_1.p2s)(alg, p2s);\n    const keylen = parseInt(alg.slice(13, 16), 10) >> 3;\n    const password = getPassword(key, alg);\n    const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`);\n    const encryptedKey = await (0, aeskw_js_1.wrap)(alg.slice(-6), derivedKey, cek);\n    return { encryptedKey, p2c, p2s: (0, base64url_js_1.encode)(p2s) };\n};\nexports.encrypt = encrypt;\nconst decrypt = async (alg, key, encryptedKey, p2c, p2s) => {\n    (0, check_p2s_js_1.default)(p2s);\n    const salt = (0, buffer_utils_js_1.p2s)(alg, p2s);\n    const keylen = parseInt(alg.slice(13, 16), 10) >> 3;\n    const password = getPassword(key, alg);\n    const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`);\n    return (0, aeskw_js_1.unwrap)(alg.slice(-6), derivedKey, encryptedKey);\n};\nexports.decrypt = decrypt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nexports.default = (key, alg) => {\n    let modulusLength;\n    try {\n        if (key instanceof node_crypto_1.KeyObject) {\n            modulusLength = key.asymmetricKeyDetails?.modulusLength;\n        }\n        else {\n            modulusLength = Buffer.from(key.n, 'base64url').byteLength << 3;\n        }\n    }\n    catch { }\n    if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n        throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n    }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decrypt = exports.encrypt = void 0;\nconst node_crypto_1 = require(\"node:crypto\");\nconst node_util_1 = require(\"node:util\");\nconst check_key_length_js_1 = require(\"./check_key_length.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst crypto_key_js_1 = require(\"../lib/crypto_key.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nconst checkKey = (key, alg) => {\n    if (key.asymmetricKeyType !== 'rsa') {\n        throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa');\n    }\n    (0, check_key_length_js_1.default)(key, alg);\n};\nconst RSA1_5 = (0, node_util_1.deprecate)(() => node_crypto_1.constants.RSA_PKCS1_PADDING, 'The RSA1_5 \"alg\" (JWE Algorithm) is deprecated and will be removed in the next major revision.');\nconst resolvePadding = (alg) => {\n    switch (alg) {\n        case 'RSA-OAEP':\n        case 'RSA-OAEP-256':\n        case 'RSA-OAEP-384':\n        case 'RSA-OAEP-512':\n            return node_crypto_1.constants.RSA_PKCS1_OAEP_PADDING;\n        case 'RSA1_5':\n            return RSA1_5();\n        default:\n            return undefined;\n    }\n};\nconst resolveOaepHash = (alg) => {\n    switch (alg) {\n        case 'RSA-OAEP':\n            return 'sha1';\n        case 'RSA-OAEP-256':\n            return 'sha256';\n        case 'RSA-OAEP-384':\n            return 'sha384';\n        case 'RSA-OAEP-512':\n            return 'sha512';\n        default:\n            return undefined;\n    }\n};\nfunction ensureKeyObject(key, alg, ...usages) {\n    if ((0, is_key_object_js_1.default)(key)) {\n        return key;\n    }\n    if ((0, webcrypto_js_1.isCryptoKey)(key)) {\n        (0, crypto_key_js_1.checkEncCryptoKey)(key, alg, ...usages);\n        return node_crypto_1.KeyObject.from(key);\n    }\n    throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types));\n}\nconst encrypt = (alg, key, cek) => {\n    const padding = resolvePadding(alg);\n    const oaepHash = resolveOaepHash(alg);\n    const keyObject = ensureKeyObject(key, alg, 'wrapKey', 'encrypt');\n    checkKey(keyObject, alg);\n    return (0, node_crypto_1.publicEncrypt)({ key: keyObject, oaepHash, padding }, cek);\n};\nexports.encrypt = encrypt;\nconst decrypt = (alg, key, encryptedKey) => {\n    const padding = resolvePadding(alg);\n    const oaepHash = resolveOaepHash(alg);\n    const keyObject = ensureKeyObject(key, alg, 'unwrapKey', 'decrypt');\n    checkKey(keyObject, alg);\n    return (0, node_crypto_1.privateDecrypt)({ key: keyObject, oaepHash, padding }, encryptedKey);\n};\nexports.decrypt = decrypt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bitLength = bitLength;\nconst errors_js_1 = require(\"../util/errors.js\");\nconst random_js_1 = require(\"../runtime/random.js\");\nfunction bitLength(alg) {\n    switch (alg) {\n        case 'A128GCM':\n            return 128;\n        case 'A192GCM':\n            return 192;\n        case 'A256GCM':\n        case 'A128CBC-HS256':\n            return 256;\n        case 'A192CBC-HS384':\n            return 384;\n        case 'A256CBC-HS512':\n            return 512;\n        default:\n            throw new errors_js_1.JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);\n    }\n}\nexports.default = (alg) => (0, random_js_1.default)(new Uint8Array(bitLength(alg) >> 3));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromX509 = exports.fromSPKI = exports.fromPKCS8 = exports.toPKCS8 = exports.toSPKI = void 0;\nconst node_crypto_1 = require(\"node:crypto\");\nconst node_buffer_1 = require(\"node:buffer\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nconst genericExport = (keyType, keyFormat, key) => {\n    let keyObject;\n    if ((0, webcrypto_js_1.isCryptoKey)(key)) {\n        if (!key.extractable) {\n            throw new TypeError('CryptoKey is not extractable');\n        }\n        keyObject = node_crypto_1.KeyObject.from(key);\n    }\n    else if ((0, is_key_object_js_1.default)(key)) {\n        keyObject = key;\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types));\n    }\n    if (keyObject.type !== keyType) {\n        throw new TypeError(`key is not a ${keyType} key`);\n    }\n    return keyObject.export({ format: 'pem', type: keyFormat });\n};\nconst toSPKI = (key) => {\n    return genericExport('public', 'spki', key);\n};\nexports.toSPKI = toSPKI;\nconst toPKCS8 = (key) => {\n    return genericExport('private', 'pkcs8', key);\n};\nexports.toPKCS8 = toPKCS8;\nconst fromPKCS8 = (pem) => (0, node_crypto_1.createPrivateKey)({\n    key: node_buffer_1.Buffer.from(pem.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\\s)/g, ''), 'base64'),\n    type: 'pkcs8',\n    format: 'der',\n});\nexports.fromPKCS8 = fromPKCS8;\nconst fromSPKI = (pem) => (0, node_crypto_1.createPublicKey)({\n    key: node_buffer_1.Buffer.from(pem.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\\s)/g, ''), 'base64'),\n    type: 'spki',\n    format: 'der',\n});\nexports.fromSPKI = fromSPKI;\nconst fromX509 = (pem) => (0, node_crypto_1.createPublicKey)({\n    key: pem,\n    type: 'spki',\n    format: 'pem',\n});\nexports.fromX509 = fromX509;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nconst parse = (key) => {\n    if (key.d) {\n        return (0, node_crypto_1.createPrivateKey)({ format: 'jwk', key });\n    }\n    return (0, node_crypto_1.createPublicKey)({ format: 'jwk', key });\n};\nexports.default = parse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.importSPKI = importSPKI;\nexports.importX509 = importX509;\nexports.importPKCS8 = importPKCS8;\nexports.importJWK = importJWK;\nconst base64url_js_1 = require(\"../runtime/base64url.js\");\nconst asn1_js_1 = require(\"../runtime/asn1.js\");\nconst jwk_to_key_js_1 = require(\"../runtime/jwk_to_key.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nasync function importSPKI(spki, alg, options) {\n    if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) {\n        throw new TypeError('\"spki\" must be SPKI formatted string');\n    }\n    return (0, asn1_js_1.fromSPKI)(spki, alg, options);\n}\nasync function importX509(x509, alg, options) {\n    if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) {\n        throw new TypeError('\"x509\" must be X.509 formatted string');\n    }\n    return (0, asn1_js_1.fromX509)(x509, alg, options);\n}\nasync function importPKCS8(pkcs8, alg, options) {\n    if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) {\n        throw new TypeError('\"pkcs8\" must be PKCS#8 formatted string');\n    }\n    return (0, asn1_js_1.fromPKCS8)(pkcs8, alg, options);\n}\nasync function importJWK(jwk, alg) {\n    if (!(0, is_object_js_1.default)(jwk)) {\n        throw new TypeError('JWK must be an object');\n    }\n    alg ||= jwk.alg;\n    switch (jwk.kty) {\n        case 'oct':\n            if (typeof jwk.k !== 'string' || !jwk.k) {\n                throw new TypeError('missing \"k\" (Key Value) Parameter value');\n            }\n            return (0, base64url_js_1.decode)(jwk.k);\n        case 'RSA':\n            if ('oth' in jwk && jwk.oth !== undefined) {\n                throw new errors_js_1.JOSENotSupported('RSA JWK \"oth\" (Other Primes Info) Parameter value is not supported');\n            }\n        case 'EC':\n        case 'OKP':\n            return (0, jwk_to_key_js_1.default)({ ...jwk, alg });\n        default:\n            throw new errors_js_1.JOSENotSupported('Unsupported \"kty\" (Key Type) Parameter value');\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkKeyTypeWithJwk = void 0;\nconst invalid_key_input_js_1 = require(\"./invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"../runtime/is_key_like.js\");\nconst jwk = require(\"./is_jwk.js\");\nconst tag = (key) => key?.[Symbol.toStringTag];\nconst jwkMatchesOp = (alg, key, usage) => {\n    if (key.use !== undefined && key.use !== 'sig') {\n        throw new TypeError('Invalid key for this operation, when present its use must be sig');\n    }\n    if (key.key_ops !== undefined && key.key_ops.includes?.(usage) !== true) {\n        throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${usage}`);\n    }\n    if (key.alg !== undefined && key.alg !== alg) {\n        throw new TypeError(`Invalid key for this operation, when present its alg must be ${alg}`);\n    }\n    return true;\n};\nconst symmetricTypeCheck = (alg, key, usage, allowJwk) => {\n    if (key instanceof Uint8Array)\n        return;\n    if (allowJwk && jwk.isJWK(key)) {\n        if (jwk.isSecretJWK(key) && jwkMatchesOp(alg, key, usage))\n            return;\n        throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present`);\n    }\n    if (!(0, is_key_like_js_1.default)(key)) {\n        throw new TypeError((0, invalid_key_input_js_1.withAlg)(alg, key, ...is_key_like_js_1.types, 'Uint8Array', allowJwk ? 'JSON Web Key' : null));\n    }\n    if (key.type !== 'secret') {\n        throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type \"secret\"`);\n    }\n};\nconst asymmetricTypeCheck = (alg, key, usage, allowJwk) => {\n    if (allowJwk && jwk.isJWK(key)) {\n        switch (usage) {\n            case 'sign':\n                if (jwk.isPrivateJWK(key) && jwkMatchesOp(alg, key, usage))\n                    return;\n                throw new TypeError(`JSON Web Key for this operation be a private JWK`);\n            case 'verify':\n                if (jwk.isPublicJWK(key) && jwkMatchesOp(alg, key, usage))\n                    return;\n                throw new TypeError(`JSON Web Key for this operation be a public JWK`);\n        }\n    }\n    if (!(0, is_key_like_js_1.default)(key)) {\n        throw new TypeError((0, invalid_key_input_js_1.withAlg)(alg, key, ...is_key_like_js_1.types, allowJwk ? 'JSON Web Key' : null));\n    }\n    if (key.type === 'secret') {\n        throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type \"secret\"`);\n    }\n    if (usage === 'sign' && key.type === 'public') {\n        throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type \"private\"`);\n    }\n    if (usage === 'decrypt' && key.type === 'public') {\n        throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type \"private\"`);\n    }\n    if (key.algorithm && usage === 'verify' && key.type === 'private') {\n        throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type \"public\"`);\n    }\n    if (key.algorithm && usage === 'encrypt' && key.type === 'private') {\n        throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type \"public\"`);\n    }\n};\nfunction checkKeyType(allowJwk, alg, key, usage) {\n    const symmetric = alg.startsWith('HS') ||\n        alg === 'dir' ||\n        alg.startsWith('PBES2') ||\n        /^A\\d{3}(?:GCM)?KW$/.test(alg);\n    if (symmetric) {\n        symmetricTypeCheck(alg, key, usage, allowJwk);\n    }\n    else {\n        asymmetricTypeCheck(alg, key, usage, allowJwk);\n    }\n}\nexports.default = checkKeyType.bind(undefined, false);\nexports.checkKeyTypeWithJwk = checkKeyType.bind(undefined, true);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nconst check_iv_length_js_1 = require(\"../lib/check_iv_length.js\");\nconst check_cek_length_js_1 = require(\"./check_cek_length.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst cbc_tag_js_1 = require(\"./cbc_tag.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst crypto_key_js_1 = require(\"../lib/crypto_key.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst iv_js_1 = require(\"../lib/iv.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst ciphers_js_1 = require(\"./ciphers.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nfunction cbcEncrypt(enc, plaintext, cek, iv, aad) {\n    const keySize = parseInt(enc.slice(1, 4), 10);\n    if ((0, is_key_object_js_1.default)(cek)) {\n        cek = cek.export();\n    }\n    const encKey = cek.subarray(keySize >> 3);\n    const macKey = cek.subarray(0, keySize >> 3);\n    const algorithm = `aes-${keySize}-cbc`;\n    if (!(0, ciphers_js_1.default)(algorithm)) {\n        throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`);\n    }\n    const cipher = (0, node_crypto_1.createCipheriv)(algorithm, encKey, iv);\n    const ciphertext = (0, buffer_utils_js_1.concat)(cipher.update(plaintext), cipher.final());\n    const macSize = parseInt(enc.slice(-3), 10);\n    const tag = (0, cbc_tag_js_1.default)(aad, iv, ciphertext, macSize, macKey, keySize);\n    return { ciphertext, tag, iv };\n}\nfunction gcmEncrypt(enc, plaintext, cek, iv, aad) {\n    const keySize = parseInt(enc.slice(1, 4), 10);\n    const algorithm = `aes-${keySize}-gcm`;\n    if (!(0, ciphers_js_1.default)(algorithm)) {\n        throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`);\n    }\n    const cipher = (0, node_crypto_1.createCipheriv)(algorithm, cek, iv, { authTagLength: 16 });\n    if (aad.byteLength) {\n        cipher.setAAD(aad, { plaintextLength: plaintext.length });\n    }\n    const ciphertext = cipher.update(plaintext);\n    cipher.final();\n    const tag = cipher.getAuthTag();\n    return { ciphertext, tag, iv };\n}\nconst encrypt = (enc, plaintext, cek, iv, aad) => {\n    let key;\n    if ((0, webcrypto_js_1.isCryptoKey)(cek)) {\n        (0, crypto_key_js_1.checkEncCryptoKey)(cek, enc, 'encrypt');\n        key = node_crypto_1.KeyObject.from(cek);\n    }\n    else if (cek instanceof Uint8Array || (0, is_key_object_js_1.default)(cek)) {\n        key = cek;\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(cek, ...is_key_like_js_1.types, 'Uint8Array'));\n    }\n    (0, check_cek_length_js_1.default)(enc, key);\n    if (iv) {\n        (0, check_iv_length_js_1.default)(enc, iv);\n    }\n    else {\n        iv = (0, iv_js_1.default)(enc);\n    }\n    switch (enc) {\n        case 'A128CBC-HS256':\n        case 'A192CBC-HS384':\n        case 'A256CBC-HS512':\n            return cbcEncrypt(enc, plaintext, key, iv, aad);\n        case 'A128GCM':\n        case 'A192GCM':\n        case 'A256GCM':\n            return gcmEncrypt(enc, plaintext, key, iv, aad);\n        default:\n            throw new errors_js_1.JOSENotSupported('Unsupported JWE Content Encryption Algorithm');\n    }\n};\nexports.default = encrypt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.wrap = wrap;\nexports.unwrap = unwrap;\nconst encrypt_js_1 = require(\"../runtime/encrypt.js\");\nconst decrypt_js_1 = require(\"../runtime/decrypt.js\");\nconst base64url_js_1 = require(\"../runtime/base64url.js\");\nasync function wrap(alg, key, cek, iv) {\n    const jweAlgorithm = alg.slice(0, 7);\n    const wrapped = await (0, encrypt_js_1.default)(jweAlgorithm, cek, key, iv, new Uint8Array(0));\n    return {\n        encryptedKey: wrapped.ciphertext,\n        iv: (0, base64url_js_1.encode)(wrapped.iv),\n        tag: (0, base64url_js_1.encode)(wrapped.tag),\n    };\n}\nasync function unwrap(alg, key, encryptedKey, iv, tag) {\n    const jweAlgorithm = alg.slice(0, 7);\n    return (0, decrypt_js_1.default)(jweAlgorithm, key, encryptedKey, iv, tag, new Uint8Array(0));\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst aeskw_js_1 = require(\"../runtime/aeskw.js\");\nconst ECDH = require(\"../runtime/ecdhes.js\");\nconst pbes2kw_js_1 = require(\"../runtime/pbes2kw.js\");\nconst rsaes_js_1 = require(\"../runtime/rsaes.js\");\nconst base64url_js_1 = require(\"../runtime/base64url.js\");\nconst normalize_key_js_1 = require(\"../runtime/normalize_key.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst cek_js_1 = require(\"../lib/cek.js\");\nconst import_js_1 = require(\"../key/import.js\");\nconst check_key_type_js_1 = require(\"./check_key_type.js\");\nconst is_object_js_1 = require(\"./is_object.js\");\nconst aesgcmkw_js_1 = require(\"./aesgcmkw.js\");\nasync function decryptKeyManagement(alg, key, encryptedKey, joseHeader, options) {\n    (0, check_key_type_js_1.default)(alg, key, 'decrypt');\n    key = (await normalize_key_js_1.default.normalizePrivateKey?.(key, alg)) || key;\n    switch (alg) {\n        case 'dir': {\n            if (encryptedKey !== undefined)\n                throw new errors_js_1.JWEInvalid('Encountered unexpected JWE Encrypted Key');\n            return key;\n        }\n        case 'ECDH-ES':\n            if (encryptedKey !== undefined)\n                throw new errors_js_1.JWEInvalid('Encountered unexpected JWE Encrypted Key');\n        case 'ECDH-ES+A128KW':\n        case 'ECDH-ES+A192KW':\n        case 'ECDH-ES+A256KW': {\n            if (!(0, is_object_js_1.default)(joseHeader.epk))\n                throw new errors_js_1.JWEInvalid(`JOSE Header \"epk\" (Ephemeral Public Key) missing or invalid`);\n            if (!ECDH.ecdhAllowed(key))\n                throw new errors_js_1.JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime');\n            const epk = await (0, import_js_1.importJWK)(joseHeader.epk, alg);\n            let partyUInfo;\n            let partyVInfo;\n            if (joseHeader.apu !== undefined) {\n                if (typeof joseHeader.apu !== 'string')\n                    throw new errors_js_1.JWEInvalid(`JOSE Header \"apu\" (Agreement PartyUInfo) invalid`);\n                try {\n                    partyUInfo = (0, base64url_js_1.decode)(joseHeader.apu);\n                }\n                catch {\n                    throw new errors_js_1.JWEInvalid('Failed to base64url decode the apu');\n                }\n            }\n            if (joseHeader.apv !== undefined) {\n                if (typeof joseHeader.apv !== 'string')\n                    throw new errors_js_1.JWEInvalid(`JOSE Header \"apv\" (Agreement PartyVInfo) invalid`);\n                try {\n                    partyVInfo = (0, base64url_js_1.decode)(joseHeader.apv);\n                }\n                catch {\n                    throw new errors_js_1.JWEInvalid('Failed to base64url decode the apv');\n                }\n            }\n            const sharedSecret = await ECDH.deriveKey(epk, key, alg === 'ECDH-ES' ? joseHeader.enc : alg, alg === 'ECDH-ES' ? (0, cek_js_1.bitLength)(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);\n            if (alg === 'ECDH-ES')\n                return sharedSecret;\n            if (encryptedKey === undefined)\n                throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');\n            return (0, aeskw_js_1.unwrap)(alg.slice(-6), sharedSecret, encryptedKey);\n        }\n        case 'RSA1_5':\n        case 'RSA-OAEP':\n        case 'RSA-OAEP-256':\n        case 'RSA-OAEP-384':\n        case 'RSA-OAEP-512': {\n            if (encryptedKey === undefined)\n                throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');\n            return (0, rsaes_js_1.decrypt)(alg, key, encryptedKey);\n        }\n        case 'PBES2-HS256+A128KW':\n        case 'PBES2-HS384+A192KW':\n        case 'PBES2-HS512+A256KW': {\n            if (encryptedKey === undefined)\n                throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');\n            if (typeof joseHeader.p2c !== 'number')\n                throw new errors_js_1.JWEInvalid(`JOSE Header \"p2c\" (PBES2 Count) missing or invalid`);\n            const p2cLimit = options?.maxPBES2Count || 10_000;\n            if (joseHeader.p2c > p2cLimit)\n                throw new errors_js_1.JWEInvalid(`JOSE Header \"p2c\" (PBES2 Count) out is of acceptable bounds`);\n            if (typeof joseHeader.p2s !== 'string')\n                throw new errors_js_1.JWEInvalid(`JOSE Header \"p2s\" (PBES2 Salt) missing or invalid`);\n            let p2s;\n            try {\n                p2s = (0, base64url_js_1.decode)(joseHeader.p2s);\n            }\n            catch {\n                throw new errors_js_1.JWEInvalid('Failed to base64url decode the p2s');\n            }\n            return (0, pbes2kw_js_1.decrypt)(alg, key, encryptedKey, joseHeader.p2c, p2s);\n        }\n        case 'A128KW':\n        case 'A192KW':\n        case 'A256KW': {\n            if (encryptedKey === undefined)\n                throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');\n            return (0, aeskw_js_1.unwrap)(alg, key, encryptedKey);\n        }\n        case 'A128GCMKW':\n        case 'A192GCMKW':\n        case 'A256GCMKW': {\n            if (encryptedKey === undefined)\n                throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing');\n            if (typeof joseHeader.iv !== 'string')\n                throw new errors_js_1.JWEInvalid(`JOSE Header \"iv\" (Initialization Vector) missing or invalid`);\n            if (typeof joseHeader.tag !== 'string')\n                throw new errors_js_1.JWEInvalid(`JOSE Header \"tag\" (Authentication Tag) missing or invalid`);\n            let iv;\n            try {\n                iv = (0, base64url_js_1.decode)(joseHeader.iv);\n            }\n            catch {\n                throw new errors_js_1.JWEInvalid('Failed to base64url decode the iv');\n            }\n            let tag;\n            try {\n                tag = (0, base64url_js_1.decode)(joseHeader.tag);\n            }\n            catch {\n                throw new errors_js_1.JWEInvalid('Failed to base64url decode the tag');\n            }\n            return (0, aesgcmkw_js_1.unwrap)(alg, key, encryptedKey, iv, tag);\n        }\n        default: {\n            throw new errors_js_1.JOSENotSupported('Invalid or unsupported \"alg\" (JWE Algorithm) header value');\n        }\n    }\n}\nexports.default = decryptKeyManagement;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst errors_js_1 = require(\"../util/errors.js\");\nfunction validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n    if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {\n        throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n    }\n    if (!protectedHeader || protectedHeader.crit === undefined) {\n        return new Set();\n    }\n    if (!Array.isArray(protectedHeader.crit) ||\n        protectedHeader.crit.length === 0 ||\n        protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {\n        throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n    }\n    let recognized;\n    if (recognizedOption !== undefined) {\n        recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);\n    }\n    else {\n        recognized = recognizedDefault;\n    }\n    for (const parameter of protectedHeader.crit) {\n        if (!recognized.has(parameter)) {\n            throw new errors_js_1.JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n        }\n        if (joseHeader[parameter] === undefined) {\n            throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n        }\n        if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {\n            throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n        }\n    }\n    return new Set(protectedHeader.crit);\n}\nexports.default = validateCrit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validateAlgorithms = (option, algorithms) => {\n    if (algorithms !== undefined &&\n        (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) {\n        throw new TypeError(`\"${option}\" option must be an array of strings`);\n    }\n    if (!algorithms) {\n        return undefined;\n    }\n    return new Set(algorithms);\n};\nexports.default = validateAlgorithms;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenedDecrypt = flattenedDecrypt;\nconst base64url_js_1 = require(\"../../runtime/base64url.js\");\nconst decrypt_js_1 = require(\"../../runtime/decrypt.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst is_disjoint_js_1 = require(\"../../lib/is_disjoint.js\");\nconst is_object_js_1 = require(\"../../lib/is_object.js\");\nconst decrypt_key_management_js_1 = require(\"../../lib/decrypt_key_management.js\");\nconst buffer_utils_js_1 = require(\"../../lib/buffer_utils.js\");\nconst cek_js_1 = require(\"../../lib/cek.js\");\nconst validate_crit_js_1 = require(\"../../lib/validate_crit.js\");\nconst validate_algorithms_js_1 = require(\"../../lib/validate_algorithms.js\");\nasync function flattenedDecrypt(jwe, key, options) {\n    if (!(0, is_object_js_1.default)(jwe)) {\n        throw new errors_js_1.JWEInvalid('Flattened JWE must be an object');\n    }\n    if (jwe.protected === undefined && jwe.header === undefined && jwe.unprotected === undefined) {\n        throw new errors_js_1.JWEInvalid('JOSE Header missing');\n    }\n    if (jwe.iv !== undefined && typeof jwe.iv !== 'string') {\n        throw new errors_js_1.JWEInvalid('JWE Initialization Vector incorrect type');\n    }\n    if (typeof jwe.ciphertext !== 'string') {\n        throw new errors_js_1.JWEInvalid('JWE Ciphertext missing or incorrect type');\n    }\n    if (jwe.tag !== undefined && typeof jwe.tag !== 'string') {\n        throw new errors_js_1.JWEInvalid('JWE Authentication Tag incorrect type');\n    }\n    if (jwe.protected !== undefined && typeof jwe.protected !== 'string') {\n        throw new errors_js_1.JWEInvalid('JWE Protected Header incorrect type');\n    }\n    if (jwe.encrypted_key !== undefined && typeof jwe.encrypted_key !== 'string') {\n        throw new errors_js_1.JWEInvalid('JWE Encrypted Key incorrect type');\n    }\n    if (jwe.aad !== undefined && typeof jwe.aad !== 'string') {\n        throw new errors_js_1.JWEInvalid('JWE AAD incorrect type');\n    }\n    if (jwe.header !== undefined && !(0, is_object_js_1.default)(jwe.header)) {\n        throw new errors_js_1.JWEInvalid('JWE Shared Unprotected Header incorrect type');\n    }\n    if (jwe.unprotected !== undefined && !(0, is_object_js_1.default)(jwe.unprotected)) {\n        throw new errors_js_1.JWEInvalid('JWE Per-Recipient Unprotected Header incorrect type');\n    }\n    let parsedProt;\n    if (jwe.protected) {\n        try {\n            const protectedHeader = (0, base64url_js_1.decode)(jwe.protected);\n            parsedProt = JSON.parse(buffer_utils_js_1.decoder.decode(protectedHeader));\n        }\n        catch {\n            throw new errors_js_1.JWEInvalid('JWE Protected Header is invalid');\n        }\n    }\n    if (!(0, is_disjoint_js_1.default)(parsedProt, jwe.header, jwe.unprotected)) {\n        throw new errors_js_1.JWEInvalid('JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint');\n    }\n    const joseHeader = {\n        ...parsedProt,\n        ...jwe.header,\n        ...jwe.unprotected,\n    };\n    (0, validate_crit_js_1.default)(errors_js_1.JWEInvalid, new Map(), options?.crit, parsedProt, joseHeader);\n    if (joseHeader.zip !== undefined) {\n        throw new errors_js_1.JOSENotSupported('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.');\n    }\n    const { alg, enc } = joseHeader;\n    if (typeof alg !== 'string' || !alg) {\n        throw new errors_js_1.JWEInvalid('missing JWE Algorithm (alg) in JWE Header');\n    }\n    if (typeof enc !== 'string' || !enc) {\n        throw new errors_js_1.JWEInvalid('missing JWE Encryption Algorithm (enc) in JWE Header');\n    }\n    const keyManagementAlgorithms = options && (0, validate_algorithms_js_1.default)('keyManagementAlgorithms', options.keyManagementAlgorithms);\n    const contentEncryptionAlgorithms = options &&\n        (0, validate_algorithms_js_1.default)('contentEncryptionAlgorithms', options.contentEncryptionAlgorithms);\n    if ((keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) ||\n        (!keyManagementAlgorithms && alg.startsWith('PBES2'))) {\n        throw new errors_js_1.JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter value not allowed');\n    }\n    if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) {\n        throw new errors_js_1.JOSEAlgNotAllowed('\"enc\" (Encryption Algorithm) Header Parameter value not allowed');\n    }\n    let encryptedKey;\n    if (jwe.encrypted_key !== undefined) {\n        try {\n            encryptedKey = (0, base64url_js_1.decode)(jwe.encrypted_key);\n        }\n        catch {\n            throw new errors_js_1.JWEInvalid('Failed to base64url decode the encrypted_key');\n        }\n    }\n    let resolvedKey = false;\n    if (typeof key === 'function') {\n        key = await key(parsedProt, jwe);\n        resolvedKey = true;\n    }\n    let cek;\n    try {\n        cek = await (0, decrypt_key_management_js_1.default)(alg, key, encryptedKey, joseHeader, options);\n    }\n    catch (err) {\n        if (err instanceof TypeError || err instanceof errors_js_1.JWEInvalid || err instanceof errors_js_1.JOSENotSupported) {\n            throw err;\n        }\n        cek = (0, cek_js_1.default)(enc);\n    }\n    let iv;\n    let tag;\n    if (jwe.iv !== undefined) {\n        try {\n            iv = (0, base64url_js_1.decode)(jwe.iv);\n        }\n        catch {\n            throw new errors_js_1.JWEInvalid('Failed to base64url decode the iv');\n        }\n    }\n    if (jwe.tag !== undefined) {\n        try {\n            tag = (0, base64url_js_1.decode)(jwe.tag);\n        }\n        catch {\n            throw new errors_js_1.JWEInvalid('Failed to base64url decode the tag');\n        }\n    }\n    const protectedHeader = buffer_utils_js_1.encoder.encode(jwe.protected ?? '');\n    let additionalData;\n    if (jwe.aad !== undefined) {\n        additionalData = (0, buffer_utils_js_1.concat)(protectedHeader, buffer_utils_js_1.encoder.encode('.'), buffer_utils_js_1.encoder.encode(jwe.aad));\n    }\n    else {\n        additionalData = protectedHeader;\n    }\n    let ciphertext;\n    try {\n        ciphertext = (0, base64url_js_1.decode)(jwe.ciphertext);\n    }\n    catch {\n        throw new errors_js_1.JWEInvalid('Failed to base64url decode the ciphertext');\n    }\n    const plaintext = await (0, decrypt_js_1.default)(enc, cek, ciphertext, iv, tag, additionalData);\n    const result = { plaintext };\n    if (jwe.protected !== undefined) {\n        result.protectedHeader = parsedProt;\n    }\n    if (jwe.aad !== undefined) {\n        try {\n            result.additionalAuthenticatedData = (0, base64url_js_1.decode)(jwe.aad);\n        }\n        catch {\n            throw new errors_js_1.JWEInvalid('Failed to base64url decode the aad');\n        }\n    }\n    if (jwe.unprotected !== undefined) {\n        result.sharedUnprotectedHeader = jwe.unprotected;\n    }\n    if (jwe.header !== undefined) {\n        result.unprotectedHeader = jwe.header;\n    }\n    if (resolvedKey) {\n        return { ...result, key };\n    }\n    return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compactDecrypt = compactDecrypt;\nconst decrypt_js_1 = require(\"../flattened/decrypt.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../../lib/buffer_utils.js\");\nasync function compactDecrypt(jwe, key, options) {\n    if (jwe instanceof Uint8Array) {\n        jwe = buffer_utils_js_1.decoder.decode(jwe);\n    }\n    if (typeof jwe !== 'string') {\n        throw new errors_js_1.JWEInvalid('Compact JWE must be a string or Uint8Array');\n    }\n    const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length, } = jwe.split('.');\n    if (length !== 5) {\n        throw new errors_js_1.JWEInvalid('Invalid Compact JWE');\n    }\n    const decrypted = await (0, decrypt_js_1.flattenedDecrypt)({\n        ciphertext,\n        iv: iv || undefined,\n        protected: protectedHeader,\n        tag: tag || undefined,\n        encrypted_key: encryptedKey || undefined,\n    }, key, options);\n    const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader };\n    if (typeof key === 'function') {\n        return { ...result, key: decrypted.key };\n    }\n    return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generalDecrypt = generalDecrypt;\nconst decrypt_js_1 = require(\"../flattened/decrypt.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst is_object_js_1 = require(\"../../lib/is_object.js\");\nasync function generalDecrypt(jwe, key, options) {\n    if (!(0, is_object_js_1.default)(jwe)) {\n        throw new errors_js_1.JWEInvalid('General JWE must be an object');\n    }\n    if (!Array.isArray(jwe.recipients) || !jwe.recipients.every(is_object_js_1.default)) {\n        throw new errors_js_1.JWEInvalid('JWE Recipients missing or incorrect type');\n    }\n    if (!jwe.recipients.length) {\n        throw new errors_js_1.JWEInvalid('JWE Recipients has no members');\n    }\n    for (const recipient of jwe.recipients) {\n        try {\n            return await (0, decrypt_js_1.flattenedDecrypt)({\n                aad: jwe.aad,\n                ciphertext: jwe.ciphertext,\n                encrypted_key: recipient.encrypted_key,\n                header: recipient.header,\n                iv: jwe.iv,\n                protected: jwe.protected,\n                tag: jwe.tag,\n                unprotected: jwe.unprotected,\n            }, key, options);\n        }\n        catch {\n        }\n    }\n    throw new errors_js_1.JWEDecryptionFailed();\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unprotected = void 0;\nexports.unprotected = Symbol();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst node_crypto_1 = require(\"node:crypto\");\nconst base64url_js_1 = require(\"./base64url.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst is_key_object_js_1 = require(\"./is_key_object.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nconst keyToJWK = (key) => {\n    let keyObject;\n    if ((0, webcrypto_js_1.isCryptoKey)(key)) {\n        if (!key.extractable) {\n            throw new TypeError('CryptoKey is not extractable');\n        }\n        keyObject = node_crypto_1.KeyObject.from(key);\n    }\n    else if ((0, is_key_object_js_1.default)(key)) {\n        keyObject = key;\n    }\n    else if (key instanceof Uint8Array) {\n        return {\n            kty: 'oct',\n            k: (0, base64url_js_1.encode)(key),\n        };\n    }\n    else {\n        throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array'));\n    }\n    if (keyObject.type !== 'secret' &&\n        !['rsa', 'ec', 'ed25519', 'x25519', 'ed448', 'x448'].includes(keyObject.asymmetricKeyType)) {\n        throw new errors_js_1.JOSENotSupported('Unsupported key asymmetricKeyType');\n    }\n    return keyObject.export({ format: 'jwk' });\n};\nexports.default = keyToJWK;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exportSPKI = exportSPKI;\nexports.exportPKCS8 = exportPKCS8;\nexports.exportJWK = exportJWK;\nconst asn1_js_1 = require(\"../runtime/asn1.js\");\nconst asn1_js_2 = require(\"../runtime/asn1.js\");\nconst key_to_jwk_js_1 = require(\"../runtime/key_to_jwk.js\");\nasync function exportSPKI(key) {\n    return (0, asn1_js_1.toSPKI)(key);\n}\nasync function exportPKCS8(key) {\n    return (0, asn1_js_2.toPKCS8)(key);\n}\nasync function exportJWK(key) {\n    return (0, key_to_jwk_js_1.default)(key);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst aeskw_js_1 = require(\"../runtime/aeskw.js\");\nconst ECDH = require(\"../runtime/ecdhes.js\");\nconst pbes2kw_js_1 = require(\"../runtime/pbes2kw.js\");\nconst rsaes_js_1 = require(\"../runtime/rsaes.js\");\nconst base64url_js_1 = require(\"../runtime/base64url.js\");\nconst normalize_key_js_1 = require(\"../runtime/normalize_key.js\");\nconst cek_js_1 = require(\"../lib/cek.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst export_js_1 = require(\"../key/export.js\");\nconst check_key_type_js_1 = require(\"./check_key_type.js\");\nconst aesgcmkw_js_1 = require(\"./aesgcmkw.js\");\nasync function encryptKeyManagement(alg, enc, key, providedCek, providedParameters = {}) {\n    let encryptedKey;\n    let parameters;\n    let cek;\n    (0, check_key_type_js_1.default)(alg, key, 'encrypt');\n    key = (await normalize_key_js_1.default.normalizePublicKey?.(key, alg)) || key;\n    switch (alg) {\n        case 'dir': {\n            cek = key;\n            break;\n        }\n        case 'ECDH-ES':\n        case 'ECDH-ES+A128KW':\n        case 'ECDH-ES+A192KW':\n        case 'ECDH-ES+A256KW': {\n            if (!ECDH.ecdhAllowed(key)) {\n                throw new errors_js_1.JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime');\n            }\n            const { apu, apv } = providedParameters;\n            let { epk: ephemeralKey } = providedParameters;\n            ephemeralKey ||= (await ECDH.generateEpk(key)).privateKey;\n            const { x, y, crv, kty } = await (0, export_js_1.exportJWK)(ephemeralKey);\n            const sharedSecret = await ECDH.deriveKey(key, ephemeralKey, alg === 'ECDH-ES' ? enc : alg, alg === 'ECDH-ES' ? (0, cek_js_1.bitLength)(enc) : parseInt(alg.slice(-5, -2), 10), apu, apv);\n            parameters = { epk: { x, crv, kty } };\n            if (kty === 'EC')\n                parameters.epk.y = y;\n            if (apu)\n                parameters.apu = (0, base64url_js_1.encode)(apu);\n            if (apv)\n                parameters.apv = (0, base64url_js_1.encode)(apv);\n            if (alg === 'ECDH-ES') {\n                cek = sharedSecret;\n                break;\n            }\n            cek = providedCek || (0, cek_js_1.default)(enc);\n            const kwAlg = alg.slice(-6);\n            encryptedKey = await (0, aeskw_js_1.wrap)(kwAlg, sharedSecret, cek);\n            break;\n        }\n        case 'RSA1_5':\n        case 'RSA-OAEP':\n        case 'RSA-OAEP-256':\n        case 'RSA-OAEP-384':\n        case 'RSA-OAEP-512': {\n            cek = providedCek || (0, cek_js_1.default)(enc);\n            encryptedKey = await (0, rsaes_js_1.encrypt)(alg, key, cek);\n            break;\n        }\n        case 'PBES2-HS256+A128KW':\n        case 'PBES2-HS384+A192KW':\n        case 'PBES2-HS512+A256KW': {\n            cek = providedCek || (0, cek_js_1.default)(enc);\n            const { p2c, p2s } = providedParameters;\n            ({ encryptedKey, ...parameters } = await (0, pbes2kw_js_1.encrypt)(alg, key, cek, p2c, p2s));\n            break;\n        }\n        case 'A128KW':\n        case 'A192KW':\n        case 'A256KW': {\n            cek = providedCek || (0, cek_js_1.default)(enc);\n            encryptedKey = await (0, aeskw_js_1.wrap)(alg, key, cek);\n            break;\n        }\n        case 'A128GCMKW':\n        case 'A192GCMKW':\n        case 'A256GCMKW': {\n            cek = providedCek || (0, cek_js_1.default)(enc);\n            const { iv } = providedParameters;\n            ({ encryptedKey, ...parameters } = await (0, aesgcmkw_js_1.wrap)(alg, key, cek, iv));\n            break;\n        }\n        default: {\n            throw new errors_js_1.JOSENotSupported('Invalid or unsupported \"alg\" (JWE Algorithm) header value');\n        }\n    }\n    return { cek, encryptedKey, parameters };\n}\nexports.default = encryptKeyManagement;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FlattenedEncrypt = void 0;\nconst base64url_js_1 = require(\"../../runtime/base64url.js\");\nconst private_symbols_js_1 = require(\"../../lib/private_symbols.js\");\nconst encrypt_js_1 = require(\"../../runtime/encrypt.js\");\nconst encrypt_key_management_js_1 = require(\"../../lib/encrypt_key_management.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst is_disjoint_js_1 = require(\"../../lib/is_disjoint.js\");\nconst buffer_utils_js_1 = require(\"../../lib/buffer_utils.js\");\nconst validate_crit_js_1 = require(\"../../lib/validate_crit.js\");\nclass FlattenedEncrypt {\n    _plaintext;\n    _protectedHeader;\n    _sharedUnprotectedHeader;\n    _unprotectedHeader;\n    _aad;\n    _cek;\n    _iv;\n    _keyManagementParameters;\n    constructor(plaintext) {\n        if (!(plaintext instanceof Uint8Array)) {\n            throw new TypeError('plaintext must be an instance of Uint8Array');\n        }\n        this._plaintext = plaintext;\n    }\n    setKeyManagementParameters(parameters) {\n        if (this._keyManagementParameters) {\n            throw new TypeError('setKeyManagementParameters can only be called once');\n        }\n        this._keyManagementParameters = parameters;\n        return this;\n    }\n    setProtectedHeader(protectedHeader) {\n        if (this._protectedHeader) {\n            throw new TypeError('setProtectedHeader can only be called once');\n        }\n        this._protectedHeader = protectedHeader;\n        return this;\n    }\n    setSharedUnprotectedHeader(sharedUnprotectedHeader) {\n        if (this._sharedUnprotectedHeader) {\n            throw new TypeError('setSharedUnprotectedHeader can only be called once');\n        }\n        this._sharedUnprotectedHeader = sharedUnprotectedHeader;\n        return this;\n    }\n    setUnprotectedHeader(unprotectedHeader) {\n        if (this._unprotectedHeader) {\n            throw new TypeError('setUnprotectedHeader can only be called once');\n        }\n        this._unprotectedHeader = unprotectedHeader;\n        return this;\n    }\n    setAdditionalAuthenticatedData(aad) {\n        this._aad = aad;\n        return this;\n    }\n    setContentEncryptionKey(cek) {\n        if (this._cek) {\n            throw new TypeError('setContentEncryptionKey can only be called once');\n        }\n        this._cek = cek;\n        return this;\n    }\n    setInitializationVector(iv) {\n        if (this._iv) {\n            throw new TypeError('setInitializationVector can only be called once');\n        }\n        this._iv = iv;\n        return this;\n    }\n    async encrypt(key, options) {\n        if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader) {\n            throw new errors_js_1.JWEInvalid('either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()');\n        }\n        if (!(0, is_disjoint_js_1.default)(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader)) {\n            throw new errors_js_1.JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint');\n        }\n        const joseHeader = {\n            ...this._protectedHeader,\n            ...this._unprotectedHeader,\n            ...this._sharedUnprotectedHeader,\n        };\n        (0, validate_crit_js_1.default)(errors_js_1.JWEInvalid, new Map(), options?.crit, this._protectedHeader, joseHeader);\n        if (joseHeader.zip !== undefined) {\n            throw new errors_js_1.JOSENotSupported('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.');\n        }\n        const { alg, enc } = joseHeader;\n        if (typeof alg !== 'string' || !alg) {\n            throw new errors_js_1.JWEInvalid('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');\n        }\n        if (typeof enc !== 'string' || !enc) {\n            throw new errors_js_1.JWEInvalid('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');\n        }\n        let encryptedKey;\n        if (this._cek && (alg === 'dir' || alg === 'ECDH-ES')) {\n            throw new TypeError(`setContentEncryptionKey cannot be called with JWE \"alg\" (Algorithm) Header ${alg}`);\n        }\n        let cek;\n        {\n            let parameters;\n            ({ cek, encryptedKey, parameters } = await (0, encrypt_key_management_js_1.default)(alg, enc, key, this._cek, this._keyManagementParameters));\n            if (parameters) {\n                if (options && private_symbols_js_1.unprotected in options) {\n                    if (!this._unprotectedHeader) {\n                        this.setUnprotectedHeader(parameters);\n                    }\n                    else {\n                        this._unprotectedHeader = { ...this._unprotectedHeader, ...parameters };\n                    }\n                }\n                else if (!this._protectedHeader) {\n                    this.setProtectedHeader(parameters);\n                }\n                else {\n                    this._protectedHeader = { ...this._protectedHeader, ...parameters };\n                }\n            }\n        }\n        let additionalData;\n        let protectedHeader;\n        let aadMember;\n        if (this._protectedHeader) {\n            protectedHeader = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(JSON.stringify(this._protectedHeader)));\n        }\n        else {\n            protectedHeader = buffer_utils_js_1.encoder.encode('');\n        }\n        if (this._aad) {\n            aadMember = (0, base64url_js_1.encode)(this._aad);\n            additionalData = (0, buffer_utils_js_1.concat)(protectedHeader, buffer_utils_js_1.encoder.encode('.'), buffer_utils_js_1.encoder.encode(aadMember));\n        }\n        else {\n            additionalData = protectedHeader;\n        }\n        const { ciphertext, tag, iv } = await (0, encrypt_js_1.default)(enc, this._plaintext, cek, this._iv, additionalData);\n        const jwe = {\n            ciphertext: (0, base64url_js_1.encode)(ciphertext),\n        };\n        if (iv) {\n            jwe.iv = (0, base64url_js_1.encode)(iv);\n        }\n        if (tag) {\n            jwe.tag = (0, base64url_js_1.encode)(tag);\n        }\n        if (encryptedKey) {\n            jwe.encrypted_key = (0, base64url_js_1.encode)(encryptedKey);\n        }\n        if (aadMember) {\n            jwe.aad = aadMember;\n        }\n        if (this._protectedHeader) {\n            jwe.protected = buffer_utils_js_1.decoder.decode(protectedHeader);\n        }\n        if (this._sharedUnprotectedHeader) {\n            jwe.unprotected = this._sharedUnprotectedHeader;\n        }\n        if (this._unprotectedHeader) {\n            jwe.header = this._unprotectedHeader;\n        }\n        return jwe;\n    }\n}\nexports.FlattenedEncrypt = FlattenedEncrypt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GeneralEncrypt = void 0;\nconst encrypt_js_1 = require(\"../flattened/encrypt.js\");\nconst private_symbols_js_1 = require(\"../../lib/private_symbols.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst cek_js_1 = require(\"../../lib/cek.js\");\nconst is_disjoint_js_1 = require(\"../../lib/is_disjoint.js\");\nconst encrypt_key_management_js_1 = require(\"../../lib/encrypt_key_management.js\");\nconst base64url_js_1 = require(\"../../runtime/base64url.js\");\nconst validate_crit_js_1 = require(\"../../lib/validate_crit.js\");\nclass IndividualRecipient {\n    parent;\n    unprotectedHeader;\n    key;\n    options;\n    constructor(enc, key, options) {\n        this.parent = enc;\n        this.key = key;\n        this.options = options;\n    }\n    setUnprotectedHeader(unprotectedHeader) {\n        if (this.unprotectedHeader) {\n            throw new TypeError('setUnprotectedHeader can only be called once');\n        }\n        this.unprotectedHeader = unprotectedHeader;\n        return this;\n    }\n    addRecipient(...args) {\n        return this.parent.addRecipient(...args);\n    }\n    encrypt(...args) {\n        return this.parent.encrypt(...args);\n    }\n    done() {\n        return this.parent;\n    }\n}\nclass GeneralEncrypt {\n    _plaintext;\n    _recipients = [];\n    _protectedHeader;\n    _unprotectedHeader;\n    _aad;\n    constructor(plaintext) {\n        this._plaintext = plaintext;\n    }\n    addRecipient(key, options) {\n        const recipient = new IndividualRecipient(this, key, { crit: options?.crit });\n        this._recipients.push(recipient);\n        return recipient;\n    }\n    setProtectedHeader(protectedHeader) {\n        if (this._protectedHeader) {\n            throw new TypeError('setProtectedHeader can only be called once');\n        }\n        this._protectedHeader = protectedHeader;\n        return this;\n    }\n    setSharedUnprotectedHeader(sharedUnprotectedHeader) {\n        if (this._unprotectedHeader) {\n            throw new TypeError('setSharedUnprotectedHeader can only be called once');\n        }\n        this._unprotectedHeader = sharedUnprotectedHeader;\n        return this;\n    }\n    setAdditionalAuthenticatedData(aad) {\n        this._aad = aad;\n        return this;\n    }\n    async encrypt() {\n        if (!this._recipients.length) {\n            throw new errors_js_1.JWEInvalid('at least one recipient must be added');\n        }\n        if (this._recipients.length === 1) {\n            const [recipient] = this._recipients;\n            const flattened = await new encrypt_js_1.FlattenedEncrypt(this._plaintext)\n                .setAdditionalAuthenticatedData(this._aad)\n                .setProtectedHeader(this._protectedHeader)\n                .setSharedUnprotectedHeader(this._unprotectedHeader)\n                .setUnprotectedHeader(recipient.unprotectedHeader)\n                .encrypt(recipient.key, { ...recipient.options });\n            const jwe = {\n                ciphertext: flattened.ciphertext,\n                iv: flattened.iv,\n                recipients: [{}],\n                tag: flattened.tag,\n            };\n            if (flattened.aad)\n                jwe.aad = flattened.aad;\n            if (flattened.protected)\n                jwe.protected = flattened.protected;\n            if (flattened.unprotected)\n                jwe.unprotected = flattened.unprotected;\n            if (flattened.encrypted_key)\n                jwe.recipients[0].encrypted_key = flattened.encrypted_key;\n            if (flattened.header)\n                jwe.recipients[0].header = flattened.header;\n            return jwe;\n        }\n        let enc;\n        for (let i = 0; i < this._recipients.length; i++) {\n            const recipient = this._recipients[i];\n            if (!(0, is_disjoint_js_1.default)(this._protectedHeader, this._unprotectedHeader, recipient.unprotectedHeader)) {\n                throw new errors_js_1.JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint');\n            }\n            const joseHeader = {\n                ...this._protectedHeader,\n                ...this._unprotectedHeader,\n                ...recipient.unprotectedHeader,\n            };\n            const { alg } = joseHeader;\n            if (typeof alg !== 'string' || !alg) {\n                throw new errors_js_1.JWEInvalid('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');\n            }\n            if (alg === 'dir' || alg === 'ECDH-ES') {\n                throw new errors_js_1.JWEInvalid('\"dir\" and \"ECDH-ES\" alg may only be used with a single recipient');\n            }\n            if (typeof joseHeader.enc !== 'string' || !joseHeader.enc) {\n                throw new errors_js_1.JWEInvalid('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');\n            }\n            if (!enc) {\n                enc = joseHeader.enc;\n            }\n            else if (enc !== joseHeader.enc) {\n                throw new errors_js_1.JWEInvalid('JWE \"enc\" (Encryption Algorithm) Header Parameter must be the same for all recipients');\n            }\n            (0, validate_crit_js_1.default)(errors_js_1.JWEInvalid, new Map(), recipient.options.crit, this._protectedHeader, joseHeader);\n            if (joseHeader.zip !== undefined) {\n                throw new errors_js_1.JOSENotSupported('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.');\n            }\n        }\n        const cek = (0, cek_js_1.default)(enc);\n        const jwe = {\n            ciphertext: '',\n            iv: '',\n            recipients: [],\n            tag: '',\n        };\n        for (let i = 0; i < this._recipients.length; i++) {\n            const recipient = this._recipients[i];\n            const target = {};\n            jwe.recipients.push(target);\n            const joseHeader = {\n                ...this._protectedHeader,\n                ...this._unprotectedHeader,\n                ...recipient.unprotectedHeader,\n            };\n            const p2c = joseHeader.alg.startsWith('PBES2') ? 2048 + i : undefined;\n            if (i === 0) {\n                const flattened = await new encrypt_js_1.FlattenedEncrypt(this._plaintext)\n                    .setAdditionalAuthenticatedData(this._aad)\n                    .setContentEncryptionKey(cek)\n                    .setProtectedHeader(this._protectedHeader)\n                    .setSharedUnprotectedHeader(this._unprotectedHeader)\n                    .setUnprotectedHeader(recipient.unprotectedHeader)\n                    .setKeyManagementParameters({ p2c })\n                    .encrypt(recipient.key, {\n                    ...recipient.options,\n                    [private_symbols_js_1.unprotected]: true,\n                });\n                jwe.ciphertext = flattened.ciphertext;\n                jwe.iv = flattened.iv;\n                jwe.tag = flattened.tag;\n                if (flattened.aad)\n                    jwe.aad = flattened.aad;\n                if (flattened.protected)\n                    jwe.protected = flattened.protected;\n                if (flattened.unprotected)\n                    jwe.unprotected = flattened.unprotected;\n                target.encrypted_key = flattened.encrypted_key;\n                if (flattened.header)\n                    target.header = flattened.header;\n                continue;\n            }\n            const { encryptedKey, parameters } = await (0, encrypt_key_management_js_1.default)(recipient.unprotectedHeader?.alg ||\n                this._protectedHeader?.alg ||\n                this._unprotectedHeader?.alg, enc, recipient.key, cek, { p2c });\n            target.encrypted_key = (0, base64url_js_1.encode)(encryptedKey);\n            if (recipient.unprotectedHeader || parameters)\n                target.header = { ...recipient.unprotectedHeader, ...parameters };\n        }\n        return jwe;\n    }\n}\nexports.GeneralEncrypt = GeneralEncrypt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = dsaDigest;\nconst errors_js_1 = require(\"../util/errors.js\");\nfunction dsaDigest(alg) {\n    switch (alg) {\n        case 'PS256':\n        case 'RS256':\n        case 'ES256':\n        case 'ES256K':\n            return 'sha256';\n        case 'PS384':\n        case 'RS384':\n        case 'ES384':\n            return 'sha384';\n        case 'PS512':\n        case 'RS512':\n        case 'ES512':\n            return 'sha512';\n        case 'Ed25519':\n        case 'EdDSA':\n            return undefined;\n        default:\n            throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = keyForCrypto;\nconst node_crypto_1 = require(\"node:crypto\");\nconst get_named_curve_js_1 = require(\"./get_named_curve.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst check_key_length_js_1 = require(\"./check_key_length.js\");\nconst ecCurveAlgMap = new Map([\n    ['ES256', 'P-256'],\n    ['ES256K', 'secp256k1'],\n    ['ES384', 'P-384'],\n    ['ES512', 'P-521'],\n]);\nfunction keyForCrypto(alg, key) {\n    let asymmetricKeyType;\n    let asymmetricKeyDetails;\n    let isJWK;\n    if (key instanceof node_crypto_1.KeyObject) {\n        asymmetricKeyType = key.asymmetricKeyType;\n        asymmetricKeyDetails = key.asymmetricKeyDetails;\n    }\n    else {\n        isJWK = true;\n        switch (key.kty) {\n            case 'RSA':\n                asymmetricKeyType = 'rsa';\n                break;\n            case 'EC':\n                asymmetricKeyType = 'ec';\n                break;\n            case 'OKP': {\n                if (key.crv === 'Ed25519') {\n                    asymmetricKeyType = 'ed25519';\n                    break;\n                }\n                if (key.crv === 'Ed448') {\n                    asymmetricKeyType = 'ed448';\n                    break;\n                }\n                throw new TypeError('Invalid key for this operation, its crv must be Ed25519 or Ed448');\n            }\n            default:\n                throw new TypeError('Invalid key for this operation, its kty must be RSA, OKP, or EC');\n        }\n    }\n    let options;\n    switch (alg) {\n        case 'Ed25519':\n            if (asymmetricKeyType !== 'ed25519') {\n                throw new TypeError(`Invalid key for this operation, its asymmetricKeyType must be ed25519`);\n            }\n            break;\n        case 'EdDSA':\n            if (!['ed25519', 'ed448'].includes(asymmetricKeyType)) {\n                throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448');\n            }\n            break;\n        case 'RS256':\n        case 'RS384':\n        case 'RS512':\n            if (asymmetricKeyType !== 'rsa') {\n                throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa');\n            }\n            (0, check_key_length_js_1.default)(key, alg);\n            break;\n        case 'PS256':\n        case 'PS384':\n        case 'PS512':\n            if (asymmetricKeyType === 'rsa-pss') {\n                const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = asymmetricKeyDetails;\n                const length = parseInt(alg.slice(-3), 10);\n                if (hashAlgorithm !== undefined &&\n                    (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm)) {\n                    throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of \"alg\" ${alg}`);\n                }\n                if (saltLength !== undefined && saltLength > length >> 3) {\n                    throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of \"alg\" ${alg}`);\n                }\n            }\n            else if (asymmetricKeyType !== 'rsa') {\n                throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss');\n            }\n            (0, check_key_length_js_1.default)(key, alg);\n            options = {\n                padding: node_crypto_1.constants.RSA_PKCS1_PSS_PADDING,\n                saltLength: node_crypto_1.constants.RSA_PSS_SALTLEN_DIGEST,\n            };\n            break;\n        case 'ES256':\n        case 'ES256K':\n        case 'ES384':\n        case 'ES512': {\n            if (asymmetricKeyType !== 'ec') {\n                throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ec');\n            }\n            const actual = (0, get_named_curve_js_1.default)(key);\n            const expected = ecCurveAlgMap.get(alg);\n            if (actual !== expected) {\n                throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${expected}, got ${actual}`);\n            }\n            options = { dsaEncoding: 'ieee-p1363' };\n            break;\n        }\n        default:\n            throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n    }\n    if (isJWK) {\n        return { format: 'jwk', key, ...options };\n    }\n    return options ? { ...options, key } : key;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = hmacDigest;\nconst errors_js_1 = require(\"../util/errors.js\");\nfunction hmacDigest(alg) {\n    switch (alg) {\n        case 'HS256':\n            return 'sha256';\n        case 'HS384':\n            return 'sha384';\n        case 'HS512':\n            return 'sha512';\n        default:\n            throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = getSignVerifyKey;\nconst node_crypto_1 = require(\"node:crypto\");\nconst webcrypto_js_1 = require(\"./webcrypto.js\");\nconst crypto_key_js_1 = require(\"../lib/crypto_key.js\");\nconst invalid_key_input_js_1 = require(\"../lib/invalid_key_input.js\");\nconst is_key_like_js_1 = require(\"./is_key_like.js\");\nconst jwk = require(\"../lib/is_jwk.js\");\nfunction getSignVerifyKey(alg, key, usage) {\n    if (key instanceof Uint8Array) {\n        if (!alg.startsWith('HS')) {\n            throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types));\n        }\n        return (0, node_crypto_1.createSecretKey)(key);\n    }\n    if (key instanceof node_crypto_1.KeyObject) {\n        return key;\n    }\n    if ((0, webcrypto_js_1.isCryptoKey)(key)) {\n        (0, crypto_key_js_1.checkSigCryptoKey)(key, alg, usage);\n        return node_crypto_1.KeyObject.from(key);\n    }\n    if (jwk.isJWK(key)) {\n        if (alg.startsWith('HS')) {\n            return (0, node_crypto_1.createSecretKey)(Buffer.from(key.k, 'base64url'));\n        }\n        return key;\n    }\n    throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array', 'JSON Web Key'));\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto = require(\"node:crypto\");\nconst node_util_1 = require(\"node:util\");\nconst dsa_digest_js_1 = require(\"./dsa_digest.js\");\nconst hmac_digest_js_1 = require(\"./hmac_digest.js\");\nconst node_key_js_1 = require(\"./node_key.js\");\nconst get_sign_verify_key_js_1 = require(\"./get_sign_verify_key.js\");\nconst oneShotSign = (0, node_util_1.promisify)(crypto.sign);\nconst sign = async (alg, key, data) => {\n    const k = (0, get_sign_verify_key_js_1.default)(alg, key, 'sign');\n    if (alg.startsWith('HS')) {\n        const hmac = crypto.createHmac((0, hmac_digest_js_1.default)(alg), k);\n        hmac.update(data);\n        return hmac.digest();\n    }\n    return oneShotSign((0, dsa_digest_js_1.default)(alg), data, (0, node_key_js_1.default)(alg, k));\n};\nexports.default = sign;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto = require(\"node:crypto\");\nconst node_util_1 = require(\"node:util\");\nconst dsa_digest_js_1 = require(\"./dsa_digest.js\");\nconst node_key_js_1 = require(\"./node_key.js\");\nconst sign_js_1 = require(\"./sign.js\");\nconst get_sign_verify_key_js_1 = require(\"./get_sign_verify_key.js\");\nconst oneShotVerify = (0, node_util_1.promisify)(crypto.verify);\nconst verify = async (alg, key, signature, data) => {\n    const k = (0, get_sign_verify_key_js_1.default)(alg, key, 'verify');\n    if (alg.startsWith('HS')) {\n        const expected = await (0, sign_js_1.default)(alg, k, data);\n        const actual = signature;\n        try {\n            return crypto.timingSafeEqual(actual, expected);\n        }\n        catch {\n            return false;\n        }\n    }\n    const algorithm = (0, dsa_digest_js_1.default)(alg);\n    const keyInput = (0, node_key_js_1.default)(alg, k);\n    try {\n        return await oneShotVerify(algorithm, data, keyInput, signature);\n    }\n    catch {\n        return false;\n    }\n};\nexports.default = verify;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenedVerify = flattenedVerify;\nconst base64url_js_1 = require(\"../../runtime/base64url.js\");\nconst verify_js_1 = require(\"../../runtime/verify.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../../lib/buffer_utils.js\");\nconst is_disjoint_js_1 = require(\"../../lib/is_disjoint.js\");\nconst is_object_js_1 = require(\"../../lib/is_object.js\");\nconst check_key_type_js_1 = require(\"../../lib/check_key_type.js\");\nconst validate_crit_js_1 = require(\"../../lib/validate_crit.js\");\nconst validate_algorithms_js_1 = require(\"../../lib/validate_algorithms.js\");\nconst is_jwk_js_1 = require(\"../../lib/is_jwk.js\");\nconst import_js_1 = require(\"../../key/import.js\");\nasync function flattenedVerify(jws, key, options) {\n    if (!(0, is_object_js_1.default)(jws)) {\n        throw new errors_js_1.JWSInvalid('Flattened JWS must be an object');\n    }\n    if (jws.protected === undefined && jws.header === undefined) {\n        throw new errors_js_1.JWSInvalid('Flattened JWS must have either of the \"protected\" or \"header\" members');\n    }\n    if (jws.protected !== undefined && typeof jws.protected !== 'string') {\n        throw new errors_js_1.JWSInvalid('JWS Protected Header incorrect type');\n    }\n    if (jws.payload === undefined) {\n        throw new errors_js_1.JWSInvalid('JWS Payload missing');\n    }\n    if (typeof jws.signature !== 'string') {\n        throw new errors_js_1.JWSInvalid('JWS Signature missing or incorrect type');\n    }\n    if (jws.header !== undefined && !(0, is_object_js_1.default)(jws.header)) {\n        throw new errors_js_1.JWSInvalid('JWS Unprotected Header incorrect type');\n    }\n    let parsedProt = {};\n    if (jws.protected) {\n        try {\n            const protectedHeader = (0, base64url_js_1.decode)(jws.protected);\n            parsedProt = JSON.parse(buffer_utils_js_1.decoder.decode(protectedHeader));\n        }\n        catch {\n            throw new errors_js_1.JWSInvalid('JWS Protected Header is invalid');\n        }\n    }\n    if (!(0, is_disjoint_js_1.default)(parsedProt, jws.header)) {\n        throw new errors_js_1.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n    }\n    const joseHeader = {\n        ...parsedProt,\n        ...jws.header,\n    };\n    const extensions = (0, validate_crit_js_1.default)(errors_js_1.JWSInvalid, new Map([['b64', true]]), options?.crit, parsedProt, joseHeader);\n    let b64 = true;\n    if (extensions.has('b64')) {\n        b64 = parsedProt.b64;\n        if (typeof b64 !== 'boolean') {\n            throw new errors_js_1.JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n        }\n    }\n    const { alg } = joseHeader;\n    if (typeof alg !== 'string' || !alg) {\n        throw new errors_js_1.JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n    }\n    const algorithms = options && (0, validate_algorithms_js_1.default)('algorithms', options.algorithms);\n    if (algorithms && !algorithms.has(alg)) {\n        throw new errors_js_1.JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter value not allowed');\n    }\n    if (b64) {\n        if (typeof jws.payload !== 'string') {\n            throw new errors_js_1.JWSInvalid('JWS Payload must be a string');\n        }\n    }\n    else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) {\n        throw new errors_js_1.JWSInvalid('JWS Payload must be a string or an Uint8Array instance');\n    }\n    let resolvedKey = false;\n    if (typeof key === 'function') {\n        key = await key(parsedProt, jws);\n        resolvedKey = true;\n        (0, check_key_type_js_1.checkKeyTypeWithJwk)(alg, key, 'verify');\n        if ((0, is_jwk_js_1.isJWK)(key)) {\n            key = await (0, import_js_1.importJWK)(key, alg);\n        }\n    }\n    else {\n        (0, check_key_type_js_1.checkKeyTypeWithJwk)(alg, key, 'verify');\n    }\n    const data = (0, buffer_utils_js_1.concat)(buffer_utils_js_1.encoder.encode(jws.protected ?? ''), buffer_utils_js_1.encoder.encode('.'), typeof jws.payload === 'string' ? buffer_utils_js_1.encoder.encode(jws.payload) : jws.payload);\n    let signature;\n    try {\n        signature = (0, base64url_js_1.decode)(jws.signature);\n    }\n    catch {\n        throw new errors_js_1.JWSInvalid('Failed to base64url decode the signature');\n    }\n    const verified = await (0, verify_js_1.default)(alg, key, signature, data);\n    if (!verified) {\n        throw new errors_js_1.JWSSignatureVerificationFailed();\n    }\n    let payload;\n    if (b64) {\n        try {\n            payload = (0, base64url_js_1.decode)(jws.payload);\n        }\n        catch {\n            throw new errors_js_1.JWSInvalid('Failed to base64url decode the payload');\n        }\n    }\n    else if (typeof jws.payload === 'string') {\n        payload = buffer_utils_js_1.encoder.encode(jws.payload);\n    }\n    else {\n        payload = jws.payload;\n    }\n    const result = { payload };\n    if (jws.protected !== undefined) {\n        result.protectedHeader = parsedProt;\n    }\n    if (jws.header !== undefined) {\n        result.unprotectedHeader = jws.header;\n    }\n    if (resolvedKey) {\n        return { ...result, key };\n    }\n    return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.compactVerify = compactVerify;\nconst verify_js_1 = require(\"../flattened/verify.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../../lib/buffer_utils.js\");\nasync function compactVerify(jws, key, options) {\n    if (jws instanceof Uint8Array) {\n        jws = buffer_utils_js_1.decoder.decode(jws);\n    }\n    if (typeof jws !== 'string') {\n        throw new errors_js_1.JWSInvalid('Compact JWS must be a string or Uint8Array');\n    }\n    const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');\n    if (length !== 3) {\n        throw new errors_js_1.JWSInvalid('Invalid Compact JWS');\n    }\n    const verified = await (0, verify_js_1.flattenedVerify)({ payload, protected: protectedHeader, signature }, key, options);\n    const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };\n    if (typeof key === 'function') {\n        return { ...result, key: verified.key };\n    }\n    return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generalVerify = generalVerify;\nconst verify_js_1 = require(\"../flattened/verify.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst is_object_js_1 = require(\"../../lib/is_object.js\");\nasync function generalVerify(jws, key, options) {\n    if (!(0, is_object_js_1.default)(jws)) {\n        throw new errors_js_1.JWSInvalid('General JWS must be an object');\n    }\n    if (!Array.isArray(jws.signatures) || !jws.signatures.every(is_object_js_1.default)) {\n        throw new errors_js_1.JWSInvalid('JWS Signatures missing or incorrect type');\n    }\n    for (const signature of jws.signatures) {\n        try {\n            return await (0, verify_js_1.flattenedVerify)({\n                header: signature.header,\n                payload: jws.payload,\n                protected: signature.protected,\n                signature: signature.signature,\n            }, key, options);\n        }\n        catch {\n        }\n    }\n    throw new errors_js_1.JWSSignatureVerificationFailed();\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = (date) => Math.floor(date.getTime() / 1000);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst minute = 60;\nconst hour = minute * 60;\nconst day = hour * 24;\nconst week = day * 7;\nconst year = day * 365.25;\nconst REGEX = /^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;\nexports.default = (str) => {\n    const matched = REGEX.exec(str);\n    if (!matched || (matched[4] && matched[1])) {\n        throw new TypeError('Invalid time period format');\n    }\n    const value = parseFloat(matched[2]);\n    const unit = matched[3].toLowerCase();\n    let numericDate;\n    switch (unit) {\n        case 'sec':\n        case 'secs':\n        case 'second':\n        case 'seconds':\n        case 's':\n            numericDate = Math.round(value);\n            break;\n        case 'minute':\n        case 'minutes':\n        case 'min':\n        case 'mins':\n        case 'm':\n            numericDate = Math.round(value * minute);\n            break;\n        case 'hour':\n        case 'hours':\n        case 'hr':\n        case 'hrs':\n        case 'h':\n            numericDate = Math.round(value * hour);\n            break;\n        case 'day':\n        case 'days':\n        case 'd':\n            numericDate = Math.round(value * day);\n            break;\n        case 'week':\n        case 'weeks':\n        case 'w':\n            numericDate = Math.round(value * week);\n            break;\n        default:\n            numericDate = Math.round(value * year);\n            break;\n    }\n    if (matched[1] === '-' || matched[4] === 'ago') {\n        return -numericDate;\n    }\n    return numericDate;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst errors_js_1 = require(\"../util/errors.js\");\nconst buffer_utils_js_1 = require(\"./buffer_utils.js\");\nconst epoch_js_1 = require(\"./epoch.js\");\nconst secs_js_1 = require(\"./secs.js\");\nconst is_object_js_1 = require(\"./is_object.js\");\nconst normalizeTyp = (value) => value.toLowerCase().replace(/^application\\//, '');\nconst checkAudiencePresence = (audPayload, audOption) => {\n    if (typeof audPayload === 'string') {\n        return audOption.includes(audPayload);\n    }\n    if (Array.isArray(audPayload)) {\n        return audOption.some(Set.prototype.has.bind(new Set(audPayload)));\n    }\n    return false;\n};\nexports.default = (protectedHeader, encodedPayload, options = {}) => {\n    let payload;\n    try {\n        payload = JSON.parse(buffer_utils_js_1.decoder.decode(encodedPayload));\n    }\n    catch {\n    }\n    if (!(0, is_object_js_1.default)(payload)) {\n        throw new errors_js_1.JWTInvalid('JWT Claims Set must be a top-level JSON object');\n    }\n    const { typ } = options;\n    if (typ &&\n        (typeof protectedHeader.typ !== 'string' ||\n            normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {\n        throw new errors_js_1.JWTClaimValidationFailed('unexpected \"typ\" JWT header value', payload, 'typ', 'check_failed');\n    }\n    const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;\n    const presenceCheck = [...requiredClaims];\n    if (maxTokenAge !== undefined)\n        presenceCheck.push('iat');\n    if (audience !== undefined)\n        presenceCheck.push('aud');\n    if (subject !== undefined)\n        presenceCheck.push('sub');\n    if (issuer !== undefined)\n        presenceCheck.push('iss');\n    for (const claim of new Set(presenceCheck.reverse())) {\n        if (!(claim in payload)) {\n            throw new errors_js_1.JWTClaimValidationFailed(`missing required \"${claim}\" claim`, payload, claim, 'missing');\n        }\n    }\n    if (issuer &&\n        !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {\n        throw new errors_js_1.JWTClaimValidationFailed('unexpected \"iss\" claim value', payload, 'iss', 'check_failed');\n    }\n    if (subject && payload.sub !== subject) {\n        throw new errors_js_1.JWTClaimValidationFailed('unexpected \"sub\" claim value', payload, 'sub', 'check_failed');\n    }\n    if (audience &&\n        !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {\n        throw new errors_js_1.JWTClaimValidationFailed('unexpected \"aud\" claim value', payload, 'aud', 'check_failed');\n    }\n    let tolerance;\n    switch (typeof options.clockTolerance) {\n        case 'string':\n            tolerance = (0, secs_js_1.default)(options.clockTolerance);\n            break;\n        case 'number':\n            tolerance = options.clockTolerance;\n            break;\n        case 'undefined':\n            tolerance = 0;\n            break;\n        default:\n            throw new TypeError('Invalid clockTolerance option type');\n    }\n    const { currentDate } = options;\n    const now = (0, epoch_js_1.default)(currentDate || new Date());\n    if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {\n        throw new errors_js_1.JWTClaimValidationFailed('\"iat\" claim must be a number', payload, 'iat', 'invalid');\n    }\n    if (payload.nbf !== undefined) {\n        if (typeof payload.nbf !== 'number') {\n            throw new errors_js_1.JWTClaimValidationFailed('\"nbf\" claim must be a number', payload, 'nbf', 'invalid');\n        }\n        if (payload.nbf > now + tolerance) {\n            throw new errors_js_1.JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', payload, 'nbf', 'check_failed');\n        }\n    }\n    if (payload.exp !== undefined) {\n        if (typeof payload.exp !== 'number') {\n            throw new errors_js_1.JWTClaimValidationFailed('\"exp\" claim must be a number', payload, 'exp', 'invalid');\n        }\n        if (payload.exp <= now - tolerance) {\n            throw new errors_js_1.JWTExpired('\"exp\" claim timestamp check failed', payload, 'exp', 'check_failed');\n        }\n    }\n    if (maxTokenAge) {\n        const age = now - payload.iat;\n        const max = typeof maxTokenAge === 'number' ? maxTokenAge : (0, secs_js_1.default)(maxTokenAge);\n        if (age - tolerance > max) {\n            throw new errors_js_1.JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', payload, 'iat', 'check_failed');\n        }\n        if (age < 0 - tolerance) {\n            throw new errors_js_1.JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', payload, 'iat', 'check_failed');\n        }\n    }\n    return payload;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.jwtVerify = jwtVerify;\nconst verify_js_1 = require(\"../jws/compact/verify.js\");\nconst jwt_claims_set_js_1 = require(\"../lib/jwt_claims_set.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nasync function jwtVerify(jwt, key, options) {\n    const verified = await (0, verify_js_1.compactVerify)(jwt, key, options);\n    if (verified.protectedHeader.crit?.includes('b64') && verified.protectedHeader.b64 === false) {\n        throw new errors_js_1.JWTInvalid('JWTs MUST NOT use unencoded payload');\n    }\n    const payload = (0, jwt_claims_set_js_1.default)(verified.protectedHeader, verified.payload, options);\n    const result = { payload, protectedHeader: verified.protectedHeader };\n    if (typeof key === 'function') {\n        return { ...result, key: verified.key };\n    }\n    return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.jwtDecrypt = jwtDecrypt;\nconst decrypt_js_1 = require(\"../jwe/compact/decrypt.js\");\nconst jwt_claims_set_js_1 = require(\"../lib/jwt_claims_set.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nasync function jwtDecrypt(jwt, key, options) {\n    const decrypted = await (0, decrypt_js_1.compactDecrypt)(jwt, key, options);\n    const payload = (0, jwt_claims_set_js_1.default)(decrypted.protectedHeader, decrypted.plaintext, options);\n    const { protectedHeader } = decrypted;\n    if (protectedHeader.iss !== undefined && protectedHeader.iss !== payload.iss) {\n        throw new errors_js_1.JWTClaimValidationFailed('replicated \"iss\" claim header parameter mismatch', payload, 'iss', 'mismatch');\n    }\n    if (protectedHeader.sub !== undefined && protectedHeader.sub !== payload.sub) {\n        throw new errors_js_1.JWTClaimValidationFailed('replicated \"sub\" claim header parameter mismatch', payload, 'sub', 'mismatch');\n    }\n    if (protectedHeader.aud !== undefined &&\n        JSON.stringify(protectedHeader.aud) !== JSON.stringify(payload.aud)) {\n        throw new errors_js_1.JWTClaimValidationFailed('replicated \"aud\" claim header parameter mismatch', payload, 'aud', 'mismatch');\n    }\n    const result = { payload, protectedHeader };\n    if (typeof key === 'function') {\n        return { ...result, key: decrypted.key };\n    }\n    return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompactEncrypt = void 0;\nconst encrypt_js_1 = require(\"../flattened/encrypt.js\");\nclass CompactEncrypt {\n    _flattened;\n    constructor(plaintext) {\n        this._flattened = new encrypt_js_1.FlattenedEncrypt(plaintext);\n    }\n    setContentEncryptionKey(cek) {\n        this._flattened.setContentEncryptionKey(cek);\n        return this;\n    }\n    setInitializationVector(iv) {\n        this._flattened.setInitializationVector(iv);\n        return this;\n    }\n    setProtectedHeader(protectedHeader) {\n        this._flattened.setProtectedHeader(protectedHeader);\n        return this;\n    }\n    setKeyManagementParameters(parameters) {\n        this._flattened.setKeyManagementParameters(parameters);\n        return this;\n    }\n    async encrypt(key, options) {\n        const jwe = await this._flattened.encrypt(key, options);\n        return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.');\n    }\n}\nexports.CompactEncrypt = CompactEncrypt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FlattenedSign = void 0;\nconst base64url_js_1 = require(\"../../runtime/base64url.js\");\nconst sign_js_1 = require(\"../../runtime/sign.js\");\nconst is_disjoint_js_1 = require(\"../../lib/is_disjoint.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../../lib/buffer_utils.js\");\nconst check_key_type_js_1 = require(\"../../lib/check_key_type.js\");\nconst validate_crit_js_1 = require(\"../../lib/validate_crit.js\");\nclass FlattenedSign {\n    _payload;\n    _protectedHeader;\n    _unprotectedHeader;\n    constructor(payload) {\n        if (!(payload instanceof Uint8Array)) {\n            throw new TypeError('payload must be an instance of Uint8Array');\n        }\n        this._payload = payload;\n    }\n    setProtectedHeader(protectedHeader) {\n        if (this._protectedHeader) {\n            throw new TypeError('setProtectedHeader can only be called once');\n        }\n        this._protectedHeader = protectedHeader;\n        return this;\n    }\n    setUnprotectedHeader(unprotectedHeader) {\n        if (this._unprotectedHeader) {\n            throw new TypeError('setUnprotectedHeader can only be called once');\n        }\n        this._unprotectedHeader = unprotectedHeader;\n        return this;\n    }\n    async sign(key, options) {\n        if (!this._protectedHeader && !this._unprotectedHeader) {\n            throw new errors_js_1.JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');\n        }\n        if (!(0, is_disjoint_js_1.default)(this._protectedHeader, this._unprotectedHeader)) {\n            throw new errors_js_1.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n        }\n        const joseHeader = {\n            ...this._protectedHeader,\n            ...this._unprotectedHeader,\n        };\n        const extensions = (0, validate_crit_js_1.default)(errors_js_1.JWSInvalid, new Map([['b64', true]]), options?.crit, this._protectedHeader, joseHeader);\n        let b64 = true;\n        if (extensions.has('b64')) {\n            b64 = this._protectedHeader.b64;\n            if (typeof b64 !== 'boolean') {\n                throw new errors_js_1.JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n            }\n        }\n        const { alg } = joseHeader;\n        if (typeof alg !== 'string' || !alg) {\n            throw new errors_js_1.JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n        }\n        (0, check_key_type_js_1.checkKeyTypeWithJwk)(alg, key, 'sign');\n        let payload = this._payload;\n        if (b64) {\n            payload = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(payload));\n        }\n        let protectedHeader;\n        if (this._protectedHeader) {\n            protectedHeader = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(JSON.stringify(this._protectedHeader)));\n        }\n        else {\n            protectedHeader = buffer_utils_js_1.encoder.encode('');\n        }\n        const data = (0, buffer_utils_js_1.concat)(protectedHeader, buffer_utils_js_1.encoder.encode('.'), payload);\n        const signature = await (0, sign_js_1.default)(alg, key, data);\n        const jws = {\n            signature: (0, base64url_js_1.encode)(signature),\n            payload: '',\n        };\n        if (b64) {\n            jws.payload = buffer_utils_js_1.decoder.decode(payload);\n        }\n        if (this._unprotectedHeader) {\n            jws.header = this._unprotectedHeader;\n        }\n        if (this._protectedHeader) {\n            jws.protected = buffer_utils_js_1.decoder.decode(protectedHeader);\n        }\n        return jws;\n    }\n}\nexports.FlattenedSign = FlattenedSign;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompactSign = void 0;\nconst sign_js_1 = require(\"../flattened/sign.js\");\nclass CompactSign {\n    _flattened;\n    constructor(payload) {\n        this._flattened = new sign_js_1.FlattenedSign(payload);\n    }\n    setProtectedHeader(protectedHeader) {\n        this._flattened.setProtectedHeader(protectedHeader);\n        return this;\n    }\n    async sign(key, options) {\n        const jws = await this._flattened.sign(key, options);\n        if (jws.payload === undefined) {\n            throw new TypeError('use the flattened module for creating JWS with b64: false');\n        }\n        return `${jws.protected}.${jws.payload}.${jws.signature}`;\n    }\n}\nexports.CompactSign = CompactSign;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GeneralSign = void 0;\nconst sign_js_1 = require(\"../flattened/sign.js\");\nconst errors_js_1 = require(\"../../util/errors.js\");\nclass IndividualSignature {\n    parent;\n    protectedHeader;\n    unprotectedHeader;\n    options;\n    key;\n    constructor(sig, key, options) {\n        this.parent = sig;\n        this.key = key;\n        this.options = options;\n    }\n    setProtectedHeader(protectedHeader) {\n        if (this.protectedHeader) {\n            throw new TypeError('setProtectedHeader can only be called once');\n        }\n        this.protectedHeader = protectedHeader;\n        return this;\n    }\n    setUnprotectedHeader(unprotectedHeader) {\n        if (this.unprotectedHeader) {\n            throw new TypeError('setUnprotectedHeader can only be called once');\n        }\n        this.unprotectedHeader = unprotectedHeader;\n        return this;\n    }\n    addSignature(...args) {\n        return this.parent.addSignature(...args);\n    }\n    sign(...args) {\n        return this.parent.sign(...args);\n    }\n    done() {\n        return this.parent;\n    }\n}\nclass GeneralSign {\n    _payload;\n    _signatures = [];\n    constructor(payload) {\n        this._payload = payload;\n    }\n    addSignature(key, options) {\n        const signature = new IndividualSignature(this, key, options);\n        this._signatures.push(signature);\n        return signature;\n    }\n    async sign() {\n        if (!this._signatures.length) {\n            throw new errors_js_1.JWSInvalid('at least one signature must be added');\n        }\n        const jws = {\n            signatures: [],\n            payload: '',\n        };\n        for (let i = 0; i < this._signatures.length; i++) {\n            const signature = this._signatures[i];\n            const flattened = new sign_js_1.FlattenedSign(this._payload);\n            flattened.setProtectedHeader(signature.protectedHeader);\n            flattened.setUnprotectedHeader(signature.unprotectedHeader);\n            const { payload, ...rest } = await flattened.sign(signature.key, signature.options);\n            if (i === 0) {\n                jws.payload = payload;\n            }\n            else if (jws.payload !== payload) {\n                throw new errors_js_1.JWSInvalid('inconsistent use of JWS Unencoded Payload (RFC7797)');\n            }\n            jws.signatures.push(rest);\n        }\n        return jws;\n    }\n}\nexports.GeneralSign = GeneralSign;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProduceJWT = void 0;\nconst epoch_js_1 = require(\"../lib/epoch.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nconst secs_js_1 = require(\"../lib/secs.js\");\nfunction validateInput(label, input) {\n    if (!Number.isFinite(input)) {\n        throw new TypeError(`Invalid ${label} input`);\n    }\n    return input;\n}\nclass ProduceJWT {\n    _payload;\n    constructor(payload = {}) {\n        if (!(0, is_object_js_1.default)(payload)) {\n            throw new TypeError('JWT Claims Set MUST be an object');\n        }\n        this._payload = payload;\n    }\n    setIssuer(issuer) {\n        this._payload = { ...this._payload, iss: issuer };\n        return this;\n    }\n    setSubject(subject) {\n        this._payload = { ...this._payload, sub: subject };\n        return this;\n    }\n    setAudience(audience) {\n        this._payload = { ...this._payload, aud: audience };\n        return this;\n    }\n    setJti(jwtId) {\n        this._payload = { ...this._payload, jti: jwtId };\n        return this;\n    }\n    setNotBefore(input) {\n        if (typeof input === 'number') {\n            this._payload = { ...this._payload, nbf: validateInput('setNotBefore', input) };\n        }\n        else if (input instanceof Date) {\n            this._payload = { ...this._payload, nbf: validateInput('setNotBefore', (0, epoch_js_1.default)(input)) };\n        }\n        else {\n            this._payload = { ...this._payload, nbf: (0, epoch_js_1.default)(new Date()) + (0, secs_js_1.default)(input) };\n        }\n        return this;\n    }\n    setExpirationTime(input) {\n        if (typeof input === 'number') {\n            this._payload = { ...this._payload, exp: validateInput('setExpirationTime', input) };\n        }\n        else if (input instanceof Date) {\n            this._payload = { ...this._payload, exp: validateInput('setExpirationTime', (0, epoch_js_1.default)(input)) };\n        }\n        else {\n            this._payload = { ...this._payload, exp: (0, epoch_js_1.default)(new Date()) + (0, secs_js_1.default)(input) };\n        }\n        return this;\n    }\n    setIssuedAt(input) {\n        if (typeof input === 'undefined') {\n            this._payload = { ...this._payload, iat: (0, epoch_js_1.default)(new Date()) };\n        }\n        else if (input instanceof Date) {\n            this._payload = { ...this._payload, iat: validateInput('setIssuedAt', (0, epoch_js_1.default)(input)) };\n        }\n        else if (typeof input === 'string') {\n            this._payload = {\n                ...this._payload,\n                iat: validateInput('setIssuedAt', (0, epoch_js_1.default)(new Date()) + (0, secs_js_1.default)(input)),\n            };\n        }\n        else {\n            this._payload = { ...this._payload, iat: validateInput('setIssuedAt', input) };\n        }\n        return this;\n    }\n}\nexports.ProduceJWT = ProduceJWT;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SignJWT = void 0;\nconst sign_js_1 = require(\"../jws/compact/sign.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst produce_js_1 = require(\"./produce.js\");\nclass SignJWT extends produce_js_1.ProduceJWT {\n    _protectedHeader;\n    setProtectedHeader(protectedHeader) {\n        this._protectedHeader = protectedHeader;\n        return this;\n    }\n    async sign(key, options) {\n        const sig = new sign_js_1.CompactSign(buffer_utils_js_1.encoder.encode(JSON.stringify(this._payload)));\n        sig.setProtectedHeader(this._protectedHeader);\n        if (Array.isArray(this._protectedHeader?.crit) &&\n            this._protectedHeader.crit.includes('b64') &&\n            this._protectedHeader.b64 === false) {\n            throw new errors_js_1.JWTInvalid('JWTs MUST NOT use unencoded payload');\n        }\n        return sig.sign(key, options);\n    }\n}\nexports.SignJWT = SignJWT;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EncryptJWT = void 0;\nconst encrypt_js_1 = require(\"../jwe/compact/encrypt.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst produce_js_1 = require(\"./produce.js\");\nclass EncryptJWT extends produce_js_1.ProduceJWT {\n    _cek;\n    _iv;\n    _keyManagementParameters;\n    _protectedHeader;\n    _replicateIssuerAsHeader;\n    _replicateSubjectAsHeader;\n    _replicateAudienceAsHeader;\n    setProtectedHeader(protectedHeader) {\n        if (this._protectedHeader) {\n            throw new TypeError('setProtectedHeader can only be called once');\n        }\n        this._protectedHeader = protectedHeader;\n        return this;\n    }\n    setKeyManagementParameters(parameters) {\n        if (this._keyManagementParameters) {\n            throw new TypeError('setKeyManagementParameters can only be called once');\n        }\n        this._keyManagementParameters = parameters;\n        return this;\n    }\n    setContentEncryptionKey(cek) {\n        if (this._cek) {\n            throw new TypeError('setContentEncryptionKey can only be called once');\n        }\n        this._cek = cek;\n        return this;\n    }\n    setInitializationVector(iv) {\n        if (this._iv) {\n            throw new TypeError('setInitializationVector can only be called once');\n        }\n        this._iv = iv;\n        return this;\n    }\n    replicateIssuerAsHeader() {\n        this._replicateIssuerAsHeader = true;\n        return this;\n    }\n    replicateSubjectAsHeader() {\n        this._replicateSubjectAsHeader = true;\n        return this;\n    }\n    replicateAudienceAsHeader() {\n        this._replicateAudienceAsHeader = true;\n        return this;\n    }\n    async encrypt(key, options) {\n        const enc = new encrypt_js_1.CompactEncrypt(buffer_utils_js_1.encoder.encode(JSON.stringify(this._payload)));\n        if (this._replicateIssuerAsHeader) {\n            this._protectedHeader = { ...this._protectedHeader, iss: this._payload.iss };\n        }\n        if (this._replicateSubjectAsHeader) {\n            this._protectedHeader = { ...this._protectedHeader, sub: this._payload.sub };\n        }\n        if (this._replicateAudienceAsHeader) {\n            this._protectedHeader = { ...this._protectedHeader, aud: this._payload.aud };\n        }\n        enc.setProtectedHeader(this._protectedHeader);\n        if (this._iv) {\n            enc.setInitializationVector(this._iv);\n        }\n        if (this._cek) {\n            enc.setContentEncryptionKey(this._cek);\n        }\n        if (this._keyManagementParameters) {\n            enc.setKeyManagementParameters(this._keyManagementParameters);\n        }\n        return enc.encrypt(key, options);\n    }\n}\nexports.EncryptJWT = EncryptJWT;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateJwkThumbprint = calculateJwkThumbprint;\nexports.calculateJwkThumbprintUri = calculateJwkThumbprintUri;\nconst digest_js_1 = require(\"../runtime/digest.js\");\nconst base64url_js_1 = require(\"../runtime/base64url.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nconst check = (value, description) => {\n    if (typeof value !== 'string' || !value) {\n        throw new errors_js_1.JWKInvalid(`${description} missing or invalid`);\n    }\n};\nasync function calculateJwkThumbprint(jwk, digestAlgorithm) {\n    if (!(0, is_object_js_1.default)(jwk)) {\n        throw new TypeError('JWK must be an object');\n    }\n    digestAlgorithm ??= 'sha256';\n    if (digestAlgorithm !== 'sha256' &&\n        digestAlgorithm !== 'sha384' &&\n        digestAlgorithm !== 'sha512') {\n        throw new TypeError('digestAlgorithm must one of \"sha256\", \"sha384\", or \"sha512\"');\n    }\n    let components;\n    switch (jwk.kty) {\n        case 'EC':\n            check(jwk.crv, '\"crv\" (Curve) Parameter');\n            check(jwk.x, '\"x\" (X Coordinate) Parameter');\n            check(jwk.y, '\"y\" (Y Coordinate) Parameter');\n            components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y };\n            break;\n        case 'OKP':\n            check(jwk.crv, '\"crv\" (Subtype of Key Pair) Parameter');\n            check(jwk.x, '\"x\" (Public Key) Parameter');\n            components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x };\n            break;\n        case 'RSA':\n            check(jwk.e, '\"e\" (Exponent) Parameter');\n            check(jwk.n, '\"n\" (Modulus) Parameter');\n            components = { e: jwk.e, kty: jwk.kty, n: jwk.n };\n            break;\n        case 'oct':\n            check(jwk.k, '\"k\" (Key Value) Parameter');\n            components = { k: jwk.k, kty: jwk.kty };\n            break;\n        default:\n            throw new errors_js_1.JOSENotSupported('\"kty\" (Key Type) Parameter missing or unsupported');\n    }\n    const data = buffer_utils_js_1.encoder.encode(JSON.stringify(components));\n    return (0, base64url_js_1.encode)(await (0, digest_js_1.default)(digestAlgorithm, data));\n}\nasync function calculateJwkThumbprintUri(jwk, digestAlgorithm) {\n    digestAlgorithm ??= 'sha256';\n    const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm);\n    return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EmbeddedJWK = EmbeddedJWK;\nconst import_js_1 = require(\"../key/import.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nasync function EmbeddedJWK(protectedHeader, token) {\n    const joseHeader = {\n        ...protectedHeader,\n        ...token?.header,\n    };\n    if (!(0, is_object_js_1.default)(joseHeader.jwk)) {\n        throw new errors_js_1.JWSInvalid('\"jwk\" (JSON Web Key) Header Parameter must be a JSON object');\n    }\n    const key = await (0, import_js_1.importJWK)({ ...joseHeader.jwk, ext: true }, joseHeader.alg);\n    if (key instanceof Uint8Array || key.type !== 'public') {\n        throw new errors_js_1.JWSInvalid('\"jwk\" (JSON Web Key) Header Parameter must be a public key');\n    }\n    return key;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createLocalJWKSet = createLocalJWKSet;\nconst import_js_1 = require(\"../key/import.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nfunction getKtyFromAlg(alg) {\n    switch (typeof alg === 'string' && alg.slice(0, 2)) {\n        case 'RS':\n        case 'PS':\n            return 'RSA';\n        case 'ES':\n            return 'EC';\n        case 'Ed':\n            return 'OKP';\n        default:\n            throw new errors_js_1.JOSENotSupported('Unsupported \"alg\" value for a JSON Web Key Set');\n    }\n}\nfunction isJWKSLike(jwks) {\n    return (jwks &&\n        typeof jwks === 'object' &&\n        Array.isArray(jwks.keys) &&\n        jwks.keys.every(isJWKLike));\n}\nfunction isJWKLike(key) {\n    return (0, is_object_js_1.default)(key);\n}\nfunction clone(obj) {\n    if (typeof structuredClone === 'function') {\n        return structuredClone(obj);\n    }\n    return JSON.parse(JSON.stringify(obj));\n}\nclass LocalJWKSet {\n    _jwks;\n    _cached = new WeakMap();\n    constructor(jwks) {\n        if (!isJWKSLike(jwks)) {\n            throw new errors_js_1.JWKSInvalid('JSON Web Key Set malformed');\n        }\n        this._jwks = clone(jwks);\n    }\n    async getKey(protectedHeader, token) {\n        const { alg, kid } = { ...protectedHeader, ...token?.header };\n        const kty = getKtyFromAlg(alg);\n        const candidates = this._jwks.keys.filter((jwk) => {\n            let candidate = kty === jwk.kty;\n            if (candidate && typeof kid === 'string') {\n                candidate = kid === jwk.kid;\n            }\n            if (candidate && typeof jwk.alg === 'string') {\n                candidate = alg === jwk.alg;\n            }\n            if (candidate && typeof jwk.use === 'string') {\n                candidate = jwk.use === 'sig';\n            }\n            if (candidate && Array.isArray(jwk.key_ops)) {\n                candidate = jwk.key_ops.includes('verify');\n            }\n            if (candidate) {\n                switch (alg) {\n                    case 'ES256':\n                        candidate = jwk.crv === 'P-256';\n                        break;\n                    case 'ES256K':\n                        candidate = jwk.crv === 'secp256k1';\n                        break;\n                    case 'ES384':\n                        candidate = jwk.crv === 'P-384';\n                        break;\n                    case 'ES512':\n                        candidate = jwk.crv === 'P-521';\n                        break;\n                    case 'Ed25519':\n                        candidate = jwk.crv === 'Ed25519';\n                        break;\n                    case 'EdDSA':\n                        candidate = jwk.crv === 'Ed25519' || jwk.crv === 'Ed448';\n                        break;\n                }\n            }\n            return candidate;\n        });\n        const { 0: jwk, length } = candidates;\n        if (length === 0) {\n            throw new errors_js_1.JWKSNoMatchingKey();\n        }\n        if (length !== 1) {\n            const error = new errors_js_1.JWKSMultipleMatchingKeys();\n            const { _cached } = this;\n            error[Symbol.asyncIterator] = async function* () {\n                for (const jwk of candidates) {\n                    try {\n                        yield await importWithAlgCache(_cached, jwk, alg);\n                    }\n                    catch { }\n                }\n            };\n            throw error;\n        }\n        return importWithAlgCache(this._cached, jwk, alg);\n    }\n}\nasync function importWithAlgCache(cache, jwk, alg) {\n    const cached = cache.get(jwk) || cache.set(jwk, {}).get(jwk);\n    if (cached[alg] === undefined) {\n        const key = await (0, import_js_1.importJWK)({ ...jwk, ext: true }, alg);\n        if (key instanceof Uint8Array || key.type !== 'public') {\n            throw new errors_js_1.JWKSInvalid('JSON Web Key Set members must be public keys');\n        }\n        cached[alg] = key;\n    }\n    return cached[alg];\n}\nfunction createLocalJWKSet(jwks) {\n    const set = new LocalJWKSet(jwks);\n    const localJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);\n    Object.defineProperties(localJWKSet, {\n        jwks: {\n            value: () => clone(set._jwks),\n            enumerable: true,\n            configurable: false,\n            writable: false,\n        },\n    });\n    return localJWKSet;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst http = require(\"node:http\");\nconst https = require(\"node:https\");\nconst node_events_1 = require(\"node:events\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst fetchJwks = async (url, timeout, options) => {\n    let get;\n    switch (url.protocol) {\n        case 'https:':\n            get = https.get;\n            break;\n        case 'http:':\n            get = http.get;\n            break;\n        default:\n            throw new TypeError('Unsupported URL protocol.');\n    }\n    const { agent, headers } = options;\n    const req = get(url.href, {\n        agent,\n        timeout,\n        headers,\n    });\n    const [response] = (await Promise.race([(0, node_events_1.once)(req, 'response'), (0, node_events_1.once)(req, 'timeout')]));\n    if (!response) {\n        req.destroy();\n        throw new errors_js_1.JWKSTimeout();\n    }\n    if (response.statusCode !== 200) {\n        throw new errors_js_1.JOSEError('Expected 200 OK from the JSON Web Key Set HTTP response');\n    }\n    const parts = [];\n    for await (const part of response) {\n        parts.push(part);\n    }\n    try {\n        return JSON.parse(buffer_utils_js_1.decoder.decode((0, buffer_utils_js_1.concat)(...parts)));\n    }\n    catch {\n        throw new errors_js_1.JOSEError('Failed to parse the JSON Web Key Set HTTP response as JSON');\n    }\n};\nexports.default = fetchJwks;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.experimental_jwksCache = exports.jwksCache = void 0;\nexports.createRemoteJWKSet = createRemoteJWKSet;\nconst fetch_jwks_js_1 = require(\"../runtime/fetch_jwks.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst local_js_1 = require(\"./local.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nfunction isCloudflareWorkers() {\n    return (typeof WebSocketPair !== 'undefined' ||\n        (typeof navigator !== 'undefined' && navigator.userAgent === 'Cloudflare-Workers') ||\n        (typeof EdgeRuntime !== 'undefined' && EdgeRuntime === 'vercel'));\n}\nlet USER_AGENT;\nif (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {\n    const NAME = 'jose';\n    const VERSION = 'v5.10.0';\n    USER_AGENT = `${NAME}/${VERSION}`;\n}\nexports.jwksCache = Symbol();\nfunction isFreshJwksCache(input, cacheMaxAge) {\n    if (typeof input !== 'object' || input === null) {\n        return false;\n    }\n    if (!('uat' in input) || typeof input.uat !== 'number' || Date.now() - input.uat >= cacheMaxAge) {\n        return false;\n    }\n    if (!('jwks' in input) ||\n        !(0, is_object_js_1.default)(input.jwks) ||\n        !Array.isArray(input.jwks.keys) ||\n        !Array.prototype.every.call(input.jwks.keys, is_object_js_1.default)) {\n        return false;\n    }\n    return true;\n}\nclass RemoteJWKSet {\n    _url;\n    _timeoutDuration;\n    _cooldownDuration;\n    _cacheMaxAge;\n    _jwksTimestamp;\n    _pendingFetch;\n    _options;\n    _local;\n    _cache;\n    constructor(url, options) {\n        if (!(url instanceof URL)) {\n            throw new TypeError('url must be an instance of URL');\n        }\n        this._url = new URL(url.href);\n        this._options = { agent: options?.agent, headers: options?.headers };\n        this._timeoutDuration =\n            typeof options?.timeoutDuration === 'number' ? options?.timeoutDuration : 5000;\n        this._cooldownDuration =\n            typeof options?.cooldownDuration === 'number' ? options?.cooldownDuration : 30000;\n        this._cacheMaxAge = typeof options?.cacheMaxAge === 'number' ? options?.cacheMaxAge : 600000;\n        if (options?.[exports.jwksCache] !== undefined) {\n            this._cache = options?.[exports.jwksCache];\n            if (isFreshJwksCache(options?.[exports.jwksCache], this._cacheMaxAge)) {\n                this._jwksTimestamp = this._cache.uat;\n                this._local = (0, local_js_1.createLocalJWKSet)(this._cache.jwks);\n            }\n        }\n    }\n    coolingDown() {\n        return typeof this._jwksTimestamp === 'number'\n            ? Date.now() < this._jwksTimestamp + this._cooldownDuration\n            : false;\n    }\n    fresh() {\n        return typeof this._jwksTimestamp === 'number'\n            ? Date.now() < this._jwksTimestamp + this._cacheMaxAge\n            : false;\n    }\n    async getKey(protectedHeader, token) {\n        if (!this._local || !this.fresh()) {\n            await this.reload();\n        }\n        try {\n            return await this._local(protectedHeader, token);\n        }\n        catch (err) {\n            if (err instanceof errors_js_1.JWKSNoMatchingKey) {\n                if (this.coolingDown() === false) {\n                    await this.reload();\n                    return this._local(protectedHeader, token);\n                }\n            }\n            throw err;\n        }\n    }\n    async reload() {\n        if (this._pendingFetch && isCloudflareWorkers()) {\n            this._pendingFetch = undefined;\n        }\n        const headers = new Headers(this._options.headers);\n        if (USER_AGENT && !headers.has('User-Agent')) {\n            headers.set('User-Agent', USER_AGENT);\n            this._options.headers = Object.fromEntries(headers.entries());\n        }\n        this._pendingFetch ||= (0, fetch_jwks_js_1.default)(this._url, this._timeoutDuration, this._options)\n            .then((json) => {\n            this._local = (0, local_js_1.createLocalJWKSet)(json);\n            if (this._cache) {\n                this._cache.uat = Date.now();\n                this._cache.jwks = json;\n            }\n            this._jwksTimestamp = Date.now();\n            this._pendingFetch = undefined;\n        })\n            .catch((err) => {\n            this._pendingFetch = undefined;\n            throw err;\n        });\n        await this._pendingFetch;\n    }\n}\nfunction createRemoteJWKSet(url, options) {\n    const set = new RemoteJWKSet(url, options);\n    const remoteJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);\n    Object.defineProperties(remoteJWKSet, {\n        coolingDown: {\n            get: () => set.coolingDown(),\n            enumerable: true,\n            configurable: false,\n        },\n        fresh: {\n            get: () => set.fresh(),\n            enumerable: true,\n            configurable: false,\n        },\n        reload: {\n            value: () => set.reload(),\n            enumerable: true,\n            configurable: false,\n            writable: false,\n        },\n        reloading: {\n            get: () => !!set._pendingFetch,\n            enumerable: true,\n            configurable: false,\n        },\n        jwks: {\n            value: () => set._local?.jwks(),\n            enumerable: true,\n            configurable: false,\n            writable: false,\n        },\n    });\n    return remoteJWKSet;\n}\nexports.experimental_jwksCache = exports.jwksCache;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnsecuredJWT = void 0;\nconst base64url = require(\"../runtime/base64url.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst jwt_claims_set_js_1 = require(\"../lib/jwt_claims_set.js\");\nconst produce_js_1 = require(\"./produce.js\");\nclass UnsecuredJWT extends produce_js_1.ProduceJWT {\n    encode() {\n        const header = base64url.encode(JSON.stringify({ alg: 'none' }));\n        const payload = base64url.encode(JSON.stringify(this._payload));\n        return `${header}.${payload}.`;\n    }\n    static decode(jwt, options) {\n        if (typeof jwt !== 'string') {\n            throw new errors_js_1.JWTInvalid('Unsecured JWT must be a string');\n        }\n        const { 0: encodedHeader, 1: encodedPayload, 2: signature, length } = jwt.split('.');\n        if (length !== 3 || signature !== '') {\n            throw new errors_js_1.JWTInvalid('Invalid Unsecured JWT');\n        }\n        let header;\n        try {\n            header = JSON.parse(buffer_utils_js_1.decoder.decode(base64url.decode(encodedHeader)));\n            if (header.alg !== 'none')\n                throw new Error();\n        }\n        catch {\n            throw new errors_js_1.JWTInvalid('Invalid Unsecured JWT');\n        }\n        const payload = (0, jwt_claims_set_js_1.default)(header, base64url.decode(encodedPayload), options);\n        return { payload, header };\n    }\n}\nexports.UnsecuredJWT = UnsecuredJWT;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decode = exports.encode = void 0;\nconst base64url = require(\"../runtime/base64url.js\");\nexports.encode = base64url.encode;\nexports.decode = base64url.decode;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeProtectedHeader = decodeProtectedHeader;\nconst base64url_js_1 = require(\"./base64url.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nfunction decodeProtectedHeader(token) {\n    let protectedB64u;\n    if (typeof token === 'string') {\n        const parts = token.split('.');\n        if (parts.length === 3 || parts.length === 5) {\n            ;\n            [protectedB64u] = parts;\n        }\n    }\n    else if (typeof token === 'object' && token) {\n        if ('protected' in token) {\n            protectedB64u = token.protected;\n        }\n        else {\n            throw new TypeError('Token does not contain a Protected Header');\n        }\n    }\n    try {\n        if (typeof protectedB64u !== 'string' || !protectedB64u) {\n            throw new Error();\n        }\n        const result = JSON.parse(buffer_utils_js_1.decoder.decode((0, base64url_js_1.decode)(protectedB64u)));\n        if (!(0, is_object_js_1.default)(result)) {\n            throw new Error();\n        }\n        return result;\n    }\n    catch {\n        throw new TypeError('Invalid Token or Protected Header formatting');\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeJwt = decodeJwt;\nconst base64url_js_1 = require(\"./base64url.js\");\nconst buffer_utils_js_1 = require(\"../lib/buffer_utils.js\");\nconst is_object_js_1 = require(\"../lib/is_object.js\");\nconst errors_js_1 = require(\"./errors.js\");\nfunction decodeJwt(jwt) {\n    if (typeof jwt !== 'string')\n        throw new errors_js_1.JWTInvalid('JWTs must use Compact JWS serialization, JWT must be a string');\n    const { 1: payload, length } = jwt.split('.');\n    if (length === 5)\n        throw new errors_js_1.JWTInvalid('Only JWTs using Compact JWS serialization can be decoded');\n    if (length !== 3)\n        throw new errors_js_1.JWTInvalid('Invalid JWT');\n    if (!payload)\n        throw new errors_js_1.JWTInvalid('JWTs must contain a payload');\n    let decoded;\n    try {\n        decoded = (0, base64url_js_1.decode)(payload);\n    }\n    catch {\n        throw new errors_js_1.JWTInvalid('Failed to base64url decode the payload');\n    }\n    let result;\n    try {\n        result = JSON.parse(buffer_utils_js_1.decoder.decode(decoded));\n    }\n    catch {\n        throw new errors_js_1.JWTInvalid('Failed to parse the decoded payload as JSON');\n    }\n    if (!(0, is_object_js_1.default)(result))\n        throw new errors_js_1.JWTInvalid('Invalid JWT Claims Set');\n    return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateSecret = generateSecret;\nexports.generateKeyPair = generateKeyPair;\nconst node_crypto_1 = require(\"node:crypto\");\nconst node_util_1 = require(\"node:util\");\nconst random_js_1 = require(\"./random.js\");\nconst errors_js_1 = require(\"../util/errors.js\");\nconst generate = (0, node_util_1.promisify)(node_crypto_1.generateKeyPair);\nasync function generateSecret(alg, options) {\n    let length;\n    switch (alg) {\n        case 'HS256':\n        case 'HS384':\n        case 'HS512':\n        case 'A128CBC-HS256':\n        case 'A192CBC-HS384':\n        case 'A256CBC-HS512':\n            length = parseInt(alg.slice(-3), 10);\n            break;\n        case 'A128KW':\n        case 'A192KW':\n        case 'A256KW':\n        case 'A128GCMKW':\n        case 'A192GCMKW':\n        case 'A256GCMKW':\n        case 'A128GCM':\n        case 'A192GCM':\n        case 'A256GCM':\n            length = parseInt(alg.slice(1, 4), 10);\n            break;\n        default:\n            throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n    }\n    return (0, node_crypto_1.createSecretKey)((0, random_js_1.default)(new Uint8Array(length >> 3)));\n}\nasync function generateKeyPair(alg, options) {\n    switch (alg) {\n        case 'RS256':\n        case 'RS384':\n        case 'RS512':\n        case 'PS256':\n        case 'PS384':\n        case 'PS512':\n        case 'RSA-OAEP':\n        case 'RSA-OAEP-256':\n        case 'RSA-OAEP-384':\n        case 'RSA-OAEP-512':\n        case 'RSA1_5': {\n            const modulusLength = options?.modulusLength ?? 2048;\n            if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n                throw new errors_js_1.JOSENotSupported('Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used');\n            }\n            const keypair = await generate('rsa', {\n                modulusLength,\n                publicExponent: 0x10001,\n            });\n            return keypair;\n        }\n        case 'ES256':\n            return generate('ec', { namedCurve: 'P-256' });\n        case 'ES256K':\n            return generate('ec', { namedCurve: 'secp256k1' });\n        case 'ES384':\n            return generate('ec', { namedCurve: 'P-384' });\n        case 'ES512':\n            return generate('ec', { namedCurve: 'P-521' });\n        case 'Ed25519':\n            return generate('ed25519');\n        case 'EdDSA': {\n            switch (options?.crv) {\n                case undefined:\n                case 'Ed25519':\n                    return generate('ed25519');\n                case 'Ed448':\n                    return generate('ed448');\n                default:\n                    throw new errors_js_1.JOSENotSupported('Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448');\n            }\n        }\n        case 'ECDH-ES':\n        case 'ECDH-ES+A128KW':\n        case 'ECDH-ES+A192KW':\n        case 'ECDH-ES+A256KW': {\n            const crv = options?.crv ?? 'P-256';\n            switch (crv) {\n                case undefined:\n                case 'P-256':\n                case 'P-384':\n                case 'P-521':\n                    return generate('ec', { namedCurve: crv });\n                case 'X25519':\n                    return generate('x25519');\n                case 'X448':\n                    return generate('x448');\n                default:\n                    throw new errors_js_1.JOSENotSupported('Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448');\n            }\n        }\n        default:\n            throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateKeyPair = generateKeyPair;\nconst generate_js_1 = require(\"../runtime/generate.js\");\nasync function generateKeyPair(alg, options) {\n    return (0, generate_js_1.generateKeyPair)(alg, options);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateSecret = generateSecret;\nconst generate_js_1 = require(\"../runtime/generate.js\");\nasync function generateSecret(alg, options) {\n    return (0, generate_js_1.generateSecret)(alg, options);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = 'node:crypto';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst runtime_js_1 = require(\"../runtime/runtime.js\");\nexports.default = runtime_js_1.default;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cryptoRuntime = exports.base64url = exports.generateSecret = exports.generateKeyPair = exports.errors = exports.decodeJwt = exports.decodeProtectedHeader = exports.importJWK = exports.importX509 = exports.importPKCS8 = exports.importSPKI = exports.exportJWK = exports.exportSPKI = exports.exportPKCS8 = exports.UnsecuredJWT = exports.experimental_jwksCache = exports.jwksCache = exports.createRemoteJWKSet = exports.createLocalJWKSet = exports.EmbeddedJWK = exports.calculateJwkThumbprintUri = exports.calculateJwkThumbprint = exports.EncryptJWT = exports.SignJWT = exports.GeneralSign = exports.FlattenedSign = exports.CompactSign = exports.FlattenedEncrypt = exports.CompactEncrypt = exports.jwtDecrypt = exports.jwtVerify = exports.generalVerify = exports.flattenedVerify = exports.compactVerify = exports.GeneralEncrypt = exports.generalDecrypt = exports.flattenedDecrypt = exports.compactDecrypt = void 0;\nvar decrypt_js_1 = require(\"./jwe/compact/decrypt.js\");\nObject.defineProperty(exports, \"compactDecrypt\", { enumerable: true, get: function () { return decrypt_js_1.compactDecrypt; } });\nvar decrypt_js_2 = require(\"./jwe/flattened/decrypt.js\");\nObject.defineProperty(exports, \"flattenedDecrypt\", { enumerable: true, get: function () { return decrypt_js_2.flattenedDecrypt; } });\nvar decrypt_js_3 = require(\"./jwe/general/decrypt.js\");\nObject.defineProperty(exports, \"generalDecrypt\", { enumerable: true, get: function () { return decrypt_js_3.generalDecrypt; } });\nvar encrypt_js_1 = require(\"./jwe/general/encrypt.js\");\nObject.defineProperty(exports, \"GeneralEncrypt\", { enumerable: true, get: function () { return encrypt_js_1.GeneralEncrypt; } });\nvar verify_js_1 = require(\"./jws/compact/verify.js\");\nObject.defineProperty(exports, \"compactVerify\", { enumerable: true, get: function () { return verify_js_1.compactVerify; } });\nvar verify_js_2 = require(\"./jws/flattened/verify.js\");\nObject.defineProperty(exports, \"flattenedVerify\", { enumerable: true, get: function () { return verify_js_2.flattenedVerify; } });\nvar verify_js_3 = require(\"./jws/general/verify.js\");\nObject.defineProperty(exports, \"generalVerify\", { enumerable: true, get: function () { return verify_js_3.generalVerify; } });\nvar verify_js_4 = require(\"./jwt/verify.js\");\nObject.defineProperty(exports, \"jwtVerify\", { enumerable: true, get: function () { return verify_js_4.jwtVerify; } });\nvar decrypt_js_4 = require(\"./jwt/decrypt.js\");\nObject.defineProperty(exports, \"jwtDecrypt\", { enumerable: true, get: function () { return decrypt_js_4.jwtDecrypt; } });\nvar encrypt_js_2 = require(\"./jwe/compact/encrypt.js\");\nObject.defineProperty(exports, \"CompactEncrypt\", { enumerable: true, get: function () { return encrypt_js_2.CompactEncrypt; } });\nvar encrypt_js_3 = require(\"./jwe/flattened/encrypt.js\");\nObject.defineProperty(exports, \"FlattenedEncrypt\", { enumerable: true, get: function () { return encrypt_js_3.FlattenedEncrypt; } });\nvar sign_js_1 = require(\"./jws/compact/sign.js\");\nObject.defineProperty(exports, \"CompactSign\", { enumerable: true, get: function () { return sign_js_1.CompactSign; } });\nvar sign_js_2 = require(\"./jws/flattened/sign.js\");\nObject.defineProperty(exports, \"FlattenedSign\", { enumerable: true, get: function () { return sign_js_2.FlattenedSign; } });\nvar sign_js_3 = require(\"./jws/general/sign.js\");\nObject.defineProperty(exports, \"GeneralSign\", { enumerable: true, get: function () { return sign_js_3.GeneralSign; } });\nvar sign_js_4 = require(\"./jwt/sign.js\");\nObject.defineProperty(exports, \"SignJWT\", { enumerable: true, get: function () { return sign_js_4.SignJWT; } });\nvar encrypt_js_4 = require(\"./jwt/encrypt.js\");\nObject.defineProperty(exports, \"EncryptJWT\", { enumerable: true, get: function () { return encrypt_js_4.EncryptJWT; } });\nvar thumbprint_js_1 = require(\"./jwk/thumbprint.js\");\nObject.defineProperty(exports, \"calculateJwkThumbprint\", { enumerable: true, get: function () { return thumbprint_js_1.calculateJwkThumbprint; } });\nObject.defineProperty(exports, \"calculateJwkThumbprintUri\", { enumerable: true, get: function () { return thumbprint_js_1.calculateJwkThumbprintUri; } });\nvar embedded_js_1 = require(\"./jwk/embedded.js\");\nObject.defineProperty(exports, \"EmbeddedJWK\", { enumerable: true, get: function () { return embedded_js_1.EmbeddedJWK; } });\nvar local_js_1 = require(\"./jwks/local.js\");\nObject.defineProperty(exports, \"createLocalJWKSet\", { enumerable: true, get: function () { return local_js_1.createLocalJWKSet; } });\nvar remote_js_1 = require(\"./jwks/remote.js\");\nObject.defineProperty(exports, \"createRemoteJWKSet\", { enumerable: true, get: function () { return remote_js_1.createRemoteJWKSet; } });\nObject.defineProperty(exports, \"jwksCache\", { enumerable: true, get: function () { return remote_js_1.jwksCache; } });\nObject.defineProperty(exports, \"experimental_jwksCache\", { enumerable: true, get: function () { return remote_js_1.experimental_jwksCache; } });\nvar unsecured_js_1 = require(\"./jwt/unsecured.js\");\nObject.defineProperty(exports, \"UnsecuredJWT\", { enumerable: true, get: function () { return unsecured_js_1.UnsecuredJWT; } });\nvar export_js_1 = require(\"./key/export.js\");\nObject.defineProperty(exports, \"exportPKCS8\", { enumerable: true, get: function () { return export_js_1.exportPKCS8; } });\nObject.defineProperty(exports, \"exportSPKI\", { enumerable: true, get: function () { return export_js_1.exportSPKI; } });\nObject.defineProperty(exports, \"exportJWK\", { enumerable: true, get: function () { return export_js_1.exportJWK; } });\nvar import_js_1 = require(\"./key/import.js\");\nObject.defineProperty(exports, \"importSPKI\", { enumerable: true, get: function () { return import_js_1.importSPKI; } });\nObject.defineProperty(exports, \"importPKCS8\", { enumerable: true, get: function () { return import_js_1.importPKCS8; } });\nObject.defineProperty(exports, \"importX509\", { enumerable: true, get: function () { return import_js_1.importX509; } });\nObject.defineProperty(exports, \"importJWK\", { enumerable: true, get: function () { return import_js_1.importJWK; } });\nvar decode_protected_header_js_1 = require(\"./util/decode_protected_header.js\");\nObject.defineProperty(exports, \"decodeProtectedHeader\", { enumerable: true, get: function () { return decode_protected_header_js_1.decodeProtectedHeader; } });\nvar decode_jwt_js_1 = require(\"./util/decode_jwt.js\");\nObject.defineProperty(exports, \"decodeJwt\", { enumerable: true, get: function () { return decode_jwt_js_1.decodeJwt; } });\nexports.errors = require(\"./util/errors.js\");\nvar generate_key_pair_js_1 = require(\"./key/generate_key_pair.js\");\nObject.defineProperty(exports, \"generateKeyPair\", { enumerable: true, get: function () { return generate_key_pair_js_1.generateKeyPair; } });\nvar generate_secret_js_1 = require(\"./key/generate_secret.js\");\nObject.defineProperty(exports, \"generateSecret\", { enumerable: true, get: function () { return generate_secret_js_1.generateSecret; } });\nexports.base64url = require(\"./util/base64url.js\");\nvar runtime_js_1 = require(\"./util/runtime.js\");\nObject.defineProperty(exports, \"cryptoRuntime\", { enumerable: true, get: function () { return runtime_js_1.default; } });\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar verify_vercel_oidc_token_exports = {};\n__export(verify_vercel_oidc_token_exports, {\n  verifyVercelOidcToken: () => verifyVercelOidcToken\n});\nmodule.exports = __toCommonJS(verify_vercel_oidc_token_exports);\nvar import_jose = require(\"jose\");\nconst VERCEL_OIDC_ISSUER = \"https://oidc.vercel.com\";\nconst VERCEL_OIDC_JWKS_URL = new URL(\n  \"https://oidc.vercel.com/.well-known/jwks\"\n);\nconst DEFAULT_ALGORITHMS = [\"RS256\"];\nconst VERCEL_OIDC_JWKS = (0, import_jose.createRemoteJWKSet)(VERCEL_OIDC_JWKS_URL);\nasync function verifyVercelOidcToken(token, options) {\n  const {\n    algorithms,\n    projectId = process.env.VERCEL_PROJECT_ID,\n    environment = process.env.VERCEL_TARGET_ENV || process.env.VERCEL_ENV,\n    ownerId,\n    ...verifyOptions\n  } = options ?? {};\n  if (projectId === \"*\" && ownerId === void 0 && !hasAudienceVerification(verifyOptions.audience)) {\n    throw new TypeError(\n      \"Expected ownerId or audience to be provided when projectId is '*'.\"\n    );\n  }\n  const result = await (0, import_jose.jwtVerify)(token, VERCEL_OIDC_JWKS, {\n    ...verifyOptions,\n    algorithms: algorithms ?? DEFAULT_ALGORITHMS\n  });\n  validateIssuer(result.payload.iss);\n  validateClaim({\n    actual: result.payload.project_id,\n    claim: \"project_id\",\n    env: \"VERCEL_PROJECT_ID\",\n    expected: projectId,\n    option: \"projectId\"\n  });\n  validateClaim({\n    actual: result.payload.environment,\n    claim: \"environment\",\n    env: \"VERCEL_TARGET_ENV or VERCEL_ENV\",\n    expected: environment,\n    option: \"environment\"\n  });\n  validateOptionalClaim({\n    actual: result.payload.owner_id,\n    claim: \"owner_id\",\n    expected: ownerId\n  });\n  return result;\n}\nfunction hasAudienceVerification(audience) {\n  return Array.isArray(audience) ? audience.length > 0 : audience !== void 0;\n}\nfunction validateIssuer(actual) {\n  if (actual !== VERCEL_OIDC_ISSUER && (typeof actual !== \"string\" || !actual.startsWith(`${VERCEL_OIDC_ISSUER}/`))) {\n    throw new TypeError(\n      `Expected Vercel OIDC token iss claim to be \"${VERCEL_OIDC_ISSUER}\" or to start with \"${VERCEL_OIDC_ISSUER}/\".`\n    );\n  }\n}\nfunction validateClaim({\n  actual,\n  claim,\n  env,\n  expected,\n  option\n}) {\n  if (expected === \"*\") {\n    return;\n  }\n  if (expected === void 0 || expected.length === 0) {\n    throw new TypeError(\n      `Expected ${env} to be set or ${option} to be provided. Pass ${option}: '*' to allow any ${claim} claim.`\n    );\n  }\n  if (Array.isArray(expected) && typeof actual === \"string\" && expected.includes(actual)) {\n    return;\n  }\n  if (actual !== expected) {\n    throw new TypeError(\n      Array.isArray(expected) ? `Expected Vercel OIDC token ${claim} claim to be one of: ${expected.map((value) => `\"${value}\"`).join(\", \")}.` : `Expected Vercel OIDC token ${claim} claim to be \"${expected}\".`\n    );\n  }\n}\nfunction validateOptionalClaim({\n  actual,\n  claim,\n  expected\n}) {\n  if (expected === void 0) {\n    return;\n  }\n  if (actual !== expected) {\n    throw new TypeError(\n      `Expected Vercel OIDC token ${claim} claim to be \"${expected}\".`\n    );\n  }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  verifyVercelOidcToken\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar src_exports = {};\n__export(src_exports, {\n  AccessTokenMissingError: () => import_auth_errors.AccessTokenMissingError,\n  RefreshAccessTokenFailedError: () => import_auth_errors.RefreshAccessTokenFailedError,\n  exchangeVercelOidcToken: () => import_exchange_vercel_oidc_token.exchangeVercelOidcToken,\n  getContext: () => import_get_context.getContext,\n  getVercelOidcToken: () => import_get_vercel_oidc_token_with_refresh.getVercelOidcToken,\n  getVercelOidcTokenSync: () => import_get_vercel_oidc_token_sync.getVercelOidcTokenSync,\n  getVercelToken: () => import_token_util.getVercelToken,\n  verifyVercelOidcToken: () => import_verify_vercel_oidc_token.verifyVercelOidcToken\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_get_vercel_oidc_token_with_refresh = require(\"./get-vercel-oidc-token-with-refresh\");\nvar import_get_vercel_oidc_token_sync = require(\"./get-vercel-oidc-token-sync\");\nvar import_get_context = require(\"./get-context\");\nvar import_verify_vercel_oidc_token = require(\"./verify-vercel-oidc-token\");\nvar import_auth_errors = require(\"./auth-errors\");\nvar import_exchange_vercel_oidc_token = require(\"./exchange-vercel-oidc-token\");\nvar import_token_util = require(\"./token-util\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  AccessTokenMissingError,\n  RefreshAccessTokenFailedError,\n  exchangeVercelOidcToken,\n  getContext,\n  getVercelOidcToken,\n  getVercelOidcTokenSync,\n  getVercelToken,\n  verifyVercelOidcToken\n});\n","import * as cmd from \"cmd-ts\";\nimport { login } from \"../commands/login\";\nimport createDebugger from \"debug\";\nimport chalk from \"chalk\";\nimport {\n  getVercelOidcToken,\n  getVercelToken,\n  AccessTokenMissingError,\n  RefreshAccessTokenFailedError,\n} from \"@vercel/oidc\";\nimport { getAuth } from \"@vercel/sandbox/dist/auth/index.js\";\n\nconst debug = createDebugger(\"sandbox:args:auth\");\n\nlet freshTokenAcquiredAt: number | undefined;\n\nconst FRESH_TOKEN_WINDOW_MS = 15_000;\n\nexport function isTokenFresh(): boolean {\n  return (\n    freshTokenAcquiredAt !== undefined &&\n    Date.now() - freshTokenAcquiredAt < FRESH_TOKEN_WINDOW_MS\n  );\n}\n\nfunction markTokenAsFresh(): void {\n  freshTokenAcquiredAt = Date.now();\n}\n\nexport const token = cmd.option({\n  long: \"token\",\n  description:\n    \"A Vercel authentication token. If not provided, will use the token stored in your system from `VERCEL_AUTH_TOKEN` or will start a log in process.\",\n  type: {\n    ...cmd.string,\n    displayName: \"pat_or_oidc\",\n    defaultValueIsSerializable: false,\n    onMissing: async () => {\n      if (process.env.VERCEL_AUTH_TOKEN) {\n        return process.env.VERCEL_AUTH_TOKEN;\n      }\n\n      if (process.env.VERCEL_OIDC_TOKEN) {\n        try {\n          return await getVercelOidcToken();\n        } catch (cause) {\n          debug(`Failed to get or refresh OIDC token: ${getMessage(cause)}`);\n          console.warn(\n            chalk.yellow(\n              `${chalk.bold(\"warn:\")} failed to get or refresh OIDC token, using personal token authentication.`,\n            ),\n          );\n        }\n      }\n\n      // Try to get CLI token, which handles auth.json reading and refresh\n      try {\n        const previousToken = getAuth()?.token;\n        const storedToken = await getVercelToken();\n        if (previousToken && storedToken !== previousToken) {\n          markTokenAsFresh();\n        }\n        return storedToken;\n      } catch (error) {\n        // Handle specific auth errors by triggering login\n        if (\n          error instanceof AccessTokenMissingError ||\n          error instanceof RefreshAccessTokenFailedError\n        ) {\n          debug(\n            `CLI token unavailable (${error.name}), prompting for login...`,\n          );\n          console.warn(\n            chalk.yellow(\n              `${chalk.bold(\"notice:\")} Your session has expired. Please log in again.`,\n            ),\n          );\n          await login.handler({});\n\n          // Try again after login\n          try {\n            const refreshed = await getVercelToken();\n            markTokenAsFresh();\n            return refreshed;\n          } catch (retryError) {\n            throw new Error(\n              [\n                `Failed to retrieve authentication token.`,\n                `${chalk.bold(\"hint:\")} Try logging in again with \\`sandbox login\\`.`,\n                \"╰▶ Docs: https://vercel.com/docs/vercel-sandbox/cli-reference#authentication\",\n              ].join(\"\\n\"),\n            );\n          }\n        }\n\n        // Re-throw unexpected errors\n        throw error;\n      }\n    },\n  },\n});\n\nfunction getMessage(error: unknown): string {\n  if (!(error instanceof Error)) {\n    return String(error);\n  }\n\n  let message = error.message;\n  if (error.cause) {\n    message += `\\nCaused by: ${getMessage(error.cause)}`;\n  }\n\n  return message;\n}\n","import { z } from \"zod\";\n\n/**\n * A Zod codec that serializes and deserializes JSON strings.\n */\nexport const jsonCodec = <T extends z.core.$ZodType>(schema: T) =>\n  z.codec(z.string(), schema, {\n    encode: (value) => JSON.stringify(value, null, 2),\n    decode: (jsonString, ctx) => {\n      try {\n        return JSON.parse(jsonString);\n      } catch (err: any) {\n        ctx.issues.push({\n          code: \"invalid_format\",\n          format: \"json\",\n          input: jsonString,\n          message: err.message,\n        });\n        return z.NEVER;\n      }\n    },\n  });\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { z } from \"zod/v4\";\nimport { jsonCodec } from \"./zod\";\n\nconst ProjectConfiguration = jsonCodec(\n  z.object({\n    orgId: z.string(),\n    projectId: z.string(),\n  }),\n);\n\nexport function readProjectConfiguration(cwd: string) {\n  try {\n    const pathname = path.join(cwd, \".vercel\", \"project.json\");\n    const string = fs.readFileSync(pathname, \"utf8\");\n    return ProjectConfiguration.decode(string);\n  } catch {\n    return null;\n  }\n}\n","import { z } from \"zod/v4\";\nimport { readProjectConfiguration } from \"./project-configuration\";\nimport createDebugger from \"debug\";\nimport * as Auth from \"@vercel/sandbox/dist/auth/index.js\";\n\nconst debug = createDebugger(\"sandbox:scope\");\n\n/**\n * Inferred scope information for a sandbox session.\n */\nexport type InferredScope = {\n  /** Project identifier — may be an ID (prj_*) or a slug */\n  project: string;\n  /** Team/owner identifier — may be an ID (team_*) or a slug */\n  owner: string;\n  /** Human-readable project slug for display */\n  projectSlug?: string;\n  /** Human-readable team slug for display */\n  ownerSlug?: string;\n};\n\nexport async function inferScope({\n  token,\n  team,\n}: {\n  token: string;\n  team?: string;\n}): Promise<InferredScope> {\n  // If the token is a JWT (OIDC token), extract scope from its claims\n  const jwt = z.jwt().safeParse(token);\n  if (jwt.success) {\n    debug(\"trying to infer scope from OIDC JWT\");\n    const data = await inferFromJwt(jwt.data);\n    debug(\"Using scope from OIDC JWT\", data);\n    return data;\n  }\n\n  const projectJson = readProjectConfiguration(process.cwd());\n  if (projectJson) {\n    debug(\"Using scope from project configuration\", {\n      owner: projectJson.orgId,\n      project: projectJson.projectId,\n    });\n    return { owner: projectJson.orgId, project: projectJson.projectId };\n  }\n\n  debug(\"trying to infer scope from API token\", { team });\n  const fromToken = await inferFromToken(token, team);\n  debug(\"Using scope from API token\", fromToken);\n  return fromToken;\n}\n\nconst JwtSchema = z\n  .object({\n    project_id: z.string(),\n    owner_id: z.string(),\n    project: z.string().optional(),\n    owner: z.string().optional(),\n  })\n  .transform((data) => {\n    return {\n      project: data.project_id,\n      owner: data.owner_id,\n      projectSlug: data.project,\n      ownerSlug: data.owner,\n    };\n  });\n\nasync function inferFromJwt(jwt: string) {\n  const body = JSON.parse(Buffer.from(jwt.split(\".\")[1], \"base64\").toString());\n  return { _tag: \"OIDC\" as const, ...JwtSchema.parse(body) };\n}\n\nasync function inferFromToken(token: string, requestedTeam?: string) {\n  const { teamId, teamSlug, projectId, projectSlug } = await Auth.inferScope({\n    token,\n    teamId: requestedTeam,\n  });\n  return {\n    owner: teamId,\n    project: projectId,\n    ownerSlug: teamSlug ?? teamId,\n    projectSlug: projectSlug ?? projectId,\n  };\n}\n","import retry from \"async-retry\";\nimport { APIError } from \"@vercel/sandbox\";\nimport { NotOk } from \"@vercel/sandbox/dist/auth/index.js\";\nimport createDebugger from \"debug\";\nimport { isTokenFresh } from \"../args/auth\";\n\nconst debug = createDebugger(\"sandbox:fresh-auth-retry\");\n\n/**\n * Run an async operation, transparently retrying on 401/403 when the auth\n * token was just acquired via auto-login.\n */\nexport async function withFreshAuthRetry<T>(\n  factory: () => Promise<T>,\n): Promise<T> {\n  return retry<T>(\n    async (bail, attempt) => {\n      try {\n        return await factory();\n      } catch (error) {\n        const status = getAuthFailureStatus(error);\n        if (status !== undefined && isTokenFresh()) {\n          debug(`fresh-auth retry attempt ${attempt} (status ${status})`);\n          throw error;\n        }\n        bail(error as Error);\n        return undefined as never;\n      }\n    },\n    { retries: 3, minTimeout: 250, factor: 2, maxRetryTime: 3_000 },\n  );\n}\n\n/**\n * Returns the HTTP status if the error represents a 401 or 403.\n * Returns undefined for any other error.\n */\nfunction getAuthFailureStatus(error: unknown): number | undefined {\n  let status: number | undefined;\n  if (error instanceof APIError) {\n    status = error.response.status;\n  } else if (error instanceof NotOk) {\n    status = error.response.statusCode;\n  }\n  return status === 401 || status === 403 ? status : undefined;\n}\n","import { token } from \"./auth\";\nimport * as cmd from \"cmd-ts\";\nimport type { ArgParser } from \"cmd-ts/dist/esm/argparser\";\nimport { inferScope } from \"../util/infer-scope\";\nimport { withFreshAuthRetry } from \"../util/fresh-auth-retry\";\nimport type { ProvidesHelp } from \"cmd-ts/dist/esm/helpdoc\";\nimport { NotOk } from \"@vercel/sandbox/dist/auth/index.js\";\nimport chalk from \"chalk\";\nimport createDebugger from \"debug\";\n\nconst debug = createDebugger(\"sandbox:scope\");\n\nconst project = cmd.option({\n  long: \"project\",\n  type: { ...cmd.optional(cmd.string), displayName: \"my-project\" },\n  description:\n    \"The project name or ID to associate with the command. Can be inferred from VERCEL_OIDC_TOKEN.\",\n});\n\n/** Parser for the `--team` option. */\nconst teamParser = cmd.option({\n  long: \"team\",\n  type: { ...cmd.optional(cmd.string), displayName: \"my-team\" },\n});\n/** Parser for the `--scope` option. */\nconst scopeParser = cmd.option({\n  long: \"scope\",\n  type: { ...cmd.optional(cmd.string), displayName: \"my-team\" },\n  description:\n    \"The scope/team to associate with the command. Can be inferred from VERCEL_OIDC_TOKEN. [alias: --team]\",\n});\n\n/** Parser for the `--scope` option that falls back to `--team` if not provided. */\nconst team: typeof scopeParser = {\n  ...scopeParser,\n  register(opts) {\n    scopeParser.register?.(opts);\n    teamParser.register?.(opts);\n  },\n  async parse(context) {\n    const [scope, team] = await Promise.all([\n      scopeParser.parse(context),\n      teamParser.parse(context),\n    ]);\n\n    if (scope._tag !== \"error\" && typeof scope.value === \"undefined\") {\n      if (team._tag !== \"error\" && team.value) {\n        return team;\n      } else if (team._tag === \"error\") {\n        return team;\n      }\n    }\n\n    return scope;\n  },\n};\n\n/**\n * Combining multiple argument parsing into a single \"scope\" argument\n * that includes token, project, and team.\n * If project or team are not provided, they will be inferred.\n */\nexport const scope: ArgParser<{\n  token: string;\n  project: string;\n  team: string;\n  projectSlug?: string;\n  teamSlug?: string;\n}> &\n  ProvidesHelp = {\n  register(ctx) {\n    token.register?.(ctx);\n    project.register?.(ctx);\n    team.register?.(ctx);\n  },\n  async parse(context) {\n    const t = await token.parse(context);\n    if (t._tag === \"error\") {\n      return t;\n    }\n\n    // We want to find all the arguments that `--project` or `--team` are\n    // visiting, so the errors will be nicer.\n    const visited = new Set(context.visitedNodes);\n    let [projectId, teamId] = await Promise.all([\n      project.parse(context),\n      team.parse(context),\n    ]);\n    const nodes = Array.from(context.visitedNodes).filter(\n      (x) => !visited.has(x),\n    );\n\n    if (projectId._tag === \"error\") {\n      return projectId;\n    }\n\n    if (teamId._tag === \"error\") {\n      return teamId;\n    }\n\n    let projectSlug: string | undefined;\n    let teamSlug: string | undefined;\n\n    if (\n      typeof projectId.value === \"undefined\" ||\n      typeof teamId.value === \"undefined\"\n    ) {\n      try {\n        const scope = await withFreshAuthRetry(() =>\n          inferScope({\n            token: t.value,\n            team: teamId.value,\n          }),\n        );\n        projectId.value ??= scope.project;\n        teamId.value ??= scope.owner;\n        projectSlug = scope.projectSlug;\n        teamSlug = scope.ownerSlug;\n      } catch (err) {\n        debug(\"scope inference failed: %O\", err);\n        const detail =\n          err instanceof NotOk ? ` ${err.response.responseText}` : \"\";\n        return {\n          _tag: \"error\",\n          error: {\n            errors: [\n              {\n                nodes,\n                message: [\n                  `Could not determine team/project scope.${detail}`,\n                  `${chalk.bold(\"hint:\")} Specify explicitly with --scope TEAM_SLUG --project PROJECT_NAME, or set VERCEL_OIDC_TOKEN.`,\n                  \"╰▶ Docs: https://vercel.com/docs/sandbox\",\n                ].join(\"\\n\"),\n              },\n            ],\n          },\n        };\n      }\n    }\n\n    return {\n      _tag: \"ok\",\n      value: {\n        token: t.value,\n        project: projectId.value,\n        team: teamId.value,\n        projectSlug,\n        teamSlug,\n      },\n    };\n  },\n  helpTopics() {\n    return [\n      ...token.helpTopics(),\n      ...project.helpTopics(),\n      ...team.helpTopics(),\n    ].map((x) => ({\n      ...x,\n      category: \"Auth & Scope\",\n    }));\n  },\n};\n","{\n  \"name\": \"sandbox\",\n  \"description\": \"Command line interface for Vercel Sandbox\",\n  \"version\": \"4.9.0\",\n  \"scripts\": {\n    \"clean\": \"rm -rf node_modules dist\",\n    \"sandbox\": \"tsx ./src/sandbox.ts\",\n    \"build\": \"tsdown\",\n    \"vercel-build\": \"tsx ./scripts/create-preview-deployment-tgz.ts\",\n    \"test\": \"vitest\",\n    \"example-whoami\": \"ts-node ./src/example-whoami.ts\",\n    \"example-next\": \"ts-node ./src/example-next.ts\",\n    \"example-flask\": \"ts-node ./src/example-flask.ts\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"generate-docs\": \"ts-node ./scripts/print-usage.ts > docs/index.md\",\n    \"version:bump\": \"pnpm generate-docs\"\n  },\n  \"keywords\": [\n    \"vercel\",\n    \"sandbox\",\n    \"cli\"\n  ],\n  \"main\": \"./dist/index.mjs\",\n  \"bin\": {\n    \"sandbox\": \"./bin/sandbox.mjs\",\n    \"sbx\": \"./bin/sandbox.mjs\"\n  },\n  \"files\": [\n    \"bin\",\n    \"README.md\",\n    \"dist\"\n  ],\n  \"homepage\": \"https://vercel.com/docs/vercel-sandbox/cli-reference\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/vercel/sandbox.git\",\n    \"directory\": \"packages/sandbox\"\n  },\n  \"license\": \"Apache-2.0\",\n  \"dependencies\": {\n    \"@vercel/sandbox\": \"workspace:*\",\n    \"async-retry\": \"1.3.3\",\n    \"debug\": \"^4.4.1\",\n    \"ws\": \"^8.21.0\",\n    \"zod\": \"^4.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/async-retry\": \"1.4.9\",\n    \"@types/debug\": \"^4.1.12\",\n    \"@types/ms\": \"^2.1.0\",\n    \"@types/node\": \"^22.15.12\",\n    \"@types/ws\": \"^8.18.1\",\n    \"@vercel/cli-config\": \"0.2.4\",\n    \"@vercel/detect-agent\": \"1.2.5\",\n    \"@vercel/oidc\": \"^4.0.0\",\n    \"@vercel/sandbox\": \"workspace:*\",\n    \"chalk\": \"^5.6.0\",\n    \"cmd-ts\": \"0.15.0\",\n    \"date-fns\": \"^4.1.0\",\n    \"dotenv-flow\": \"^4.1.0\",\n    \"listr2\": \"^9.0.2\",\n    \"ms\": \"^2.1.3\",\n    \"open\": \"^10.2.0\",\n    \"ora\": \"^8.2.0\",\n    \"tsdown\": \"catalog:\",\n    \"tsx\": \"4.20.3\",\n    \"vitest\": \"catalog:\",\n    \"xdg-app-paths\": \"5.1.0\"\n  }\n}\n","import chalk from \"chalk\";\n\nexport class StyledError extends Error {\n  name = \"StyledError\";\n  constructor(message: string, cause?: unknown) {\n    super(chalk.red(message), { cause });\n  }\n}\n","import { APIError, StreamError } from \"@vercel/sandbox\";\nimport chalk from \"chalk\";\nimport createDebugger from \"debug\";\nimport { tmpdir } from \"node:os\";\nimport Path from \"node:path\";\nimport { writeFile } from \"node:fs/promises\";\nimport { z } from \"zod\";\nimport { StyledError } from \"../error\";\n\nconst debug = createDebugger(\"sandbox:errors\");\n\nconst ApiErrorResponse = z.object({\n  error: z.object({\n    message: z.string(),\n  }),\n});\n\n/**\n * Formats an {@link APIError} into a {@link StyledError} with the pretty\n * multi-line layout used across the CLI.\n */\nexport async function formatApiError(\n  error: APIError<unknown>,\n): Promise<StyledError> {\n  const status = error.response.status;\n  const parsedError = ApiErrorResponse.safeParse(error.json);\n  const message = parsedError.data?.error.message ?? getErrorMessage(status);\n\n  // A 404 on a sandbox lookup is almost always a mistyped or removed name: a\n  // user mistake with a clear next step, not a system failure. Keep that\n  // output quiet and actionable; DEBUG=sandbox:errors restores the request\n  // detail and the response buffer.\n  const isLookupMiss =\n    status === 404 && /\\/sandboxes\\//.test(error.response.url);\n  if (isLookupMiss && !debug.enabled) {\n    debug(`requested url: ${error.response.url}`);\n    return new StyledError(\n      [\n        message,\n        `├▶ status code: ${status} ${error.response.statusText}`,\n        `╰▶ ${chalk.bold(\"hint:\")} run ${chalk.cyan(\"sandbox ls --all\")} to see the sandboxes in this project.`,\n      ].join(\"\\n\"),\n      error,\n    );\n  }\n\n  const tmpPath = await writeResponseToTemp(error);\n  const lines = [\n    message,\n    `├▶ requested url: ${error.response.url}`,\n    `├▶ status code: ${status} ${error.response.statusText}`,\n  ];\n  if (isLookupMiss) {\n    lines.push(\n      `├▶ ${chalk.bold(\"hint:\")} run ${chalk.cyan(\"sandbox ls --all\")} to see the sandboxes in this project.`,\n    );\n  }\n  lines.push(\n    `╰▶ ${chalk.bold(\"hint:\")} the full response buffer is stored in ${chalk.italic(tmpPath)}`,\n  );\n  return new StyledError(lines.join(\"\\n\"), error);\n}\n\nfunction getErrorMessage(status: number): string {\n  if (status === 400) {\n    return \"Sandbox API request failed: the request was invalid (400). Check the command arguments and try again.\";\n  }\n  if (status === 401 || status === 403) {\n    return \"Sandbox API request failed due to authentication. Check your token or run `sandbox login`.\";\n  }\n  if (status === 404) {\n    return \"Sandbox API request failed: resource not found.\";\n  }\n  if (status === 429) {\n    return \"Sandbox API rate limit exceeded (429). Please wait and try again.\";\n  }\n  if (status >= 500) {\n    return \"Sandbox API responded with a server error. Please try again.\";\n  }\n  return \"Sandbox API request failed.\";\n}\n\nasync function writeResponseToTemp({\n  response,\n  text,\n}: APIError<unknown>): Promise<string> {\n  const unique = [process.pid, process.hrtime.bigint()]\n    .map((x) => x.toString(36))\n    .join(\"\");\n  const tmpPath = Path.join(tmpdir(), `sandbox-cli-response-${unique}.http`);\n\n  const buffers = [] as Buffer[];\n  buffers.push(Buffer.from(`${response.url}\\r\\n`));\n  buffers.push(Buffer.from(`${response.status} ${response.statusText}\\r\\n`));\n  for (const [key, value] of response.headers) {\n    buffers.push(Buffer.from(`${key}: ${value}\\r\\n`));\n  }\n  buffers.push(Buffer.from(`\\r\\n`));\n  if (text) {\n    buffers.push(Buffer.from(text));\n  }\n\n  await writeFile(tmpPath, Buffer.concat(buffers));\n  return tmpPath;\n}\n\n/**\n * Detects network-level timeouts when talking to the Sandbox API.\n */\nexport function isApiTimeoutError(error: unknown): boolean {\n  if (!error || typeof error !== \"object\") {\n    return false;\n  }\n\n  const e = error as {\n    name?: string;\n    code?: string;\n    message?: string;\n    cause?: unknown;\n  };\n  if (e.name === \"TimeoutError\" || e.name === \"AbortError\") {\n    return true;\n  }\n  if (e.code === \"ETIMEDOUT\") {\n    return true;\n  }\n\n  const causeCode = (e.cause as { code?: string } | undefined)?.code;\n  if (\n    causeCode === \"UND_ERR_CONNECT_TIMEOUT\" ||\n    causeCode === \"UND_ERR_HEADERS_TIMEOUT\"\n  ) {\n    return true;\n  }\n\n  // undici wraps the underlying error: `TypeError: fetch failed` -> cause.\n  if (e.name === \"TypeError\" && e.message === \"fetch failed\") {\n    return isApiTimeoutError(e.cause);\n  }\n  return false;\n}\n\nexport function formatApiTimeoutError(error: unknown): StyledError {\n  return new StyledError(\n    [\n      \"The request to the Sandbox API timed out.\",\n      `╰▶ ${chalk.bold(\"hint:\")} check your network connection and try again.`,\n    ].join(\"\\n\"),\n    error,\n  );\n}\n\nexport function formatStreamError(error: StreamError): StyledError {\n  return new StyledError(\n    [\n      \"The sandbox stream was interrupted.\",\n      `├▶ code: ${error.code}`,\n      `├▶ session: ${error.sessionId}`,\n      `╰▶ ${chalk.bold(\"hint:\")} the sandbox may have stopped. Resume or recreate it and try again.`,\n    ].join(\"\\n\"),\n    error,\n  );\n}\n\n/**\n * Single funnel for every error that reaches the CLI's top-level catch.\n */\nexport async function printTopLevelError(e: unknown): Promise<void> {\n  const styled = await toStyledError(e);\n\n  console.error();\n  if (styled) {\n    console.error(styled.message);\n  } else {\n    console.error(chalk.red(e instanceof Error ? e.message : String(e)));\n    // Surface the raw error (object + stack) only when explicitly debugging.\n    if (debug.enabled) {\n      console.error(e);\n    }\n  }\n}\n\nasync function toStyledError(e: unknown): Promise<StyledError | null> {\n  if (e instanceof StyledError) {\n    return e;\n  }\n  if (e instanceof APIError) {\n    return formatApiError(e);\n  }\n  if (e instanceof StreamError) {\n    return formatStreamError(e);\n  }\n  if (isApiTimeoutError(e)) {\n    return formatApiTimeoutError(e);\n  }\n  return null;\n}\n","/* eslint-env es6, node */\n// # spell-checker:ignore HomeDrive HomePath LocalAppData UserProfile WinDir\n'use strict';\n\nconst os = require('os');\nconst paths = require('path');\n\nconst isWinOS = /^win/i.test(process.platform);\n\nfunction normalize_path(path) {\n\treturn paths.normalize(paths.join(path, '.'));\n}\n\nconst base = () => {\n\tconst { env } = process;\n\n\tconst object = {};\n\n\tobject.home = () => normalize_path(os.homedir ? os.homedir() : env.HOME);\n\n\tobject.temp = () => normalize_path(os.tmpdir ? os.tmpdir() : env.TMPDIR || env.TEMP || env.TMP);\n\n\treturn object;\n};\n\nconst windows = () => {\n\tconst { env } = process;\n\n\tconst object = {};\n\n\tobject.home = () =>\n\t\tnormalize_path(\n\t\t\tos.homedir\n\t\t\t\t? os.homedir()\n\t\t\t\t: env.USERPROFILE || paths.join(env.HOMEDRIVE, env.HOMEPATH) || env.HOME\n\t\t);\n\n\tobject.temp = () =>\n\t\tnormalize_path(\n\t\t\tos.tmpdir\n\t\t\t\t? os.tmpdir()\n\t\t\t\t: env.TEMP ||\n\t\t\t\t\t\tenv.TMP ||\n\t\t\t\t\t\tpaths.join(env.LOCALAPPDATA || env.SystemRoot || env.windir, 'Temp')\n\t\t);\n\n\treturn object;\n};\n\nclass _OSPaths {\n\tconstructor() {\n\t\tconst OSPaths = function () {\n\t\t\treturn new _OSPaths();\n\t\t};\n\n\t\tthis._fn = OSPaths;\n\n\t\t// Connect to platform-specific API functions by extension\n\t\tconst extension = isWinOS ? windows() : base();\n\t\tObject.keys(extension).forEach((key) => {\n\t\t\tthis._fn[key] = extension[key];\n\t\t});\n\n\t\treturn this._fn;\n\t}\n}\n\nmodule.exports = new _OSPaths();\n","// # spell-checker:ignore macos APPDATA LOCALAPPDATA\n/* eslint-env es6, node */\n'use strict';\n\nconst path = require('path');\n\nconst osPaths = require('os-paths');\n\n// XDG references\n// # ref: <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html> @@ <https://archive.is/aAhtw>\n// # ref: <https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html> @@ <https://archive.is/7N0TN>\n// # ref: <https://wiki.archlinux.org/index.php/XDG_Base_Directory> @@ <https://archive.is/VdO9n>\n// # ref: <https://wiki.debian.org/XDGBaseDirectorySpecification#state> @@ <http://archive.is/pahId>\n// # ref: <https://ploum.net/207-modify-your-application-to-use-xdg-folders> @@ <https://archive.is/f43Gk>\n\nconst linux = () => {\n\tconst object = {};\n\n\tobject.cache = () =>\n\t\tprocess.env.XDG_CACHE_HOME || path.join(osPaths.home() || osPaths.temp(), '.cache');\n\tobject.config = () =>\n\t\tprocess.env.XDG_CONFIG_HOME || path.join(osPaths.home() || osPaths.temp(), '.config');\n\tobject.data = () =>\n\t\tprocess.env.XDG_DATA_HOME || path.join(osPaths.home() || osPaths.temp(), '.local', 'share');\n\tobject.runtime = () => process.env.XDG_RUNTIME_DIR || undefined;\n\tobject.state = () =>\n\t\tprocess.env.XDG_STATE_HOME || path.join(osPaths.home() || osPaths.temp(), '.local', 'state');\n\n\treturn object;\n};\n\nconst macos = () => {\n\tconst object = {};\n\n\tobject.cache = () =>\n\t\tprocess.env.XDG_CACHE_HOME ||\n\t\tpath.join(path.join(osPaths.home() || osPaths.temp(), 'Library'), 'Caches');\n\tobject.config = () =>\n\t\tprocess.env.XDG_CONFIG_HOME ||\n\t\tpath.join(path.join(osPaths.home() || osPaths.temp(), 'Library'), 'Preferences');\n\tobject.data = () =>\n\t\tprocess.env.XDG_DATA_HOME ||\n\t\tpath.join(path.join(osPaths.home() || osPaths.temp(), 'Library'), 'Application Support');\n\tobject.runtime = () => process.env.XDG_RUNTIME_DIR || undefined;\n\tobject.state = () =>\n\t\tprocess.env.XDG_STATE_HOME ||\n\t\tpath.join(path.join(osPaths.home() || osPaths.temp(), 'Library'), 'State');\n\n\treturn object;\n};\n\nconst windows = () => {\n\tconst object = {};\n\t// # ref: <https://www.thewindowsclub.com/local-localnow-roaming-folders-windows-10> @@ <http://archive.is/tDEPl>\n\t// Locations for cache/config/data/state are invented (Windows doesn't have a popular convention)\n\n\tobject.cache = () => {\n\t\tconst localAppData =\n\t\t\tprocess.env.LOCALAPPDATA || path.join(osPaths.home() || osPaths.temp(), 'AppData', 'Local'); // \"AppData/Local\" contains local-machine-only user data\n\t\treturn process.env.XDG_CACHE_HOME || path.join(localAppData, 'xdg.cache');\n\t};\n\n\tobject.config = () => {\n\t\tconst appData =\n\t\t\tprocess.env.APPDATA || path.join(osPaths.home() || osPaths.temp(), 'AppData', 'Roaming'); // \"AppData/Roaming\" contains data which may follow user between machines\n\t\treturn process.env.XDG_CONFIG_HOME || path.join(appData, 'xdg.config');\n\t};\n\n\tobject.data = () => {\n\t\tconst appData =\n\t\t\tprocess.env.APPDATA || path.join(osPaths.home() || osPaths.temp(), 'AppData', 'Roaming'); // \"AppData/Roaming\" contains data which may follow user between machines\n\t\treturn process.env.XDG_DATA_HOME || path.join(appData, 'xdg.data');\n\t};\n\n\tobject.runtime = () => process.env.XDG_RUNTIME_DIR || undefined;\n\n\tobject.state = () => {\n\t\tconst localAppData =\n\t\t\tprocess.env.LOCALAPPDATA || path.join(osPaths.home() || osPaths.temp(), 'AppData', 'Local'); // \"AppData/Local\" contains local-machine-only user data\n\t\treturn process.env.XDG_STATE_HOME || path.join(localAppData, 'xdg.state');\n\t};\n\n\treturn object;\n};\n\nconst _XDGPortable = () => {\n\tconst XDGPortable = function () {\n\t\treturn _XDGPortable();\n\t};\n\n\tlet extension = {};\n\tif (/^darwin$/i.test(process.platform)) {\n\t\textension = macos();\n\t} else if (/^win/i.test(process.platform)) {\n\t\textension = windows();\n\t} else {\n\t\textension = linux();\n\t}\n\n\textension.configDirs = () => {\n\t\tconst dirs = [];\n\t\tdirs.push(extension.config());\n\t\tif (process.env.XDG_CONFIG_DIRS) {\n\t\t\tdirs.push(...process.env.XDG_CONFIG_DIRS.split(path.delimiter));\n\t\t}\n\n\t\treturn dirs;\n\t};\n\n\textension.dataDirs = () => {\n\t\tconst dirs = [];\n\t\tdirs.push(extension.data());\n\t\tif (process.env.XDG_DATA_DIRS) {\n\t\t\tdirs.push(...process.env.XDG_DATA_DIRS.split(path.delimiter));\n\t\t}\n\n\t\treturn dirs;\n\t};\n\n\tObject.keys(extension).forEach((key) => {\n\t\tXDGPortable[key] = extension[key];\n\t});\n\n\treturn XDGPortable;\n};\n\nmodule.exports = _XDGPortable();\n","// # spell-checker:ignore macos APPDATA LOCALAPPDATA\n/* eslint-env es6, node */\n'use strict';\n\nconst path = require('path');\nconst os = require('os');\nconst xdg = require('xdg-portable');\n\nconst isWinOS = /^win/i.test(process.platform);\n\nfunction _normalizeOptions(options, isolated) {\n\toptions = options || {};\n\tif (typeof options !== 'object') {\n\t\toptions = {isolated: options};\n\t}\n\n\toptions.isolated = ((options.isolated === undefined) || (options.isolated === null)) ? isolated : options.isolated;\n\tif (typeof options.isolated !== 'boolean') {\n\t\tthrow new TypeError(`Expected boolean for \"isolated\" argument, got ${typeof options.isolated}`);\n\t}\n\n\treturn options;\n}\n\nconst base = (name, isolated) => {\n\tconst object = {};\n\n\tobject.cache = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn path.join(xdg.cache(), options.isolated ? name : '');\n\t};\n\n\tobject.config = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn path.join(xdg.config(), options.isolated ? name : '');\n\t};\n\n\tobject.data = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn path.join(xdg.data(), options.isolated ? name : '');\n\t};\n\n\tobject.runtime = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn xdg.runtime() ? path.join(xdg.runtime(), options.isolated ? name : '') : undefined;\n\t};\n\n\tobject.state = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn path.join(xdg.state(), options.isolated ? name : '');\n\t};\n\n\tobject.configDirs = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn (xdg.configDirs()).map(s => path.join(s, options.isolated ? name : ''));\n\t};\n\n\tobject.dataDirs = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn (xdg.dataDirs()).map(s => path.join(s, options.isolated ? name : ''));\n\t};\n\n\treturn object;\n};\n\nconst windows = (name, isolated) => {\n\tconst {env} = process;\n\tconst homedir = os.homedir();\n\tconst tmpdir = os.tmpdir();\n\n\t// # ref: <https://www.thewindowsclub.com/local-localnow-roaming-folders-windows-10> @@ <http://archive.is/tDEPl>\n\tconst appData = env.APPDATA || path.join(homedir || tmpdir, 'AppData', 'Roaming'); // APPDATA == \"AppData/Roaming\" contains data which may follow user between machines\n\tconst localAppData = env.LOCALAPPDATA || path.join(homedir || tmpdir, 'AppData', 'Local'); // LOCALAPPDATA == \"AppData/Local\" contains local-machine-only user data\n\n\tconst object = {};\n\n\t// Locations for data/config/cache/state are invented (Windows doesn't have a popular convention)\n\n\tobject.cache = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn (!options.isolated || env.XDG_CACHE_HOME) ?\n\t\t\tpath.join(xdg.cache(), options.isolated ? name : '') :\n\t\t\tpath.join(localAppData, options.isolated ? name : '', 'Cache');\n\t};\n\n\tobject.config = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\tconst config = (!options.isolated || env.XDG_CONFIG_HOME) ?\n\t\t\tpath.join(xdg.config(), options.isolated ? name : '') :\n\t\t\tpath.join(appData, options.isolated ? name : '', 'Config');\n\t\treturn config;\n\t};\n\n\tobject.data = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\tconst data = (!options.isolated || env.XDG_DATA_HOME) ?\n\t\t\tpath.join(xdg.data(), options.isolated ? name : '') :\n\t\t\tpath.join(appData, options.isolated ? name : '', 'Data');\n\t\treturn data;\n\t};\n\n\tobject.runtime = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn xdg.runtime() ? path.join(xdg.runtime(), options.isolated ? name : '') : undefined;\n\t};\n\n\tobject.state = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\treturn (!options.isolated || env.XDG_STATE_HOME) ?\n\t\t\tpath.join(xdg.state(), options.isolated ? name : '') :\n\t\t\tpath.join(localAppData, options.isolated ? name : '', 'State');\n\t};\n\n\tobject.configDirs = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\tconst dirs = [object.config(options)];\n\t\tif (env.XDG_CONFIG_DIRS) {\n\t\t\tdirs.push(...env.XDG_CONFIG_DIRS.split(path.delimiter).map(s => path.join(s, options.isolated ? name : '')));\n\t\t}\n\n\t\treturn dirs;\n\t};\n\n\tobject.dataDirs = (options = {isolated: null}) => {\n\t\toptions = _normalizeOptions(options, isolated);\n\t\tconst dirs = [object.data(options)];\n\t\tif (env.XDG_DATA_DIRS) {\n\t\t\tdirs.push(...env.XDG_DATA_DIRS.split(path.delimiter).map(s => path.join(s, options.isolated ? name : '')));\n\t\t}\n\n\t\treturn dirs;\n\t};\n\n\treturn object;\n};\n\nclass _XDGAppPaths {\n\tconstructor(options = {name: null, suffix: null, isolated: true}) {\n\t\tconst XDGAppPaths = function (options = {name: null, suffix: null, isolated: true}) {\n\t\t\treturn new _XDGAppPaths(options);\n\t\t};\n\n\t\tthis._fn = XDGAppPaths;\n\n\t\toptions = options || {};\n\t\tif (typeof options !== 'object') {\n\t\t\toptions = {name: options};\n\t\t}\n\n\t\tlet name = options.name || '';\n\t\tif (typeof name !== 'string') {\n\t\t\tthrow new TypeError(`Expected string for \"name\" argument, got ${typeof name}`);\n\t\t}\n\n\t\tconst suffix = options.suffix || '';\n\t\tif (typeof suffix !== 'string') {\n\t\t\tthrow new TypeError(`Expected string for \"suffix\" argument, got ${typeof suffix}`);\n\t\t}\n\n\t\tconst isolated = ((options.isolated === undefined) || (options.isolated === null)) ? true : options.isolated;\n\t\tif (typeof isolated !== 'boolean') {\n\t\t\tthrow new TypeError(`Expected boolean for \"isolated\" argument, got ${typeof isolated}`);\n\t\t}\n\n\t\tif (!name) {\n\t\t\t// Find a suitable application name (ref: <https://stackoverflow.com/a/46110961/43774>)\n\t\t\tname = path.parse(process.pkg ? process.execPath : (require.main ? require.main.filename : process.argv[0])).name;\n\t\t}\n\n\t\tif (suffix) {\n\t\t\tname += suffix;\n\t\t}\n\n\t\tthis._fn.$name = () => name;\n\t\tthis._fn.$isolated = () => isolated;\n\n\t\t// Connect to platform-specific API functions by extension\n\t\tconst extension = isWinOS ? windows(name, isolated) : base(name, isolated);\n\t\tObject.keys(extension).forEach(key => {\n\t\t\tthis._fn[key] = extension[key];\n\t\t});\n\n\t\treturn this._fn;\n\t}\n}\n\nmodule.exports = new _XDGAppPaths();\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDataPath = getDataPath;\nexports.getGlobalPathConfig = getGlobalPathConfig;\nexports.getConfigFilePath = getConfigFilePath;\nexports.getAuthConfigFilePath = getAuthConfigFilePath;\nexports.readGlobalConfigFlag = readGlobalConfigFlag;\n// Zod-free path helpers so hot paths (e.g. the `vc.js` shim) can locate and\n// read the global config without loading zod and the config schemas.\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\nconst node_path_1 = __importDefault(require(\"node:path\"));\nconst node_os_1 = require(\"node:os\");\nfunction isReadableDirectory(targetPath) {\n    try {\n        return node_fs_1.default.lstatSync(targetPath).isDirectory();\n    }\n    catch (_) {\n        return false;\n    }\n}\nfunction getDataDirectories(appName) {\n    // xdg-app-paths infers a default app name when loaded, which requires a\n    // process entrypoint that is not present in every server runtime.\n    const XDGAppPaths = require('xdg-app-paths');\n    return XDGAppPaths(appName).dataDirs();\n}\n/** Canonical platform application-data directory for the Vercel CLI. */\nfunction getDataPath() {\n    return getDataDirectories('com.vercel.cli')[0];\n}\nfunction getGlobalPathConfig() {\n    const vercelDirectories = getDataDirectories('com.vercel.cli');\n    const possibleConfigPaths = [\n        ...vercelDirectories, // latest vercel directory\n        node_path_1.default.join((0, node_os_1.homedir)(), '.now'), // legacy config in user's home directory\n        ...getDataDirectories('now'), // legacy XDG directory\n    ];\n    return (possibleConfigPaths.find(configPath => isReadableDirectory(configPath)) ||\n        vercelDirectories[0]);\n}\nfunction getConfigFilePath(configDir) {\n    return node_path_1.default.join(configDir, 'config.json');\n}\nfunction getAuthConfigFilePath(configDir) {\n    return node_path_1.default.join(configDir, 'auth.json');\n}\n// Reads a single key from the global config file without schema validation,\n// for cheap feature-gate reads on hot paths.\nfunction readGlobalConfigFlag(configPath, key) {\n    try {\n        const content = node_fs_1.default.readFileSync(configPath, 'utf8').replace(/^\\uFEFF/, '');\n        const parsed = JSON.parse(content);\n        if (parsed && typeof parsed === 'object') {\n            return parsed[key];\n        }\n    }\n    catch {\n        // Missing/unreadable/invalid config is treated as \"no value\".\n    }\n    return undefined;\n}\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar src_exports = {};\n__export(src_exports, {\n  KNOWN_AGENTS: () => KNOWN_AGENTS,\n  determineAgent: () => determineAgent\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_promises = require(\"node:fs/promises\");\nvar import_node_fs = require(\"node:fs\");\nconst DEVIN_LOCAL_PATH = \"/opt/.devin\";\nconst CURSOR = \"cursor\";\nconst CURSOR_CLI = \"cursor-cli\";\nconst CLAUDE = \"claude\";\nconst COWORK = \"cowork\";\nconst DEVIN = \"devin\";\nconst REPLIT = \"replit\";\nconst GEMINI = \"gemini\";\nconst CODEX = \"codex\";\nconst ANTIGRAVITY = \"antigravity\";\nconst AUGMENT_CLI = \"augment-cli\";\nconst OPENCODE = \"opencode\";\nconst GITHUB_COPILOT = \"github-copilot\";\nconst GITHUB_COPILOT_CLI = \"github-copilot-cli\";\nconst V0 = \"v0\";\nconst KNOWN_AGENTS = {\n  CURSOR,\n  CURSOR_CLI,\n  CLAUDE,\n  COWORK,\n  DEVIN,\n  REPLIT,\n  GEMINI,\n  CODEX,\n  ANTIGRAVITY,\n  AUGMENT_CLI,\n  OPENCODE,\n  GITHUB_COPILOT,\n  V0\n};\nasync function determineAgent() {\n  if (process.env.AI_AGENT) {\n    const name = process.env.AI_AGENT.trim();\n    if (name) {\n      if (name === GITHUB_COPILOT || name === GITHUB_COPILOT_CLI) {\n        return {\n          isAgent: true,\n          agent: { name: GITHUB_COPILOT }\n        };\n      }\n      if (name === V0) {\n        return {\n          isAgent: true,\n          agent: { name: V0 }\n        };\n      }\n      return {\n        isAgent: true,\n        agent: { name }\n      };\n    }\n  }\n  if (process.env.CURSOR_TRACE_ID) {\n    return { isAgent: true, agent: { name: CURSOR } };\n  }\n  if (process.env.CURSOR_AGENT || process.env.CURSOR_EXTENSION_HOST_ROLE === \"agent-exec\") {\n    return { isAgent: true, agent: { name: CURSOR_CLI } };\n  }\n  if (process.env.GEMINI_CLI) {\n    return { isAgent: true, agent: { name: GEMINI } };\n  }\n  if (process.env.CODEX_SANDBOX || process.env.CODEX_CI || process.env.CODEX_THREAD_ID) {\n    return { isAgent: true, agent: { name: CODEX } };\n  }\n  if (process.env.ANTIGRAVITY_AGENT) {\n    return { isAgent: true, agent: { name: ANTIGRAVITY } };\n  }\n  if (process.env.AUGMENT_AGENT) {\n    return { isAgent: true, agent: { name: AUGMENT_CLI } };\n  }\n  if (process.env.OPENCODE_CLIENT) {\n    return { isAgent: true, agent: { name: OPENCODE } };\n  }\n  if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) {\n    if (process.env.CLAUDE_CODE_IS_COWORK) {\n      return { isAgent: true, agent: { name: COWORK } };\n    }\n    return { isAgent: true, agent: { name: CLAUDE } };\n  }\n  if (process.env.REPL_ID) {\n    return { isAgent: true, agent: { name: REPLIT } };\n  }\n  if (process.env.COPILOT_MODEL || process.env.COPILOT_ALLOW_ALL || process.env.COPILOT_GITHUB_TOKEN) {\n    return { isAgent: true, agent: { name: GITHUB_COPILOT } };\n  }\n  try {\n    await (0, import_promises.access)(DEVIN_LOCAL_PATH, import_node_fs.constants.F_OK);\n    return { isAgent: true, agent: { name: DEVIN } };\n  } catch (_error) {\n  }\n  return { isAgent: false, agent: void 0 };\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  KNOWN_AGENTS,\n  determineAgent\n});\n","import { determineAgent } from \"@vercel/detect-agent\";\n\nlet agentNamePromise: Promise<string | undefined> | undefined;\n\n/**\n * Detects the AI agent driving this process, if any. Memoized because the\n * result is used both for telemetry events and for the user-agent header\n * on every API request.\n */\nexport function detectAgentName(): Promise<string | undefined> {\n  if (!agentNamePromise) {\n    agentNamePromise = determineAgent().then(\n      (result) => (result.isAgent ? result.agent.name : undefined),\n      () => undefined,\n    );\n  }\n  return agentNamePromise;\n}\n","import { randomUUID } from \"node:crypto\";\nimport { mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport os from \"node:os\";\nimport xdgAppPaths from \"xdg-app-paths\";\nimport { getConfigFilePath, getGlobalPathConfig } from \"@vercel/cli-config/paths\";\nimport createDebugger from \"debug\";\nimport { version } from \"../pkg\";\nimport { detectAgentName } from \"./agent\";\n\nconst debug = createDebugger(\"sandbox:telemetry\");\n\nconst BRIDGE_URL = \"https://telemetry.vercel.com/api/sandbox-cli/v1/events\";\nconst FLUSH_TIMEOUT_MS = 1_500;\n\ninterface Event {\n  id: string;\n  event_time: number;\n  key: string;\n  value: string;\n}\n\nfunction configFilePath(): string {\n  return join(xdgAppPaths(\"sandbox-cli\").config(), \"telemetry.json\");\n}\n\nfunction readJson(path: string): Record<string, unknown> | undefined {\n  try {\n    return JSON.parse(readFileSync(path, \"utf8\"));\n  } catch {\n    return undefined;\n  }\n}\n\nexport function readTelemetryConfig(): { enabled?: boolean } | undefined {\n  return readJson(configFilePath());\n}\n\nexport function writeTelemetryConfig(enabled: boolean): void {\n  const dir = xdgAppPaths(\"sandbox-cli\").config();\n  mkdirSync(dir, { recursive: true });\n  writeFileSync(configFilePath(), JSON.stringify({ enabled }, null, 2));\n}\n\n/**\n * Reads the Vercel CLI's global telemetry preference so that running as\n * `vercel sandbox` respects an existing `vercel telemetry disable`.\n * getConfigFilePath resolves the same directory (and legacy fallbacks)\n * the Vercel CLI actually writes to.\n */\nfunction vercelCliTelemetryDisabled(): boolean {\n  try {\n    const config = readJson(getConfigFilePath(getGlobalPathConfig()));\n    const telemetry = config?.telemetry as { enabled?: boolean } | undefined;\n    return telemetry?.enabled === false;\n  } catch {\n    return false;\n  }\n}\n\n// Keep in sync with the commands registered in app.ts (including aliases).\nconst SUBCOMMANDS = new Set([\n  \"list\",\n  \"ls\",\n  \"create\",\n  \"sh\",\n  \"fork\",\n  \"config\",\n  \"copy\",\n  \"cp\",\n  \"exec\",\n  \"connect\",\n  \"ssh\",\n  \"shell\",\n  \"stop\",\n  \"remove\",\n  \"rm\",\n  \"run\",\n  \"snapshot\",\n  \"snapshots\",\n  \"sessions\",\n  \"login\",\n  \"logout\",\n  \"telemetry\",\n]);\n\nexport class Telemetry {\n  private events: Event[] = [];\n  private readonly sessionId = randomUUID();\n  private teamId = \"NO_TEAM_ID\";\n  private projectId: string | undefined;\n  private embedded = false;\n\n  get enabled(): boolean {\n    if (\n      process.env.VERCEL_SANDBOX_TELEMETRY_DISABLED ||\n      process.env.VERCEL_TELEMETRY_DISABLED\n    ) {\n      return false;\n    }\n    if (this.embedded && vercelCliTelemetryDisabled()) {\n      return false;\n    }\n    return readTelemetryConfig()?.enabled ?? true;\n  }\n\n  get isDebug(): boolean {\n    return Boolean(process.env.VERCEL_TELEMETRY_DEBUG);\n  }\n\n  track(key: string, value: string | undefined): void {\n    if (!value) return;\n    this.events.push({ id: randomUUID(), event_time: Date.now(), key, value });\n  }\n\n  updateTeamId(teamId: string | undefined): void {\n    if (teamId) this.teamId = teamId;\n  }\n\n  updateProjectId(projectId: string | undefined): void {\n    if (projectId) this.projectId = projectId;\n  }\n\n  /**\n   * Records the `sbx_` session id an invocation touched, and whether it\n   * created that session or attached to an existing one, so invocations can\n   * be joined to the usage-fact pipeline downstream.\n   */\n  trackSandboxSession(sessionId: string | undefined, origin: \"created\" | \"attached\"): void {\n    this.track(\"sandbox_session_id\", sessionId);\n    if (sessionId) this.track(\"sandbox_session_origin\", origin);\n  }\n\n  trackExitCode(code: number): void {\n    this.track(\"exit_code\", String(code));\n  }\n\n  async trackInvocation(opts: { appName: string; argv: string[] }): Promise<void> {\n    this.embedded = opts.appName !== \"sandbox\";\n    // cmd-ts only dispatches on argv[0], so anchor there and only ever record\n    // known subcommand names: an option value elsewhere in argv (a token, a\n    // path, or a name that collides with a command) can never end up in an\n    // event, and a leading flag records nothing rather than something wrong.\n    const first = opts.argv[0];\n    const subcommand = first && SUBCOMMANDS.has(first) ? first : undefined;\n    this.track(\"subcommand\", subcommand);\n    this.track(\"agent\", await detectAgentName());\n    this.track(\"version\", version);\n    this.track(\"platform\", os.platform());\n    this.track(\"arch\", os.arch());\n    this.track(\"ci\", process.env.CI ? \"TRUE\" : undefined);\n    this.track(\"embedded\", this.embedded ? opts.appName : undefined);\n  }\n\n  /**\n   * Sends buffered events to the telemetry bridge. Never throws and never\n   * blocks the CLI for longer than FLUSH_TIMEOUT_MS. With\n   * VERCEL_TELEMETRY_DEBUG set, events are printed to stderr and not sent.\n   */\n  async flush(): Promise<void> {\n    if (this.events.length === 0) return;\n\n    const events = this.events.map((event) => ({\n      ...event,\n      team_id: this.teamId,\n      session_id: this.sessionId,\n      project_id: this.projectId ?? null,\n      // Set by the Vercel CLI's sandbox wrapper so events from embedded runs\n      // can join the Vercel CLI's own invocation-grained telemetry.\n      vercel_cli_invocation_id: process.env.VERCEL_CLI_INVOCATION_ID ?? null,\n    }));\n    this.events = [];\n\n    if (this.isDebug) {\n      for (const event of events) {\n        process.stderr.write(`[telemetry] ${JSON.stringify(event)}\\n`);\n      }\n      return;\n    }\n\n    if (!this.enabled) return;\n\n    try {\n      const response = await fetch(\n        process.env.VERCEL_SANDBOX_TELEMETRY_BRIDGE_URL || BRIDGE_URL,\n        {\n          method: \"POST\",\n          headers: {\n            \"content-type\": \"application/json\",\n            \"client-id\": \"sandbox-cli\",\n            \"x-sandbox-cli-topic-id\": \"generic\",\n            \"x-sandbox-cli-session-id\": this.sessionId,\n          },\n          body: JSON.stringify(events),\n          signal: AbortSignal.timeout(FLUSH_TIMEOUT_MS),\n        },\n      );\n      debug(\"telemetry bridge responded with %d\", response.status);\n    } catch (error) {\n      debug(\"failed to send telemetry events: %o\", error);\n    }\n  }\n}\n\nexport const telemetry = new Telemetry();\n","import { Sandbox, APIError, Snapshot, Drive } from \"@vercel/sandbox\";\nimport { version } from \"./pkg\";\nimport { withFreshAuthRetry } from \"./util/fresh-auth-retry\";\nimport { formatApiError } from \"./util/format-error\";\nimport { telemetry } from \"./telemetry\";\nimport { detectAgentName } from \"./telemetry/agent\";\n\n/**\n * A {@link Sandbox} wrapper that adds user-agent headers and error handling.\n */\nexport const sandboxClient: Pick<\n  typeof Sandbox,\n  \"get\" | \"list\" | \"create\" | \"fork\"\n> = {\n  get: (params) =>\n    withErrorHandling(async () => {\n      updateScope(params);\n      const sandbox = await Sandbox.get({ fetch: fetchWithUserAgent, resume: false, ...params });\n      trackSession(sandbox, \"attached\");\n      return sandbox;\n    }),\n  create: (params) =>\n    withErrorHandling(async () => {\n      updateScope(params);\n      const sandbox = await Sandbox.create({ fetch: fetchWithUserAgent, ...params });\n      trackSession(sandbox, \"created\");\n      return sandbox;\n    }),\n  fork: (params) =>\n    withErrorHandling(async () => {\n      updateScope(params);\n      const sandbox = await Sandbox.fork({ fetch: fetchWithUserAgent, ...params });\n      trackSession(sandbox, \"created\");\n      return sandbox;\n    }),\n  list: (params) =>\n    withErrorHandling(() => {\n      updateScope(params);\n      return Sandbox.list({ fetch: fetchWithUserAgent, ...params } as typeof params);\n    }),\n};\n\nexport const snapshotClient: Pick<\n  typeof Snapshot,\n  \"get\" | \"list\" | \"tree\"\n> = {\n  list: (params) =>\n    withErrorHandling(() =>\n      Snapshot.list({ fetch: fetchWithUserAgent, ...params }),\n    ),\n  get: (params) => withErrorHandling(() => Snapshot.get({ ...params })),\n  tree: (params) =>\n    withErrorHandling(() => Snapshot.tree({ fetch: fetchWithUserAgent, ...params })),\n};\n\nexport const driveClient: Pick<typeof Drive, \"get\" | \"getOrCreate\" | \"list\"> & {\n  fork(drive: Drive, params: Parameters<Drive[\"fork\"]>[0]): Promise<Drive>;\n  delete(drive: Drive): Promise<void>;\n} = {\n  get: (params) =>\n    withErrorHandling(() => Drive.get({ fetch: fetchWithUserAgent, ...params })),\n  getOrCreate: (params) =>\n    withErrorHandling(() =>\n      Drive.getOrCreate({ fetch: fetchWithUserAgent, ...params }),\n    ),\n  list: (params) =>\n    withErrorHandling(() =>\n      Drive.list({ fetch: fetchWithUserAgent, ...params } as typeof params),\n    ),\n  delete: (drive) => withErrorHandling(() => drive.delete()),\n  fork: (drive, params) => withErrorHandling(() => drive.fork(params)),\n};\n\nfunction scopeField(params: unknown, field: string): string | undefined {\n  if (params && typeof params === \"object\" && field in params) {\n    const value = (params as Record<string, unknown>)[field];\n    if (typeof value === \"string\") return value;\n  }\n  return undefined;\n}\n\nfunction updateScope(params: unknown): void {\n  telemetry.updateTeamId(scopeField(params, \"teamId\"));\n  telemetry.updateProjectId(scopeField(params, \"projectId\"));\n}\n\nfunction trackSession(sandbox: Sandbox, origin: \"created\" | \"attached\"): void {\n  try {\n    telemetry.trackSandboxSession(sandbox.currentSession().sessionId, origin);\n  } catch {\n    // No active session on this instance; nothing to record.\n  }\n}\n\nconst fetchWithUserAgent: typeof globalThis.fetch = async (input, init) => {\n  const headers = new Headers(\n    init?.headers ??\n      (input && typeof input === \"object\" && \"headers\" in input\n        ? input?.headers\n        : {}),\n  );\n  let agent = `vercel/sandbox-cli/${version}`;\n\n  let existingAgent = headers.get(\"user-agent\");\n\n  if (telemetry.enabled) {\n    // Attribute API traffic to the AI agent driving this invocation, if any,\n    // so the server side can record it once ingestion support lands. The SDK\n    // stamps its own phrase, so skip ours when one is already present.\n    if (!existingAgent?.includes(\" agent/\")) {\n      const aiAgent = await detectAgentName();\n      if (aiAgent) {\n        agent += ` agent/${aiAgent}`;\n      }\n    }\n  } else if (existingAgent) {\n    // The SDK gates its stamp on env vars only, so a config-file opt-out\n    // (`sandbox telemetry disable`) must be enforced here: strip any agent\n    // phrase from the header rather than trusting upstream gates.\n    existingAgent = existingAgent.replace(/ agent\\/\\S+/g, \"\");\n  }\n\n  if (existingAgent) {\n    agent += ` ${existingAgent}`;\n  }\n\n  headers.set(\"user-agent\", agent);\n\n  return fetch(input, { ...init, headers });\n};\n\nasync function withErrorHandling<T>(factory: () => Promise<T>): Promise<T> {\n  try {\n    return await withFreshAuthRetry(factory);\n  } catch (error) {\n    if (error instanceof APIError) {\n      throw await formatApiError(error);\n    }\n    throw error;\n  }\n}\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\n\nexport const snapshotId = cmd.extendType(cmd.string, {\n  displayName: \"snapshot_id\",\n  description: \"The ID of the snapshot\",\n  async from(s) {\n    if (!s.startsWith(\"snap_\")) {\n      throw new Error(\n        [\n          `Malformed snapshot ID: \"${s}\".`,\n          `${chalk.bold(\"hint:\")} Snapshot IDs must start with 'snap_' (e.g., snap_abc123def456).`,\n        ].join(\"\\n\"),\n      );\n    }\n    return s;\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\n\nexport const publishPorts = cmd.multioption({\n  long: \"publish-port\",\n  short: \"p\",\n  description: \"Publish sandbox port(s) to DOMAIN.vercel.run\",\n  type: cmd.array(\n    cmd.extendType(cmd.number, {\n      displayName: \"PORT\",\n      async from(number) {\n        if (!Number.isInteger(number) || number < 1024 || number > 65535) {\n          throw new Error(\n            [\n              `Invalid port: ${number}.`,\n              `${chalk.bold(\"hint:\")} Ports must be integers between 1024-65535 (privileged ports 0-1023 are reserved).`,\n              \"Examples: 3000, 8443\",\n            ].join(\"\\n\"),\n          );\n        }\n        return number;\n      },\n    }),\n  ),\n});\n","import { extendType, string } from \"cmd-ts\";\nimport { Duration } from \"./duration\";\nimport type { StringValue } from \"ms\";\n\nexport const SnapshotExpiration = extendType(string, {\n  displayName: \"DURATION|none\",\n  description: 'A duration (e.g. 7d, 30d) or \"none\" for no expiration',\n  async from(value): Promise<StringValue> {\n    if (value === \"none\") {\n      return \"0\";\n    }\n    return Duration.from(value);\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport { SnapshotExpiration } from \"../types/snapshot-expiration\";\n\nexport const snapshotExpiration = cmd.option({\n  long: \"snapshot-expiration\",\n  type: cmd.optional(SnapshotExpiration),\n  description:\n    'Default snapshot expiration. Use \"none\" or 0 for no expiration. Example: 7d, 30d',\n});\n\nexport const keepLastSnapshots = cmd.option({\n  long: \"keep-last-snapshots\",\n  type: cmd.optional(\n    cmd.extendType(cmd.number, {\n      displayName: \"COUNT\",\n      async from(n) {\n        if (!Number.isInteger(n) || n < 1 || n > 10) {\n          throw new Error(\n            `Invalid --keep-last-snapshots value: ${n}. Must be an integer between 1 and 10.`,\n          );\n        }\n        return n;\n      },\n    }),\n  ),\n  description: \"Keep only the N most recent snapshots of this sandbox (1-10).\",\n});\n\nexport const keepLastSnapshotsFor = cmd.option({\n  long: \"keep-last-snapshots-for\",\n  type: cmd.optional(SnapshotExpiration),\n  description:\n    'Expiration applied to kept snapshots. Use \"none\" or 0 for no expiration. Example: 7d, 30d',\n});\n\nexport const deleteEvictedSnapshots = cmd.option({\n  long: \"delete-evicted-snapshots\",\n  type: cmd.optional({\n    ...cmd.oneOf([\"true\", \"false\"]),\n    displayName: \"true|false\",\n  }),\n  description:\n    'When \"true\" (the default), evicted snapshots are deleted immediately; when \"false\", they keep the default expiration.',\n});\n\nexport const snapshotRetentionArgs = {\n  snapshotExpiration,\n  keepLastSnapshots,\n  keepLastSnapshotsFor,\n  deleteEvictedSnapshots,\n} as const;\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\n\nexport const sandboxName = cmd.extendType(cmd.string, {\n  displayName: \"name\",\n  description: \"The name of the sandbox\",\n  async from(s) {\n    if (!s || s.trim().length === 0) {\n      throw new Error(\n        [\n          `Sandbox name cannot be empty.`,\n          `${chalk.bold(\"hint:\")} Provide a sandbox name.`,\n          \"╰▶ run `sandbox list` to see available sandboxes.\",\n        ].join(\"\\n\"),\n      );\n    }\n\n    return s;\n  },\n});\n","import type { Sandbox } from \"@vercel/sandbox\";\nimport ms from \"ms\";\nimport createDebugger from \"debug\";\nimport { setTimeout } from \"node:timers/promises\";\n\nconst debug = createDebugger(\"sandbox:timeout\");\n\nconst BUFFER = ms(\"10 seconds\");\n\nexport async function extendSandboxTimeoutPeriodically(\n  sandbox: Sandbox,\n  signal: AbortSignal,\n) {\n  const session = sandbox.currentSession();\n  const timeout = session.timeout;\n  if (timeout == null) return;\n\n  const nextTick = session.createdAt.getTime() + timeout;\n  debug(`next tick: ${new Date(nextTick).toISOString()}`);\n\n  while (!signal.aborted) {\n    const currentTimeout = session.timeout;\n    if (currentTimeout == null) return;\n\n    const sleepMs =\n      session.createdAt.getTime() + currentTimeout - Date.now() - BUFFER;\n    if (sleepMs > 2000) {\n      debug(`sleeping for ${sleepMs}ms until next timeout extension`);\n      await setTimeout(sleepMs, null, { signal });\n    }\n    await sandbox.extendTimeout(ms(\"5 minutes\"));\n    const updatedTimeout = session.timeout;\n    if (updatedTimeout == null) return;\n    const nextTick = session.createdAt.getTime() + updatedTimeout;\n    debug(\n      `extended sandbox timeout by 5 minutes. next tick: ${new Date(nextTick).toISOString()}`,\n    );\n  }\n}\n","import { Sandbox } from \"@vercel/sandbox\";\nimport createDebugger from \"debug\";\nimport retry from \"async-retry\";\nimport { WebSocket } from \"ws\";\nimport ora from \"ora\";\nimport {\n  acquireRelease,\n  createAbortController,\n  defer,\n} from \"../util/disposables\";\nimport chalk from \"chalk\";\nimport { extendSandboxTimeoutPeriodically } from \"./extend-sandbox-timeout\";\n\nconst debug = createDebugger(\"sandbox:interactive-shell\");\n\n/**\n * A default TERM value so applications like `vim` and `nano` work properly.\n */\nconst TERM = \"xterm-256color\";\n\n/**\n * A custom prompt so interactive sessions show the Vercel triangle and the\n * working directory (e.g. `▲ /vercel/sandbox/ `) instead of the shell's\n * default prompt. The server passes this through to the shell verbatim.\n *\n * This is built from primitives every POSIX shell honors so it renders the\n * same regardless of which shell a customer image ships as `/bin/sh`.\n *\n * The color escapes are wrapped in the raw readline \"ignore\" markers\n * `\\x01` (RL_PROMPT_START_IGNORE) and `\\x02` (RL_PROMPT_END_IGNORE) — the\n * same bytes that bash's `\\[` / `\\]` decode into. This lets bash's readline\n * exclude the (zero-width) escape sequences from its prompt-width calculation\n * so cursor positioning stays correct on long/wrapping lines and during line\n * editing. In non-bash shells these are C0 control bytes that terminals treat\n * as non-printing, so they don't affect rendering there.\n */\nconst PS1 = `▲ \\x01\\x1b[2m\\x02$PWD/\\x01\\x1b[0m\\x02 `;\n\n/**\n * Starts an interactive shell session with a sandbox. The API hands us a\n * WebSocket URL and token, and we tunnel stdin/stdout over it.\n */\nexport async function startInteractiveShell(options: {\n  sandbox: Sandbox;\n  cwd?: string;\n  execution: [string, ...string[]];\n  envVars: Record<string, string>;\n  sudo: boolean;\n  skipExtendingTimeout: boolean;\n}) {\n  let cleaned = false;\n  const cleanup = () => {\n    if (cleaned) {\n      return;\n    }\n\n    process.stdin.removeAllListeners();\n    try {\n      process.stdin.setRawMode(false);\n      process.stdin.pause();\n      process.stdin.unref();\n    } catch {\n      // Ignore errors restoring stdin.\n    }\n    cleaned = true;\n  };\n  process.once(\"beforeExit\", cleanup);\n  using _cleanup = defer(cleanup);\n\n  using progress = acquireRelease(\n    () => ora({ discardStdin: false }).start(),\n    (s) => s.stop(),\n  );\n\n  debug(\"Opening interactive session...\");\n  progress.text = \"Opening interactive session...\";\n  const { url, token } = await options.sandbox.openInteractive();\n\n  const [command, ...args] = options.execution;\n  const execution: [string, ...string[]] = options.sudo\n    ? [\"sudo\", command, ...args]\n    : [command, ...args];\n\n  debug(\"Connecting...\");\n  progress.text = \"Connecting...\";\n\n  let client: WebSocket;\n  try {\n    // Wait for the websocket server to be ready\n    // to accept traffic. This is important for\n    // cross region connections because the sevrer\n    // will have been instructed to start, but may not\n    // be fully ready to accept connections yet.\n    const { hostname } = new URL(url);\n    await retry(\n      async (_, attempt) => {\n        debug(\"Validating server health... (attempt %d)\", attempt);\n        const response = await fetch(`https://${hostname}/health`);\n        if (!response.ok) {\n          throw new Error(`Server health check failed: ${response.statusText}`);\n        }\n      },\n      {\n        onRetry: (error: unknown, attempt: number) => {\n          debug(\n            \"Server health check failed: %s (attempt %d)\",\n            (error as Error).message,\n            attempt,\n          );\n        },\n        retries: 5,\n        minTimeout: 100,\n        randomize: true,\n      },\n    );\n\n    client = new WebSocket(`${url}?token=${encodeURIComponent(token)}`);\n  } catch (e) {\n    console.error(\n      chalk.dim(`\\n╰▶ connection to ▲ ${options.sandbox.name} failed.`),\n    );\n    process.exitCode = 1;\n    return;\n  }\n  using _client = defer(() => {\n    try {\n      client.close();\n    } catch {\n      // Ignore errors closing the socket.\n    }\n  });\n\n  await new Promise<void>((resolve, reject) => {\n    client.once(\"open\", () => resolve());\n    client.once(\"error\", (err) => reject(err));\n  });\n  debug(\"connected to %s\", url);\n  progress.text = \"Connected successfully.\";\n\n  client.send(\n    JSON.stringify({\n      type: \"start\",\n      command: execution[0],\n      args: execution.slice(1),\n      env: toEnvArray({ TERM, PS1, ...options.envVars }),\n      cwd: options.cwd ?? options.sandbox.cwd,\n      cols: process.stdout.columns,\n      rows: process.stdout.rows,\n    }),\n  );\n\n  progress.stop();\n\n  using extension = createAbortController(\"stopped extensions\");\n  if (!options.skipExtendingTimeout) {\n    extendSandboxTimeoutPeriodically(options.sandbox, extension.signal).catch(\n      extension.ignoreInterruptions,\n    );\n  }\n\n  // server -> stdout (binary frames) and exit (text control frame).\n  client.on(\"message\", (data: Buffer, isBinary: boolean) => {\n    if (isBinary) {\n      process.stdout.write(data);\n      return;\n    }\n    try {\n      const msg = JSON.parse(data.toString());\n      if (msg.type === \"exit\") {\n        process.exitCode = typeof msg.code === \"number\" ? msg.code : undefined;\n      }\n    } catch {\n      // Non-JSON text frame; treat as output.\n      process.stdout.write(data);\n    }\n  });\n\n  // stdin -> server (binary frames).\n  if (process.stdin.isTTY) {\n    process.stdin.setRawMode(true);\n  }\n  process.stdin.resume();\n  const onStdin = (chunk: Buffer) => {\n    if (client.readyState === WebSocket.OPEN) {\n      client.send(chunk);\n    }\n  };\n  process.stdin.on(\"data\", onStdin);\n\n  const onResize = () => {\n    if (client.readyState !== WebSocket.OPEN) return;\n    client.send(\n      JSON.stringify({\n        type: \"resize\",\n        cols: process.stdout.columns,\n        rows: process.stdout.rows,\n      }),\n    );\n  };\n  process.on(\"SIGWINCH\", onResize);\n\n  await new Promise<void>((resolve, reject) => {\n    client.once(\"close\", () => resolve());\n    client.once(\"error\", (err) => reject(err));\n  });\n\n  extension.abort(\"client disconnected\");\n  process.removeListener(\"SIGWINCH\", onResize);\n  process.stdin.removeListener(\"data\", onStdin);\n\n  console.error(\n    chalk.dim(`\\n╰▶ connection to ▲ ${options.sandbox.name} closed.`),\n  );\n}\n\nfunction toEnvArray(env: Record<string, string>): string[] {\n  return Object.entries(env).map(([key, value]) => `${key}=${value}`);\n}\n","import chalk from \"chalk\";\n\nexport function printCommand(command: string, args: string[]) {\n  return chalk.gray(chalk.dim(\"$ \") + [command, ...args].join(\" \"));\n}\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\n\nexport const KeyValuePair = cmd.extendType(cmd.string, {\n  displayName: \"key=value\",\n  async from(input) {\n    if (!input.includes(\"=\")) {\n      // Punning: --env ABC is equivalent to --env ABC=$ABC\n      return { key: input, value: process.env[input] };\n    }\n\n    const [key, ...rest] = input.split(\"=\");\n    return { key, value: rest.join(\"=\") };\n  },\n});\n\nexport const ObjectFromKeyValue = cmd.extendType(cmd.array(KeyValuePair), {\n  async from(input): Promise<Record<string, string>> {\n    const obj: Record<string, string> = Object.create(null);\n    const missingVars: string[] = [];\n    for (const { key, value } of input) {\n      if (value === undefined) {\n        missingVars.push(key);\n      } else {\n        obj[key] = value;\n      }\n    }\n    if (missingVars.length > 0) {\n      const plural = missingVars.length > 1;\n      console.error(\n        chalk.yellow(\n          [\n            `${chalk.bold(\"warn:\")} env var${plural ? \"s were\" : \" was\"} not defined and ${plural ? \"were\" : \"was\"} not passed: ${missingVars.join(\", \")}`,\n            `╰▶ ${chalk.bold(\"hint:\")} --env VAR is equivalent to --env VAR=$VAR`,\n          ].join(\"\\n\"),\n        ),\n      );\n    }\n    return obj;\n  },\n});\n","import { Sandbox } from \"@vercel/sandbox\";\nimport * as cmd from \"cmd-ts\";\nimport ms from \"ms\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { isatty } from \"node:tty\";\nimport { startInteractiveShell } from \"../interactive-shell/interactive-shell\";\nimport { printCommand } from \"../util/print-command\";\nimport { ObjectFromKeyValue } from \"../args/key-value-pair\";\nimport { scope } from \"../args/scope\";\nimport { Duration } from \"../types/duration\";\nimport { sandboxClient } from \"../client\";\nimport chalk from \"chalk\";\n\nexport const args = {\n  sandbox: cmd.positional({\n    type: sandboxName as cmd.Type<string, string | Sandbox>,\n  }),\n  command: cmd.positional({\n    displayName: \"command\",\n    description: \"The executable to invoke\",\n  }),\n  args: cmd.rest({\n    displayName: \"args\",\n    description: \"arguments to pass to the command\",\n  }),\n  asSudo: cmd.flag({\n    long: \"sudo\",\n    description: \"Give extended privileges to the command.\",\n  }),\n  interactive: cmd.flag({\n    long: \"interactive\",\n    short: \"i\",\n    description: \"Run the command in a secure interactive shell\",\n    type: cmd.extendType(cmd.boolean, {\n      defaultValue() {\n        return false;\n      },\n      async from(input) {\n        if (input && !isatty(1)) {\n          throw new Error(\n            [\n              `The --interactive flag requires a terminal (TTY).`,\n              `${chalk.bold(\"hint:\")} Run this command in an interactive terminal, or remove --interactive to run non-interactively.`,\n            ].join(\"\\n\"),\n          );\n        }\n        return input;\n      },\n    }),\n  }),\n  skipExtendingTimeout: cmd.flag({\n    long: \"no-extend-timeout\",\n    description:\n      \"Do not extend the sandbox timeout while running an interactive command. Only affects interactive executions.\",\n  }),\n  tty: cmd.flag({\n    long: \"tty\",\n    short: \"t\",\n    description: \"Allocate a tty for an interactive command. This is a no-op.\",\n  }),\n  cwd: cmd.option({\n    long: \"workdir\",\n    short: \"w\",\n    description: \"The working directory to run the command in\",\n    type: cmd.optional(cmd.string),\n  }),\n  envVars: cmd.multioption({\n    long: \"env\",\n    short: \"e\",\n    type: ObjectFromKeyValue,\n    description: \"Environment variables to set for the command\",\n  }),\n  timeout: cmd.option({\n    long: \"timeout\",\n    type: cmd.optional(Duration),\n    description:\n      \"Maximum duration to wait for the command (e.g. 30s, 5m). \" +\n      \"On expiry the process is killed with SIGKILL. \" +\n      \"Cannot be combined with --interactive.\",\n  }),\n  scope,\n} as const;\n\nexport const exec = cmd.command({\n  name: \"exec\",\n  description: \"Execute a command in an existing sandbox\",\n  args,\n  async handler({\n    command,\n    cwd,\n    args,\n    asSudo,\n    sandbox: sandboxName,\n    scope: { token, team, project },\n    interactive,\n    envVars,\n    skipExtendingTimeout,\n    timeout,\n  }) {\n    if (interactive && timeout) {\n      throw new Error(\n        [\n          \"--timeout cannot be combined with --interactive.\",\n          `${chalk.bold(\"hint:\")} Remove one of the two flags. Interactive sessions do not enforce a command timeout.`,\n        ].join(\"\\n\"),\n      );\n    }\n\n    const sandbox =\n      typeof sandboxName !== \"string\"\n        ? sandboxName\n        : await sandboxClient.get({\n            name: sandboxName,\n            projectId: project,\n            teamId: team,\n            token,\n            // Resume up front so the sandbox is already running by the time the\n            // interactive-shell setup runs its parallel steps.\n            resume: true,\n            __includeSystemRoutes: true,\n          });\n\n    if (!interactive) {\n      console.error(printCommand(command, args));\n      const result = await sandbox.runCommand({\n        cmd: command,\n        args,\n        stderr: process.stderr,\n        stdout: process.stdout,\n        sudo: asSudo,\n        cwd,\n        env: envVars,\n        timeoutMs: timeout ? ms(timeout) : undefined,\n      });\n\n      // Exit code 137 (128 + SIGKILL) is how a `--timeout` kill surfaces.\n      if (timeout && result.exitCode === 137) {\n        console.error(\n          `${chalk.yellow(\"Command was killed (SIGKILL, exit code 137)\")}.`,\n        );\n      }\n\n      process.exitCode = result.exitCode;\n    } else {\n      await startInteractiveShell({\n        sandbox,\n        cwd,\n        execution: [command, ...args],\n        envVars,\n        sudo: asSudo,\n        skipExtendingTimeout,\n      });\n    }\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\n\nconst networkPolicyMode = cmd.extendType(cmd.string, {\n  displayName: \"MODE\",\n  async from(value) {\n    const validModes = [\"allow-all\", \"deny-all\"];\n    if (!validModes.includes(value)) {\n      throw new Error(\n        [\n          `Invalid network policy mode: ${value}.`,\n          `${chalk.bold(\"hint:\")} Valid modes are: ${validModes.join(\", \")}`,\n        ].join(\"\\n\"),\n      );\n    }\n    return value as \"allow-all\" | \"deny-all\";\n  },\n});\n\nexport const networkPolicy = cmd.option({\n  long: \"network-policy\",\n  description:\n    `Network policy mode: \"allow-all\" or \"deny-all\"\n      - allow-all: sandbox can access any website/domain\n      - deny-all: sandbox has no network access\n    Omit this option and use --allowed-domain / --allowed-cidr / --denied-cidr for custom policies.`,\n  type: cmd.optional(networkPolicyMode),\n});\n\nexport const allowedDomains = cmd.multioption({\n  long: \"allowed-domain\",\n  description:\n    `Domain to allow traffic to (creates a custom network policy). Supports \"*\" for wildcards for a segment (e.g. '*.vercel.com', 'www.*.com'). If used as the first segment, will match any subdomain.`,\n  type: cmd.array(cmd.string),\n});\n\nexport const allowedCIDRs = cmd.multioption({\n  long: \"allowed-cidr\",\n  description:\n    `CIDR to allow traffic to (creates a custom network policy). Takes precedence over 'allowed-domain'.`,\n  type: cmd.array(cmd.string),\n});\n\nexport const deniedCIDRs = cmd.multioption({\n  long: \"denied-cidr\",\n  description:\n    `CIDR to deny traffic to (creates a custom network policy). Takes precedence over allowed domains/CIDRs.`,\n  type: cmd.array(cmd.string),\n});\n\nexport { networkPolicyMode };\n\nexport const networkPolicyArgs = {\n  networkPolicy,\n  allowedDomains,\n  allowedCIDRs,\n  deniedCIDRs,\n} as const;\n","import chalk from \"chalk\";\nimport type { NetworkPolicy } from \"@vercel/sandbox\";\n\ntype NetworkPolicyMode = \"allow-all\" | \"deny-all\";\n\n/**\n * Resolves the network policy mode from --network-policy and --mode flags.\n * Errors if both are provided with conflicting values.\n */\nexport function resolveMode(\n  networkPolicy?: NetworkPolicyMode,\n  mode?: NetworkPolicyMode,\n): NetworkPolicyMode | undefined {\n  if (networkPolicy && mode && networkPolicy !== mode) {\n    throw new Error(\n      [\n        `Conflicting network policy modes: --network-policy=${networkPolicy} and --mode=${mode}.`,\n        `${chalk.bold(\"hint:\")} Use only one of --network-policy or --mode.`,\n      ].join(\"\\n\"),\n    );\n  }\n  return networkPolicy ?? mode;\n}\n\n/**\n * Builds a NetworkPolicy from CLI arguments.\n */\nexport function buildNetworkPolicy(args: {\n  networkPolicy?: NetworkPolicyMode;\n  allowedDomains: string[];\n  allowedCIDRs: string[];\n  deniedCIDRs: string[];\n}): NetworkPolicy {\n  const { networkPolicy, allowedDomains, allowedCIDRs, deniedCIDRs } = args;\n\n  const hasListOptions =\n    allowedDomains.length > 0 ||\n    allowedCIDRs.length > 0 ||\n    deniedCIDRs.length > 0;\n\n  if (networkPolicy && hasListOptions) {\n    throw new Error(\n      [\n        `Cannot combine --network-policy=${networkPolicy} with --allowed-domain, --allowed-cidr, or --denied-cidr.`,\n        `${chalk.bold(\"hint:\")} Use --allowed-domain / --allowed-cidr / --denied-cidr without --network-policy for custom policies.`,\n      ].join(\"\\n\"),\n    );\n  }\n\n  if (hasListOptions) {\n    return {\n      ...(allowedDomains.length > 0 && { allow: allowedDomains }),\n      ...((allowedCIDRs.length > 0 || deniedCIDRs.length > 0) && {\n        subnets: {\n          ...(allowedCIDRs.length > 0 && { allow: allowedCIDRs }),\n          ...(deniedCIDRs.length > 0 && { deny: deniedCIDRs }),\n        },\n      }),\n    };\n  }\n\n  return networkPolicy ?? \"allow-all\";\n}\n","import ms from \"ms\";\nimport chalk from \"chalk\";\n\ninterface KeepLastSnapshotsInput {\n  keepLastSnapshots: number | undefined;\n  keepLastSnapshotsFor: string | undefined;\n  // cmd-ts `oneOf([\"true\", \"false\"])` returns `string | undefined`, not the\n  // narrower literal type — accept the broader shape here.\n  deleteEvictedSnapshots: string | undefined;\n}\n\nexport interface KeepLastSnapshotsPayload {\n  count: number;\n  expiration: number | undefined;\n  deleteEvicted: boolean | undefined;\n}\n\n/**\n * Validates the `--keep-last-snapshots*` flag combination and builds the\n * payload object that the SDK expects, or returns `undefined` when no\n * retention policy was configured.\n *\n * Throws when `--keep-last-snapshots-for` or `--delete-evicted-snapshots` are\n * passed without `--keep-last-snapshots`.\n */\nexport function buildKeepLastSnapshotsPayload(\n  input: KeepLastSnapshotsInput,\n): KeepLastSnapshotsPayload | undefined {\n  const { keepLastSnapshots, keepLastSnapshotsFor, deleteEvictedSnapshots } =\n    input;\n\n  if (\n    keepLastSnapshots === undefined &&\n    (keepLastSnapshotsFor !== undefined ||\n      deleteEvictedSnapshots !== undefined)\n  ) {\n    throw new Error(\n      [\n        \"--keep-last-snapshots-for and --delete-evicted-snapshots require --keep-last-snapshots.\",\n        `${chalk.bold(\"hint:\")} Pass --keep-last-snapshots <count> to enable the retention policy.`,\n      ].join(\"\\n\"),\n    );\n  }\n\n  if (keepLastSnapshots === undefined) {\n    return undefined;\n  }\n\n  return {\n    count: keepLastSnapshots,\n    expiration:\n      keepLastSnapshotsFor !== undefined\n        ? ms(keepLastSnapshotsFor as Parameters<typeof ms>[0])\n        : undefined,\n    deleteEvicted:\n      deleteEvictedSnapshots !== undefined\n        ? deleteEvictedSnapshots === \"true\"\n        : undefined,\n  };\n}\n","import chalk from \"chalk\";\nimport type { Sandbox } from \"@vercel/sandbox\";\n\ninterface Scope {\n  team: string;\n  project: string;\n  teamSlug?: string;\n  projectSlug?: string;\n}\n\n/**\n * Print the \"✅ Sandbox <name> <action>.\" summary that the create and fork\n * commands emit after a successful creation, including project/team and any\n * published port routes.\n *\n * - The sandbox name is written to stdout, everything else to stderr — so\n *   `sandbox create | xargs -I {} sandbox exec {} -- ...` keeps working.\n * - Pass `action: \"created\"` for create, or `action: \\`forked from ${chalk.cyan(source)}\\``\n *   for fork.\n */\nexport function printSandboxSummary(opts: {\n  sandbox: Sandbox;\n  scope: Scope;\n  action: string;\n  /** Append a \"connect with\" hint so the output never ends at a dead end. */\n  connectHint?: boolean;\n}) {\n  const { sandbox, scope, action, connectHint } = opts;\n  const teamDisplay = scope.teamSlug ?? scope.team;\n  const projectDisplay = scope.projectSlug ?? scope.project;\n  const routes = sandbox.routes.filter(\n    (x) => x.port !== sandbox.interactivePort,\n  );\n  const hasPorts = routes.length > 0;\n\n  process.stderr.write(\"✅ Sandbox \");\n  process.stdout.write(chalk.cyan(sandbox.name));\n  process.stderr.write(\" \" + action + \".\\n\");\n  process.stderr.write(\n    chalk.dim(\"   │ \") + \"team: \" + chalk.cyan(teamDisplay) + \"\\n\",\n  );\n  process.stderr.write(\n    chalk.dim(\"   │ \") + \"region: \" + chalk.cyan(sandbox.region) + \"\\n\",\n  );\n  if (sandbox.networkId) {\n    process.stderr.write(\n      chalk.dim(\"   │ \") +\n        \"secure compute network: \" +\n        chalk.cyan(sandbox.networkId) +\n        \"\\n\",\n    );\n  }\n\n  // With a connect hint, the hint becomes the closing \"╰\" line.\n  const close = (last: boolean) =>\n    chalk.dim(last && !connectHint ? \"   ╰ \" : \"   │ \");\n\n  if (hasPorts) {\n    process.stderr.write(\n      chalk.dim(\"   │ \") + \"project: \" + chalk.cyan(projectDisplay) + \"\\n\",\n    );\n    process.stderr.write(chalk.dim(\"   │ \") + \"ports:\\n\");\n    for (let i = 0; i < routes.length; i++) {\n      const route = routes[i];\n      const isLast = i === routes.length - 1;\n      process.stderr.write(\n        close(isLast) +\n          \"• \" +\n          route.port +\n          \" -> \" +\n          chalk.cyan(route.url) +\n          \"\\n\",\n      );\n    }\n  } else {\n    process.stderr.write(\n      close(true) + \"project: \" + chalk.cyan(projectDisplay) + \"\\n\",\n    );\n  }\n\n  if (connectHint) {\n    process.stderr.write(\n      chalk.dim(\"   ╰ \") +\n        \"connect with: \" +\n        chalk.cyan(`sandbox ssh ${sandbox.name}`) +\n        \"\\n\",\n    );\n  }\n}\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\nimport type { SandboxMountMode, Sandbox } from \"@vercel/sandbox\";\n\nexport interface DriveMount {\n  drive: string;\n  path: string;\n  mode?: SandboxMountMode;\n}\n\nexport type DriveMounts = NonNullable<Sandbox[\"mounts\"]>;\n\nexport const driveName = cmd.extendType(cmd.string, {\n  displayName: \"name\",\n  description: \"The name of the drive\",\n  async from(input) {\n    const value = input.trim();\n    if (value.length === 0) {\n      throw new Error(\"Drive name cannot be empty.\");\n    }\n    return value;\n  },\n});\n\nexport const driveMount = cmd.extendType(cmd.string, {\n  displayName: \"drive:path[:mode]\",\n  description:\n    'Drive mount in the format \"drive:/path[:snapshot|read-write]\".',\n  async from(input) {\n    return parseDriveMount(input);\n  },\n});\n\nexport const driveMounts = cmd.extendType(cmd.array(driveMount), {\n  async from(input): Promise<DriveMounts> {\n    const mounts: DriveMounts = Object.create(null);\n\n    for (const mount of input) {\n      mounts[mount.path] = {\n        drive: mount.drive,\n        mode: mount.mode ?? \"read-write\",\n      };\n    }\n\n    return mounts;\n  },\n});\n\nexport const mounts = cmd.multioption({\n  long: \"mount\",\n  type: driveMounts,\n  description:\n    'Attach a drive to the sandbox. Format: \"drive:/path[:snapshot|read-write]\".',\n});\n\n// Binary multipliers. The docs describe drive sizes in GiB and TiB and the\n// API takes bytes, so \"GB\"/\"TB\" are accepted as aliases of the binary units\n// rather than as decimal units that would land 7-10% below what was typed.\nconst SIZE_MULTIPLIERS: Record<string, number> = {\n  k: 1024,\n  m: 1024 ** 2,\n  g: 1024 ** 3,\n  t: 1024 ** 4,\n};\n\n/**\n * Parses a drive size such as \"200GiB\", \"2TiB\", \"5 GB\" or \"5368709120\".\n * A bare number is bytes. Anything that does not parse throws, so a typo\n * like \"2TiB\" can never be sent to the API as 2 bytes.\n */\nexport function parseDriveSize(input: string): number {\n  const match = /^\\s*(\\d+(?:\\.\\d+)?)\\s*(?:([kmgt])(?:i?b)?|b)?\\s*$/i.exec(input);\n  const invalid = () =>\n    new Error(\n      `Invalid size \"${input}\". Use bytes or a size with a unit, e.g. 200GiB or 2TiB.`,\n    );\n  if (!match) {\n    throw invalid();\n  }\n  const [, amount, unit] = match;\n  const bytes = Math.round(\n    Number(amount) * (unit ? SIZE_MULTIPLIERS[unit.toLowerCase()] : 1),\n  );\n  if (!Number.isSafeInteger(bytes) || bytes < 1) {\n    throw invalid();\n  }\n  return bytes;\n}\n\nexport const driveMaxSize = cmd.extendType(cmd.string, {\n  displayName: \"SIZE\",\n  async from(input) {\n    return parseDriveSize(input);\n  },\n});\n\nexport const driveRegion = cmd.extendType(cmd.string, {\n  displayName: \"REGION\",\n  async from(input) {\n    const region = input.trim();\n    if (region.length === 0) {\n      throw new Error(\"Drive region cannot be empty.\");\n    }\n    return region;\n  },\n});\n\nexport function parseDriveMount(input: string): DriveMount {\n  const [drive, path, mode, ...rest] = input.split(\":\");\n  const validModes: SandboxMountMode[] = [\"snapshot\", \"read-write\"];\n\n  if (rest.length > 0 || !drive || path === undefined) {\n    throw new Error(\n      [\n        `Invalid drive mount: ${input}.`,\n        `${chalk.bold(\"hint:\")} Use \"drive:/path\" or \"drive:/path:snapshot\".`,\n      ].join(\"\\n\"),\n    );\n  }\n\n  if (mode !== undefined && !validModes.includes(mode as SandboxMountMode)) {\n    throw new Error(\n      [\n        `Invalid drive mount mode: ${mode}.`,\n        `${chalk.bold(\"hint:\")} Valid modes are: ${validModes.join(\", \")}`,\n      ].join(\"\\n\"),\n    );\n  }\n\n  return {\n    drive,\n    path,\n    mode: mode as DriveMount[\"mode\"],\n  };\n}\n","import chalk from \"chalk\";\nimport xdgAppPaths from \"xdg-app-paths\";\nimport { mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport Path from \"node:path\";\nimport { version } from \"../pkg\";\n\nconst REGISTRY_URL = \"https://registry.npmjs.org/sandbox/latest\";\n\n/**\n * Re-check the registry at most once per hour; the cache file answers in\n * between, so most commands never touch the network. Mirrors the Vercel\n * CLI's caching approach (XDG cache file + refresh interval), without the\n * detached worker process it uses.\n */\nconst CACHE_TTL_MS = 60 * 60 * 1000;\n\n/**\n * Budget for a registry round trip when one does run. `report()` aborts an\n * in-flight request anyway, so this only bounds how long a slow registry has\n * to answer before the notice is skipped for this run.\n */\nconst FETCH_TIMEOUT_MS = 1000;\n\ninterface VersionCache {\n  latest: string;\n  checkedAt: number;\n}\n\nexport interface VersionCheck {\n  /**\n   * Print a stderr notice when a newer release is known (from the cache or\n   * from a lookup that finished in time), and abort any still-in-flight\n   * registry request so it can never keep the process alive after the\n   * command is done.\n   */\n  report(): void;\n}\n\n/** Options exist for tests; production callers pass nothing. */\nexport interface VersionCheckOptions {\n  cachePath?: string;\n  ttlMs?: number;\n  fetchImpl?: typeof fetch;\n  currentVersion?: string;\n}\n\nfunction defaultCachePath(): string {\n  return Path.join(xdgAppPaths(\"sandbox-cli\").cache(), \"latest-version.json\");\n}\n\nfunction readCache(cachePath: string): VersionCache | undefined {\n  try {\n    const parsed = JSON.parse(readFileSync(cachePath, \"utf8\")) as VersionCache;\n    if (\n      typeof parsed.latest === \"string\" &&\n      typeof parsed.checkedAt === \"number\"\n    ) {\n      return parsed;\n    }\n  } catch {\n    // A missing or corrupt cache is the same as no cache.\n  }\n  return undefined;\n}\n\nfunction writeCache(cachePath: string, cache: VersionCache): void {\n  try {\n    mkdirSync(Path.dirname(cachePath), { recursive: true });\n    writeFileSync(cachePath, JSON.stringify(cache));\n  } catch {\n    // The cache is best-effort; the next run simply checks again.\n  }\n}\n\n/**\n * Start a latest-version check. With a fresh cache this is synchronous and\n * network-free; with a stale or missing cache it fires one registry lookup\n * concurrently with the command's own network work, so it adds no latency.\n * Stale clients silently keep old creation defaults (e.g. the base image),\n * so surfacing \"you're behind\" at creation time is the only signal that\n * reaches globally-installed CLIs.\n *\n * Set SANDBOX_SKIP_VERSION_CHECK=1 to disable (e.g. in CI).\n */\nexport function startLatestVersionCheck(\n  opts: VersionCheckOptions = {},\n): VersionCheck {\n  if (process.env.SANDBOX_SKIP_VERSION_CHECK) {\n    return { report() {} };\n  }\n\n  const cachePath = opts.cachePath ?? defaultCachePath();\n  const ttlMs = opts.ttlMs ?? CACHE_TTL_MS;\n  const fetchImpl = opts.fetchImpl ?? fetch;\n  const current = opts.currentVersion ?? version;\n\n  const cached = readCache(cachePath);\n  let latest = cached?.latest;\n  let controller: AbortController | undefined;\n\n  const fresh = cached !== undefined && Date.now() - cached.checkedAt < ttlMs;\n  if (!fresh) {\n    controller = new AbortController();\n    const timeout = setTimeout(() => controller?.abort(), FETCH_TIMEOUT_MS);\n    timeout.unref?.();\n    fetchImpl(REGISTRY_URL, { signal: controller.signal })\n      .then((res) => (res.ok ? res.json() : undefined))\n      .then((json) => {\n        const fetched = (json as { version?: string } | undefined)?.version;\n        if (fetched) {\n          latest = fetched;\n          writeCache(cachePath, { latest: fetched, checkedAt: Date.now() });\n        }\n      })\n      .catch(() => {\n        // Never let the version check interfere with the actual command.\n      })\n      .finally(() => clearTimeout(timeout));\n  }\n\n  return {\n    report() {\n      // Tear down an in-flight request first: a pending registry call must\n      // not keep the event loop alive after the command has finished.\n      controller?.abort();\n      if (latest && isOutdated(current, latest)) {\n        process.stderr.write(\n          chalk.yellow(\"⚠ \") +\n            `A newer Sandbox CLI is available: ${chalk.cyan(latest)}` +\n            chalk.dim(` (you're on ${current})`) +\n            \"\\n\" +\n            chalk.dim(\"   ╰ \") +\n            \"newer versions can change creation defaults like the base image. Update with \" +\n            chalk.cyan(\"npm i -g sandbox@latest\") +\n            \"\\n\",\n        );\n      }\n    },\n  };\n}\n\n/**\n * Minimal x.y.z comparison. Prerelease versions on either side opt out of\n * the notice entirely rather than risking a wrong comparison.\n */\nexport function isOutdated(current: string, latest: string): boolean {\n  if (current.includes(\"-\") || latest.includes(\"-\")) {\n    return false;\n  }\n  const c = current.split(\".\").map(Number);\n  const l = latest.split(\".\").map(Number);\n  for (let i = 0; i < 3; i++) {\n    const a = c[i] ?? 0;\n    const b = l[i] ?? 0;\n    if (Number.isNaN(a) || Number.isNaN(b)) {\n      return false;\n    }\n    if (b !== a) {\n      return b > a;\n    }\n  }\n  return false;\n}\n","import * as cmd from \"cmd-ts\";\nimport { DEFAULT_SANDBOX_REGION } from \"@vercel/sandbox\";\n\nexport const regionType = cmd.extendType(cmd.string, {\n  displayName: \"REGION\",\n  async from(value) {\n    const region = value.trim();\n    if (region === \"\") {\n      throw new Error(\"Region cannot be empty.\");\n    }\n    return region;\n  },\n});\n\nexport const region = cmd.option({\n  long: \"region\",\n  type: cmd.optional(regionType),\n  description: `Region to create the sandbox in (defaults to ${DEFAULT_SANDBOX_REGION}; any Vercel region is supported, e.g. sfo1, fra1, hnd1, syd1)`,\n});\n\nexport const regionListType = cmd.extendType(cmd.string, {\n  displayName: \"REGION,...\",\n  async from(value) {\n    const regions = value\n      .split(\",\")\n      .map((region) => region.trim())\n      .filter((region) => region !== \"\");\n    if (regions.length === 0) {\n      throw new Error(\"Regions cannot be empty.\");\n    }\n    return [...new Set(regions)];\n  },\n});\n\nexport const failoverRegionListType = cmd.extendType(cmd.string, {\n  displayName: \"REGION,...|none\",\n  async from(value) {\n    if (value.trim() === \"none\") {\n      return [];\n    }\n    const regions = await regionListType.from(value);\n    if (regions.includes(\"none\")) {\n      throw new Error('\"none\" cannot be combined with region names.');\n    }\n    return regions;\n  },\n});\n\nexport const failoverRegions = cmd.option({\n  long: \"failover-regions\",\n  type: cmd.optional(failoverRegionListType),\n  description:\n    'Comma-separated regions the sandbox can fail over to (e.g. --failover-regions sfo1,fra1). Must not include the sandbox region. Pass \"none\" for no failover regions, overriding the project default.',\n});\n","import * as cmd from \"cmd-ts\";\n\nexport const networkIdType = cmd.extendType(cmd.string, {\n  displayName: \"NETWORK_ID\",\n  async from(value) {\n    const networkId = value.trim();\n    if (networkId === \"\") {\n      throw new Error(\"Network ID cannot be empty.\");\n    }\n    if (networkId.length > 255) {\n      throw new Error(\"Network ID cannot exceed 255 characters.\");\n    }\n    return networkId;\n  },\n});\n\nexport const networkIdOrNoneType = cmd.extendType(cmd.string, {\n  displayName: \"NETWORK_ID|none\",\n  async from(value) {\n    return value.trim() === \"none\" ? null : networkIdType.from(value);\n  },\n});\n\nexport const networkId = cmd.option({\n  long: \"network-id\",\n  type: cmd.optional(networkIdType),\n  description:\n    \"Secure Compute network ID from your team's Settings > Networking (requires an Enterprise plan)\",\n});\n","export const defaultShell = {\n  command: \"sh\",\n  args: [\n    \"-ic\",\n    `shell=\"\\${SHELL:-sh}\"\ncase \"\\${shell##*/}\" in\n  bash) exec \"$shell\" --norc -i ;;\n  *) exec \"$shell\" -i ;;\nesac`,\n  ],\n};\n","export const agentNames = [\"opencode\", \"claude\", \"pi\", \"codex\"] as const;\n\ntype Agent = {\n  displayName: string;\n  command: string;\n  args: string[];\n  env: Record<string, string>;\n  reconnectArgs: string[];\n  reconnectEnv: \"defaults\" | \"explicit\";\n};\n\nexport const agents: Record<(typeof agentNames)[number], Agent> = {\n  opencode: {\n    displayName: \"OpenCode\",\n    command: \"opencode\",\n    args: [],\n    env: { OPENCODE_DISABLE_AUTOUPDATE: \"true\" },\n    reconnectArgs: [\"--continue\"],\n    reconnectEnv: \"defaults\",\n  },\n  claude: {\n    displayName: \"Claude Code\",\n    command: \"claude\",\n    args: [],\n    env: {},\n    reconnectArgs: [\"--continue\"],\n    reconnectEnv: \"explicit\",\n  },\n  pi: {\n    displayName: \"Pi\",\n    command: \"pi\",\n    args: [],\n    env: {},\n    reconnectArgs: [\"--continue\"],\n    reconnectEnv: \"explicit\",\n  },\n  codex: {\n    displayName: \"Codex\",\n    command: \"codex\",\n    args: [\"--no-daemon\"],\n    env: {},\n    reconnectArgs: [\"resume\", \"--last\", \"--no-daemon\"],\n    reconnectEnv: \"explicit\",\n  },\n};\n","import * as cmd from \"cmd-ts\";\nimport { isatty } from \"node:tty\";\nimport ms from \"ms\";\nimport { runtime } from \"../args/runtime\";\nimport { timeout } from \"../args/timeout\";\nimport { vcpus } from \"../args/vcpus\";\nimport chalk from \"chalk\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\nimport { snapshotId } from \"../args/snapshot-id\";\nimport { publishPorts } from \"../args/ports\";\nimport { snapshotRetentionArgs } from \"../args/snapshot-retention\";\nimport ora from \"ora\";\nimport * as Exec from \"./exec\";\nimport { networkPolicyArgs } from \"../args/network-policy\";\nimport { buildNetworkPolicy } from \"../util/network-policy\";\nimport { ObjectFromKeyValue } from \"../args/key-value-pair\";\nimport { buildKeepLastSnapshotsPayload } from \"../util/keep-last-snapshots\";\nimport { printSandboxSummary } from \"../util/print-sandbox-summary\";\nimport { mounts } from \"../args/drive\";\nimport { startLatestVersionCheck } from \"../util/check-latest-version\";\nimport { region, failoverRegions } from \"../args/region\";\nimport { networkId } from \"../args/network-id\";\nimport { defaultShell } from \"../interactive-shell/default-shell\";\nimport { agentNames, agents } from \"./agents\";\n\nexport const args = {\n  name: cmd.option({\n    long: \"name\",\n    description:\n      \"A user-chosen name for the sandbox. It must be unique per project.\",\n    type: cmd.optional(cmd.string),\n  }),\n  nonPersistent: cmd.flag({\n    long: \"non-persistent\",\n    description:\n      \"Disable automatic restore of the filesystem between sessions.\",\n  }),\n  runtime,\n  image: cmd.option({\n    long: \"image\",\n    description:\n      \"A Vercel Container Registry (VCR) image name and optional tag or sha to start the sandbox from (e.g. my-repo, my-repo:v1).\",\n    type: cmd.optional(cmd.string),\n  }),\n  timeout,\n  vcpus,\n  ports: publishPorts,\n  silent: cmd.flag({\n    long: \"silent\",\n    description: \"Don't write sandbox name to stdout\",\n  }),\n  snapshot: cmd.option({\n    long: \"snapshot\",\n    short: \"s\",\n    description: \"Start the sandbox from a snapshot ID\",\n    type: cmd.optional(snapshotId),\n  }),\n  connect: cmd.flag({\n    long: \"connect\",\n    description:\n      \"Start an interactive shell session after creating the sandbox\",\n  }),\n  envVars: cmd.multioption({\n    long: \"env\",\n    short: \"e\",\n    type: ObjectFromKeyValue,\n    description: \"Default environment variables for sandbox commands\",\n  }),\n  tags: cmd.multioption({\n    long: \"tag\",\n    short: \"t\",\n    type: ObjectFromKeyValue,\n    description:\n      \"Key-value tags to associate with the sandbox (e.g. --tag env=staging)\",\n  }),\n  mounts,\n  region,\n  failoverRegions,\n  networkId,\n  ...snapshotRetentionArgs,\n  ...networkPolicyArgs,\n  scope,\n} as const;\n\nexport const create = cmd.command({\n  name: \"create\",\n  description: \"Create a sandbox in the specified account and project.\",\n  args: {\n    ...args,\n    agent: cmd.positional({\n      displayName: \"agent\",\n      description: `Open a coding agent in a new sandbox (${agentNames.join(\", \")})`,\n      type: cmd.optional(cmd.oneOf(agentNames)),\n    }),\n  },\n  examples: [\n    {\n      description: \"Create a sandbox and open OpenCode\",\n      command: \"sandbox create opencode\",\n    },\n    {\n      description:\n        \"Create a sandbox on a Secure Compute network (requires an Enterprise plan)\",\n      command: `sandbox create --network-id your_network_id_here`,\n    },\n    {\n      description: \"Create and connect to a sandbox without a network access\",\n      command: `sandbox run --network-policy=none --connect`,\n    },\n  ],\n  async handler(input) {\n    const {\n      agent,\n      name,\n      nonPersistent,\n      ports,\n      scope,\n      runtime,\n      image,\n      timeout,\n      vcpus,\n      silent,\n      snapshot,\n      connect,\n      envVars,\n      tags,\n      mounts,\n      region,\n      failoverRegions,\n      networkId,\n      snapshotExpiration,\n      keepLastSnapshots,\n      keepLastSnapshotsFor,\n      deleteEvictedSnapshots,\n      networkPolicy: networkPolicyMode,\n      allowedDomains,\n      allowedCIDRs,\n      deniedCIDRs,\n    } = input;\n    // Internal flag for composing commands (e.g. `run`) that create a sandbox\n    // as a step rather than as the outcome, where a connect hint would mislead.\n    const { __printConnectHint = true } = input as {\n      __printConnectHint?: boolean;\n    };\n    const launcher = agent ? agents[agent] : undefined;\n    if (agent) {\n      if (\n        runtime !== undefined ||\n        image !== undefined ||\n        snapshot !== undefined\n      ) {\n        throw new Error(\n          `sandbox create ${agent} cannot be combined with --runtime, --image, or --snapshot.`,\n        );\n      }\n      if (!isatty(0) || !isatty(1)) {\n        throw new Error(\n          `sandbox create ${agent} requires a terminal (TTY). Run it in an interactive terminal.`,\n        );\n      }\n    }\n    if (runtime !== undefined && image !== undefined) {\n      throw new Error(\"--runtime and --image cannot be used together.\");\n    }\n\n    // Look up the latest published CLI version while the creation request is\n    // in flight, so stale installs learn they're behind at no latency cost.\n    const versionCheck = silent ? undefined : startLatestVersionCheck();\n\n    const networkPolicy = buildNetworkPolicy({\n      networkPolicy: networkPolicyMode,\n      allowedDomains,\n      allowedCIDRs,\n      deniedCIDRs,\n    });\n\n    const keepLastSnapshotsPayload = buildKeepLastSnapshotsPayload({\n      keepLastSnapshots,\n      keepLastSnapshotsFor,\n      deleteEvictedSnapshots,\n    });\n\n    const selectedImage = agent ? \"vercel/sandbox/universal\" : image;\n    const runtimeOptions =\n      selectedImage !== undefined\n        ? { image: selectedImage }\n        : runtime !== undefined\n          ? { runtime }\n          : {};\n\n    const persistent = !nonPersistent;\n    const resources = vcpus ? { vcpus } : undefined;\n    const tagsObj = Object.keys(tags).length > 0 ? tags : undefined;\n    const mountsObj = Object.keys(mounts).length > 0 ? mounts : undefined;\n    const spinner = silent ? undefined : ora(\"Creating sandbox...\").start();\n    const sandbox = snapshot\n      ? await sandboxClient.create({\n          name,\n          source: { type: \"snapshot\", snapshotId: snapshot },\n          teamId: scope.team,\n          projectId: scope.project,\n          token: scope.token,\n          ports,\n          timeout: ms(timeout),\n          resources,\n          networkPolicy,\n          env: envVars,\n          tags: tagsObj,\n          mounts: mountsObj,\n          region,\n          failoverRegions,\n          networkId,\n          persistent,\n          snapshotExpiration: snapshotExpiration\n            ? ms(snapshotExpiration)\n            : undefined,\n          keepLastSnapshots: keepLastSnapshotsPayload,\n          __interactive: true,\n        })\n      : await sandboxClient.create({\n          name,\n          teamId: scope.team,\n          projectId: scope.project,\n          token: scope.token,\n          ports,\n          ...runtimeOptions,\n          timeout: ms(timeout),\n          resources,\n          networkPolicy,\n          env: envVars,\n          tags: tagsObj,\n          mounts: mountsObj,\n          region,\n          failoverRegions,\n          networkId,\n          persistent,\n          snapshotExpiration: snapshotExpiration\n            ? ms(snapshotExpiration)\n            : undefined,\n          keepLastSnapshots: keepLastSnapshotsPayload,\n          __interactive: true,\n        });\n    spinner?.stop();\n\n    if (!sandbox.interactivePort) {\n      throw new Error(\n        [\n          `Sandbox created but interactive port is missing.`,\n          `${chalk.bold(\"hint:\")} This is an internal error. Please try again.`,\n          \"╰▶ Report this issue: https://github.com/vercel/sandbox/issues\",\n        ].join(\"\\n\"),\n      );\n    }\n\n    if (!silent) {\n      printSandboxSummary({\n        sandbox,\n        scope,\n        action: \"created\",\n        connectHint: !agent && !connect && __printConnectHint,\n      });\n      versionCheck?.report();\n    }\n\n    if (agent || connect) {\n      try {\n        if (launcher) {\n          try {\n            const check = await sandbox.runCommand({\n              cmd: launcher.command,\n              args: [\"--version\"],\n              env: { ...launcher.env, ...envVars },\n            });\n            if (check.exitCode !== 0) {\n              throw new Error(\n                `Version check exited with code ${check.exitCode}.`,\n              );\n            }\n          } catch (cause) {\n            throw new Error(\n              `Unable to start ${launcher.displayName} (${launcher.command}) in the sandbox.`,\n              { cause },\n            );\n          }\n        }\n        await Exec.exec.handler({\n          ...(launcher\n            ? { command: launcher.command, args: launcher.args }\n            : defaultShell),\n          scope,\n          asSudo: false,\n          cwd: undefined,\n          skipExtendingTimeout: false,\n          envVars: launcher ? { ...launcher.env, ...envVars } : {},\n          interactive: true,\n          tty: true,\n          sandbox,\n          timeout: undefined,\n        });\n      } finally {\n        if (launcher && !silent) {\n          const scopeFlags = `--scope=${scope.team} --project=${scope.project}`;\n          const envFlags =\n            launcher.reconnectEnv === \"explicit\"\n              ? Object.keys(envVars)\n                  .map((key) => ` --env='${key.replaceAll(\"'\", \"'\\\\''\")}'`)\n                  .join(\"\")\n              : Object.entries(launcher.env)\n                  .map(([key, value]) => ` --env=${key}=${value}`)\n                  .join(\"\");\n          process.stderr.write(\n            `\\n${chalk.blue(\"ℹ\")} Exiting ${launcher.displayName} does not stop the sandbox.\\n`,\n          );\n          if (launcher.reconnectEnv === \"explicit\" && envFlags) {\n            process.stderr.write(\n              chalk.dim(\"   │ \") +\n                \"Before reconnecting, export the same --env values in your local shell. Values are not included in this hint.\\n\",\n            );\n          }\n          process.stderr.write(\n            chalk.dim(\"   │ \") +\n              \"Reconnect: \" +\n              chalk.cyan(\n                `sandbox exec ${scopeFlags} --interactive${envFlags} ${sandbox.name} -- ${[launcher.command, ...launcher.reconnectArgs].join(\" \")}`,\n              ) +\n              \"\\n\",\n          );\n          process.stderr.write(\n            chalk.dim(\"   ╰ \") +\n              \"Stop: \" +\n              chalk.cyan(`sandbox stop ${scopeFlags} ${sandbox.name}`) +\n              \"\\n\",\n          );\n        }\n      }\n    }\n\n    return sandbox;\n  },\n});\n","export function omit<T extends object, K extends keyof T>(\n  obj: T,\n  ...keys: K[]\n): Omit<T, K> {\n  const result = { ...obj };\n  for (const key of keys) {\n    delete result[key];\n  }\n  return result;\n}\n","import * as cmd from \"cmd-ts\";\nimport * as Create from \"./create\";\nimport * as Exec from \"./exec\";\nimport { omit } from \"../util/omit\";\nimport { defaultShell } from \"../interactive-shell/default-shell\";\n\nconst args = {\n  ...omit(Create.args, \"connect\"),\n  removeAfterUse: cmd.flag({\n    long: \"rm\",\n    description: \"Automatically remove the sandbox when the shell exits.\",\n  }),\n} as const;\n\nexport const sh = cmd.command({\n  name: \"sh\",\n  description: \"Create a sandbox and start an interactive shell\",\n  args,\n  async handler({ removeAfterUse, ...rest }) {\n    if (!removeAfterUse) {\n      return Create.create.handler({\n        ...rest,\n        agent: undefined,\n        connect: true,\n      });\n    }\n\n    const sandbox = await Create.create.handler({\n      ...rest,\n      agent: undefined,\n      connect: false,\n      nonPersistent: true,\n      __printConnectHint: false,\n    } as Parameters<typeof Create.create.handler>[0]);\n\n    try {\n      await Exec.exec.handler({\n        ...defaultShell,\n        scope: rest.scope,\n        asSudo: false,\n        cwd: undefined,\n        skipExtendingTimeout: false,\n        envVars: {},\n        interactive: true,\n        tty: true,\n        sandbox,\n        timeout: undefined,\n      });\n    } finally {\n      await sandbox.delete();\n    }\n\n    return sandbox;\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport ms from \"ms\";\nimport chalk from \"chalk\";\nimport ora from \"ora\";\nimport { vcpus } from \"../args/vcpus\";\nimport { Duration } from \"../types/duration\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { publishPorts } from \"../args/ports\";\nimport { snapshotRetentionArgs } from \"../args/snapshot-retention\";\nimport * as Exec from \"./exec\";\nimport { networkPolicyArgs } from \"../args/network-policy\";\nimport { buildNetworkPolicy } from \"../util/network-policy\";\nimport { ObjectFromKeyValue } from \"../args/key-value-pair\";\nimport { buildKeepLastSnapshotsPayload } from \"../util/keep-last-snapshots\";\nimport { printSandboxSummary } from \"../util/print-sandbox-summary\";\nimport { region, failoverRegions } from \"../args/region\";\nimport { networkId } from \"../args/network-id\";\nimport { defaultShell } from \"../interactive-shell/default-shell\";\n\nexport const args = {\n  source: cmd.positional({\n    displayName: \"source\",\n    description: \"Name of the source sandbox to fork from.\",\n    type: sandboxName,\n  }),\n  name: cmd.option({\n    long: \"name\",\n    description:\n      \"A user-chosen name for the forked sandbox. Must be unique per project.\",\n    type: cmd.optional(cmd.string),\n  }),\n  nonPersistent: cmd.flag({\n    long: \"non-persistent\",\n    description:\n      \"Disable automatic restore of the filesystem between sessions.\",\n  }),\n  timeout: cmd.option({\n    long: \"timeout\",\n    type: cmd.optional(Duration),\n    description:\n      \"Override the maximum sandbox duration (inherited from source if omitted). Example: 5m, 30m\",\n  }),\n  vcpus,\n  ports: publishPorts,\n  silent: cmd.flag({\n    long: \"silent\",\n    description: \"Don't write sandbox name to stdout\",\n  }),\n  connect: cmd.flag({\n    long: \"connect\",\n    description:\n      \"Start an interactive shell session after creating the forked sandbox\",\n  }),\n  envVars: cmd.multioption({\n    long: \"env\",\n    short: \"e\",\n    type: ObjectFromKeyValue,\n    description:\n      \"Environment variables to set on the fork. When provided, fully replaces the env vars copied from the source (no per-key merge).\",\n  }),\n  tags: cmd.multioption({\n    long: \"tag\",\n    short: \"t\",\n    type: ObjectFromKeyValue,\n    description:\n      \"Key-value tags to associate with the fork. When provided, fully replaces the tags copied from the source (no per-key merge).\",\n  }),\n  region,\n  failoverRegions,\n  networkId,\n  ...snapshotRetentionArgs,\n  ...networkPolicyArgs,\n  scope,\n} as const;\n\nexport const fork = cmd.command({\n  name: \"fork\",\n  description:\n    \"Fork an existing sandbox into a new one. The fork starts from the source's latest snapshot (or a fresh copy of its runtime when it has none) and copies its config (cpu, timeout, network policy, tags, env vars, etc.); any flag passed here overrides the copied value. Changes made in a running source since its last snapshot are not included: run `sandbox snapshot --stop <source>` first to fork the current filesystem.\",\n  args,\n  examples: [\n    {\n      description: \"Fork a sandbox with all config copied from the source\",\n      command: `sandbox fork my-source`,\n    },\n    {\n      description: \"Fork with a specific name and overridden vcpus\",\n      command: `sandbox fork my-source --name my-forked-sandbox --vcpus 4`,\n    },\n  ],\n  async handler({\n    source,\n    name,\n    nonPersistent,\n    ports,\n    scope,\n    timeout,\n    vcpus,\n    silent,\n    connect,\n    envVars,\n    tags,\n    region,\n    failoverRegions,\n    networkId,\n    snapshotExpiration,\n    keepLastSnapshots,\n    keepLastSnapshotsFor,\n    deleteEvictedSnapshots,\n    networkPolicy: networkPolicyMode,\n    allowedDomains,\n    allowedCIDRs,\n    deniedCIDRs,\n  }) {\n    const networkPolicyProvided =\n      networkPolicyMode !== undefined ||\n      allowedDomains.length > 0 ||\n      allowedCIDRs.length > 0 ||\n      deniedCIDRs.length > 0;\n    const networkPolicy = networkPolicyProvided\n      ? buildNetworkPolicy({\n          networkPolicy: networkPolicyMode,\n          allowedDomains,\n          allowedCIDRs,\n          deniedCIDRs,\n        })\n      : undefined;\n\n    const keepLastSnapshotsPayload = buildKeepLastSnapshotsPayload({\n      keepLastSnapshots,\n      keepLastSnapshotsFor,\n      deleteEvictedSnapshots,\n    });\n\n    const tagsObj = Object.keys(tags).length > 0 ? tags : undefined;\n    const envObj = Object.keys(envVars).length > 0 ? envVars : undefined;\n\n    // The server forks from the source's latest snapshot, never from a live\n    // session, so a running source silently leaves its recent changes behind.\n    const sourceSandbox = await sandboxClient.get({\n      name: source,\n      teamId: scope.team,\n      projectId: scope.project,\n      token: scope.token,\n    });\n    if (sourceSandbox.status === \"running\") {\n      const from = sourceSandbox.currentSnapshotId\n        ? \"last snapshot\"\n        : \"runtime image (it has no snapshot yet)\";\n      console.error(\n        chalk.yellow(\n          [\n            `${chalk.bold(\"warn:\")} ${source} is running. The fork starts from its ${from}, not from its live filesystem.`,\n            `╰▶ ${chalk.bold(\"hint:\")} run \\`sandbox snapshot --stop ${source}\\` first to fork the current filesystem.`,\n          ].join(\"\\n\"),\n        ),\n      );\n    }\n\n    const spinner = silent\n      ? undefined\n      : ora(`Forking sandbox ${chalk.cyan(source)}...`).start();\n    const sandbox = await sandboxClient.fork({\n      sourceSandbox: source,\n      teamId: scope.team,\n      projectId: scope.project,\n      token: scope.token,\n      ...(name !== undefined && { name }),\n      ...(ports.length > 0 && { ports }),\n      ...(timeout !== undefined && { timeout: ms(timeout) }),\n      ...(vcpus !== undefined && { resources: { vcpus } }),\n      ...(networkPolicy !== undefined && { networkPolicy }),\n      ...(envObj !== undefined && { env: envObj }),\n      ...(tagsObj !== undefined && { tags: tagsObj }),\n      ...(region !== undefined && { region }),\n      ...(failoverRegions !== undefined && { failoverRegions }),\n      ...(networkId !== undefined && { networkId }),\n      ...(nonPersistent && { persistent: false }),\n      ...(snapshotExpiration !== undefined && {\n        snapshotExpiration: ms(snapshotExpiration),\n      }),\n      ...(keepLastSnapshotsPayload !== undefined && {\n        keepLastSnapshots: keepLastSnapshotsPayload,\n      }),\n      __interactive: true,\n    });\n    spinner?.stop();\n\n    if (!sandbox.interactivePort) {\n      throw new Error(\n        [\n          `Sandbox forked but interactive port is missing.`,\n          `${chalk.bold(\"hint:\")} This is an internal error. Please try again.`,\n          \"╰▶ Report this issue: https://github.com/vercel/sandbox/issues\",\n        ].join(\"\\n\"),\n      );\n    }\n\n    if (!silent) {\n      printSandboxSummary({\n        sandbox,\n        scope,\n        action: `forked from ${chalk.cyan(source)}`,\n        connectHint: !connect,\n      });\n    }\n\n    if (connect) {\n      await Exec.exec.handler({\n        ...defaultShell,\n        scope,\n        asSudo: false,\n        cwd: undefined,\n        skipExtendingTimeout: false,\n        envVars: {},\n        interactive: true,\n        tty: true,\n        sandbox,\n        timeout: undefined,\n      });\n    }\n\n    return sandbox;\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport { APIError, type Sandbox } from \"@vercel/sandbox\";\nimport * as Create from \"./create\";\nimport * as Exec from \"./exec\";\nimport { sandboxClient } from \"../client\";\nimport { StyledError } from \"../error\";\nimport { omit } from \"../util/omit\";\n\nconst args = {\n  ...Create.args,\n  // `timeout` is omitted because it collides with Create's `--timeout`\n  // (sandbox lifetime).\n  ...omit(Exec.args, \"sandbox\", \"timeout\"),\n  removeAfterUse: cmd.flag({\n    long: \"rm\",\n    description: \"Automatically remove the sandbox when the command exits.\",\n  }),\n  stopAfterUse: cmd.flag({\n    long: \"stop\",\n    description: \"Stop the sandbox when the command exits.\",\n  }),\n} as const;\n\nexport const run = cmd.command({\n  name: \"run\",\n  description: \"Create and run a command in a sandbox\",\n  args,\n  async handler({ removeAfterUse, stopAfterUse, ...rest }) {\n    if (removeAfterUse && stopAfterUse) {\n      throw new Error(\"--rm and --stop are mutually exclusive.\");\n    }\n    if (rest.runtime !== undefined && rest.image !== undefined) {\n      throw new Error(\"--runtime and --image cannot be used together.\");\n    }\n\n    let sandbox: Sandbox;\n\n    // Resume an existing sandbox or otherwise create it.\n    if (rest.name) {\n      try {\n        sandbox = await sandboxClient.get({\n          name: rest.name,\n          projectId: rest.scope.project,\n          teamId: rest.scope.team,\n          token: rest.scope.token,\n          resume: true,\n          __includeSystemRoutes: true,\n        });\n      } catch (error) {\n        if (\n          error instanceof StyledError &&\n          error.cause instanceof APIError &&\n          error.cause.response.status === 404\n        ) {\n          sandbox = await Create.create.handler({\n            ...rest,\n            agent: undefined,\n            nonPersistent: rest.nonPersistent || removeAfterUse,\n            __printConnectHint: false,\n          } as Parameters<typeof Create.create.handler>[0]);\n        } else {\n          throw error;\n        }\n      }\n    } else {\n      sandbox = await Create.create.handler({\n        ...rest,\n        agent: undefined,\n        nonPersistent: rest.nonPersistent || removeAfterUse,\n        __printConnectHint: false,\n      } as Parameters<typeof Create.create.handler>[0]);\n    }\n\n    try {\n      await Exec.exec.handler({ ...rest, sandbox, timeout: undefined });\n    } finally {\n      if (removeAfterUse) {\n        await sandbox.delete();\n      }\n      if (stopAfterUse) {\n        await sandbox.stop();\n      }\n    }\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport { DEFAULT_SANDBOX_REGION, Sandbox } from \"@vercel/sandbox\";\nimport { sandboxClient } from \"../client\";\nimport { scope } from \"../args/scope\";\nimport chalk, { ChalkInstance } from \"chalk\";\nimport ora from \"ora\";\nimport { acquireRelease } from \"../util/disposables\";\nimport {\n  table,\n  timeAgo,\n  formatBytes,\n  formatRunDuration,\n  formatNextCursorHint,\n} from \"../util/output\";\nimport { ObjectFromKeyValue } from \"../args/key-value-pair\";\n\nfunction formatImage(image: string): string {\n  const [repository, digest] = image.split(\"@\");\n  if (!digest) return image;\n  const [algorithm, hex] = digest.split(\":\");\n  if (!hex) return image;\n  return `${repository}@${algorithm}:${hex.slice(0, 12)}…`;\n}\n\nexport const list = cmd.command({\n  name: \"list\",\n  aliases: [\"ls\"],\n  description: \"List all sandboxes for the specified account and project.\",\n  args: {\n    all: cmd.flag({\n      long: \"all\",\n      short: \"a\",\n      description: \"Show all sandboxes (default shows just running)\",\n    }),\n    namePrefix: cmd.option({\n      long: \"name-prefix\",\n      description: \"Filter sandboxes by name prefix\",\n      type: cmd.optional(cmd.string),\n    }),\n    sortBy: cmd.option({\n      long: \"sort-by\",\n      description:\n        \"Sort sandboxes by field. Options: createdAt (default), name, statusUpdatedAt\",\n      type: cmd.optional(\n        cmd.oneOf([\"createdAt\", \"name\", \"statusUpdatedAt\"] as const),\n      ),\n    }),\n    sortOrder: cmd.option({\n      long: \"sort-order\",\n      description: \"Sort order. Options: asc, desc (default)\",\n      type: cmd.optional(cmd.oneOf([\"asc\", \"desc\"] as const)),\n    }),\n    tags: cmd.multioption({\n      long: \"tag\",\n      description: 'Filter sandboxes by tag. Format: \"key=value\"',\n      type: ObjectFromKeyValue,\n    }),\n    limit: cmd.option({\n      long: \"limit\",\n      description: \"Maximum number of sandboxes per page (default 50).\",\n      type: cmd.optional(cmd.number),\n    }),\n    cursor: cmd.option({\n      long: \"cursor\",\n      description: \"Pagination cursor from a previous 'More results' hint.\",\n      type: cmd.optional(cmd.string),\n    }),\n    scope,\n  },\n  async handler({\n    scope: { token, team, project },\n    all,\n    namePrefix,\n    sortBy,\n    sortOrder,\n    tags,\n    limit,\n    cursor,\n  }) {\n    if (namePrefix) {\n      if (sortBy && sortBy !== \"name\") {\n        console.error(\n          chalk.red(\"Error: --sort-by must be 'name' when using --name-prefix\"),\n        );\n        return;\n      }\n\n      sortBy = \"name\";\n    }\n\n    const { sandboxes, pagination } = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Fetching sandboxes...\").start(),\n        (s) => s.stop(),\n      );\n\n      return sandboxClient.list({\n        token,\n        teamId: team,\n        projectId: project,\n        limit: limit ?? 50,\n        ...(cursor && { cursor }),\n        ...(namePrefix && { namePrefix }),\n        ...(sortBy && { sortBy }),\n        ...(sortOrder && { sortOrder }),\n        ...(Object.keys(tags).length > 0 && { tags }),\n      });\n    })();\n\n    const displayedSandboxes = all\n      ? sandboxes\n      : sandboxes.filter((x) => x.status === \"running\");\n\n    const memoryFormatter = new Intl.NumberFormat(undefined, {\n      style: \"unit\",\n      unit: \"megabyte\",\n    });\n\n    type SandboxRow = (typeof sandboxes)[number];\n    type Column = {\n      value: (s: SandboxRow) => string | number;\n      color?: (s: SandboxRow) => ChalkInstance;\n    };\n\n    const columns: Record<string, Column> = {\n      NAME: { value: (s) => s.name },\n      STATUS: {\n        value: (s) => s.status,\n        color: (s) => SandboxStatusColor[s.status] ?? chalk.reset,\n      },\n      CREATED: {\n        value: (s) => timeAgo(s.createdAt),\n      },\n      // Raw list metadata, not a Sandbox instance, so the default is applied\n      // here rather than by the `region` getter.\n      REGION: { value: (s) => s.region ?? DEFAULT_SANDBOX_REGION },\n      MEMORY: {\n        value: (s) =>\n          s.memory != null ? memoryFormatter.format(s.memory) : \"-\",\n      },\n      VCPUS: { value: (s) => s.vcpus ?? \"-\" },\n      \"IMAGE/RUNTIME\": {\n        value: (s) => (s.image ? formatImage(s.image) : (s.runtime ?? \"-\")),\n      },\n      TIMEOUT: {\n        // Prefer the live deadline (`expiresAt`) of the running session. Fall\n        // back to the configured timeout for non-running sandboxes that don't\n        // report `expiresAt`.\n        value: (s) => {\n          if (s.expiresAt != null) return timeAgo(s.expiresAt);\n          if (s.timeout != null) return timeAgo(s.createdAt + s.timeout);\n          return \"-\";\n        },\n      },\n      SNAPSHOT: { value: (s) => s.currentSnapshotId ?? \"-\" },\n      MOUNTS: { value: (s) => formatMounts(s.mounts) },\n      TAGS: {\n        value: (s) =>\n          s.tags && Object.keys(s.tags).length > 0\n            ? Object.entries(s.tags)\n                .map(([k, v]) => `${k}:${v}`)\n                .join(\", \")\n            : \"-\",\n      },\n    };\n    if (all) {\n      columns.CPU = {\n        value: (s) =>\n          s.totalActiveCpuDurationMs\n            ? formatRunDuration(s.totalActiveCpuDurationMs)\n            : \"-\",\n      };\n      columns[\"NETWORK (OUT/IN)\"] = {\n        value: (s) =>\n          s.totalEgressBytes || s.totalIngressBytes\n            ? `${formatBytes(s.totalEgressBytes ?? 0)} / ${formatBytes(s.totalIngressBytes ?? 0)}`\n            : \"- / -\",\n      };\n    }\n\n    console.log(table({ rows: displayedSandboxes, columns }));\n\n    if (pagination.next !== null) {\n      console.log(formatNextCursorHint(pagination.next));\n    }\n  },\n});\n\nconst SandboxStatusColor: Record<Sandbox[\"status\"], ChalkInstance> = {\n  running: chalk.cyan,\n  failed: chalk.red,\n  stopped: chalk.gray.dim,\n  stopping: chalk.gray,\n  pending: chalk.magenta,\n  snapshotting: chalk.blue,\n  aborted: chalk.gray.dim,\n};\n\nfunction formatMounts(mounts: Sandbox[\"mounts\"]): string {\n  if (!mounts || Object.keys(mounts).length === 0) {\n    return \"-\";\n  }\n\n  return Object.entries(mounts)\n    .map(\n      ([path, mount]) => `${mount.drive}:${path}:${mount.mode ?? \"read-write\"}`,\n    )\n    .join(\", \");\n}\n","import * as cmd from \"cmd-ts\";\nimport * as Exec from \"./exec\";\nimport { omit } from \"../util/omit\";\nimport { defaultShell } from \"../interactive-shell/default-shell\";\n\nexport const connect = cmd.command({\n  name: \"connect\",\n  aliases: [\"ssh\", \"shell\"],\n  description: \"Start an interactive shell in an existing sandbox\",\n  args: omit(Exec.args, \"command\", \"args\", \"interactive\", \"tty\"),\n  async handler(args) {\n    return Exec.exec.handler({\n      ...defaultShell,\n      interactive: true,\n      tty: true,\n      ...args,\n    });\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\nimport ora from \"ora\";\nimport type { Sandbox } from \"@vercel/sandbox\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\nimport { formatBytes, formatRunDuration, timeAgo } from \"../util/output\";\n\ntype StopResult = Awaited<ReturnType<Sandbox[\"stop\"]>>;\n\n/** Label/value pair; null means empty (used for column alignment). */\ntype Cell = { label: string; value: string } | null;\n\nfunction c(label: string, value: string): Cell {\n  return { label, value };\n}\n\n/** Visible width of a cell (label + value, no ANSI). */\nfunction cellWidth(cell: Cell): number {\n  return cell ? cell.label.length + cell.value.length : 0;\n}\n\n/** Print rows as a tree with column-aligned label: value pairs. */\nfunction printTree(rows: Cell[][]) {\n  // Column widths\n  const widths: number[] = [];\n  for (const row of rows) {\n    for (let i = 0; i < row.length; i++) {\n      widths[i] = Math.max(widths[i] ?? 0, cellWidth(row[i]));\n    }\n  }\n\n  for (let r = 0; r < rows.length; r++) {\n    const isLast = r === rows.length - 1;\n    const prefix = isLast ? chalk.dim(\"   ╰ \") : chalk.dim(\"   │ \");\n    const line = rows[r]\n      .map((cell, i) => {\n        if (!cell) return \" \".repeat(widths[i]);\n        const pad = widths[i] - cell.label.length - cell.value.length;\n        return cell.label + chalk.cyan(cell.value) + \" \".repeat(Math.max(0, pad));\n      })\n      .join(\"  \")\n      .trimEnd();\n    process.stderr.write(prefix + line + \"\\n\");\n  }\n}\n\nfunction printStopResult(name: string, sandbox: Sandbox, sessionSnapshot: StopResult) {\n  process.stderr.write(chalk.green(\"✔\") + \" Sandbox stopped.\\n\");\n\n  const snapshot = sessionSnapshot.snapshot;\n\n  const rows: Cell[][] = [\n    [\n      c(\"sandbox: \", name),\n      sandbox.totalActiveCpuDurationMs != null ? c(\"active cpu: \", formatRunDuration(sandbox.totalActiveCpuDurationMs)) : null,\n      sandbox.memory != null ? c(\"mem: \", `${sandbox.memory} MB`) : null,\n      sandbox.totalDurationMs != null ? c(\"duration: \", formatRunDuration(sandbox.totalDurationMs)) : null,\n      sandbox.totalIngressBytes != null ? c(\"ingress: \", formatBytes(sandbox.totalIngressBytes)) : null,\n      sandbox.totalEgressBytes != null ? c(\"egress: \", formatBytes(sandbox.totalEgressBytes)) : null,\n    ],\n    [\n      c(\"session: \", sessionSnapshot.id),\n      sessionSnapshot.activeCpuDurationMs != null ? c(\"active cpu: \", formatRunDuration(sessionSnapshot.activeCpuDurationMs)) : null,\n      c(\"mem: \", `${sessionSnapshot.memory} MB`),\n      sessionSnapshot.duration != null ? c(\"duration: \", formatRunDuration(sessionSnapshot.duration)) : null,\n      sessionSnapshot.networkTransfer ? c(\"ingress: \", formatBytes(sessionSnapshot.networkTransfer.ingress)) : null,\n      sessionSnapshot.networkTransfer ? c(\"egress: \", formatBytes(sessionSnapshot.networkTransfer.egress)) : null,\n    ],\n    ...(snapshot\n      ? [[\n          c(\"snapshot: \", snapshot.id),\n          c(\"size: \", formatBytes(snapshot.sizeBytes)),\n          c(\"expires: \", snapshot.expiresAt ? timeAgo(snapshot.expiresAt) : \"never\"),\n        ]]\n      : []),\n  ];\n\n  printTree(rows);\n}\n\nexport const stop = cmd.command({\n  name: \"stop\",\n  description: \"Stop the current session of one or more sandboxes\",\n  args: {\n    sandboxName: cmd.positional({\n      type: sandboxName,\n      description: \"A sandbox name to stop\",\n    }),\n    sandboxNames: cmd.restPositionals({\n      type: sandboxName,\n      description: \"More sandboxes to stop\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandboxName, sandboxNames }) {\n    const names = Array.from(new Set([sandboxName, ...sandboxNames]));\n    const spinner = ora({\n      text: names.length === 1\n        ? `Stopping ${names[0]}`\n        : `Stopping ${names.length} sandboxes`,\n      stream: process.stderr,\n    }).start();\n\n    const results = await Promise.allSettled(\n      names.map(async (name) => {\n        const sandbox = await sandboxClient.get({\n          token,\n          teamId: team,\n          projectId: project,\n          name,\n        });\n        const sessionSnapshot = await sandbox.stop();\n        return { name, sandbox, sessionSnapshot };\n      }),\n    );\n\n    spinner.stop();\n\n    for (const result of results) {\n      if (result.status === \"fulfilled\") {\n        const { name, sandbox, sessionSnapshot } = result.value;\n        printStopResult(name, sandbox, sessionSnapshot);\n      } else {\n        const error = result.reason;\n        process.stderr.write(chalk.red(\"✖\") + ` ${error.message ?? error}\\n`);\n        process.exitCode = 1;\n      }\n    }\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\nimport ms from \"ms\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\nimport { Duration } from \"../types/duration\";\n\nexport const extend = cmd.command({\n  name: \"extend\",\n  description:\n    \"Add time to a running session without changing its default timeout\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name with a running session\",\n    }),\n    duration: cmd.positional({\n      type: Duration,\n      description: \"Time to add, for example 5m or 1h\",\n    }),\n    scope,\n  },\n  examples: [\n    { description: \"Add 30 minutes\", command: \"sandbox extend my-sandbox 30m\" },\n  ],\n  async handler({ scope: { token, team, project }, sandbox: name, duration }) {\n    const extension = ms(duration);\n    if (extension <= 0) {\n      throw new Error(\"Extension duration must be greater than zero.\");\n    }\n\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n      resume: false,\n    });\n    const session = (() => {\n      try {\n        return sandbox.currentSession();\n      } catch {\n        return null;\n      }\n    })();\n    if (session?.status !== \"running\") {\n      throw new Error(`Sandbox ${name} has no running session to extend.`);\n    }\n\n    await session.extendTimeout(extension);\n    process.stderr.write(\n      chalk.green(\"✔\") + ` Extended ${chalk.cyan(name)} by ${duration}\\n`,\n    );\n  },\n});\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n  , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n  Events.prototype = Object.create(null);\n\n  //\n  // This hack is needed because the `__proto__` property is still inherited in\n  // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n  //\n  if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n  this.fn = fn;\n  this.context = context;\n  this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('The listener must be a function');\n  }\n\n  var listener = new EE(fn, context || emitter, once)\n    , evt = prefix ? prefix + event : event;\n\n  if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n  else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n  else emitter._events[evt] = [emitter._events[evt], listener];\n\n  return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n  if (--emitter._eventsCount === 0) emitter._events = new Events();\n  else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n  this._events = new Events();\n  this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n  var names = []\n    , events\n    , name;\n\n  if (this._eventsCount === 0) return names;\n\n  for (name in (events = this._events)) {\n    if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n  }\n\n  if (Object.getOwnPropertySymbols) {\n    return names.concat(Object.getOwnPropertySymbols(events));\n  }\n\n  return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n  var evt = prefix ? prefix + event : event\n    , handlers = this._events[evt];\n\n  if (!handlers) return [];\n  if (handlers.fn) return [handlers.fn];\n\n  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n    ee[i] = handlers[i].fn;\n  }\n\n  return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n  var evt = prefix ? prefix + event : event\n    , listeners = this._events[evt];\n\n  if (!listeners) return 0;\n  if (listeners.fn) return 1;\n  return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return false;\n\n  var listeners = this._events[evt]\n    , len = arguments.length\n    , args\n    , i;\n\n  if (listeners.fn) {\n    if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n    switch (len) {\n      case 1: return listeners.fn.call(listeners.context), true;\n      case 2: return listeners.fn.call(listeners.context, a1), true;\n      case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n      case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n      case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n      case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n    }\n\n    for (i = 1, args = new Array(len -1); i < len; i++) {\n      args[i - 1] = arguments[i];\n    }\n\n    listeners.fn.apply(listeners.context, args);\n  } else {\n    var length = listeners.length\n      , j;\n\n    for (i = 0; i < length; i++) {\n      if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n      switch (len) {\n        case 1: listeners[i].fn.call(listeners[i].context); break;\n        case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n        case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n        case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n        default:\n          if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n            args[j - 1] = arguments[j];\n          }\n\n          listeners[i].fn.apply(listeners[i].context, args);\n      }\n    }\n  }\n\n  return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n  return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n  return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n  var evt = prefix ? prefix + event : event;\n\n  if (!this._events[evt]) return this;\n  if (!fn) {\n    clearEvent(this, evt);\n    return this;\n  }\n\n  var listeners = this._events[evt];\n\n  if (listeners.fn) {\n    if (\n      listeners.fn === fn &&\n      (!once || listeners.once) &&\n      (!context || listeners.context === context)\n    ) {\n      clearEvent(this, evt);\n    }\n  } else {\n    for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n      if (\n        listeners[i].fn !== fn ||\n        (once && !listeners[i].once) ||\n        (context && listeners[i].context !== context)\n      ) {\n        events.push(listeners[i]);\n      }\n    }\n\n    //\n    // Reset the array, or remove it completely if we have no more listeners.\n    //\n    if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n    else clearEvent(this, evt);\n  }\n\n  return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n  var evt;\n\n  if (event) {\n    evt = prefix ? prefix + event : event;\n    if (this._events[evt]) clearEvent(this, evt);\n  } else {\n    this._events = new Events();\n    this._eventsCount = 0;\n  }\n\n  return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n  module.exports = EventEmitter;\n}\n","import EventEmitter from './index.js'\n\nexport { EventEmitter }\nexport default EventEmitter\n","import * as tty from \"tty\"\n\nconst {\n  env = {},\n  argv = [],\n  platform = \"\",\n} = typeof process === \"undefined\" ? {} : process\n\nconst isDisabled = \"NO_COLOR\" in env || argv.includes(\"--no-color\")\nconst isForced = \"FORCE_COLOR\" in env || argv.includes(\"--color\")\nconst isWindows = platform === \"win32\"\nconst isDumbTerminal = env.TERM === \"dumb\"\n\nconst isCompatibleTerminal =\n  tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal\n\nconst isCI =\n  \"CI\" in env &&\n  (\"GITHUB_ACTIONS\" in env || \"GITLAB_CI\" in env || \"CIRCLECI\" in env)\n\nexport const isColorSupported =\n  !isDisabled &&\n  (isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI)\n\nconst replaceClose = (\n  index,\n  string,\n  close,\n  replace,\n  head = string.substring(0, index) + replace,\n  tail = string.substring(index + close.length),\n  next = tail.indexOf(close)\n) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace))\n\nconst clearBleed = (index, string, open, close, replace) =>\n  index < 0\n    ? open + string + close\n    : open + replaceClose(index, string, close, replace) + close\n\nconst filterEmpty =\n  (open, close, replace = open, at = open.length + 1) =>\n  (string) =>\n    string || !(string === \"\" || string === undefined)\n      ? clearBleed(\n          (\"\" + string).indexOf(close, at),\n          string,\n          open,\n          close,\n          replace\n        )\n      : \"\"\n\nconst init = (open, close, replace) =>\n  filterEmpty(`\\x1b[${open}m`, `\\x1b[${close}m`, replace)\n\nconst colors = {\n  reset: init(0, 0),\n  bold: init(1, 22, \"\\x1b[22m\\x1b[1m\"),\n  dim: init(2, 22, \"\\x1b[22m\\x1b[2m\"),\n  italic: init(3, 23),\n  underline: init(4, 24),\n  inverse: init(7, 27),\n  hidden: init(8, 28),\n  strikethrough: init(9, 29),\n  black: init(30, 39),\n  red: init(31, 39),\n  green: init(32, 39),\n  yellow: init(33, 39),\n  blue: init(34, 39),\n  magenta: init(35, 39),\n  cyan: init(36, 39),\n  white: init(37, 39),\n  gray: init(90, 39),\n  bgBlack: init(40, 49),\n  bgRed: init(41, 49),\n  bgGreen: init(42, 49),\n  bgYellow: init(43, 49),\n  bgBlue: init(44, 49),\n  bgMagenta: init(45, 49),\n  bgCyan: init(46, 49),\n  bgWhite: init(47, 49),\n  blackBright: init(90, 39),\n  redBright: init(91, 39),\n  greenBright: init(92, 39),\n  yellowBright: init(93, 39),\n  blueBright: init(94, 39),\n  magentaBright: init(95, 39),\n  cyanBright: init(96, 39),\n  whiteBright: init(97, 39),\n  bgBlackBright: init(100, 49),\n  bgRedBright: init(101, 49),\n  bgGreenBright: init(102, 49),\n  bgYellowBright: init(103, 49),\n  bgBlueBright: init(104, 49),\n  bgMagentaBright: init(105, 49),\n  bgCyanBright: init(106, 49),\n  bgWhiteBright: init(107, 49),\n}\n\nexport const createColors = ({ useColor = isColorSupported } = {}) =>\n  useColor\n    ? colors\n    : Object.keys(colors).reduce(\n        (colors, key) => ({ ...colors, [key]: String }),\n        {}\n      )\n\nexport const {\n  reset,\n  bold,\n  dim,\n  italic,\n  underline,\n  inverse,\n  hidden,\n  strikethrough,\n  black,\n  red,\n  green,\n  yellow,\n  blue,\n  magenta,\n  cyan,\n  white,\n  gray,\n  bgBlack,\n  bgRed,\n  bgGreen,\n  bgYellow,\n  bgBlue,\n  bgMagenta,\n  bgCyan,\n  bgWhite,\n  blackBright,\n  redBright,\n  greenBright,\n  yellowBright,\n  blueBright,\n  magentaBright,\n  cyanBright,\n  whiteBright,\n  bgBlackBright,\n  bgRedBright,\n  bgGreenBright,\n  bgYellowBright,\n  bgBlueBright,\n  bgMagentaBright,\n  bgCyanBright,\n  bgWhiteBright,\n} = createColors()\n","'use strict'\nmodule.exports = rfdc\n\nfunction copyBuffer (cur) {\n  if (cur instanceof Buffer) {\n    return Buffer.from(cur)\n  }\n\n  return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length)\n}\n\nfunction rfdc (opts) {\n  opts = opts || {}\n  if (opts.circles) return rfdcCircles(opts)\n\n  const constructorHandlers = new Map()\n  constructorHandlers.set(Date, (o) => new Date(o))\n  constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)))\n  constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)))\n  if (opts.constructorHandlers) {\n    for (const handler of opts.constructorHandlers) {\n      constructorHandlers.set(handler[0], handler[1])\n    }\n  }\n\n  let handler = null\n\n  return opts.proto ? cloneProto : clone\n\n  function cloneArray (a, fn) {\n    const keys = Object.keys(a)\n    const a2 = new Array(keys.length)\n    for (let i = 0; i < keys.length; i++) {\n      const k = keys[i]\n      const cur = a[k]\n      if (typeof cur !== 'object' || cur === null) {\n        a2[k] = cur\n      } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n        a2[k] = handler(cur, fn)\n      } else if (ArrayBuffer.isView(cur)) {\n        a2[k] = copyBuffer(cur)\n      } else {\n        a2[k] = fn(cur)\n      }\n    }\n    return a2\n  }\n\n  function clone (o) {\n    if (typeof o !== 'object' || o === null) return o\n    if (Array.isArray(o)) return cloneArray(o, clone)\n    if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n      return handler(o, clone)\n    }\n    const o2 = {}\n    for (const k in o) {\n      if (Object.hasOwnProperty.call(o, k) === false) continue\n      const cur = o[k]\n      if (typeof cur !== 'object' || cur === null) {\n        o2[k] = cur\n      } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n        o2[k] = handler(cur, clone)\n      } else if (ArrayBuffer.isView(cur)) {\n        o2[k] = copyBuffer(cur)\n      } else {\n        o2[k] = clone(cur)\n      }\n    }\n    return o2\n  }\n\n  function cloneProto (o) {\n    if (typeof o !== 'object' || o === null) return o\n    if (Array.isArray(o)) return cloneArray(o, cloneProto)\n    if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n      return handler(o, cloneProto)\n    }\n    const o2 = {}\n    for (const k in o) {\n      const cur = o[k]\n      if (typeof cur !== 'object' || cur === null) {\n        o2[k] = cur\n      } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n        o2[k] = handler(cur, cloneProto)\n      } else if (ArrayBuffer.isView(cur)) {\n        o2[k] = copyBuffer(cur)\n      } else {\n        o2[k] = cloneProto(cur)\n      }\n    }\n    return o2\n  }\n}\n\nfunction rfdcCircles (opts) {\n  const refs = []\n  const refsNew = []\n\n  const constructorHandlers = new Map()\n  constructorHandlers.set(Date, (o) => new Date(o))\n  constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)))\n  constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)))\n  if (opts.constructorHandlers) {\n    for (const handler of opts.constructorHandlers) {\n      constructorHandlers.set(handler[0], handler[1])\n    }\n  }\n\n  let handler = null\n  return opts.proto ? cloneProto : clone\n\n  function cloneArray (a, fn) {\n    const keys = Object.keys(a)\n    const a2 = new Array(keys.length)\n    for (let i = 0; i < keys.length; i++) {\n      const k = keys[i]\n      const cur = a[k]\n      if (typeof cur !== 'object' || cur === null) {\n        a2[k] = cur\n      } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n        a2[k] = handler(cur, fn)\n      } else if (ArrayBuffer.isView(cur)) {\n        a2[k] = copyBuffer(cur)\n      } else {\n        const index = refs.indexOf(cur)\n        if (index !== -1) {\n          a2[k] = refsNew[index]\n        } else {\n          a2[k] = fn(cur)\n        }\n      }\n    }\n    return a2\n  }\n\n  function clone (o) {\n    if (typeof o !== 'object' || o === null) return o\n    if (Array.isArray(o)) return cloneArray(o, clone)\n    if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n      return handler(o, clone)\n    }\n    const o2 = {}\n    refs.push(o)\n    refsNew.push(o2)\n    for (const k in o) {\n      if (Object.hasOwnProperty.call(o, k) === false) continue\n      const cur = o[k]\n      if (typeof cur !== 'object' || cur === null) {\n        o2[k] = cur\n      } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n        o2[k] = handler(cur, clone)\n      } else if (ArrayBuffer.isView(cur)) {\n        o2[k] = copyBuffer(cur)\n      } else {\n        const i = refs.indexOf(cur)\n        if (i !== -1) {\n          o2[k] = refsNew[i]\n        } else {\n          o2[k] = clone(cur)\n        }\n      }\n    }\n    refs.pop()\n    refsNew.pop()\n    return o2\n  }\n\n  function cloneProto (o) {\n    if (typeof o !== 'object' || o === null) return o\n    if (Array.isArray(o)) return cloneArray(o, cloneProto)\n    if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n      return handler(o, cloneProto)\n    }\n    const o2 = {}\n    refs.push(o)\n    refsNew.push(o2)\n    for (const k in o) {\n      const cur = o[k]\n      if (typeof cur !== 'object' || cur === null) {\n        o2[k] = cur\n      } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n        o2[k] = handler(cur, cloneProto)\n      } else if (ArrayBuffer.isView(cur)) {\n        o2[k] = copyBuffer(cur)\n      } else {\n        const i = refs.indexOf(cur)\n        if (i !== -1) {\n          o2[k] = refsNew[i]\n        } else {\n          o2[k] = cloneProto(cur)\n        }\n      }\n    }\n    refs.pop()\n    refsNew.pop()\n    return o2\n  }\n}\n","import EventEmitter from \"eventemitter3\";\nimport { createColors } from \"colorette\";\nimport { format } from \"util\";\nimport { EOL } from \"os\";\nimport { StringDecoder } from \"string_decoder\";\nimport { Writable } from \"stream\";\nimport rfdc from \"rfdc\";\nimport { randomUUID } from \"crypto\";\n\n//#region src/constants/ansi-escape-codes.constants.ts\n/**\n* Indicates an UNICODE characters is coming up.\n*/\nconst ANSI_ESCAPE = \"\\x1B[\";\n/**\n* Generic ANSI escape characters for terminal based operations.\n*/\nconst ANSI_ESCAPE_CODES = {\n\tCURSOR_HIDE: ANSI_ESCAPE + \"?25l\",\n\tCURSOR_SHOW: ANSI_ESCAPE + \"?25h\"\n};\n\n//#endregion\n//#region src/constants/environment-variables.constants.ts\n/**\n* Environment variables for Listr.\n*/\nlet ListrEnvironmentVariables = /* @__PURE__ */ function(ListrEnvironmentVariables$1) {\n\tListrEnvironmentVariables$1[\"FORCE_UNICODE\"] = \"LISTR_FORCE_UNICODE\";\n\tListrEnvironmentVariables$1[\"FORCE_TTY\"] = \"LISTR_FORCE_TTY\";\n\tListrEnvironmentVariables$1[\"DISABLE_COLOR\"] = \"NO_COLOR\";\n\tListrEnvironmentVariables$1[\"FORCE_COLOR\"] = \"FORCE_COLOR\";\n\treturn ListrEnvironmentVariables$1;\n}({});\n\n//#endregion\n//#region src/constants/listr-error.constants.ts\n/**\n* The actual error type that is collected and to help identify where the error is triggered from.\n*/\nlet ListrErrorTypes = /* @__PURE__ */ function(ListrErrorTypes$1) {\n\t/** Task has failed and will try to retry. */\n\tListrErrorTypes$1[\"WILL_RETRY\"] = \"WILL_RETRY\";\n\t/** Task has failed and will try to rollback. */\n\tListrErrorTypes$1[\"WILL_ROLLBACK\"] = \"WILL_ROLLBACK\";\n\t/** Task has failed, ran the rollback action but the rollback action itself has failed. */\n\tListrErrorTypes$1[\"HAS_FAILED_TO_ROLLBACK\"] = \"HAS_FAILED_TO_ROLLBACK\";\n\t/** Task has failed. */\n\tListrErrorTypes$1[\"HAS_FAILED\"] = \"HAS_FAILED\";\n\t/** Task has failed, but exitOnError is set to false, so will ignore this error. */\n\tListrErrorTypes$1[\"HAS_FAILED_WITHOUT_ERROR\"] = \"HAS_FAILED_WITHOUT_ERROR\";\n\treturn ListrErrorTypes$1;\n}({});\n\n//#endregion\n//#region src/constants/listr-events.constants.ts\n/**\n* Events that are triggered by Listr.\n*\n* These are stateful and singleton events by being attached to the main Listr class and propagating to the subtasks.\n*\n* @see {@link https://listr2.kilic.dev/listr/events.html}\n*/\nlet ListrEventType = /* @__PURE__ */ function(ListrEventType$1) {\n\t/** Indicates that underlying renderer should refresh the current render. */\n\tListrEventType$1[\"SHOULD_REFRESH_RENDER\"] = \"SHOUD_REFRESH_RENDER\";\n\treturn ListrEventType$1;\n}({});\n\n//#endregion\n//#region src/constants/listr-renderer.constants.ts\nlet ListrRendererSelection = /* @__PURE__ */ function(ListrRendererSelection$1) {\n\tListrRendererSelection$1[\"PRIMARY\"] = \"PRIMARY\";\n\tListrRendererSelection$1[\"SECONDARY\"] = \"SECONDARY\";\n\tListrRendererSelection$1[\"SILENT\"] = \"SILENT\";\n\treturn ListrRendererSelection$1;\n}({});\n\n//#endregion\n//#region src/constants/listr-task-events.constants.ts\n/**\n* Internal events that are fired from the Task.\n*\n* @see {@link https://listr2.kilic.dev/task/events.html}\n*/\nlet ListrTaskEventType = /* @__PURE__ */ function(ListrTaskEventType$1) {\n\t/** Title has changed for the current Task. */\n\tListrTaskEventType$1[\"TITLE\"] = \"TITLE\";\n\t/**\n\t* State has changed for the current Task.\n\t*\n\t* @see {@link module:listr2.ListrTaskState}\n\t*/\n\tListrTaskEventType$1[\"STATE\"] = \"STATE\";\n\t/** The current Task has been marked as enabled. */\n\tListrTaskEventType$1[\"ENABLED\"] = \"ENABLED\";\n\t/** The current Task is currently processing subtasks. */\n\tListrTaskEventType$1[\"SUBTASK\"] = \"SUBTASK\";\n\t/** The current Task is now processing a prompt. */\n\tListrTaskEventType$1[\"PROMPT\"] = \"PROMPT\";\n\t/** The current Task is now dumping output. */\n\tListrTaskEventType$1[\"OUTPUT\"] = \"OUTPUT\";\n\t/**\n\t* The current Task is now dumping a message.\n\t*\n\t* @see {module:Listr2.ListrTaskMessage}\n\t*/\n\tListrTaskEventType$1[\"MESSAGE\"] = \"MESSAGE\";\n\t/** The current Task is closed and no further action in expected. */\n\tListrTaskEventType$1[\"CLOSED\"] = \"CLOSED\";\n\treturn ListrTaskEventType$1;\n}({});\n\n//#endregion\n//#region src/constants/listr-task-state.constants.ts\n/**\n* Tasks can be in various states during the execution.\n*\n* Whenever a state change occurs, the task will emit a {@link module:listr2.ListrTaskEventType.STATE} with the appropriate state.\n*/\nlet ListrTaskState = /* @__PURE__ */ function(ListrTaskState$1) {\n\t/** Task has not started yet, waiting for pick-up. */\n\tListrTaskState$1[\"WAITING\"] = \"WAITING\";\n\t/** Task has started. */\n\tListrTaskState$1[\"STARTED\"] = \"STARTED\";\n\t/** Task has been completed. */\n\tListrTaskState$1[\"COMPLETED\"] = \"COMPLETED\";\n\t/** Task has failed. */\n\tListrTaskState$1[\"FAILED\"] = \"FAILED\";\n\t/** Task has been skipped. */\n\tListrTaskState$1[\"SKIPPED\"] = \"SKIPPED\";\n\t/** Task is currently trying to rollback. */\n\tListrTaskState$1[\"ROLLING_BACK\"] = \"ROLLING_BACK\";\n\t/** Task has rolledback successfully after failing. */\n\tListrTaskState$1[\"ROLLED_BACK\"] = \"ROLLED_BACK\";\n\t/** Task is currently retrying. */\n\tListrTaskState$1[\"RETRY\"] = \"RETRY\";\n\t/** Task is currently paused. */\n\tListrTaskState$1[\"PAUSED\"] = \"PAUSED\";\n\t/** Task is currently trying to process a prompt. */\n\tListrTaskState$1[\"PROMPT\"] = \"PROMPT\";\n\t/** Task has successfully processed the prompt. */\n\tListrTaskState$1[\"PROMPT_COMPLETED\"] = \"PROMPT_COMPLETED\";\n\t/** Task has failed to process the prompt. */\n\tListrTaskState$1[\"PROMPT_FAILED\"] = \"PROMPT_FAILED\";\n\treturn ListrTaskState$1;\n}({});\n\n//#endregion\n//#region src/lib/event-manager.ts\nvar EventManager = class {\n\temitter = new EventEmitter();\n\temit(dispatch, args) {\n\t\tthis.emitter.emit(dispatch, args);\n\t}\n\ton(dispatch, handler) {\n\t\tthis.emitter.addListener(dispatch, handler);\n\t}\n\tonce(dispatch, handler) {\n\t\tthis.emitter.once(dispatch, handler);\n\t}\n\toff(dispatch, handler) {\n\t\tthis.emitter.off(dispatch, handler);\n\t}\n\tcomplete() {\n\t\tthis.emitter.removeAllListeners();\n\t}\n};\n\n//#endregion\n//#region src/interfaces/event.interface.ts\n/**\n* Give event map a set of indexes to not make it go crazy when some events are missing from it.\n* They are optional after all.\n*/\nvar BaseEventMap = class {};\n\n//#endregion\n//#region src/utils/environment/is-observable.ts\n/**\n* Tests to see if the object is an RxJS {@link Observable}\n* @param obj the object to test\n*/\nfunction isObservable(obj) {\n\treturn !!obj && typeof obj === \"object\" && typeof obj.subscribe === \"function\";\n}\n\n//#endregion\n//#region src/utils/environment/is-readable.ts\n/**\n* Tests to see if the object is an Readable or NodeJS.ReadableStream {@link Readable, NodeJS.ReadableStream}\n* @param obj the object to test\n*/\nfunction isReadable(obj) {\n\treturn !!obj && typeof obj === \"object\" && obj.readable === true && typeof obj.read === \"function\" && typeof obj.on === \"function\";\n}\n\n//#endregion\n//#region src/utils/environment/is-unicode-supported.ts\nfunction isUnicodeSupported() {\n\t/* istanbul ignore next */\n\treturn !!process.env[ListrEnvironmentVariables.FORCE_UNICODE] || process.platform !== \"win32\" || !!process.env.CI || !!process.env.WT_SESSION || process.env.TERM_PROGRAM === \"vscode\" || process.env.TERM === \"xterm-256color\" || process.env.TERM === \"alacritty\";\n}\n\n//#endregion\n//#region src/utils/format/cleanse-ansi.constants.ts\nconst CLEAR_LINE_REGEX = \"(?:\\\\u001b|\\\\u009b)\\\\[[\\\\=><~/#&.:=?%@~_-]*[0-9]*[\\\\a-ln-tqyz=><~/#&.:=?%@~_-]+\";\nconst BELL_REGEX = /\\u0007/;\n\n//#endregion\n//#region src/utils/format/cleanse-ansi.ts\nfunction cleanseAnsi(chunk) {\n\treturn String(chunk).replace(new RegExp(CLEAR_LINE_REGEX, \"gmi\"), \"\").replace(new RegExp(BELL_REGEX, \"gmi\"), \"\").trim();\n}\n\n//#endregion\n//#region src/utils/format/color.ts\n/**\n* Creates color palette through underlying dependency of `colorette`.\n*\n* @see {@link https://www.npmjs.com/package/colorette}\n*/\nconst color = createColors();\n\n//#endregion\n//#region src/utils/format/indent.ts\nfunction indent(string, count) {\n\treturn string.replace(/^(?!\\s*$)/gm, \" \".repeat(count));\n}\n\n//#endregion\n//#region src/utils/format/figures.ts\nconst FIGURES_MAIN = {\n\twarning: \"⚠\",\n\tcross: \"✖\",\n\tarrowDown: \"↓\",\n\ttick: \"✔\",\n\tarrowRight: \"→\",\n\tpointer: \"❯\",\n\tcheckboxOn: \"☒\",\n\tarrowLeft: \"←\",\n\tsquareSmallFilled: \"◼\",\n\tpointerSmall: \"›\"\n};\nconst FIGURES_FALLBACK = {\n\t...FIGURES_MAIN,\n\twarning: \"‼\",\n\tcross: \"×\",\n\ttick: \"√\",\n\tpointer: \">\",\n\tcheckboxOn: \"[×]\",\n\tsquareSmallFilled: \"■\"\n};\nconst figures = isUnicodeSupported() ? FIGURES_MAIN : FIGURES_FALLBACK;\n\n//#endregion\n//#region src/utils/format/splat.ts\nfunction splat(message, ...splat$1) {\n\treturn format(String(message), ...splat$1);\n}\n\n//#endregion\n//#region src/utils/logger/logger.constants.ts\n/** Default ListrLogLevels for the logger */\nlet ListrLogLevels = /* @__PURE__ */ function(ListrLogLevels$1) {\n\tListrLogLevels$1[\"STARTED\"] = \"STARTED\";\n\tListrLogLevels$1[\"COMPLETED\"] = \"COMPLETED\";\n\tListrLogLevels$1[\"FAILED\"] = \"FAILED\";\n\tListrLogLevels$1[\"SKIPPED\"] = \"SKIPPED\";\n\tListrLogLevels$1[\"OUTPUT\"] = \"OUTPUT\";\n\tListrLogLevels$1[\"TITLE\"] = \"TITLE\";\n\tListrLogLevels$1[\"ROLLBACK\"] = \"ROLLBACK\";\n\tListrLogLevels$1[\"RETRY\"] = \"RETRY\";\n\tListrLogLevels$1[\"PROMPT\"] = \"PROMPT\";\n\tListrLogLevels$1[\"PAUSED\"] = \"PAUSED\";\n\treturn ListrLogLevels$1;\n}({});\nconst LISTR_LOGGER_STYLE = {\n\ticon: {\n\t\t[ListrLogLevels.STARTED]: figures.pointer,\n\t\t[ListrLogLevels.FAILED]: figures.cross,\n\t\t[ListrLogLevels.SKIPPED]: figures.arrowDown,\n\t\t[ListrLogLevels.COMPLETED]: figures.tick,\n\t\t[ListrLogLevels.OUTPUT]: figures.pointerSmall,\n\t\t[ListrLogLevels.TITLE]: figures.arrowRight,\n\t\t[ListrLogLevels.RETRY]: figures.warning,\n\t\t[ListrLogLevels.ROLLBACK]: figures.arrowLeft,\n\t\t[ListrLogLevels.PAUSED]: figures.squareSmallFilled\n\t},\n\tcolor: {\n\t\t[ListrLogLevels.STARTED]: color.yellow,\n\t\t[ListrLogLevels.FAILED]: color.red,\n\t\t[ListrLogLevels.SKIPPED]: color.yellow,\n\t\t[ListrLogLevels.COMPLETED]: color.green,\n\t\t[ListrLogLevels.RETRY]: color.yellowBright,\n\t\t[ListrLogLevels.ROLLBACK]: color.redBright,\n\t\t[ListrLogLevels.PAUSED]: color.yellowBright\n\t}\n};\nconst LISTR_LOGGER_STDERR_LEVELS = [\n\tListrLogLevels.RETRY,\n\tListrLogLevels.ROLLBACK,\n\tListrLogLevels.FAILED\n];\n\n//#endregion\n//#region src/utils/logger/logger.ts\n/**\n* Creates a new Listr2 logger.\n*\n* This logger is used throughout the renderers for consistency.\n*\n* @see {@link https://listr2.kilic.dev/renderer/logger.html}\n*/\nvar ListrLogger = class {\n\tprocess;\n\tconstructor(options) {\n\t\tthis.options = options;\n\t\tthis.options = {\n\t\t\tuseIcons: true,\n\t\t\ttoStderr: [],\n\t\t\t...options ?? {}\n\t\t};\n\t\tthis.options.fields ??= {};\n\t\tthis.options.fields.prefix ??= [];\n\t\tthis.options.fields.suffix ??= [];\n\t\tthis.process = this.options.processOutput ?? new ProcessOutput();\n\t}\n\tlog(level, message, options) {\n\t\tconst output = this.format(level, message, options);\n\t\tif (this.options.toStderr.includes(level)) {\n\t\t\tthis.process.toStderr(output);\n\t\t\treturn;\n\t\t}\n\t\tthis.process.toStdout(output);\n\t}\n\ttoStdout(message, options, eol = true) {\n\t\tthis.process.toStdout(this.format(null, message, options), eol);\n\t}\n\ttoStderr(message, options, eol = true) {\n\t\tthis.process.toStderr(this.format(null, message, options), eol);\n\t}\n\twrap(message, options) {\n\t\tif (!message) return message;\n\t\treturn this.applyFormat(`[${message}]`, options);\n\t}\n\tsplat(...args) {\n\t\tconst message = args.shift() ?? \"\";\n\t\treturn args.length === 0 ? message : splat(message, args);\n\t}\n\tsuffix(message, ...suffixes) {\n\t\tsuffixes.filter(Boolean).forEach((suffix) => {\n\t\t\tmessage += this.spacing(message);\n\t\t\tif (typeof suffix === \"string\") message += this.wrap(suffix);\n\t\t\telse if (typeof suffix === \"object\") {\n\t\t\t\tsuffix.args ??= [];\n\t\t\t\tif (typeof suffix.condition === \"function\" ? !suffix.condition(...suffix.args) : !(suffix.condition ?? true)) return message;\n\t\t\t\tmessage += this.wrap(typeof suffix.field === \"function\" ? suffix.field(...suffix.args) : suffix.field, { format: suffix?.format(...suffix.args) });\n\t\t\t}\n\t\t});\n\t\treturn message;\n\t}\n\tprefix(message, ...prefixes) {\n\t\tprefixes.filter(Boolean).forEach((prefix) => {\n\t\t\tmessage = this.spacing(message) + message;\n\t\t\tif (typeof prefix === \"string\") message = this.wrap(prefix) + message;\n\t\t\telse if (typeof prefix === \"object\") {\n\t\t\t\tprefix.args ??= [];\n\t\t\t\tif (typeof prefix.condition === \"function\" ? !prefix.condition(...prefix.args) : !(prefix.condition ?? true)) return message;\n\t\t\t\tmessage = this.wrap(typeof prefix.field === \"function\" ? prefix.field(...prefix.args) : prefix.field, { format: prefix?.format() }) + message;\n\t\t\t}\n\t\t});\n\t\treturn message;\n\t}\n\tfields(message, options) {\n\t\tif (this.options?.fields?.prefix) message = this.prefix(message, ...this.options.fields.prefix);\n\t\tif (options?.prefix) message = this.prefix(message, ...options.prefix);\n\t\tif (options?.suffix) message = this.suffix(message, ...options.suffix);\n\t\tif (this.options?.fields?.suffix) message = this.suffix(message, ...this.options.fields.suffix);\n\t\treturn message;\n\t}\n\ticon(level, icon) {\n\t\tif (!level) return null;\n\t\tif (!icon) {\n\t\t\tconst i = this.options.icon?.[level];\n\t\t\ticon = typeof i === \"function\" ? i() : i;\n\t\t}\n\t\tconst coloring = this.options.color?.[level];\n\t\tif (icon && coloring) icon = coloring(icon);\n\t\treturn icon;\n\t}\n\tformat(level, message, options) {\n\t\tif (!Array.isArray(message)) message = [message];\n\t\tmessage = this.splat(message.shift(), ...message).toString().split(EOL).filter((m) => !m || m.trim() !== \"\").map((m) => {\n\t\t\treturn this.style(level, this.fields(m, {\n\t\t\t\tprefix: Array.isArray(options?.prefix) ? options.prefix : [options?.prefix],\n\t\t\t\tsuffix: Array.isArray(options?.suffix) ? options.suffix : [options?.suffix]\n\t\t\t}));\n\t\t}).join(EOL);\n\t\treturn message;\n\t}\n\tstyle(level, message) {\n\t\tif (!level || !message) return message;\n\t\tconst icon = this.icon(level, !this.options.useIcons && this.wrap(level));\n\t\tif (icon) message = icon + \" \" + message;\n\t\treturn message;\n\t}\n\tapplyFormat(message, options) {\n\t\tif (options?.format) return options.format(message);\n\t\treturn message;\n\t}\n\tspacing(message) {\n\t\treturn typeof message === \"undefined\" || message.trim() === \"\" ? \"\" : \" \";\n\t}\n};\n\n//#endregion\n//#region src/utils/process-output/process-output-buffer.ts\nvar ProcessOutputBuffer = class {\n\tbuffer = [];\n\tdecoder = new StringDecoder();\n\tconstructor(options) {\n\t\tthis.options = options;\n\t}\n\tget all() {\n\t\treturn this.buffer;\n\t}\n\tget last() {\n\t\treturn this.buffer.at(-1);\n\t}\n\tget length() {\n\t\treturn this.buffer.length;\n\t}\n\twrite(data, ...args) {\n\t\tconst callback = args[args.length - 1];\n\t\tthis.buffer.push({\n\t\t\ttime: Date.now(),\n\t\t\tstream: this.options?.stream,\n\t\t\tentry: this.decoder.write(typeof data === \"string\" ? Buffer.from(data, typeof args[0] === \"string\" ? args[0] : void 0) : Buffer.from(data))\n\t\t});\n\t\tif (this.options?.limit) this.buffer = this.buffer.slice(-this.options.limit);\n\t\tif (typeof callback === \"function\") callback();\n\t\treturn true;\n\t}\n\treset() {\n\t\tthis.buffer = [];\n\t}\n};\n\n//#endregion\n//#region src/utils/process-output/process-output-stream.ts\nvar ProcessOutputStream = class {\n\tmethod;\n\tbuffer;\n\tconstructor(stream) {\n\t\tthis.stream = stream;\n\t\tthis.method = stream.write;\n\t\tthis.buffer = new ProcessOutputBuffer({ stream });\n\t}\n\tget out() {\n\t\treturn Object.assign({}, this.stream, { write: this.write.bind(this) });\n\t}\n\thijack() {\n\t\tthis.stream.write = this.buffer.write.bind(this.buffer);\n\t}\n\trelease() {\n\t\tthis.stream.write = this.method;\n\t\tconst buffer = [...this.buffer.all];\n\t\tthis.buffer.reset();\n\t\treturn buffer;\n\t}\n\twrite(...args) {\n\t\treturn this.method.apply(this.stream, args);\n\t}\n};\n\n//#endregion\n//#region src/utils/process-output/process-output.ts\n/**\n* Creates a new Listr2 process-output controller.\n*\n* This is used to control the flow to `process.stdout` and `process.stderr` for all renderers.\n*\n* @see {@link https://listr2.kilic.dev/renderer/process-output.html}\n*/\nvar ProcessOutput = class {\n\tstream;\n\tactive;\n\tconstructor(stdout, stderr, options) {\n\t\tthis.options = options;\n\t\tthis.stream = {\n\t\t\tstdout: new ProcessOutputStream(stdout ?? process.stdout),\n\t\t\tstderr: new ProcessOutputStream(stderr ?? process.stderr)\n\t\t};\n\t\tthis.options = {\n\t\t\tdump: [\"stdout\", \"stderr\"],\n\t\t\tleaveEmptyLine: true,\n\t\t\t...options\n\t\t};\n\t}\n\tget stdout() {\n\t\treturn this.stream.stdout.out;\n\t}\n\tget stderr() {\n\t\treturn this.stream.stderr.out;\n\t}\n\thijack() {\n\t\tif (this.active) throw new Error(\"ProcessOutput has been already hijacked!\");\n\t\tthis.stream.stdout.write(ANSI_ESCAPE_CODES.CURSOR_HIDE);\n\t\tObject.values(this.stream).forEach((stream) => stream.hijack());\n\t\tthis.active = true;\n\t}\n\trelease() {\n\t\tconst output = Object.entries(this.stream).map(([name, stream]) => ({\n\t\t\tname,\n\t\t\tbuffer: stream.release()\n\t\t})).filter((output$1) => this.options.dump.includes(output$1.name)).flatMap((output$1) => output$1.buffer).sort((a, b) => a.time - b.time).map((message) => {\n\t\t\treturn {\n\t\t\t\t...message,\n\t\t\t\tentry: cleanseAnsi(message.entry)\n\t\t\t};\n\t\t}).filter((message) => message.entry);\n\t\tif (output.length > 0) {\n\t\t\tif (this.options.leaveEmptyLine) this.stdout.write(EOL);\n\t\t\toutput.forEach((message) => {\n\t\t\t\tconst stream = message.stream ?? this.stdout;\n\t\t\t\tstream.write(message.entry + EOL);\n\t\t\t});\n\t\t}\n\t\tthis.stream.stdout.write(ANSI_ESCAPE_CODES.CURSOR_SHOW);\n\t\tthis.active = false;\n\t}\n\ttoStdout(buffer, eol = true) {\n\t\tif (eol) buffer = buffer + EOL;\n\t\treturn this.stream.stdout.write(buffer);\n\t}\n\ttoStderr(buffer, eol = true) {\n\t\tif (eol) buffer = buffer + EOL;\n\t\treturn this.stream.stderr.write(buffer);\n\t}\n};\n\n//#endregion\n//#region src/utils/process-output/writable.ts\n/* istanbul ignore next */\nfunction createWritable(cb) {\n\tconst writable = new Writable();\n\twritable.rows = Infinity;\n\twritable.columns = Infinity;\n\twritable.write = (chunk) => {\n\t\tcb(chunk.toString());\n\t\treturn true;\n\t};\n\treturn writable;\n}\n\n//#endregion\n//#region src/utils/prompts/adapter.ts\n/* istanbul ignore next */\nvar ListrPromptAdapter = class {\n\tstate;\n\tconstructor(task, wrapper) {\n\t\tthis.task = task;\n\t\tthis.wrapper = wrapper;\n\t}\n\treportStarted() {\n\t\tthis.state = this.task.state;\n\t\tif (this.task.prompt) throw new PromptError(\"There is already an active prompt attached to this task which may not be cleaned up properly.\");\n\t\tthis.task.prompt = this;\n\t\tthis.task.state$ = ListrTaskState.PROMPT;\n\t}\n\treportFailed() {\n\t\tthis.task.state$ = ListrTaskState.PROMPT_FAILED;\n\t\tthis.restoreState();\n\t}\n\treportCompleted() {\n\t\tthis.task.state$ = ListrTaskState.PROMPT_COMPLETED;\n\t\tthis.restoreState();\n\t}\n\trestoreState() {\n\t\tthis.task.prompt = void 0;\n\t\tif (this.state) this.task.state = this.state;\n\t}\n};\n\n//#endregion\n//#region src/utils/ui/spinner.ts\n/* istanbul ignore next */\nvar Spinner = class {\n\tspinner = !isUnicodeSupported() ? [\n\t\t\"-\",\n\t\t\"\\\\\",\n\t\t\"|\",\n\t\t\"/\"\n\t] : [\n\t\t\"⠋\",\n\t\t\"⠙\",\n\t\t\"⠹\",\n\t\t\"⠸\",\n\t\t\"⠼\",\n\t\t\"⠴\",\n\t\t\"⠦\",\n\t\t\"⠧\",\n\t\t\"⠇\",\n\t\t\"⠏\"\n\t];\n\tid;\n\tspinnerPosition = 0;\n\tspin() {\n\t\tthis.spinnerPosition = ++this.spinnerPosition % this.spinner.length;\n\t}\n\tfetch() {\n\t\treturn this.spinner[this.spinnerPosition];\n\t}\n\tisRunning() {\n\t\treturn !!this.id;\n\t}\n\tstart(cb, interval = 100) {\n\t\tthis.id = setInterval(() => {\n\t\t\tthis.spin();\n\t\t\tif (cb) cb();\n\t\t}, interval);\n\t}\n\tstop() {\n\t\tclearInterval(this.id);\n\t}\n};\n\n//#endregion\n//#region src/renderer/default/renderer.constants.ts\nlet ListrDefaultRendererLogLevels = /* @__PURE__ */ function(ListrDefaultRendererLogLevels$1) {\n\tListrDefaultRendererLogLevels$1[\"SKIPPED_WITH_COLLAPSE\"] = \"SKIPPED_WITH_COLLAPSE\";\n\tListrDefaultRendererLogLevels$1[\"SKIPPED_WITHOUT_COLLAPSE\"] = \"SKIPPED_WITHOUT_COLLAPSE\";\n\tListrDefaultRendererLogLevels$1[\"OUTPUT\"] = \"OUTPUT\";\n\tListrDefaultRendererLogLevels$1[\"OUTPUT_WITH_BOTTOMBAR\"] = \"OUTPUT_WITH_BOTTOMBAR\";\n\tListrDefaultRendererLogLevels$1[\"PENDING\"] = \"PENDING\";\n\tListrDefaultRendererLogLevels$1[\"COMPLETED\"] = \"COMPLETED\";\n\tListrDefaultRendererLogLevels$1[\"COMPLETED_WITH_FAILED_SUBTASKS\"] = \"COMPLETED_WITH_FAILED_SUBTASKS\";\n\tListrDefaultRendererLogLevels$1[\"COMPLETED_WITH_FAILED_SISTER_TASKS\"] = \"COMPLETED_WITH_SISTER_TASKS_FAILED\";\n\tListrDefaultRendererLogLevels$1[\"RETRY\"] = \"RETRY\";\n\tListrDefaultRendererLogLevels$1[\"ROLLING_BACK\"] = \"ROLLING_BACK\";\n\tListrDefaultRendererLogLevels$1[\"ROLLED_BACK\"] = \"ROLLED_BACK\";\n\tListrDefaultRendererLogLevels$1[\"FAILED\"] = \"FAILED\";\n\tListrDefaultRendererLogLevels$1[\"FAILED_WITH_FAILED_SUBTASKS\"] = \"FAILED_WITH_SUBTASKS\";\n\tListrDefaultRendererLogLevels$1[\"WAITING\"] = \"WAITING\";\n\tListrDefaultRendererLogLevels$1[\"PAUSED\"] = \"PAUSED\";\n\treturn ListrDefaultRendererLogLevels$1;\n}({});\nconst LISTR_DEFAULT_RENDERER_STYLE = {\n\ticon: {\n\t\t[ListrDefaultRendererLogLevels.SKIPPED_WITH_COLLAPSE]: figures.arrowDown,\n\t\t[ListrDefaultRendererLogLevels.SKIPPED_WITHOUT_COLLAPSE]: figures.warning,\n\t\t[ListrDefaultRendererLogLevels.OUTPUT]: figures.pointerSmall,\n\t\t[ListrDefaultRendererLogLevels.OUTPUT_WITH_BOTTOMBAR]: figures.pointerSmall,\n\t\t[ListrDefaultRendererLogLevels.PENDING]: figures.pointer,\n\t\t[ListrDefaultRendererLogLevels.COMPLETED]: figures.tick,\n\t\t[ListrDefaultRendererLogLevels.COMPLETED_WITH_FAILED_SUBTASKS]: figures.warning,\n\t\t[ListrDefaultRendererLogLevels.COMPLETED_WITH_FAILED_SISTER_TASKS]: figures.squareSmallFilled,\n\t\t[ListrDefaultRendererLogLevels.RETRY]: figures.warning,\n\t\t[ListrDefaultRendererLogLevels.ROLLING_BACK]: figures.warning,\n\t\t[ListrDefaultRendererLogLevels.ROLLED_BACK]: figures.arrowLeft,\n\t\t[ListrDefaultRendererLogLevels.FAILED]: figures.cross,\n\t\t[ListrDefaultRendererLogLevels.FAILED_WITH_FAILED_SUBTASKS]: figures.pointer,\n\t\t[ListrDefaultRendererLogLevels.WAITING]: figures.squareSmallFilled,\n\t\t[ListrDefaultRendererLogLevels.PAUSED]: figures.squareSmallFilled\n\t},\n\tcolor: {\n\t\t[ListrDefaultRendererLogLevels.SKIPPED_WITH_COLLAPSE]: color.yellow,\n\t\t[ListrDefaultRendererLogLevels.SKIPPED_WITHOUT_COLLAPSE]: color.yellow,\n\t\t[ListrDefaultRendererLogLevels.PENDING]: color.yellow,\n\t\t[ListrDefaultRendererLogLevels.COMPLETED]: color.green,\n\t\t[ListrDefaultRendererLogLevels.COMPLETED_WITH_FAILED_SUBTASKS]: color.yellow,\n\t\t[ListrDefaultRendererLogLevels.COMPLETED_WITH_FAILED_SISTER_TASKS]: color.red,\n\t\t[ListrDefaultRendererLogLevels.RETRY]: color.yellowBright,\n\t\t[ListrDefaultRendererLogLevels.ROLLING_BACK]: color.redBright,\n\t\t[ListrDefaultRendererLogLevels.ROLLED_BACK]: color.redBright,\n\t\t[ListrDefaultRendererLogLevels.FAILED]: color.red,\n\t\t[ListrDefaultRendererLogLevels.FAILED_WITH_FAILED_SUBTASKS]: color.red,\n\t\t[ListrDefaultRendererLogLevels.WAITING]: color.dim,\n\t\t[ListrDefaultRendererLogLevels.PAUSED]: color.yellowBright\n\t}\n};\n\n//#endregion\n//#region src/presets/timer/parser.ts\n/**\n* A basic function to parse minutes and tasks passed given a duration.\n* Useful for renderers to show the task time.\n*/\n/* istanbul ignore next */\nfunction parseTimer(duration) {\n\tconst seconds = Math.floor(duration / 1e3);\n\tconst minutes = Math.floor(seconds / 60);\n\tlet parsedTime;\n\tif (seconds === 0 && minutes === 0) parsedTime = `0.${Math.floor(duration / 100)}s`;\n\tif (seconds > 0) parsedTime = `${seconds % 60}s`;\n\tif (minutes > 0) parsedTime = `${minutes}m${parsedTime}`;\n\treturn parsedTime;\n}\n\n//#endregion\n//#region src/presets/timer/preset.ts\n/* istanbul ignore next */\nconst PRESET_TIMER = {\n\tcondition: true,\n\tfield: parseTimer,\n\tformat: () => color.dim\n};\n\n//#endregion\n//#region src/presets/timestamp/parser.ts\n/* istanbul ignore next */\nfunction parseTimestamp() {\n\tconst now = /* @__PURE__ */ new Date();\n\treturn String(now.getHours()).padStart(2, \"0\") + \":\" + String(now.getMinutes()).padStart(2, \"0\") + \":\" + String(now.getSeconds()).padStart(2, \"0\");\n}\n\n//#endregion\n//#region src/presets/timestamp/preset.ts\n/* istanbul ignore next */\nconst PRESET_TIMESTAMP = {\n\tcondition: true,\n\tfield: parseTimestamp,\n\tformat: () => color.dim\n};\n\n//#endregion\n//#region src/renderer/default/renderer.ts\nvar DefaultRenderer = class DefaultRenderer {\n\tstatic nonTTY = false;\n\tstatic rendererOptions = {\n\t\tindentation: 2,\n\t\tclearOutput: false,\n\t\tshowSubtasks: true,\n\t\tcollapseSubtasks: true,\n\t\tcollapseSkips: true,\n\t\tshowSkipMessage: true,\n\t\tsuffixSkips: false,\n\t\tcollapseErrors: true,\n\t\tshowErrorMessage: true,\n\t\tsuffixRetries: true,\n\t\tlazy: false,\n\t\tremoveEmptyLines: true,\n\t\tformatOutput: \"wrap\",\n\t\tpausedTimer: {\n\t\t\t...PRESET_TIMER,\n\t\t\tformat: () => color.yellowBright\n\t\t}\n\t};\n\tstatic rendererTaskOptions = { outputBar: true };\n\tprompt;\n\tactivePrompt;\n\tspinner;\n\tlogger;\n\tupdater;\n\ttruncate;\n\twrap;\n\tbuffer = {\n\t\toutput: /* @__PURE__ */ new Map(),\n\t\tbottom: /* @__PURE__ */ new Map()\n\t};\n\tcache = {\n\t\trender: /* @__PURE__ */ new Map(),\n\t\trendererOptions: /* @__PURE__ */ new Map(),\n\t\trendererTaskOptions: /* @__PURE__ */ new Map()\n\t};\n\tconstructor(tasks, options, events) {\n\t\tthis.tasks = tasks;\n\t\tthis.options = options;\n\t\tthis.events = events;\n\t\tthis.options = {\n\t\t\t...DefaultRenderer.rendererOptions,\n\t\t\t...this.options,\n\t\t\ticon: {\n\t\t\t\t...LISTR_DEFAULT_RENDERER_STYLE.icon,\n\t\t\t\t...options?.icon ?? {}\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\t...LISTR_DEFAULT_RENDERER_STYLE.color,\n\t\t\t\t...options?.color ?? {}\n\t\t\t}\n\t\t};\n\t\tthis.spinner = this.options.spinner ?? new Spinner();\n\t\tthis.logger = this.options.logger ?? new ListrLogger({\n\t\t\tuseIcons: true,\n\t\t\ttoStderr: []\n\t\t});\n\t\tthis.logger.options.icon = this.options.icon;\n\t\tthis.logger.options.color = this.options.color;\n\t}\n\tasync render() {\n\t\tconst { createLogUpdate } = await import(\"log-update\");\n\t\tconst { default: truncate } = await import(\"cli-truncate\");\n\t\tconst { default: wrap } = await import(\"wrap-ansi\");\n\t\tthis.updater = createLogUpdate(this.logger.process.stdout);\n\t\tthis.truncate = truncate;\n\t\tthis.wrap = wrap;\n\t\tthis.logger.process.hijack();\n\t\t/* istanbul ignore if */\n\t\tif (!this.options?.lazy) this.spinner.start(() => {\n\t\t\tthis.update();\n\t\t});\n\t\tthis.events.on(ListrEventType.SHOULD_REFRESH_RENDER, () => {\n\t\t\tthis.update();\n\t\t});\n\t}\n\tupdate() {\n\t\tthis.updater(this.create());\n\t}\n\tend() {\n\t\tthis.spinner.stop();\n\t\tthis.updater.clear();\n\t\tthis.updater.done();\n\t\tif (!this.options.clearOutput) this.logger.process.toStdout(this.create({ prompt: false }));\n\t\tthis.logger.process.release();\n\t}\n\tcreate(options) {\n\t\toptions = {\n\t\t\ttasks: true,\n\t\t\tbottomBar: true,\n\t\t\tprompt: true,\n\t\t\t...options\n\t\t};\n\t\tconst render = [];\n\t\tconst renderTasks = this.renderer(this.tasks);\n\t\tconst renderBottomBar = this.renderBottomBar();\n\t\tconst renderPrompt = this.renderPrompt();\n\t\tif (options.tasks && renderTasks.length > 0) render.push(...renderTasks);\n\t\tif (options.bottomBar && renderBottomBar.length > 0) {\n\t\t\tif (render.length > 0) render.push(\"\");\n\t\t\trender.push(...renderBottomBar);\n\t\t}\n\t\tif (options.prompt && renderPrompt.length > 0) {\n\t\t\tif (render.length > 0) render.push(\"\");\n\t\t\trender.push(...renderPrompt);\n\t\t}\n\t\treturn render.join(EOL);\n\t}\n\tstyle(task, output = false) {\n\t\tconst rendererOptions = this.cache.rendererOptions.get(task.id);\n\t\tif (task.isSkipped()) {\n\t\t\tif (output || rendererOptions.collapseSkips) return this.logger.icon(ListrDefaultRendererLogLevels.SKIPPED_WITH_COLLAPSE);\n\t\t\telse if (rendererOptions.collapseSkips === false) return this.logger.icon(ListrDefaultRendererLogLevels.SKIPPED_WITHOUT_COLLAPSE);\n\t\t}\n\t\tif (output) {\n\t\t\tif (this.shouldOutputToBottomBar(task)) return this.logger.icon(ListrDefaultRendererLogLevels.OUTPUT_WITH_BOTTOMBAR);\n\t\t\treturn this.logger.icon(ListrDefaultRendererLogLevels.OUTPUT);\n\t\t}\n\t\tif (task.hasSubtasks()) {\n\t\t\tif (task.isStarted() || task.isPrompt() && rendererOptions.showSubtasks !== false && !task.subtasks.every((subtask) => !subtask.hasTitle())) return this.logger.icon(ListrDefaultRendererLogLevels.PENDING);\n\t\t\telse if (task.isCompleted() && task.subtasks.some((subtask) => subtask.hasFailed())) return this.logger.icon(ListrDefaultRendererLogLevels.COMPLETED_WITH_FAILED_SUBTASKS);\n\t\t\telse if (task.hasFailed()) return this.logger.icon(ListrDefaultRendererLogLevels.FAILED_WITH_FAILED_SUBTASKS);\n\t\t}\n\t\tif (task.isStarted() || task.isPrompt()) return this.logger.icon(ListrDefaultRendererLogLevels.PENDING, !this.options?.lazy && this.spinner.fetch());\n\t\telse if (task.isCompleted()) return this.logger.icon(ListrDefaultRendererLogLevels.COMPLETED);\n\t\telse if (task.isRetrying()) return this.logger.icon(ListrDefaultRendererLogLevels.RETRY, !this.options?.lazy && this.spinner.fetch());\n\t\telse if (task.isRollingBack()) return this.logger.icon(ListrDefaultRendererLogLevels.ROLLING_BACK, !this.options?.lazy && this.spinner.fetch());\n\t\telse if (task.hasRolledBack()) return this.logger.icon(ListrDefaultRendererLogLevels.ROLLED_BACK);\n\t\telse if (task.hasFailed()) return this.logger.icon(ListrDefaultRendererLogLevels.FAILED);\n\t\telse if (task.isPaused()) return this.logger.icon(ListrDefaultRendererLogLevels.PAUSED);\n\t\treturn this.logger.icon(ListrDefaultRendererLogLevels.WAITING);\n\t}\n\tformat(message, icon, level) {\n\t\tif (message.trim() === \"\") return [];\n\t\tif (icon) message = icon + \" \" + message;\n\t\tlet parsed;\n\t\tconst columns = (process.stdout.columns ?? 80) - level * this.options.indentation - 2;\n\t\tswitch (this.options.formatOutput) {\n\t\t\tcase \"truncate\":\n\t\t\t\tparsed = message.split(EOL).map((s, i) => {\n\t\t\t\t\treturn this.truncate(this.indent(s, i), columns);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"wrap\":\n\t\t\t\tparsed = this.wrap(message, columns, {\n\t\t\t\t\thard: true,\n\t\t\t\t\ttrim: false\n\t\t\t\t}).split(EOL).map((s, i) => this.indent(s, i));\n\t\t\t\tbreak;\n\t\t\tdefault: throw new ListrRendererError(\"Format option for the renderer is wrong.\");\n\t\t}\n\t\tif (this.options.removeEmptyLines) parsed = parsed.filter(Boolean);\n\t\treturn parsed.map((str) => indent(str, level * this.options.indentation));\n\t}\n\tshouldOutputToOutputBar(task) {\n\t\tconst outputBar = this.cache.rendererTaskOptions.get(task.id).outputBar;\n\t\treturn typeof outputBar === \"number\" && outputBar !== 0 || typeof outputBar === \"boolean\" && outputBar !== false;\n\t}\n\tshouldOutputToBottomBar(task) {\n\t\tconst bottomBar = this.cache.rendererTaskOptions.get(task.id).bottomBar;\n\t\treturn typeof bottomBar === \"number\" && bottomBar !== 0 || typeof bottomBar === \"boolean\" && bottomBar !== false || !task.hasTitle();\n\t}\n\trenderer(tasks, level = 0) {\n\t\treturn tasks.flatMap((task) => {\n\t\t\tif (!task.isEnabled()) return [];\n\t\t\tif (this.cache.render.has(task.id)) return this.cache.render.get(task.id);\n\t\t\tthis.calculate(task);\n\t\t\tthis.setupBuffer(task);\n\t\t\tconst rendererOptions = this.cache.rendererOptions.get(task.id);\n\t\t\tconst rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);\n\t\t\tconst output = [];\n\t\t\tif (task.isPrompt()) {\n\t\t\t\tif (this.activePrompt && this.activePrompt !== task.id) throw new ListrRendererError(\"Only one prompt can be active at the given time, please re-evaluate your task design.\");\n\t\t\t\telse if (!this.activePrompt) {\n\t\t\t\t\ttask.on(ListrTaskEventType.PROMPT, (prompt) => {\n\t\t\t\t\t\tconst cleansed = cleanseAnsi(prompt);\n\t\t\t\t\t\tif (cleansed) this.prompt = cleansed;\n\t\t\t\t\t});\n\t\t\t\t\ttask.on(ListrTaskEventType.STATE, (state) => {\n\t\t\t\t\t\tif (state === ListrTaskState.PROMPT_COMPLETED || task.hasFinalized() || task.hasReset()) {\n\t\t\t\t\t\t\tthis.prompt = null;\n\t\t\t\t\t\t\tthis.activePrompt = null;\n\t\t\t\t\t\t\ttask.off(ListrTaskEventType.PROMPT);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tthis.activePrompt = task.id;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (task.hasTitle()) if (!(tasks.some((task$1) => task$1.hasFailed()) && !task.hasFailed() && task.options.exitOnError !== false && !(task.isCompleted() || task.isSkipped()))) if (task.hasFailed() && rendererOptions.collapseErrors) output.push(...this.format(!task.hasSubtasks() && task.message.error && rendererOptions.showErrorMessage ? task.message.error : task.title, this.style(task), level));\n\t\t\telse if (task.isSkipped() && rendererOptions.collapseSkips) output.push(...this.format(this.logger.suffix(task.message.skip && rendererOptions.showSkipMessage ? task.message.skip : task.title, {\n\t\t\t\tfield: ListrLogLevels.SKIPPED,\n\t\t\t\tcondition: rendererOptions.suffixSkips,\n\t\t\t\tformat: () => color.dim\n\t\t\t}), this.style(task), level));\n\t\t\telse if (task.isRetrying()) output.push(...this.format(this.logger.suffix(task.title, {\n\t\t\t\tfield: `${ListrLogLevels.RETRY}:${task.message.retry.count}`,\n\t\t\t\tformat: () => color.yellow,\n\t\t\t\tcondition: rendererOptions.suffixRetries\n\t\t\t}), this.style(task), level));\n\t\t\telse if (task.isCompleted() && task.hasTitle() && assertFunctionOrSelf(rendererTaskOptions.timer?.condition, task.message.duration)) output.push(...this.format(this.logger.suffix(task?.title, {\n\t\t\t\t...rendererTaskOptions.timer,\n\t\t\t\targs: [task.message.duration]\n\t\t\t}), this.style(task), level));\n\t\t\telse if (task.isPaused()) output.push(...this.format(this.logger.suffix(task.title, {\n\t\t\t\t...rendererOptions.pausedTimer,\n\t\t\t\targs: [task.message.paused - Date.now()]\n\t\t\t}), this.style(task), level));\n\t\t\telse output.push(...this.format(task.title, this.style(task), level));\n\t\t\telse output.push(...this.format(task.title, this.logger.icon(ListrDefaultRendererLogLevels.COMPLETED_WITH_FAILED_SISTER_TASKS), level));\n\t\t\tif (!task.hasSubtasks() || !rendererOptions.showSubtasks) {\n\t\t\t\tif (task.hasFailed() && rendererOptions.collapseErrors === false && (rendererOptions.showErrorMessage || !rendererOptions.showSubtasks)) output.push(...this.dump(task, level, ListrLogLevels.FAILED));\n\t\t\t\telse if (task.isSkipped() && rendererOptions.collapseSkips === false && (rendererOptions.showSkipMessage || !rendererOptions.showSubtasks)) output.push(...this.dump(task, level, ListrLogLevels.SKIPPED));\n\t\t\t}\n\t\t\tif (task.isPending() || rendererTaskOptions.persistentOutput) output.push(...this.renderOutputBar(task, level));\n\t\t\tif (rendererOptions.showSubtasks !== false && task.hasSubtasks() && (task.isPending() || task.hasFinalized() && !task.hasTitle() || task.isCompleted() && rendererOptions.collapseSubtasks === false && !task.subtasks.some((subtask) => this.cache.rendererOptions.get(subtask.id)?.collapseSubtasks === true) || task.subtasks.some((subtask) => this.cache.rendererOptions.get(subtask.id)?.collapseSubtasks === false) || task.subtasks.some((subtask) => subtask.hasFailed()) || task.subtasks.some((subtask) => subtask.hasRolledBack()))) {\n\t\t\t\tconst subtaskLevel = !task.hasTitle() ? level : level + 1;\n\t\t\t\tconst subtaskRender = this.renderer(task.subtasks, subtaskLevel);\n\t\t\t\toutput.push(...subtaskRender);\n\t\t\t}\n\t\t\tif (task.hasFinalized()) {\n\t\t\t\tif (!rendererTaskOptions.persistentOutput) {\n\t\t\t\t\tthis.buffer.bottom.delete(task.id);\n\t\t\t\t\tthis.buffer.output.delete(task.id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (task.isClosed()) {\n\t\t\t\tthis.cache.render.set(task.id, output);\n\t\t\t\tthis.reset(task);\n\t\t\t}\n\t\t\treturn output;\n\t\t});\n\t}\n\trenderOutputBar(task, level) {\n\t\tconst output = this.buffer.output.get(task.id);\n\t\tif (!output) return [];\n\t\treturn output.all.flatMap((o) => this.dump(task, level, ListrLogLevels.OUTPUT, o.entry));\n\t}\n\trenderBottomBar() {\n\t\tif (this.buffer.bottom.size === 0) return [];\n\t\treturn Array.from(this.buffer.bottom.values()).flatMap((output) => output.all).sort((a, b) => a.time - b.time).map((output) => output.entry);\n\t}\n\trenderPrompt() {\n\t\tif (!this.prompt) return [];\n\t\treturn [this.prompt];\n\t}\n\tcalculate(task) {\n\t\tif (this.cache.rendererOptions.has(task.id) && this.cache.rendererTaskOptions.has(task.id)) return;\n\t\tconst rendererOptions = {\n\t\t\t...this.options,\n\t\t\t...task.rendererOptions\n\t\t};\n\t\tthis.cache.rendererOptions.set(task.id, rendererOptions);\n\t\tthis.cache.rendererTaskOptions.set(task.id, {\n\t\t\t...DefaultRenderer.rendererTaskOptions,\n\t\t\ttimer: rendererOptions.timer,\n\t\t\t...task.rendererTaskOptions\n\t\t});\n\t}\n\tsetupBuffer(task) {\n\t\tif (this.buffer.bottom.has(task.id) || this.buffer.output.has(task.id)) return;\n\t\tconst rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);\n\t\tif (this.shouldOutputToBottomBar(task) && !this.buffer.bottom.has(task.id)) {\n\t\t\tthis.buffer.bottom.set(task.id, new ProcessOutputBuffer({ limit: typeof rendererTaskOptions.bottomBar === \"number\" ? rendererTaskOptions.bottomBar : 1 }));\n\t\t\ttask.on(ListrTaskEventType.OUTPUT, (output) => {\n\t\t\t\tconst data = this.dump(task, -1, ListrLogLevels.OUTPUT, output);\n\t\t\t\tthis.buffer.bottom.get(task.id).write(data.join(EOL));\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.STATE, (state) => {\n\t\t\t\tswitch (state) {\n\t\t\t\t\tcase ListrTaskState.RETRY || ListrTaskState.ROLLING_BACK:\n\t\t\t\t\t\tthis.buffer.bottom.delete(task.id);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (this.shouldOutputToOutputBar(task) && !this.buffer.output.has(task.id)) {\n\t\t\tthis.buffer.output.set(task.id, new ProcessOutputBuffer({ limit: typeof rendererTaskOptions.outputBar === \"number\" ? rendererTaskOptions.outputBar : 1 }));\n\t\t\ttask.on(ListrTaskEventType.OUTPUT, (output) => {\n\t\t\t\tthis.buffer.output.get(task.id).write(output);\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.STATE, (state) => {\n\t\t\t\tswitch (state) {\n\t\t\t\t\tcase ListrTaskState.RETRY || ListrTaskState.ROLLING_BACK:\n\t\t\t\t\t\tthis.buffer.output.delete(task.id);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\treset(task) {\n\t\tthis.cache.rendererOptions.delete(task.id);\n\t\tthis.cache.rendererTaskOptions.delete(task.id);\n\t\tthis.buffer.output.delete(task.id);\n\t}\n\tdump(task, level, source = ListrLogLevels.OUTPUT, data) {\n\t\tif (!data) switch (source) {\n\t\t\tcase ListrLogLevels.OUTPUT:\n\t\t\t\tdata = task.output;\n\t\t\t\tbreak;\n\t\t\tcase ListrLogLevels.SKIPPED:\n\t\t\t\tdata = task.message.skip;\n\t\t\t\tbreak;\n\t\t\tcase ListrLogLevels.FAILED:\n\t\t\t\tdata = task.message.error;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (task.hasTitle() && source === ListrLogLevels.FAILED && data === task.title || typeof data !== \"string\") return [];\n\t\tif (source === ListrLogLevels.OUTPUT) data = cleanseAnsi(data);\n\t\treturn this.format(data, this.style(task, true), level + 1);\n\t}\n\tindent(str, i) {\n\t\treturn i > 0 ? indent(str.trimEnd(), this.options.indentation) : str.trimEnd();\n\t}\n};\n\n//#endregion\n//#region src/renderer/silent/renderer.ts\nvar SilentRenderer = class {\n\tstatic nonTTY = true;\n\tstatic rendererOptions;\n\tstatic rendererTaskOptions;\n\tconstructor(tasks, options) {\n\t\tthis.tasks = tasks;\n\t\tthis.options = options;\n\t}\n\trender() {}\n\tend() {}\n};\n\n//#endregion\n//#region src/renderer/simple/renderer.ts\nvar SimpleRenderer = class SimpleRenderer {\n\tstatic nonTTY = true;\n\tstatic rendererOptions = { pausedTimer: {\n\t\t...PRESET_TIMER,\n\t\tfield: (time) => `${ListrLogLevels.PAUSED}:${time}`,\n\t\tformat: () => color.yellowBright\n\t} };\n\tstatic rendererTaskOptions = {};\n\tlogger;\n\tcache = {\n\t\trendererOptions: /* @__PURE__ */ new Map(),\n\t\trendererTaskOptions: /* @__PURE__ */ new Map()\n\t};\n\tconstructor(tasks, options) {\n\t\tthis.tasks = tasks;\n\t\tthis.options = options;\n\t\tthis.options = {\n\t\t\t...SimpleRenderer.rendererOptions,\n\t\t\t...options,\n\t\t\ticon: {\n\t\t\t\t...LISTR_LOGGER_STYLE.icon,\n\t\t\t\t...options?.icon ?? {}\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\t...LISTR_LOGGER_STYLE.color,\n\t\t\t\t...options?.color ?? {}\n\t\t\t}\n\t\t};\n\t\tthis.logger = this.options.logger ?? new ListrLogger({\n\t\t\tuseIcons: true,\n\t\t\ttoStderr: LISTR_LOGGER_STDERR_LEVELS\n\t\t});\n\t\tthis.logger.options.icon = this.options.icon;\n\t\tthis.logger.options.color = this.options.color;\n\t\tif (this.options.timestamp) this.logger.options.fields.prefix.unshift(this.options.timestamp);\n\t}\n\tend() {}\n\trender() {\n\t\tthis.renderer(this.tasks);\n\t}\n\trenderer(tasks) {\n\t\ttasks.forEach((task) => {\n\t\t\tthis.calculate(task);\n\t\t\ttask.once(ListrTaskEventType.CLOSED, () => {\n\t\t\t\tthis.reset(task);\n\t\t\t});\n\t\t\tconst rendererOptions = this.cache.rendererOptions.get(task.id);\n\t\t\tconst rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);\n\t\t\ttask.on(ListrTaskEventType.SUBTASK, (subtasks) => {\n\t\t\t\tthis.renderer(subtasks);\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.STATE, (state) => {\n\t\t\t\tif (!task.hasTitle()) return;\n\t\t\t\tif (state === ListrTaskState.STARTED) this.logger.log(ListrLogLevels.STARTED, task.title);\n\t\t\t\telse if (state === ListrTaskState.COMPLETED) {\n\t\t\t\t\tconst timer = rendererTaskOptions?.timer;\n\t\t\t\t\tthis.logger.log(ListrLogLevels.COMPLETED, task.title, timer && { suffix: {\n\t\t\t\t\t\t...timer,\n\t\t\t\t\t\tcondition: !!task.message?.duration && timer.condition,\n\t\t\t\t\t\targs: [task.message.duration]\n\t\t\t\t\t} });\n\t\t\t\t} else if (state === ListrTaskState.PROMPT) {\n\t\t\t\t\tthis.logger.process.hijack();\n\t\t\t\t\ttask.on(ListrTaskEventType.PROMPT, (prompt) => {\n\t\t\t\t\t\tthis.logger.process.toStderr(prompt, false);\n\t\t\t\t\t});\n\t\t\t\t} else if (state === ListrTaskState.PROMPT_COMPLETED) {\n\t\t\t\t\ttask.off(ListrTaskEventType.PROMPT);\n\t\t\t\t\tthis.logger.process.release();\n\t\t\t\t}\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.OUTPUT, (output) => {\n\t\t\t\tthis.logger.log(ListrLogLevels.OUTPUT, output);\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.MESSAGE, (message) => {\n\t\t\t\tif (message.error) this.logger.log(ListrLogLevels.FAILED, task.title, { suffix: {\n\t\t\t\t\tfield: `${ListrLogLevels.FAILED}: ${message.error}`,\n\t\t\t\t\tformat: () => color.red\n\t\t\t\t} });\n\t\t\t\telse if (message.skip) this.logger.log(ListrLogLevels.SKIPPED, task.title, { suffix: {\n\t\t\t\t\tfield: `${ListrLogLevels.SKIPPED}: ${message.skip}`,\n\t\t\t\t\tformat: () => color.yellow\n\t\t\t\t} });\n\t\t\t\telse if (message.rollback) this.logger.log(ListrLogLevels.ROLLBACK, task.title, { suffix: {\n\t\t\t\t\tfield: `${ListrLogLevels.ROLLBACK}: ${message.rollback}`,\n\t\t\t\t\tformat: () => color.red\n\t\t\t\t} });\n\t\t\t\telse if (message.retry) this.logger.log(ListrLogLevels.RETRY, task.title, { suffix: {\n\t\t\t\t\tfield: `${ListrLogLevels.RETRY}:${message.retry.count}`,\n\t\t\t\t\tformat: () => color.red\n\t\t\t\t} });\n\t\t\t\telse if (message.paused) {\n\t\t\t\t\tconst timer = rendererOptions?.pausedTimer;\n\t\t\t\t\tthis.logger.log(ListrLogLevels.PAUSED, task.title, timer && { suffix: {\n\t\t\t\t\t\t...timer,\n\t\t\t\t\t\tcondition: !!message?.paused && timer.condition,\n\t\t\t\t\t\targs: [message.paused - Date.now()]\n\t\t\t\t\t} });\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\tcalculate(task) {\n\t\tif (this.cache.rendererOptions.has(task.id) && this.cache.rendererTaskOptions.has(task.id)) return;\n\t\tconst rendererOptions = {\n\t\t\t...this.options,\n\t\t\t...task.rendererOptions\n\t\t};\n\t\tthis.cache.rendererOptions.set(task.id, rendererOptions);\n\t\tthis.cache.rendererTaskOptions.set(task.id, {\n\t\t\t...SimpleRenderer.rendererTaskOptions,\n\t\t\ttimer: rendererOptions.timer,\n\t\t\t...task.rendererTaskOptions\n\t\t});\n\t}\n\treset(task) {\n\t\tthis.cache.rendererOptions.delete(task.id);\n\t\tthis.cache.rendererTaskOptions.delete(task.id);\n\t}\n};\n\n//#endregion\n//#region src/renderer/test/serializer.ts\nvar TestRendererSerializer = class {\n\tconstructor(options) {\n\t\tthis.options = options;\n\t}\n\tserialize(event, data, task) {\n\t\treturn JSON.stringify(this.generate(event, data, task));\n\t}\n\tgenerate(event, data, task) {\n\t\tconst output = {\n\t\t\tevent,\n\t\t\tdata\n\t\t};\n\t\tif (typeof this.options?.task !== \"boolean\") {\n\t\t\tconst t = Object.fromEntries(this.options.task.map((entity) => {\n\t\t\t\tconst property = task[entity];\n\t\t\t\tif (typeof property === \"function\") return [entity, property.call(task)];\n\t\t\t\treturn [entity, property];\n\t\t\t}));\n\t\t\tif (Object.keys(task).length > 0) output.task = t;\n\t\t}\n\t\treturn output;\n\t}\n};\n\n//#endregion\n//#region src/renderer/test/renderer.ts\nvar TestRenderer = class TestRenderer {\n\tstatic nonTTY = true;\n\tstatic rendererOptions = {\n\t\tsubtasks: true,\n\t\tstate: Object.values(ListrTaskState),\n\t\toutput: true,\n\t\tprompt: true,\n\t\ttitle: true,\n\t\tmessages: [\n\t\t\t\"skip\",\n\t\t\t\"error\",\n\t\t\t\"retry\",\n\t\t\t\"rollback\",\n\t\t\t\"paused\"\n\t\t],\n\t\tmessagesToStderr: [\n\t\t\t\"error\",\n\t\t\t\"rollback\",\n\t\t\t\"retry\"\n\t\t],\n\t\ttask: [\n\t\t\t\"hasRolledBack\",\n\t\t\t\"isRollingBack\",\n\t\t\t\"isCompleted\",\n\t\t\t\"isSkipped\",\n\t\t\t\"hasFinalized\",\n\t\t\t\"hasSubtasks\",\n\t\t\t\"title\",\n\t\t\t\"hasReset\",\n\t\t\t\"hasTitle\",\n\t\t\t\"isPrompt\",\n\t\t\t\"isPaused\",\n\t\t\t\"isPending\",\n\t\t\t\"isSkipped\",\n\t\t\t\"isStarted\",\n\t\t\t\"hasFailed\",\n\t\t\t\"isEnabled\",\n\t\t\t\"isRetrying\",\n\t\t\t\"path\"\n\t\t]\n\t};\n\tstatic rendererTaskOptions;\n\tlogger;\n\tserializer;\n\tconstructor(tasks, options) {\n\t\tthis.tasks = tasks;\n\t\tthis.options = options;\n\t\tthis.options = {\n\t\t\t...TestRenderer.rendererOptions,\n\t\t\t...this.options\n\t\t};\n\t\tthis.logger = this.options.logger ?? new ListrLogger({ useIcons: false });\n\t\tthis.serializer = new TestRendererSerializer(this.options);\n\t}\n\trender() {\n\t\tthis.renderer(this.tasks);\n\t}\n\tend() {}\n\trenderer(tasks) {\n\t\ttasks.forEach((task) => {\n\t\t\tif (this.options.subtasks) task.on(ListrTaskEventType.SUBTASK, (subtasks) => {\n\t\t\t\tthis.renderer(subtasks);\n\t\t\t});\n\t\t\tif (this.options.state) task.on(ListrTaskEventType.STATE, (state) => {\n\t\t\t\tthis.logger.toStdout(this.serializer.serialize(ListrTaskEventType.STATE, state, task));\n\t\t\t});\n\t\t\tif (this.options.output) task.on(ListrTaskEventType.OUTPUT, (data) => {\n\t\t\t\tthis.logger.toStdout(this.serializer.serialize(ListrTaskEventType.OUTPUT, data, task));\n\t\t\t});\n\t\t\tif (this.options.prompt) task.on(ListrTaskEventType.PROMPT, (prompt) => {\n\t\t\t\tthis.logger.toStdout(this.serializer.serialize(ListrTaskEventType.PROMPT, prompt, task));\n\t\t\t});\n\t\t\tif (this.options.title) task.on(ListrTaskEventType.TITLE, (title) => {\n\t\t\t\tthis.logger.toStdout(this.serializer.serialize(ListrTaskEventType.TITLE, title, task));\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.MESSAGE, (message) => {\n\t\t\t\tconst parsed = Object.fromEntries(Object.entries(message).map(([key, value]) => {\n\t\t\t\t\tif (this.options.messages.includes(key)) return [key, value];\n\t\t\t\t}).filter(Boolean));\n\t\t\t\tif (Object.keys(parsed).length > 0) {\n\t\t\t\t\tconst output = this.serializer.serialize(ListrTaskEventType.MESSAGE, parsed, task);\n\t\t\t\t\tif (this.options.messagesToStderr.some((state) => Object.keys(parsed).includes(state))) this.logger.toStderr(output);\n\t\t\t\t\telse this.logger.toStdout(output);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n};\n\n//#endregion\n//#region src/renderer/verbose/renderer.ts\nvar VerboseRenderer = class VerboseRenderer {\n\tstatic nonTTY = true;\n\tstatic rendererOptions = {\n\t\tlogTitleChange: false,\n\t\tpausedTimer: {\n\t\t\t...PRESET_TIMER,\n\t\t\tformat: () => color.yellowBright\n\t\t}\n\t};\n\tstatic rendererTaskOptions;\n\tlogger;\n\tcache = {\n\t\trendererOptions: /* @__PURE__ */ new Map(),\n\t\trendererTaskOptions: /* @__PURE__ */ new Map()\n\t};\n\tconstructor(tasks, options) {\n\t\tthis.tasks = tasks;\n\t\tthis.options = options;\n\t\tthis.options = {\n\t\t\t...VerboseRenderer.rendererOptions,\n\t\t\t...this.options,\n\t\t\ticon: {\n\t\t\t\t...LISTR_LOGGER_STYLE.icon,\n\t\t\t\t...options?.icon ?? {}\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\t...LISTR_LOGGER_STYLE.color,\n\t\t\t\t...options?.color ?? {}\n\t\t\t}\n\t\t};\n\t\tthis.logger = this.options.logger ?? new ListrLogger({\n\t\t\tuseIcons: false,\n\t\t\ttoStderr: LISTR_LOGGER_STDERR_LEVELS\n\t\t});\n\t\tthis.logger.options.icon = this.options.icon;\n\t\tthis.logger.options.color = this.options.color;\n\t\tif (this.options.timestamp) this.logger.options.fields.prefix.unshift(this.options.timestamp);\n\t}\n\trender() {\n\t\tthis.renderer(this.tasks);\n\t}\n\tend() {}\n\trenderer(tasks) {\n\t\ttasks.forEach((task) => {\n\t\t\tthis.calculate(task);\n\t\t\ttask.once(ListrTaskEventType.CLOSED, () => {\n\t\t\t\tthis.reset(task);\n\t\t\t});\n\t\t\tconst rendererOptions = this.cache.rendererOptions.get(task.id);\n\t\t\tconst rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);\n\t\t\ttask.on(ListrTaskEventType.SUBTASK, (subtasks) => {\n\t\t\t\tthis.renderer(subtasks);\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.STATE, (state) => {\n\t\t\t\tif (!task.hasTitle()) return;\n\t\t\t\tif (state === ListrTaskState.STARTED) this.logger.log(ListrLogLevels.STARTED, task.title);\n\t\t\t\telse if (state === ListrTaskState.COMPLETED) {\n\t\t\t\t\tconst timer = rendererTaskOptions.timer;\n\t\t\t\t\tthis.logger.log(ListrLogLevels.COMPLETED, task.title, timer && { suffix: {\n\t\t\t\t\t\t...timer,\n\t\t\t\t\t\tcondition: !!task.message?.duration && timer.condition,\n\t\t\t\t\t\targs: [task.message.duration]\n\t\t\t\t\t} });\n\t\t\t\t}\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.OUTPUT, (data) => {\n\t\t\t\tthis.logger.log(ListrLogLevels.OUTPUT, data);\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.PROMPT, (prompt) => {\n\t\t\t\tconst cleansed = cleanseAnsi(prompt);\n\t\t\t\tif (cleansed) this.logger.log(ListrLogLevels.PROMPT, cleansed);\n\t\t\t});\n\t\t\tif (this.options?.logTitleChange !== false) task.on(ListrTaskEventType.TITLE, (title) => {\n\t\t\t\tthis.logger.log(ListrLogLevels.TITLE, title);\n\t\t\t});\n\t\t\ttask.on(ListrTaskEventType.MESSAGE, (message) => {\n\t\t\t\tif (message?.error) this.logger.log(ListrLogLevels.FAILED, message.error);\n\t\t\t\telse if (message?.skip) this.logger.log(ListrLogLevels.SKIPPED, message.skip);\n\t\t\t\telse if (message?.rollback) this.logger.log(ListrLogLevels.ROLLBACK, message.rollback);\n\t\t\t\telse if (message?.retry) this.logger.log(ListrLogLevels.RETRY, task.title, { suffix: message.retry.count.toString() });\n\t\t\t\telse if (message?.paused) {\n\t\t\t\t\tconst timer = rendererOptions?.pausedTimer;\n\t\t\t\t\tthis.logger.log(ListrLogLevels.PAUSED, task.title, timer && { suffix: {\n\t\t\t\t\t\t...timer,\n\t\t\t\t\t\tcondition: !!message?.paused && timer.condition,\n\t\t\t\t\t\targs: [message.paused - Date.now()]\n\t\t\t\t\t} });\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\tcalculate(task) {\n\t\tif (this.cache.rendererOptions.has(task.id) && this.cache.rendererTaskOptions.has(task.id)) return;\n\t\tconst rendererOptions = {\n\t\t\t...this.options,\n\t\t\t...task.rendererOptions\n\t\t};\n\t\tthis.cache.rendererOptions.set(task.id, rendererOptions);\n\t\tthis.cache.rendererTaskOptions.set(task.id, {\n\t\t\t...VerboseRenderer.rendererTaskOptions,\n\t\t\ttimer: rendererOptions.timer,\n\t\t\t...task.rendererTaskOptions\n\t\t});\n\t}\n\treset(task) {\n\t\tthis.cache.rendererOptions.delete(task.id);\n\t\tthis.cache.rendererTaskOptions.delete(task.id);\n\t}\n};\n\n//#endregion\n//#region src/utils/ui/renderer.ts\nconst RENDERERS = {\n\tdefault: DefaultRenderer,\n\tsimple: SimpleRenderer,\n\tverbose: VerboseRenderer,\n\ttest: TestRenderer,\n\tsilent: SilentRenderer\n};\nfunction isRendererSupported(renderer) {\n\treturn process.stdout.isTTY === true || renderer.nonTTY === true;\n}\nfunction getRendererClass(renderer) {\n\tif (typeof renderer === \"string\") return RENDERERS[renderer] ?? RENDERERS.default;\n\treturn typeof renderer === \"function\" ? renderer : RENDERERS.default;\n}\nfunction getRenderer(options) {\n\tif (assertFunctionOrSelf(options?.silentRendererCondition)) return {\n\t\trenderer: getRendererClass(\"silent\"),\n\t\tselection: ListrRendererSelection.SILENT\n\t};\n\tconst r = {\n\t\trenderer: getRendererClass(options.renderer),\n\t\toptions: options.rendererOptions,\n\t\tselection: ListrRendererSelection.PRIMARY\n\t};\n\tif (!isRendererSupported(r.renderer) || assertFunctionOrSelf(options?.fallbackRendererCondition)) return {\n\t\trenderer: getRendererClass(options.fallbackRenderer),\n\t\toptions: options.fallbackRendererOptions,\n\t\tselection: ListrRendererSelection.SECONDARY\n\t};\n\treturn r;\n}\n\n//#endregion\n//#region src/utils/assert.ts\n/**\n* This function asserts the given value as a function or itself.\n* If the value itself is a function it will evaluate it with the passed in arguments,\n* elsewise it will directly return itself.\n*/\nfunction assertFunctionOrSelf(functionOrSelf, ...args) {\n\tif (typeof functionOrSelf === \"function\") return functionOrSelf(...args);\n\telse return functionOrSelf;\n}\n\n//#endregion\n//#region src/utils/clone.ts\nconst clone = rfdc({ circles: true });\n/**\n* Deep clones a object in the easiest manner.\n*/\nfunction cloneObject(obj) {\n\treturn clone(obj);\n}\n\n//#endregion\n//#region src/utils/concurrency.ts\nvar Concurrency = class {\n\tconcurrency;\n\tcount;\n\tqueue;\n\tconstructor(options) {\n\t\tthis.concurrency = options.concurrency;\n\t\tthis.count = 0;\n\t\tthis.queue = /* @__PURE__ */ new Set();\n\t}\n\tadd(fn) {\n\t\tif (this.count < this.concurrency) return this.run(fn);\n\t\treturn new Promise((resolve) => {\n\t\t\tconst callback = () => resolve(this.run(fn));\n\t\t\tthis.queue.add(callback);\n\t\t});\n\t}\n\tflush() {\n\t\tfor (const callback of this.queue) {\n\t\t\tif (this.count >= this.concurrency) break;\n\t\t\tthis.queue.delete(callback);\n\t\t\tcallback();\n\t\t}\n\t}\n\trun(fn) {\n\t\tthis.count++;\n\t\tconst promise = fn();\n\t\tconst cleanup = () => {\n\t\t\tthis.count--;\n\t\t\tthis.flush();\n\t\t};\n\t\tpromise.then(cleanup, () => {\n\t\t\tthis.queue.clear();\n\t\t});\n\t\treturn promise;\n\t}\n};\n\n//#endregion\n//#region src/utils/delay.ts\nfunction delay(time) {\n\treturn new Promise((resolve) => {\n\t\tsetTimeout(resolve, time);\n\t});\n}\n\n//#endregion\n//#region src/interfaces/listr-error.interface.ts\n/**\n* Internal error handling mechanism for Listr collects the errors and details for a failed task.\n*\n* @see {@link https://listr2.kilic.dev/task/error-handling.html}\n*/\nvar ListrError = class extends Error {\n\tpath;\n\tctx;\n\tconstructor(error, type, task) {\n\t\tsuper(error.message);\n\t\tthis.error = error;\n\t\tthis.type = type;\n\t\tthis.task = task;\n\t\tthis.name = \"ListrError\";\n\t\tthis.path = task.path;\n\t\tif (task?.options.collectErrors === \"full\") {\n\t\t\tthis.task = cloneObject(task);\n\t\t\tthis.ctx = cloneObject(task.listr.ctx);\n\t\t}\n\t\tthis.stack = error?.stack;\n\t}\n};\n\n//#endregion\n//#region src/interfaces/listr-renderer-error.interface.ts\n/**\n* Internal error coming from renderer.\n*/\nvar ListrRendererError = class extends Error {};\n\n//#endregion\n//#region src/interfaces/prompt-error.interface.ts\n/**\n* Internal error handling mechanism for Listr prompts to identify the failing cause is coming from a prompt.\n*\n* @see {@link https://listr2.kilic.dev/task/prompts.html}\n*/\nvar PromptError = class extends Error {};\n\n//#endregion\n//#region src/lib/task-wrapper.ts\n/**\n* The original Task that is defined by the user is wrapped with the TaskWrapper to provide additional functionality.\n*\n* @see {@link https://listr2.kilic.dev/task/task.html}\n*/\nvar TaskWrapper = class {\n\tconstructor(task) {\n\t\tthis.task = task;\n\t}\n\t/* istanbul ignore next */\n\tget title() {\n\t\treturn this.task.title;\n\t}\n\t/**\n\t* Title of the current task.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/title.html}\n\t*/\n\tset title(title) {\n\t\ttitle = Array.isArray(title) ? title : [title];\n\t\tthis.task.title$ = splat(title.shift(), ...title);\n\t}\n\t/* istanbul ignore next */\n\tget output() {\n\t\treturn this.task.output;\n\t}\n\t/* istanbul ignore next */\n\t/**\n\t* Send output from the current task to the renderer.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/output.html}\n\t*/\n\tset output(output) {\n\t\toutput = Array.isArray(output) ? output : [output];\n\t\tthis.task.output$ = splat(output.shift(), ...output);\n\t}\n\t/* istanbul ignore next */\n\t/** Send an output to the output channel as prompt. */\n\tset promptOutput(output) {\n\t\tthis.task.promptOutput$ = output;\n\t}\n\t/**\n\t* Creates a new set of Listr subtasks.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/subtasks.html}\n\t*/\n\tnewListr(task, options) {\n\t\tlet tasks;\n\t\tif (typeof task === \"function\") tasks = task(this);\n\t\telse tasks = task;\n\t\treturn new Listr(tasks, options, this.task);\n\t}\n\t/**\n\t* Report an error that has to be collected and handled.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/error-handling.html}\n\t*/\n\treport(error, type) {\n\t\tif (this.task.options.collectErrors !== false) this.task.listr.errors.push(new ListrError(error, type, this.task));\n\t\tthis.task.message$ = { error: error.message ?? this.task?.title };\n\t}\n\t/**\n\t* Skip the current task.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/skip.html}\n\t*/\n\tskip(message, ...metadata) {\n\t\tthis.task.state$ = ListrTaskState.SKIPPED;\n\t\tif (message) this.task.message$ = { skip: message ? splat(message, ...metadata) : this.task?.title };\n\t}\n\t/**\n\t* Check whether this task is currently in a retry state.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/retry.html}\n\t*/\n\tisRetrying() {\n\t\treturn this.task.isRetrying() ? this.task.retry : { count: 0 };\n\t}\n\t/* istanbul ignore next */\n\t/**\n\t* Create a new prompt for getting user input through the prompt adapter.\n\t* This will create a new prompt through the adapter if the task is not currently rendering a prompt or will return the active instance.\n\t*\n\t* This part of the application requires optional peer dependencies, please refer to documentation.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/prompt.html}\n\t*/\n\tprompt(adapter) {\n\t\tif (this.task.prompt) return this.task.prompt;\n\t\treturn new adapter(this.task, this);\n\t}\n\t/* istanbul ignore next */\n\t/**\n\t* Generates a fake stdout for your use case, where it will be tunnelled through Listr to handle the rendering process.\n\t*\n\t* @see {@link https://listr2.kilic.dev/renderer/process-output.html}\n\t*/\n\tstdout(type) {\n\t\treturn createWritable((chunk) => {\n\t\t\tswitch (type) {\n\t\t\t\tcase ListrTaskEventType.PROMPT:\n\t\t\t\t\tthis.promptOutput = chunk;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: this.output = chunk;\n\t\t\t}\n\t\t});\n\t}\n\t/** Run this task. */\n\trun(ctx) {\n\t\treturn this.task.run(ctx, this);\n\t}\n};\n\n//#endregion\n//#region src/lib/listr-task-event-manager.ts\nvar ListrTaskEventManager = class extends EventManager {};\n\n//#endregion\n//#region src/lib/task.ts\n/**\n* Creates and handles a runnable instance of the Task.\n*/\nvar Task = class extends ListrTaskEventManager {\n\t/** Unique id per task, can be used for identifying a Task. */\n\tid = randomUUID();\n\t/** The current state of the task. */\n\tstate = ListrTaskState.WAITING;\n\t/** Subtasks of the current task. */\n\tsubtasks;\n\t/** Title of the task. */\n\ttitle;\n\t/** Initial/Untouched version of the title for using whenever task has a reset. */\n\tinitialTitle;\n\t/** Output channel for the task. */\n\toutput;\n\t/** Current state of the retry process whenever the task is retrying. */\n\tretry;\n\t/**\n\t* A channel for messages.\n\t*\n\t* This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers.\n\t*/\n\tmessage = {};\n\t/** Current prompt instance or prompt error whenever the task is prompting. */\n\tprompt;\n\t/** Parent task of the current task. */\n\tparent;\n\t/** Enable flag of this task. */\n\tenabled;\n\t/** User provided Task callback function to run. */\n\ttaskFn;\n\t/** Marks the task as closed. This is different from finalized since this is not really related to task itself. */\n\tclosed;\n\tconstructor(listr, task, options, rendererOptions, rendererTaskOptions) {\n\t\tsuper();\n\t\tthis.listr = listr;\n\t\tthis.task = task;\n\t\tthis.options = options;\n\t\tthis.rendererOptions = rendererOptions;\n\t\tthis.rendererTaskOptions = rendererTaskOptions;\n\t\tif (task.title) {\n\t\t\tconst title = Array.isArray(task?.title) ? task.title : [task.title];\n\t\t\tthis.title = splat(title.shift(), ...title);\n\t\t\tthis.initialTitle = this.title;\n\t\t}\n\t\tthis.taskFn = task.task;\n\t\tthis.parent = listr.parentTask;\n\t}\n\t/**\n\t* Update the current state of the Task and emit the neccassary events.\n\t*/\n\tset state$(state) {\n\t\tthis.state = state;\n\t\tthis.emit(ListrTaskEventType.STATE, state);\n\t\tif (this.hasSubtasks() && this.hasFailed()) {\n\t\t\tfor (const subtask of this.subtasks) if (subtask.state === ListrTaskState.STARTED) subtask.state$ = ListrTaskState.FAILED;\n\t\t}\n\t\tthis.listr.events.emit(ListrEventType.SHOULD_REFRESH_RENDER);\n\t}\n\t/**\n\t* Update the current output of the Task and emit the neccassary events.\n\t*/\n\tset output$(data) {\n\t\tthis.output = data;\n\t\tthis.emit(ListrTaskEventType.OUTPUT, data);\n\t\tthis.listr.events.emit(ListrEventType.SHOULD_REFRESH_RENDER);\n\t}\n\t/**\n\t* Update the current prompt output of the Task and emit the neccassary events.\n\t*/\n\tset promptOutput$(data) {\n\t\tthis.emit(ListrTaskEventType.PROMPT, data);\n\t\tif (cleanseAnsi(data)) this.listr.events.emit(ListrEventType.SHOULD_REFRESH_RENDER);\n\t}\n\t/**\n\t* Update or extend the current message of the Task and emit the neccassary events.\n\t*/\n\tset message$(data) {\n\t\tthis.message = {\n\t\t\t...this.message,\n\t\t\t...data\n\t\t};\n\t\tthis.emit(ListrTaskEventType.MESSAGE, data);\n\t\tthis.listr.events.emit(ListrEventType.SHOULD_REFRESH_RENDER);\n\t}\n\t/**\n\t* Update the current title of the Task and emit the neccassary events.\n\t*/\n\tset title$(title) {\n\t\tthis.title = title;\n\t\tthis.emit(ListrTaskEventType.TITLE, title);\n\t\tthis.listr.events.emit(ListrEventType.SHOULD_REFRESH_RENDER);\n\t}\n\t/**\n\t* Current task path in the hierarchy.\n\t*/\n\tget path() {\n\t\treturn [...this.listr.path, this.initialTitle];\n\t}\n\t/**\n\t* Checks whether the current task with the given context should be set as enabled.\n\t*/\n\tasync check(ctx) {\n\t\tif (this.state === ListrTaskState.WAITING) {\n\t\t\tthis.enabled = await assertFunctionOrSelf(this.task?.enabled ?? true, ctx);\n\t\t\tthis.emit(ListrTaskEventType.ENABLED, this.enabled);\n\t\t\tthis.listr.events.emit(ListrEventType.SHOULD_REFRESH_RENDER);\n\t\t}\n\t\treturn this.enabled;\n\t}\n\t/** Returns whether this task has subtasks. */\n\thasSubtasks() {\n\t\treturn this.subtasks?.length > 0;\n\t}\n\t/** Returns whether this task is finalized in someform. */\n\thasFinalized() {\n\t\treturn this.isCompleted() || this.hasFailed() || this.isSkipped() || this.hasRolledBack();\n\t}\n\t/** Returns whether this task is in progress. */\n\tisPending() {\n\t\treturn this.isStarted() || this.isPrompt() || this.hasReset();\n\t}\n\t/** Returns whether this task has started. */\n\tisStarted() {\n\t\treturn this.state === ListrTaskState.STARTED;\n\t}\n\t/** Returns whether this task is skipped. */\n\tisSkipped() {\n\t\treturn this.state === ListrTaskState.SKIPPED;\n\t}\n\t/** Returns whether this task has been completed. */\n\tisCompleted() {\n\t\treturn this.state === ListrTaskState.COMPLETED;\n\t}\n\t/** Returns whether this task has been failed. */\n\thasFailed() {\n\t\treturn this.state === ListrTaskState.FAILED;\n\t}\n\t/** Returns whether this task has an active rollback task going on. */\n\tisRollingBack() {\n\t\treturn this.state === ListrTaskState.ROLLING_BACK;\n\t}\n\t/** Returns whether the rollback action was successful. */\n\thasRolledBack() {\n\t\treturn this.state === ListrTaskState.ROLLED_BACK;\n\t}\n\t/** Returns whether this task has an actively retrying task going on. */\n\tisRetrying() {\n\t\treturn this.state === ListrTaskState.RETRY;\n\t}\n\t/** Returns whether this task has some kind of reset like retry and rollback going on. */\n\thasReset() {\n\t\treturn this.state === ListrTaskState.RETRY || this.state === ListrTaskState.ROLLING_BACK;\n\t}\n\t/** Returns whether enabled function resolves to true. */\n\tisEnabled() {\n\t\treturn this.enabled;\n\t}\n\t/** Returns whether this task actually has a title. */\n\thasTitle() {\n\t\treturn typeof this?.title === \"string\";\n\t}\n\t/** Returns whether this task has a prompt inside. */\n\tisPrompt() {\n\t\treturn this.state === ListrTaskState.PROMPT;\n\t}\n\t/** Returns whether this task is currently paused. */\n\tisPaused() {\n\t\treturn this.state === ListrTaskState.PAUSED;\n\t}\n\t/** Returns whether this task is closed. */\n\tisClosed() {\n\t\treturn this.closed;\n\t}\n\t/** Pause the given task for certain time. */\n\tasync pause(time) {\n\t\tconst state = this.state;\n\t\tthis.state$ = ListrTaskState.PAUSED;\n\t\tthis.message$ = { paused: Date.now() + time };\n\t\tawait delay(time);\n\t\tthis.state$ = state;\n\t\tthis.message$ = { paused: null };\n\t}\n\t/** Run the current task. */\n\tasync run(context, wrapper) {\n\t\tconst handleResult = (result) => {\n\t\t\tif (result instanceof Listr) {\n\t\t\t\tresult.options = {\n\t\t\t\t\t...this.options,\n\t\t\t\t\t...result.options\n\t\t\t\t};\n\t\t\t\tresult.rendererClass = getRendererClass(\"silent\");\n\t\t\t\tthis.subtasks = result.tasks;\n\t\t\t\tresult.errors = this.listr.errors;\n\t\t\t\tthis.emit(ListrTaskEventType.SUBTASK, this.subtasks);\n\t\t\t\tresult = result.run(context);\n\t\t\t} else if (result instanceof Promise) result = result.then(handleResult);\n\t\t\telse if (isReadable(result)) result = new Promise((resolve, reject) => {\n\t\t\t\tresult.on(\"data\", (data) => {\n\t\t\t\t\tthis.output$ = data.toString();\n\t\t\t\t});\n\t\t\t\tresult.on(\"error\", (error) => reject(error));\n\t\t\t\tresult.on(\"end\", () => resolve(null));\n\t\t\t});\n\t\t\telse if (isObservable(result)) result = new Promise((resolve, reject) => {\n\t\t\t\tresult.subscribe({\n\t\t\t\t\tnext: (data) => {\n\t\t\t\t\t\tthis.output$ = data;\n\t\t\t\t\t},\n\t\t\t\t\terror: reject,\n\t\t\t\t\tcomplete: resolve\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn result;\n\t\t};\n\t\tconst startTime = Date.now();\n\t\tthis.state$ = ListrTaskState.STARTED;\n\t\tconst skipped = await assertFunctionOrSelf(this.task?.skip ?? false, context);\n\t\tif (skipped) {\n\t\t\tif (typeof skipped === \"string\") this.message$ = { skip: skipped };\n\t\t\telse if (this.hasTitle()) this.message$ = { skip: this.title };\n\t\t\telse this.message$ = { skip: \"Skipped task without a title.\" };\n\t\t\tthis.state$ = ListrTaskState.SKIPPED;\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tconst retryCount = typeof this.task?.retry === \"number\" && this.task.retry > 0 ? this.task.retry + 1 : typeof this.task?.retry === \"object\" && this.task.retry.tries > 0 ? this.task.retry.tries + 1 : 1;\n\t\t\tconst retryDelay = typeof this.task.retry === \"object\" && this.task.retry.delay;\n\t\t\tfor (let retries = 1; retries <= retryCount; retries++) try {\n\t\t\t\tawait handleResult(this.taskFn(context, wrapper));\n\t\t\t\tbreak;\n\t\t\t} catch (err) {\n\t\t\t\tif (retries !== retryCount) {\n\t\t\t\t\tthis.retry = {\n\t\t\t\t\t\tcount: retries,\n\t\t\t\t\t\terror: err\n\t\t\t\t\t};\n\t\t\t\t\tthis.message$ = { retry: this.retry };\n\t\t\t\t\tthis.title$ = this.initialTitle;\n\t\t\t\t\tthis.output = void 0;\n\t\t\t\t\twrapper.report(err, ListrErrorTypes.WILL_RETRY);\n\t\t\t\t\tthis.state$ = ListrTaskState.RETRY;\n\t\t\t\t\tif (retryDelay) await this.pause(retryDelay);\n\t\t\t\t} else throw err;\n\t\t\t}\n\t\t\tif (this.isStarted() || this.isRetrying()) {\n\t\t\t\tthis.message$ = { duration: Date.now() - startTime };\n\t\t\t\tthis.state$ = ListrTaskState.COMPLETED;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (this.prompt instanceof PromptError) error = this.prompt;\n\t\t\tif (this.task?.rollback) {\n\t\t\t\twrapper.report(error, ListrErrorTypes.WILL_ROLLBACK);\n\t\t\t\ttry {\n\t\t\t\t\tthis.state$ = ListrTaskState.ROLLING_BACK;\n\t\t\t\t\tawait this.task.rollback(context, wrapper);\n\t\t\t\t\tthis.message$ = { rollback: this.title };\n\t\t\t\t\tthis.state$ = ListrTaskState.ROLLED_BACK;\n\t\t\t\t} catch (err) {\n\t\t\t\t\tthis.state$ = ListrTaskState.FAILED;\n\t\t\t\t\twrapper.report(err, ListrErrorTypes.HAS_FAILED_TO_ROLLBACK);\n\t\t\t\t\tthis.close();\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t\tif (this.listr.options?.exitAfterRollback !== false) {\n\t\t\t\t\tthis.close();\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.state$ = ListrTaskState.FAILED;\n\t\t\t\tif (this.listr.options.exitOnError !== false && await assertFunctionOrSelf(this.task?.exitOnError, context) !== false) {\n\t\t\t\t\twrapper.report(error, ListrErrorTypes.HAS_FAILED);\n\t\t\t\t\tthis.close();\n\t\t\t\t\tthrow error;\n\t\t\t\t} else if (!this.hasSubtasks()) wrapper.report(error, ListrErrorTypes.HAS_FAILED_WITHOUT_ERROR);\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.close();\n\t\t}\n\t}\n\tclose() {\n\t\tthis.emit(ListrTaskEventType.CLOSED);\n\t\tthis.listr.events.emit(ListrEventType.SHOULD_REFRESH_RENDER);\n\t\tthis.complete();\n\t}\n};\n\n//#endregion\n//#region src/lib/listr-event-manager.ts\nvar ListrEventManager = class extends EventManager {};\n\n//#endregion\n//#region src/listr.ts\n/**\n* Create a new task list with Listr.\n*\n* @see {@link https://listr2.kilic.dev/listr/listr.html}\n*/\nvar Listr = class {\n\ttasks = [];\n\terrors = [];\n\tctx;\n\tevents;\n\tpath = [];\n\trendererClass;\n\trendererClassOptions;\n\trendererSelection;\n\tboundSignalHandler;\n\tconcurrency;\n\trenderer;\n\tconstructor(task, options, parentTask) {\n\t\tthis.task = task;\n\t\tthis.options = options;\n\t\tthis.parentTask = parentTask;\n\t\tthis.options = {\n\t\t\tconcurrent: false,\n\t\t\trenderer: \"default\",\n\t\t\tfallbackRenderer: \"simple\",\n\t\t\texitOnError: true,\n\t\t\texitAfterRollback: true,\n\t\t\tcollectErrors: false,\n\t\t\tregisterSignalListeners: true,\n\t\t\t...this.parentTask?.options ?? {},\n\t\t\t...options\n\t\t};\n\t\tif (this.options.concurrent === true) this.options.concurrent = Infinity;\n\t\telse if (typeof this.options.concurrent !== \"number\") this.options.concurrent = 1;\n\t\tthis.concurrency = new Concurrency({ concurrency: this.options.concurrent });\n\t\tif (parentTask) {\n\t\t\tthis.path = [...parentTask.listr.path, parentTask.title];\n\t\t\tthis.errors = parentTask.listr.errors;\n\t\t}\n\t\tif (this.parentTask?.listr.events instanceof ListrEventManager) this.events = this.parentTask.listr.events;\n\t\telse this.events = new ListrEventManager();\n\t\t/* istanbul ignore if */\n\t\tif (this.options?.forceTTY || process.env[ListrEnvironmentVariables.FORCE_TTY]) {\n\t\t\tprocess.stdout.isTTY = true;\n\t\t\tprocess.stderr.isTTY = true;\n\t\t}\n\t\t/* istanbul ignore if */\n\t\tif (this.options?.forceUnicode) process.env[ListrEnvironmentVariables.FORCE_UNICODE] = \"1\";\n\t\tconst renderer = getRenderer({\n\t\t\trenderer: this.options.renderer,\n\t\t\trendererOptions: this.options.rendererOptions,\n\t\t\tfallbackRenderer: this.options.fallbackRenderer,\n\t\t\tfallbackRendererOptions: this.options.fallbackRendererOptions,\n\t\t\tfallbackRendererCondition: this.options?.fallbackRendererCondition,\n\t\t\tsilentRendererCondition: this.options?.silentRendererCondition\n\t\t});\n\t\tthis.rendererClass = renderer.renderer;\n\t\tthis.rendererClassOptions = renderer.options;\n\t\tthis.rendererSelection = renderer.selection;\n\t\t/* istanbul ignore next */\n\t\tthis.add(task ?? []);\n\t\t/* istanbul ignore if */\n\t\tif (this.options.registerSignalListeners) {\n\t\t\tthis.boundSignalHandler = this.signalHandler.bind(this);\n\t\t\tprocess.once(\"SIGINT\", this.boundSignalHandler).setMaxListeners(0);\n\t\t}\n\t}\n\t/**\n\t* Whether this is the root task.\n\t*/\n\tisRoot() {\n\t\treturn !this.parentTask;\n\t}\n\t/**\n\t* Whether this is a subtask of another task list.\n\t*/\n\tisSubtask() {\n\t\treturn !!this.parentTask;\n\t}\n\t/**\n\t* Add tasks to current task list.\n\t*\n\t* @see {@link https://listr2.kilic.dev/task/task.html}\n\t*/\n\tadd(tasks) {\n\t\tthis.tasks.push(...this.generate(tasks));\n\t}\n\t/**\n\t* Run the task list.\n\t*\n\t* @see {@link https://listr2.kilic.dev/listr/listr.html#run-the-generated-task-list}\n\t*/\n\tasync run(context) {\n\t\tif (!this.renderer) this.renderer = new this.rendererClass(this.tasks, this.rendererClassOptions, this.events);\n\t\tawait this.renderer.render();\n\t\tthis.ctx = this.options?.ctx ?? context ?? {};\n\t\tawait Promise.all(this.tasks.map((task) => task.check(this.ctx)));\n\t\ttry {\n\t\t\tawait Promise.all(this.tasks.map((task) => this.concurrency.add(() => this.runTask(task))));\n\t\t\tthis.renderer.end();\n\t\t\tthis.removeSignalHandler();\n\t\t} catch (err) {\n\t\t\tif (this.options.exitOnError !== false) {\n\t\t\t\tthis.renderer.end(err);\n\t\t\t\tthis.removeSignalHandler();\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\treturn this.ctx;\n\t}\n\tgenerate(tasks) {\n\t\ttasks = Array.isArray(tasks) ? tasks : [tasks];\n\t\treturn tasks.map((task) => {\n\t\t\tlet rendererTaskOptions;\n\t\t\tif (this.rendererSelection === ListrRendererSelection.PRIMARY) rendererTaskOptions = task.rendererOptions;\n\t\t\telse if (this.rendererSelection === ListrRendererSelection.SECONDARY) rendererTaskOptions = task.fallbackRendererOptions;\n\t\t\treturn new Task(this, task, this.options, this.rendererClassOptions, rendererTaskOptions);\n\t\t});\n\t}\n\tasync runTask(task) {\n\t\tif (!await task.check(this.ctx)) return;\n\t\treturn new TaskWrapper(task).run(this.ctx);\n\t}\n\tsignalHandler() {\n\t\tthis.tasks?.forEach(async (task) => {\n\t\t\tif (task.isPending()) task.state$ = ListrTaskState.FAILED;\n\t\t});\n\t\tif (this.isRoot()) {\n\t\t\tthis.renderer?.end(/* @__PURE__ */ new Error(\"Interrupted.\"));\n\t\t\tprocess.exit(127);\n\t\t}\n\t}\n\tremoveSignalHandler() {\n\t\tif (this.boundSignalHandler) process.removeListener(\"SIGINT\", this.boundSignalHandler);\n\t}\n};\n\n//#endregion\nexport { ANSI_ESCAPE, ANSI_ESCAPE_CODES, BaseEventMap, Concurrency, DefaultRenderer, EventManager, LISTR_DEFAULT_RENDERER_STYLE, LISTR_LOGGER_STDERR_LEVELS, LISTR_LOGGER_STYLE, Listr, ListrDefaultRendererLogLevels, ListrEnvironmentVariables, ListrError, ListrErrorTypes, ListrEventManager, ListrEventType, ListrLogLevels, ListrLogger, ListrPromptAdapter, ListrRendererError, ListrRendererSelection, ListrTaskEventManager, ListrTaskEventType, ListrTaskState, PRESET_TIMER, PRESET_TIMESTAMP, ProcessOutput, ProcessOutputBuffer, ProcessOutputStream, PromptError, SilentRenderer, SimpleRenderer, Spinner, TestRenderer, TestRendererSerializer, VerboseRenderer, assertFunctionOrSelf, cleanseAnsi, cloneObject, color, createWritable, delay, figures, getRenderer, getRendererClass, indent, isObservable, isReadable, isUnicodeSupported, parseTimer, parseTimestamp, splat };","import * as cmd from \"cmd-ts\";\nimport { Listr } from \"listr2\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\n\nexport const remove = cmd.command({\n  name: \"remove\",\n  aliases: [\"rm\"],\n  description: \"Permanently remove one or more sandboxes\",\n  args: {\n    sandboxName: cmd.positional({\n      type: sandboxName,\n      description: \"a sandbox name to remove\",\n    }),\n    sandboxNames: cmd.restPositionals({\n      type: sandboxName,\n      description: \"more sandboxes to remove\",\n    }),\n    deleteOrphanSnapshots: cmd.flag({\n      long: \"delete-orphan-snapshots\",\n      description:\n        \"Also delete the snapshots of the sandbox that are not used by any other sandbox\",\n    }),\n    scope,\n  },\n  async handler({\n    scope: { token, team, project },\n    sandboxName,\n    sandboxNames,\n    deleteOrphanSnapshots,\n  }) {\n    const tasks = Array.from(\n      new Set([sandboxName, ...sandboxNames]),\n      (name) => ({\n        title: `Removing sandbox ${name}`,\n        async task() {\n          const sandbox = await sandboxClient.get({\n            token,\n            teamId: team,\n            projectId: project,\n            name,\n          });\n          await sandbox.delete({ deleteOrphanSnapshots });\n        },\n      }),\n    );\n    try {\n      await new Listr(tasks, { concurrent: true }).run();\n    } catch {\n      // Listr already rendered the error; just set exit code\n      process.exitCode = 1;\n    }\n  },\n});\n","import { sandboxClient } from \"../client\";\nimport * as cmd from \"cmd-ts\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { scope } from \"../args/scope\";\nimport consume from \"node:stream/consumers\";\nimport ora from \"ora\";\nimport chalk from \"chalk\";\n\nexport const args = {} as const;\n\nexport const parseLocalOrRemotePath = async (input: string) => {\n  const parts = input.split(\":\");\n  if (parts.length === 2) {\n    const [id, path] = parts;\n    if (!id || !path) {\n      throw new Error(\n        [\n          `Invalid copy path format: \"${input}\".`,\n          `${chalk.bold(\"hint:\")} Expected format: SANDBOX_NAME:PATH (e.g., my-sandbox:/home/user/file.txt).`,\n          \"╰▶ Local paths should not contain colons.\",\n        ].join(\"\\n\"),\n      );\n    }\n    return { type: \"remote\", sandboxName: await sandboxName.from(id), path } as const;\n  }\n\n  return { type: \"local\", path: input } as const;\n};\n\nconst localOrRemote = cmd.extendType(cmd.string, {\n  from: parseLocalOrRemotePath,\n});\n\nexport const cp = cmd.command({\n  name: \"copy\",\n  description: \"Copy files between your local filesystem and a remote sandbox\",\n  aliases: [\"cp\"],\n  args: {\n    source: cmd.positional({\n      displayName: `src`,\n      description: `The source file to copy from local file system, or a sandbox_name:path from a remote sandbox`,\n      type: localOrRemote,\n    }),\n    dest: cmd.positional({\n      displayName: `dst`,\n      description: `The destination file to copy to local file system, or a sandbox_name:path to a remote sandbox`,\n      type: localOrRemote,\n    }),\n    scope,\n  },\n  async handler({ scope, source, dest }) {\n    const spinner = ora({ text: `Reading source file (${source.path})...` }).start();\n    let sourceFile: Buffer<ArrayBufferLike> | null = null;\n\n    if (source.type === \"local\") {\n      sourceFile = await fs.readFile(source.path).catch((err) => {\n        if (err.code === \"ENOENT\") {\n          return null;\n        }\n        throw err;\n      })\n    } else {\n      const sandbox = await sandboxClient.get({\n        name: source.sandboxName,\n        teamId: scope.team,\n        token: scope.token,\n        projectId: scope.project,\n      });\n      const file = await sandbox.readFile({ path: source.path });\n      if (file) {\n        sourceFile = await consume.buffer(file);\n      }\n    }\n\n    if (!sourceFile) {\n      if (source.type === \"remote\") {\n        const dir = path.dirname(source.path);\n        spinner.fail(\n          [\n            `File not found: ${source.path} in sandbox ${source.sandboxName}.`,\n            `${chalk.bold(\"hint:\")} Verify the file path exists using \\`sandbox exec ${source.sandboxName} ls ${dir}\\`.`,\n          ].join(\"\\n\"),\n        );\n      } else {\n        spinner.fail(`Source file (${source.path}) not found.`);\n      }\n      return;\n    }\n\n    spinner.text = `Writing to destination file (${dest.path})...`;\n\n    if (dest.type === \"local\") {\n      await fs.writeFile(dest.path, sourceFile);\n    } else {\n      const sandbox = await sandboxClient.get({\n        name: dest.sandboxName,\n        teamId: scope.team,\n        projectId: scope.project,\n        token: scope.token,\n      });\n      await sandbox.writeFiles([{ path: dest.path, content: sourceFile }]);\n    }\n\n    spinner.succeed(`Copied ${source.path} to ${dest.path} successfully!`);\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport {\n  getAuth,\n  updateAuthConfig,\n  OAuth,\n} from \"@vercel/sandbox/dist/auth/index.js\";\nimport { output } from \"../util/output\";\nimport chalk from \"chalk\";\nimport createDebugger from \"debug\";\n\nconst debug = createDebugger(\"sandbox:logout\");\n\nexport const logout = cmd.command({\n  name: \"logout\",\n  description: \"Log out of the Sandbox CLI\",\n  args: {},\n  async handler() {\n    const auth = getAuth();\n\n    if (!auth?.token) {\n      output.print(\n        [\n          `No active session found. You are not currently logged in.`,\n          `${chalk.bold(\"hint:\")} To log in, run: \\`sandbox login\\``,\n        ].join(\"\\n\"),\n      );\n      return;\n    }\n\n    const oauth = await OAuth();\n    await oauth.revokeToken(auth.token);\n    updateAuthConfig({});\n    debug(\"Configuration has been deleted\");\n    output.print(\"Logged out!\");\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { Sandbox } from \"@vercel/sandbox\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\nimport chalk from \"chalk\";\nimport ora from \"ora\";\nimport { Duration } from \"../types/duration\";\nimport ms from \"ms\";\n\nexport const args = {\n  stop: cmd.flag({\n    long: \"stop\",\n    description: \"Confirm that the sandbox will be stopped when snapshotting\",\n  }),\n  silent: cmd.flag({\n    long: \"silent\",\n    description: \"Don't write snapshot ID to stdout\",\n  }),\n  expiration: cmd.option({\n    long: \"expiration\",\n    type: cmd.optional(Duration),\n    description: \"The expiration time of the snapshot. Use 0 for no expiration.\",\n  }),\n  sandbox: cmd.positional({\n    type: sandboxName as cmd.Type<string, string | Sandbox>,\n  }),\n  scope,\n} as const;\n\nexport const snapshot = cmd.command({\n  name: \"snapshot\",\n  description: \"Take a snapshot of the filesystem of a sandbox\",\n  args,\n  async handler({\n    sandbox: sandboxName,\n    stop,\n    scope: { token, team, project },\n    silent,\n    expiration,\n  }) {\n    if (!stop) {\n      console.error(\n        [\n          \"Snapshotting will stop the current session of this sandbox.\",\n          `${chalk.bold(\"hint:\")} Confirm with --stop to continue.`,\n        ].join(\"\\n\"),\n      );\n      process.exitCode = 1;\n      return;\n    }\n\n    const sandbox =\n      typeof sandboxName !== \"string\"\n        ? sandboxName\n        : await sandboxClient.get({\n            name: sandboxName,\n            projectId: project,\n            teamId: team,\n            token,\n          });\n\n    if (![\"running\"].includes(sandbox.status)) {\n      console.error(\n        [\n          `Sandbox ${sandbox.name} is not available (status: ${sandbox.status}).`,\n          `${chalk.bold(\"hint:\")} Only 'running' sandboxes can be snapshotted.`,\n          \"├▶ Use `sandbox list` to check sandbox status.\",\n          \"╰▶ Use `sandbox create` to create a new sandbox.\",\n        ].join(\"\\n\"),\n      );\n      process.exitCode = 1;\n      return;\n    }\n\n    const spinner = silent ? undefined : ora(\"Creating snapshot...\").start();\n    const snapshot = await sandbox.snapshot({\n      expiration: expiration === undefined ? undefined : ms(expiration),\n    });\n    spinner?.succeed(`Snapshot ${snapshot.snapshotId} created.`);\n  },\n});\n","import chalk from \"chalk\";\nimport { timeAgo } from \"./output\";\n\ninterface SnapshotData {\n  id: string;\n  sourceSessionId: string;\n  expiresAt?: number;\n  parentId?: string;\n}\n\ninterface TreeNode {\n  snapshot: SnapshotData;\n  siblings: SnapshotData[];\n  count: string;\n}\n\ninterface TreeResponse {\n  snapshots: TreeNode[];\n  pagination: { count: number; next: string | null };\n}\n\nexport type RenderSnapshotTreeParams =\n  | {\n      currentSnapshotId: string;\n      currentSnapshotExpiresAt?: number;\n      ancestors: TreeResponse;\n      descendants: TreeResponse;\n      current?: TreeNode;\n      hideCurrent?: false;\n    }\n  | {\n      /**\n       * Suppress the \"current\" snapshot node. Used when rendering a\n       * single-direction paginated view, where the anchor was already shown\n       * on the previous page.\n       */\n      hideCurrent: true;\n      ancestors: TreeResponse;\n      descendants: TreeResponse;\n    };\n\nfunction formatExpires(expiresAt: number | undefined): string {\n  if (expiresAt === undefined) {\n    return chalk.gray(\"never\");\n  }\n\n  const ms = expiresAt - Date.now();\n  if (ms <= 0) {\n    return chalk.red(\"expired\");\n  }\n\n  const formatted = timeAgo(expiresAt);\n  return ms <= 60 * 60 * 1000 ? chalk.red(formatted) : chalk.green(formatted);\n}\n\nfunction renderNode(\n  id: string,\n  expiresAt: number | undefined,\n  isCurrent: boolean,\n): string {\n  const bullet = isCurrent ? chalk.magenta.bold(\"●\") : chalk.magenta(\"●\");\n  const suffix = isCurrent ? `  ${chalk.green(\"◂ current\")}` : \"\";\n  return `${bullet} ${chalk.yellow(id)}   expires: ${formatExpires(expiresAt)}${suffix}`;\n}\n\nfunction renderSiblings(siblings: SnapshotData[], count: string): string[] {\n  const lines: string[] = [];\n  const maxShow = 5;\n  const shown = siblings.slice(0, maxShow);\n  const totalCount = parseInt(count, 10);\n  const hasPlus = count.endsWith(\"+\");\n  const totalSiblings = totalCount - 1; // count includes the main snapshot\n  const remaining = totalSiblings - shown.length;\n\n  for (let i = 0; i < shown.length; i++) {\n    const isLast = i === shown.length - 1 && remaining <= 0;\n    const connector = isLast ? \"╰──\" : \"├──\";\n    lines.push(`│   ${connector} ${chalk.gray(shown[i].id)}`);\n  }\n\n  if (remaining > 0) {\n    const suffix = hasPlus ? \"+\" : \"\";\n    lines.push(\n      `│   ╰── ${chalk.gray(`+${remaining}${suffix} more snapshots`)}`,\n    );\n  }\n\n  return lines;\n}\n\nexport function renderSnapshotTree(\n  params: RenderSnapshotTreeParams,\n): string {\n  const { ancestors, descendants } = params;\n  const hideCurrent = params.hideCurrent === true;\n  const currentSnapshotId = hideCurrent ? undefined : params.currentSnapshotId;\n  const lines: string[] = [];\n\n  // Helper: push a snapshot node with optional siblings and a trailing connector\n  const pushNode = (\n    node: TreeNode,\n    isCurrent: boolean,\n  ) => {\n    lines.push(\"│\");\n    lines.push(\n      renderNode(node.snapshot.id, node.snapshot.expiresAt, isCurrent),\n    );\n    if (node.siblings.length > 0) {\n      lines.push(...renderSiblings(node.siblings, node.count));\n    }\n  };\n\n  // Descendants (newest at top, reversed from asc order)\n  const descendantNodes = descendants.snapshots.filter(\n    (n) => n.snapshot.id !== currentSnapshotId,\n  );\n  if (descendantNodes.length > 0) {\n    for (const node of [...descendantNodes].reverse()) {\n      pushNode(node, false);\n    }\n  }\n\n  // Current snapshot\n  if (!hideCurrent) {\n    const { currentSnapshotId: id, currentSnapshotExpiresAt } = params;\n    const currentTreeNode =\n      params.current ??\n      ancestors.snapshots.find((n) => n.snapshot.id === id) ??\n      descendants.snapshots.find((n) => n.snapshot.id === id);\n    const currentNode: TreeNode = currentTreeNode ?? {\n      snapshot: {\n        id,\n        sourceSessionId: \"\",\n        expiresAt: currentSnapshotExpiresAt,\n      },\n      siblings: [],\n      count: \"1\",\n    };\n    pushNode(currentNode, true);\n  }\n\n  // Ancestors (parent at top, root at bottom)\n  const ancestorNodes = ancestors.snapshots.filter(\n    (n) => n.snapshot.id !== currentSnapshotId,\n  );\n  for (const node of ancestorNodes) {\n    pushNode(node, false);\n  }\n\n  // Root marker: only meaningful in the bidirectional (non-paginated) view.\n  // In a single-direction paginated view we can't tell whether the root has\n  // been reached from ancestors alone, and it would be wrong to render\n  // \"(root)\" when paginating descendants.\n  if (!hideCurrent) {\n    const lastAncestor = ancestorNodes[ancestorNodes.length - 1];\n    const hasReachedEnd = ancestors.pagination.next === null;\n    if (hasReachedEnd) {\n      if (\n        (lastAncestor && !lastAncestor.snapshot.parentId) ||\n        ancestorNodes.length === 0\n      ) {\n        lines.push(\"│\");\n        lines.push(`${chalk.white(\"○\")} ${chalk.gray(\"(root)\")}`);\n      }\n    }\n  }\n\n  return lines.join(\"\\n\");\n}\n","import * as cmd from \"cmd-ts\";\nimport { subcommands } from \"cmd-ts\";\nimport { Listr } from \"listr2\";\nimport chalk, { type ChalkInstance } from \"chalk\";\nimport ora from \"ora\";\nimport { scope } from \"../args/scope\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { snapshotId } from \"../args/snapshot-id\";\nimport { sandboxClient, snapshotClient } from \"../client\";\nimport { acquireRelease } from \"../util/disposables\";\nimport { formatBytes, formatNextCursorHint, table, timeAgo } from \"../util/output\";\nimport { renderSnapshotTree } from \"../util/snapshot-tree\";\n\nconst list = cmd.command({\n  name: \"list\",\n  aliases: [\"ls\"],\n  description: \"List snapshots for the specified account and project.\",\n  args: {\n    scope,\n    name: cmd.option({\n      type: cmd.optional(sandboxName),\n      long: \"name\",\n      description: \"Filter snapshots by sandbox.\",\n    }),\n    sortOrder: cmd.option({\n      long: \"sort-order\",\n      description: \"Sort order. Options: asc, desc (default)\",\n      type: cmd.optional(cmd.oneOf([\"asc\", \"desc\"] as const)),\n    }),\n    limit: cmd.option({\n      long: \"limit\",\n      description: \"Maximum number of snapshots per page (default 50).\",\n      type: cmd.optional(cmd.number),\n    }),\n    cursor: cmd.option({\n      long: \"cursor\",\n      description: \"Pagination cursor from a previous 'More results' hint.\",\n      type: cmd.optional(cmd.string),\n    }),\n  },\n  async handler({ scope: { token, team, project }, name, sortOrder, limit, cursor }) {\n    const { snapshots, pagination } = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Fetching snapshots...\").start(),\n        (s) => s.stop(),\n      );\n      return snapshotClient.list({\n        token,\n        teamId: team,\n        projectId: project,\n        name,\n        limit: limit ?? 50,\n        ...(cursor && { cursor }),\n        ...(sortOrder && { sortOrder }),\n      });\n    })();\n\n    console.log(\n      table({\n        rows: snapshots,\n        columns: {\n          ID: { value: (s) => s.id },\n          STATUS: {\n            value: (s) => s.status,\n            color: (s) => SnapshotStatusColor.get(s.status) ?? chalk.reset,\n          },\n          CREATED: { value: (s) => timeAgo(s.createdAt) },\n          EXPIRATION: {\n            value: (s) =>\n              s.status === \"deleted\"\n                ? chalk.gray.dim(\"deleted\")\n                : timeAgo(s.expiresAt),\n          },\n          SIZE: { value: (s) => formatBytes(s.sizeBytes) },\n          REGIONS: {\n            value: (s) => (s.regions?.length ? s.regions.join(\", \") : s.region),\n          },\n          [\"SOURCE SESSION\"]: { value: (s) => s.sourceSessionId },\n        },\n      }),\n    );\n\n    if (pagination.next !== null) {\n      console.log(formatNextCursorHint(pagination.next));\n    }\n  },\n});\n\nconst get = cmd.command({\n  name: \"get\",\n  description: \"Get details of a snapshot.\",\n  args: {\n    scope,\n    snapshotId: cmd.positional({\n      type: snapshotId,\n      description: \"Snapshot ID to retrieve\",\n    }),\n  },\n  async handler({ scope: { token, team, project }, snapshotId: id }) {\n    const snapshot = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Fetching snapshot...\").start(),\n        (s) => s.stop(),\n      );\n      return snapshotClient.get({\n        token,\n        teamId: team,\n        projectId: project,\n        snapshotId: id,\n      });\n    })();\n\n    console.log(\n      table({\n        rows: [snapshot],\n        columns: {\n          ID: { value: (s) => s.snapshotId },\n          STATUS: {\n            value: (s) => s.status,\n            color: (s) => SnapshotStatusColor.get(s.status) ?? chalk.reset,\n          },\n          CREATED: { value: (s) => timeAgo(s.createdAt) },\n          EXPIRATION: { value: (s) => s.status === 'deleted' ? chalk.gray.dim('deleted') : timeAgo(s.expiresAt) },\n          SIZE: { value: (s) => formatBytes(s.sizeBytes) },\n          REGIONS: { value: (s) => s.regions.join(\", \") },\n          [\"SOURCE SESSION\"]: { value: (s) => s.sourceSessionId },\n        },\n      }),\n    );\n  },\n});\n\nconst remove = cmd.command({\n  name: \"delete\",\n  aliases: [\"rm\", \"remove\"],\n  description: \"Delete one or more snapshots.\",\n  args: {\n    snapshotId: cmd.positional({\n      type: snapshotId,\n      description: \"Snapshot ID to delete\",\n    }),\n    snapshotIds: cmd.restPositionals({\n      type: snapshotId,\n      description: \"More snapshots IDs to delete\",\n    }),\n    scope,\n  },\n  async handler({ scope: { team, token, project }, snapshotId, snapshotIds }) {\n    const tasks = Array.from(\n      new Set([snapshotId, ...snapshotIds]),\n      (snapshotId) => {\n        return {\n          title: `Deleting snapshot ${snapshotId}`,\n          async task() {\n            const snapshot = await snapshotClient.get({\n              token,\n              teamId: team,\n              projectId: project,\n              snapshotId,\n            });\n            if (snapshot.status !== \"created\") {\n              throw new Error(\n                `Snapshot ${snapshotId} is in status \"${snapshot.status}\" and cannot be deleted.`,\n              );\n            }\n            await snapshot.delete();\n          },\n        };\n      },\n    );\n    try {\n      await new Listr(tasks, { concurrent: true }).run();\n    } catch {\n      // Listr already rendered the error; just set exit code\n      process.exitCode = 1;\n    }\n  },\n});\n\nconst tree = cmd.command({\n  name: \"tree\",\n  description: \"Show the snapshot ancestry tree for a sandbox.\",\n  args: {\n    scope,\n    sandboxName: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name\",\n    }),\n    sortOrder: cmd.option({\n      long: \"sort-order\",\n      description:\n        \"Sort order. Options: asc, desc (default). 'desc' walks ancestors, 'asc' walks descendants. Requires --cursor.\",\n      type: cmd.optional(cmd.oneOf([\"asc\", \"desc\"] as const)),\n    }),\n    limit: cmd.option({\n      long: \"limit\",\n      description:\n        \"Maximum number of snapshots per page (1–10, default 10).\",\n      type: cmd.optional(cmd.number),\n    }),\n    cursor: cmd.option({\n      long: \"cursor\",\n      description:\n        \"Pagination cursor from a previous 'More ancestors' or 'More descendants' hint.\",\n      type: cmd.optional(cmd.string),\n    }),\n  },\n  async handler({\n    scope: { token, team, project },\n    sandboxName: name,\n    sortOrder,\n    limit,\n    cursor,\n  }) {\n    if (limit !== undefined && (limit < 1 || limit > 10)) {\n      console.error(\n        chalk.red(\"Error: --limit must be between 1 and 10.\"),\n      );\n      process.exitCode = 1;\n      return;\n    }\n\n    if (sortOrder !== undefined && !cursor) {\n      console.error(\n        chalk.red(\"Error: --sort-order requires --cursor.\"),\n      );\n      process.exitCode = 1;\n      return;\n    }\n\n    const pageLimit = limit ?? 10;\n\n    // Paginated single-direction branch.\n    if (cursor) {\n      const effectiveSortOrder = sortOrder ?? \"desc\";\n      const page = await (async () => {\n        using _spinner = acquireRelease(\n          () => ora(\"Fetching snapshot tree...\").start(),\n          (s) => s.stop(),\n        );\n        return snapshotClient.tree({\n          snapshotId: cursor,\n          sortOrder: effectiveSortOrder,\n          limit: pageLimit,\n          token,\n          teamId: team,\n          projectId: project,\n        });\n      })();\n\n      const ancestors =\n        effectiveSortOrder === \"desc\"\n          ? page\n          : { snapshots: [], pagination: { count: 0, next: null } };\n      const descendants =\n        effectiveSortOrder === \"asc\"\n          ? page\n          : { snapshots: [], pagination: { count: 0, next: null } };\n\n      console.log(\n        renderSnapshotTree({\n          hideCurrent: true,\n          ancestors,\n          descendants,\n        }),\n      );\n\n      if (page.pagination.next !== null) {\n        console.log(formatNextCursorHint(page.pagination.next));\n      }\n      return;\n    }\n\n    // Default: bidirectional view anchored on the sandbox's current snapshot.\n    const result = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Fetching snapshot tree...\").start(),\n        (s) => s.stop(),\n      );\n\n      const sandbox = await sandboxClient.get({\n        name,\n        token,\n        teamId: team,\n        projectId: project,\n      });\n\n      const currentSnapshotId = sandbox.currentSnapshotId;\n      if (!currentSnapshotId) {\n        return null;\n      }\n\n      const [currentSnap, ancestors, descendants] = await Promise.all([\n        snapshotClient.get({\n          snapshotId: currentSnapshotId,\n          token,\n          teamId: team,\n          projectId: project,\n        }),\n        snapshotClient.tree({\n          snapshotId: currentSnapshotId,\n          sortOrder: \"desc\",\n          limit: pageLimit,\n          token,\n          teamId: team,\n          projectId: project,\n        }),\n        snapshotClient.tree({\n          snapshotId: currentSnapshotId,\n          sortOrder: \"asc\",\n          limit: pageLimit,\n          token,\n          teamId: team,\n          projectId: project,\n        }),\n      ]);\n\n      const current = ancestors.anchor ?? descendants.anchor;\n\n      return {\n        currentSnap,\n        currentSnapshotId,\n        ancestors,\n        descendants,\n        current,\n      };\n    })();\n\n    if (!result) {\n      console.log(chalk.yellow(\"No snapshots found for this sandbox.\"));\n      return;\n    }\n\n    console.log(\n      renderSnapshotTree({\n        currentSnapshotId: result.currentSnapshotId,\n        currentSnapshotExpiresAt: result.currentSnap.expiresAt?.getTime(),\n        ancestors: result.ancestors,\n        descendants: result.descendants,\n        current: result.current,\n      }),\n    );\n\n    const limitArg = limit !== undefined ? ` --limit ${limit}` : \"\";\n    if (result.ancestors.pagination.next !== null) {\n      console.log(\n        `\\nMore ancestors: sandbox snapshots tree ${name} --sort-order desc${limitArg} --cursor ${result.ancestors.pagination.next}`,\n      );\n    }\n    if (result.descendants.pagination.next !== null) {\n      console.log(\n        `More descendants: sandbox snapshots tree ${name} --sort-order asc${limitArg} --cursor ${result.descendants.pagination.next}`,\n      );\n    }\n  },\n});\n\nexport const snapshots = subcommands({\n  name: \"snapshots\",\n  description: \"Manage sandbox snapshots\",\n  cmds: {\n    list,\n    get,\n    tree,\n    delete: remove,\n  },\n});\n\nconst SnapshotStatusColor = new Map<string, ChalkInstance>([\n  [\"created\", chalk.cyan],\n  [\"deleted\", chalk.gray.dim],\n  [\"failed\", chalk.red],\n]);\n","import * as cmd from \"cmd-ts\";\nimport { subcommands } from \"cmd-ts\";\nimport chalk, { type ChalkInstance } from \"chalk\";\nimport ora from \"ora\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\nimport { acquireRelease } from \"../util/disposables\";\nimport {\n  table,\n  timeAgo,\n  formatBytes,\n  formatRunDuration,\n  formatNextCursorHint,\n} from \"../util/output\";\nimport type { Sandbox } from \"@vercel/sandbox\";\n\nconst list = cmd.command({\n  name: \"list\",\n  aliases: [\"ls\"],\n  description: \"List sessions from a sandbox\",\n  args: {\n    all: cmd.flag({\n      long: \"all\",\n      short: \"a\",\n      description: \"Show all sessions (default shows just running)\",\n    }),\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to list sessions for\",\n    }),\n    sortOrder: cmd.option({\n      long: \"sort-order\",\n      description: \"Sort order. Options: asc, desc (default)\",\n      type: cmd.optional(cmd.oneOf([\"asc\", \"desc\"] as const)),\n    }),\n    limit: cmd.option({\n      long: \"limit\",\n      description: \"Maximum number of sessions per page (default 50).\",\n      type: cmd.optional(cmd.number),\n    }),\n    cursor: cmd.option({\n      long: \"cursor\",\n      description: \"Pagination cursor from a previous 'More results' hint.\",\n      type: cmd.optional(cmd.string),\n    }),\n    scope,\n  },\n  async handler({\n    scope: { token, team, project },\n    all,\n    sandbox: name,\n    sortOrder,\n    limit,\n    cursor,\n  }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const { sessions, pagination } = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Fetching sessions...\").start(),\n        (s) => s.stop(),\n      );\n      return sandbox.listSessions({\n        limit: limit ?? 50,\n        ...(cursor && { cursor }),\n        ...(sortOrder && { sortOrder }),\n      });\n    })();\n\n    const displayedSessions = all\n      ? sessions\n      : sessions.filter((x) => x.status === \"running\");\n\n    const memoryFormatter = new Intl.NumberFormat(undefined, {\n      style: \"unit\",\n      unit: \"megabyte\",\n    });\n\n    type SessionRow = (typeof sessions)[number];\n    type Column = {\n      value: (s: SessionRow) => string | number;\n      color?: (s: SessionRow) => ChalkInstance;\n    };\n\n    const columns: Record<string, Column> = {\n      ID: { value: (s) => s.id },\n      STATUS: {\n        value: (s) => s.status,\n        color: (s) => SessionStatusColor[s.status] ?? chalk.reset,\n      },\n      CREATED: { value: (s) => timeAgo(s.createdAt) },\n      REGION: { value: (s) => s.region },\n      MEMORY: { value: (s) => memoryFormatter.format(s.memory) },\n      VCPUS: { value: (s) => s.vcpus },\n      RUNTIME: { value: (s) => s.runtime ?? \"-\" },\n      TIMEOUT: {\n        value: (s) => timeAgo(s.createdAt + s.timeout),\n      },\n      DURATION: {\n        value: (s) => (s.duration ? formatRunDuration(s.duration) : \"-\"),\n      },\n      SNAPSHOT: { value: (s) => s.sourceSnapshotId ?? \"-\" },\n    };\n    if (all) {\n      columns.CPU = {\n        value: (s) =>\n          s.activeCpuDurationMs\n            ? formatRunDuration(s.activeCpuDurationMs)\n            : \"-\",\n      };\n      columns[\"NETWORK (OUT/IN)\"] = {\n        value: (s) =>\n          s.networkTransfer?.egress || s.networkTransfer?.ingress\n            ? `${formatBytes(s.networkTransfer?.egress ?? 0)} / ${formatBytes(s.networkTransfer?.ingress ?? 0)}`\n            : \"- / -\",\n      };\n    }\n\n    console.log(table({ rows: displayedSessions, columns }));\n\n    if (pagination.next !== null) {\n      console.log(formatNextCursorHint(pagination.next));\n    }\n  },\n});\n\nexport const sessions = subcommands({\n  name: \"sessions\",\n  description: \"Manage sandbox sessions\",\n  cmds: {\n    list,\n  },\n});\n\nconst SessionStatusColor: Record<Sandbox[\"status\"], ChalkInstance> = {\n  running: chalk.cyan,\n  failed: chalk.red,\n  stopped: chalk.gray.dim,\n  stopping: chalk.gray,\n  pending: chalk.magenta,\n  snapshotting: chalk.blue,\n  aborted: chalk.gray.dim,\n};\n","import * as cmd from \"cmd-ts\";\nimport { APIError, type Sandbox } from \"@vercel/sandbox\";\nimport { sandboxName } from \"../args/sandbox-name\";\nimport { snapshotId } from \"../args/snapshot-id\";\nimport { scope } from \"../args/scope\";\nimport { sandboxClient } from \"../client\";\nimport {\n  networkPolicyArgs,\n  networkPolicyMode as networkPolicyModeType,\n} from \"../args/network-policy\";\nimport { buildNetworkPolicy, resolveMode } from \"../util/network-policy\";\nimport { vcpusType } from \"../args/vcpus\";\nimport { failoverRegionListType, regionType } from \"../args/region\";\nimport { networkIdOrNoneType } from \"../args/network-id\";\nimport { mounts as mountsOption } from \"../args/drive\";\nimport { Duration } from \"../types/duration\";\nimport { SnapshotExpiration } from \"../types/snapshot-expiration\";\nimport { ObjectFromKeyValue } from \"../args/key-value-pair\";\nimport { publishPorts } from \"../args/ports\";\nimport ora from \"ora\";\nimport chalk from \"chalk\";\nimport ms from \"ms\";\nimport { table } from \"../util/output\";\nimport { acquireRelease } from \"../util/disposables\";\nimport { StyledError } from \"../error\";\n\nconst vcpusCommand = cmd.command({\n  name: \"vcpus\",\n  description: \"Update the vCPU count of a sandbox\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    count: cmd.positional({\n      type: vcpusType,\n      description:\n        \"Number of vCPUs to allocate (each vCPU includes 2048 MB of memory)\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, count }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ resources: { vcpus: count } });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") + \"vcpus: \" + chalk.cyan(count) + \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst timeoutCommand = cmd.command({\n  name: \"timeout\",\n  description:\n    \"Set the timeout for new sessions; a higher value extends a running session\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    duration: cmd.positional({\n      type: Duration,\n      description:\n        \"The maximum duration a sandbox can run for. Example: 5m, 1h\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, duration }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ timeout: ms(duration) });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") + \"timeout: \" + chalk.cyan(duration) + \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst persistentCommand = cmd.command({\n  name: \"persistent\",\n  description:\n    \"Enable or disable automatic restore of the filesystem between sessions\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    value: cmd.positional({\n      type: { ...cmd.oneOf([\"true\", \"false\"]), displayName: \"true|false\" },\n      description:\n        \"Enable or disable automatic restore of the filesystem between sessions\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, value }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ persistent: value === \"true\" });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") + \"persistent: \" + chalk.cyan(value) + \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst snapshotExpirationCommand = cmd.command({\n  name: \"snapshot-expiration\",\n  description: \"Update the default snapshot expiration of a sandbox\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    duration: cmd.positional({\n      type: SnapshotExpiration,\n      description:\n        'Snapshot expiration duration (e.g. 7d, 30d) or \"none\" for no expiration',\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, duration }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ snapshotExpiration: ms(duration) });\n      spinner.stop();\n\n      const display = ms(duration) === 0 ? \"none\" : duration;\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") +\n          \"snapshot-expiration: \" +\n          chalk.cyan(display) +\n          \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst keepLastCountType = cmd.extendType(cmd.number, {\n  displayName: \"COUNT\",\n  async from(n) {\n    if (!Number.isInteger(n) || n < 0 || n > 10) {\n      throw new Error(\n        `Invalid count: ${n}. Must be an integer between 0 and 10 (0 removes the policy).`,\n      );\n    }\n    return n;\n  },\n});\n\nconst keepLastSnapshotsCommand = cmd.command({\n  name: \"keep-last-snapshots\",\n  description:\n    \"Update the snapshot retention policy (keep only the N most recent snapshots) of a sandbox\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    count: cmd.positional({\n      type: keepLastCountType,\n      description:\n        \"Number of most recent snapshots to keep (1-10). Pass 0 to remove the policy.\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, count }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      if (count === 0) {\n        await sandbox.update({ keepLastSnapshots: null });\n      } else {\n        const current = sandbox.keepLastSnapshots;\n        await sandbox.update({\n          keepLastSnapshots: {\n            count,\n            expiration: current?.expiration,\n            deleteEvicted: current?.deleteEvicted,\n          },\n        });\n      }\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") +\n          \"keep-last-snapshots: \" +\n          chalk.cyan(count === 0 ? \"cleared\" : `count=${count}`) +\n          \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst keepLastSnapshotsForCommand = cmd.command({\n  name: \"keep-last-snapshots-for\",\n  description:\n    \"Update the expiration applied to snapshots kept by the retention policy\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    duration: cmd.positional({\n      type: SnapshotExpiration,\n      description:\n        'Expiration for kept snapshots. Use \"none\" or 0 for no expiration. Example: 7d, 30d',\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, duration }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const current = sandbox.keepLastSnapshots;\n    if (!current) {\n      throw new Error(\n        [\n          \"No keep-last-snapshots policy is set on this sandbox.\",\n          `${chalk.bold(\"hint:\")} Set a count first with: sandbox config keep-last-snapshots ${name} <count>`,\n        ].join(\"\\n\"),\n      );\n    }\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({\n        keepLastSnapshots: {\n          count: current.count,\n          expiration: ms(duration),\n          deleteEvicted: current.deleteEvicted,\n        },\n      });\n      spinner.stop();\n\n      const display = ms(duration) === 0 ? \"none\" : duration;\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") +\n          \"keep-last-snapshots-for: \" +\n          chalk.cyan(display) +\n          \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst deleteEvictedSnapshotsCommand = cmd.command({\n  name: \"delete-evicted-snapshots\",\n  description:\n    'When \"true\" (the default), snapshots evicted by the keep-last-snapshots policy are deleted immediately; when \"false\", they keep the default expiration.',\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    value: cmd.positional({\n      type: { ...cmd.oneOf([\"true\", \"false\"]), displayName: \"true|false\" },\n      description:\n        'Whether to delete evicted snapshots immediately (\"true\") or let them keep the default expiration (\"false\").',\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, value }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const current = sandbox.keepLastSnapshots;\n    if (!current) {\n      throw new Error(\n        [\n          \"No keep-last-snapshots policy is set on this sandbox.\",\n          `${chalk.bold(\"hint:\")} Set a count first with: sandbox config keep-last-snapshots ${name} <count>`,\n        ].join(\"\\n\"),\n      );\n    }\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({\n        keepLastSnapshots: {\n          count: current.count,\n          expiration: current.expiration,\n          deleteEvicted: value === \"true\",\n        },\n      });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") +\n          \"delete-evicted-snapshots: \" +\n          chalk.cyan(value) +\n          \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst currentSnapshotCommand = cmd.command({\n  name: \"current-snapshot\",\n  description: \"Update the current snapshot of a sandbox\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    snapshotId: cmd.positional({\n      type: snapshotId,\n      description: \"Snapshot ID to set as the current snapshot\",\n    }),\n    scope,\n  },\n  async handler({\n    scope: { token, team, project },\n    sandbox: name,\n    snapshotId,\n  }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ currentSnapshotId: snapshotId });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") +\n          \"current-snapshot: \" +\n          chalk.cyan(snapshotId) +\n          \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      if (error instanceof APIError && error.response.status === 404) {\n        throw new StyledError(\n          `Snapshot '${snapshotId}' was not found or does not belong to this project.`,\n          error,\n        );\n      }\n      throw error;\n    }\n  },\n});\n\nconst portsCommand = cmd.command({\n  name: \"ports\",\n  description:\n    \"Update the published ports of a sandbox. Replaces all existing published ports.\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    ports: publishPorts,\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, ports }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox ports...\").start();\n    try {\n      await sandbox.update({ ports });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Ports updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      if (ports.length === 0) {\n        process.stderr.write(chalk.dim(\"   ╰ \") + \"all ports unpublished\\n\");\n      } else {\n        const routes = getPublishedRoutes(sandbox);\n        process.stderr.write(chalk.dim(\"   │ \") + \"ports:\\n\");\n        for (let i = 0; i < ports.length; i++) {\n          const port = ports[i];\n          const route = routes?.find((route) => route.port === port);\n          const isLast = i === ports.length - 1;\n          const prefix = isLast ? chalk.dim(\"   ╰ \") : chalk.dim(\"   │ \");\n          const url = route ? \" -> \" + chalk.cyan(route.url) : \"\";\n          process.stderr.write(prefix + \"• \" + port + url + \"\\n\");\n        }\n      }\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst regionCommand = cmd.command({\n  name: \"region\",\n  description:\n    \"Update the region of a sandbox (will be applied to all new sessions)\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    region: cmd.positional({\n      type: regionType,\n      description: \"Region to run the sandbox in\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, region }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ region });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") + \"region: \" + chalk.cyan(region) + \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst failoverRegionsCommand = cmd.command({\n  name: \"failover-regions\",\n  description:\n    \"Update the failover regions of a sandbox (replaces the existing list)\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    failoverRegions: cmd.positional({\n      type: failoverRegionListType,\n      description:\n        'Comma-separated regions the sandbox can fail over to (e.g. sfo1,fra1). Must not include the sandbox region. Pass \"none\" to remove them.',\n    }),\n    scope,\n  },\n  async handler({\n    scope: { token, team, project },\n    sandbox: name,\n    failoverRegions,\n  }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ failoverRegions });\n      spinner.stop();\n\n      const display =\n        failoverRegions.length === 0 ? \"cleared\" : failoverRegions.join(\", \");\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") + \"failover-regions: \" + chalk.cyan(display) + \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst networkArgs = {\n  sandbox: cmd.positional({\n    type: sandboxName,\n    description: \"Sandbox name to update\",\n  }),\n  networkId: cmd.positional({\n    type: networkIdOrNoneType,\n    description:\n      'Secure Compute network ID (requires an Enterprise plan), or \"none\" to detach',\n  }),\n  scope,\n};\n\nconst networkIdCommand = cmd.command({\n  name: \"network-id\",\n  description:\n    \"Update the Secure Compute network of a sandbox (requires an Enterprise plan)\",\n  args: networkArgs,\n  async handler({ scope: { token, team, project }, sandbox: name, networkId }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ networkId });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") +\n          \"network-id: \" +\n          chalk.cyan(networkId ?? \"cleared\") +\n          \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst networkCommand = cmd.command({\n  name: \"network\",\n  description:\n    \"Attach or detach a sandbox's Secure Compute network (requires an Enterprise plan). Changes apply on the next session.\",\n  args: networkArgs,\n  handler: networkIdCommand.handler,\n  examples: [\n    {\n      description:\n        \"Create a sandbox on a Secure Compute network (requires an Enterprise plan)\",\n      command: \"sandbox create --network-id your_network_id_here\",\n    },\n    {\n      description:\n        \"Attach or change the network for an existing sandbox (requires an Enterprise plan)\",\n      command: \"sandbox config network my-sandbox your_network_id_here\",\n    },\n    {\n      description:\n        \"Detach the Secure Compute network for the next session (Enterprise only)\",\n      command: \"sandbox config network my-sandbox none\",\n    },\n  ],\n});\n\nconst mountsCommand = cmd.command({\n  name: \"mounts\",\n  description:\n    \"Update the drives mounted on a sandbox (replaces all existing mounts, applied to all new sessions). Pass no --mount flag to remove them.\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    mounts: mountsOption,\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, mounts }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const spinner = ora(\"Updating sandbox configuration...\").start();\n    try {\n      await sandbox.update({ mounts });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Configuration updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") +\n          \"mounts: \" +\n          chalk.cyan(formatMounts(mounts)) +\n          \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst listCommand = cmd.command({\n  name: \"list\",\n  description: \"Display the current configuration of a sandbox\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to inspect\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name }) {\n    const sandbox = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Fetching sandbox configuration...\").start(),\n        (s) => s.stop(),\n      );\n      return sandboxClient.get({\n        name,\n        projectId: project,\n        teamId: team,\n        token,\n      });\n    })();\n\n    const networkPolicy =\n      typeof sandbox.networkPolicy === \"string\"\n        ? sandbox.networkPolicy\n        : \"restricted\";\n    const tagsDisplay =\n      sandbox.tags && Object.keys(sandbox.tags).length > 0\n        ? Object.entries(sandbox.tags)\n            .map(([k, v]) => `${k}=${v}`)\n            .join(\", \")\n        : \"-\";\n    const rows = [\n      { field: \"Region\", value: sandbox.region },\n      {\n        field: \"Failover regions\",\n        value: sandbox.failoverRegions.length\n          ? sandbox.failoverRegions.join(\", \")\n          : \"-\",\n      },\n      { field: \"Secure Compute network\", value: sandbox.networkId ?? \"-\" },\n      { field: \"vCPUs\", value: String(sandbox.vcpus ?? \"-\") },\n      {\n        field: \"Timeout\",\n        value:\n          sandbox.timeout != null ? ms(sandbox.timeout, { long: true }) : \"-\",\n      },\n      { field: \"Persistent\", value: String(sandbox.persistent) },\n      { field: \"Network policy\", value: String(networkPolicy) },\n      { field: \"Ports\", value: formatPorts(sandbox) },\n      {\n        field: \"Snapshot expiration\",\n        value:\n          sandbox.snapshotExpiration != null && sandbox.snapshotExpiration > 0\n            ? ms(sandbox.snapshotExpiration, { long: true })\n            : sandbox.snapshotExpiration === 0\n              ? \"none\"\n              : \"-\",\n      },\n      {\n        field: \"Keep last snapshots\",\n        value: formatKeepLastSnapshots(sandbox.keepLastSnapshots),\n      },\n      { field: \"Current snapshot\", value: sandbox.currentSnapshotId ?? \"-\" },\n      { field: \"Tags\", value: tagsDisplay },\n      { field: \"Mounts\", value: formatMounts(sandbox.mounts) },\n    ];\n\n    console.log(\n      table({\n        rows,\n        columns: {\n          FIELD: { value: (r) => r.field, color: () => chalk.bold },\n          VALUE: { value: (r) => r.value },\n        },\n      }),\n    );\n  },\n});\n\nconst networkPolicyCommand = cmd.command({\n  name: \"network-policy\",\n  description: `Update the network policy of a sandbox`,\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName as cmd.Type<string, string | Sandbox>,\n    }),\n    ...networkPolicyArgs,\n    mode: cmd.option({\n      long: \"mode\",\n      description: `Alias for --network-policy.`,\n      type: cmd.optional(networkPolicyModeType),\n    }),\n    scope,\n  },\n  async handler({\n    scope: { token, team, project },\n    sandbox: sandboxName,\n    networkPolicy: networkPolicyFlag,\n    mode: modeFlag,\n    allowedDomains,\n    allowedCIDRs,\n    deniedCIDRs,\n  }) {\n    const networkPolicyMode = resolveMode(networkPolicyFlag, modeFlag);\n\n    if (\n      networkPolicyMode === undefined &&\n      allowedDomains.length === 0 &&\n      allowedCIDRs.length === 0 &&\n      deniedCIDRs.length === 0\n    ) {\n      throw new Error(`Network policy mode or custom rules must be set.`);\n    }\n\n    const networkPolicy = buildNetworkPolicy({\n      networkPolicy: networkPolicyMode,\n      allowedDomains,\n      allowedCIDRs,\n      deniedCIDRs,\n    });\n\n    const sandbox =\n      typeof sandboxName !== \"string\"\n        ? sandboxName\n        : await sandboxClient.get({\n            name: sandboxName,\n            projectId: project,\n            teamId: team,\n            token,\n          });\n\n    const spinner = ora(\"Updating network policy...\").start();\n    try {\n      await sandbox.update({ networkPolicy });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Network policy updated for sandbox \" +\n          chalk.cyan(sandbox.name) +\n          \"\\n\",\n      );\n      const mode =\n        typeof networkPolicy === \"string\" ? networkPolicy : \"restricted\";\n      process.stderr.write(\n        chalk.dim(\"   ╰ \") + \"mode: \" + chalk.cyan(mode) + \"\\n\",\n      );\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nconst tagsCommand = cmd.command({\n  name: \"tags\",\n  description:\n    \"Update the tags of a sandbox. Replaces all existing tags with the provided tags.\",\n  args: {\n    sandbox: cmd.positional({\n      type: sandboxName,\n      description: \"Sandbox name to update\",\n    }),\n    tags: cmd.multioption({\n      long: \"tag\",\n      short: \"t\",\n      type: ObjectFromKeyValue,\n      description:\n        \"Key-value tags to set (e.g. --tag env=staging). Omit to clear all tags.\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, sandbox: name, tags }) {\n    const sandbox = await sandboxClient.get({\n      name,\n      projectId: project,\n      teamId: team,\n      token,\n    });\n\n    const tagsObj = Object.keys(tags).length > 0 ? tags : {};\n\n    const spinner = ora(\"Updating sandbox tags...\").start();\n    try {\n      await sandbox.update({ tags: tagsObj });\n      spinner.stop();\n\n      process.stderr.write(\n        \"✅ Tags updated for sandbox \" + chalk.cyan(name) + \"\\n\",\n      );\n      const entries = Object.entries(tagsObj);\n      if (entries.length === 0) {\n        process.stderr.write(chalk.dim(\"   ╰ \") + \"all tags cleared\\n\");\n      } else {\n        for (let i = 0; i < entries.length; i++) {\n          const [k, v] = entries[i];\n          const isLast = i === entries.length - 1;\n          const prefix = isLast ? chalk.dim(\"   ╰ \") : chalk.dim(\"   │ \");\n          process.stderr.write(\n            prefix + chalk.cyan(k) + \"=\" + chalk.cyan(v) + \"\\n\",\n          );\n        }\n      }\n    } catch (error) {\n      spinner.stop();\n      throw error;\n    }\n  },\n});\n\nfunction formatKeepLastSnapshots(\n  keepLastSnapshots:\n    | { count: number; expiration?: number; deleteEvicted?: boolean }\n    | undefined,\n): string {\n  if (!keepLastSnapshots) {\n    return \"-\";\n  }\n\n  const parts = [`count=${keepLastSnapshots.count}`];\n  if (keepLastSnapshots.expiration !== undefined) {\n    parts.push(\n      `for=${keepLastSnapshots.expiration === 0 ? \"none\" : ms(keepLastSnapshots.expiration, { long: true })}`,\n    );\n  }\n  if (keepLastSnapshots.deleteEvicted !== undefined) {\n    parts.push(`delete-evicted-snapshots=${keepLastSnapshots.deleteEvicted}`);\n  }\n\n  return parts.join(\", \");\n}\n\nfunction formatMounts(mounts: Sandbox[\"mounts\"]): string {\n  const entries = Object.entries(mounts ?? {});\n  if (entries.length === 0) {\n    return \"-\";\n  }\n  return entries\n    .map(\n      ([path, { drive, mode }]) => `${drive}:${path}:${mode ?? \"read-write\"}`,\n    )\n    .join(\", \");\n}\n\nfunction formatPorts(sandbox: Sandbox): string {\n  const ports = getPublishedRoutes(sandbox)?.map((route) => route.port) ?? [];\n\n  if (ports.length === 0) {\n    return \"-\";\n  }\n\n  return ports.join(\", \");\n}\n\nfunction getPublishedRoutes(sandbox: Sandbox): Sandbox[\"routes\"] | undefined {\n  return sandbox.routes.filter(\n    (route) => route.port !== sandbox.interactivePort,\n  );\n}\n\nexport const config = cmd.subcommands({\n  name: \"config\",\n  description: \"View and update sandbox configuration\",\n  cmds: {\n    list: listCommand,\n    vcpus: vcpusCommand,\n    timeout: timeoutCommand,\n    persistent: persistentCommand,\n    region: regionCommand,\n    \"failover-regions\": failoverRegionsCommand,\n    network: networkCommand,\n    \"network-id\": networkIdCommand,\n    mounts: mountsCommand,\n    \"network-policy\": networkPolicyCommand,\n    \"snapshot-expiration\": snapshotExpirationCommand,\n    \"keep-last-snapshots\": keepLastSnapshotsCommand,\n    \"keep-last-snapshots-for\": keepLastSnapshotsForCommand,\n    \"delete-evicted-snapshots\": deleteEvictedSnapshotsCommand,\n    \"current-snapshot\": currentSnapshotCommand,\n    ports: portsCommand,\n    tags: tagsCommand,\n  },\n});\n","import * as cmd from \"cmd-ts\";\nimport { subcommands } from \"cmd-ts\";\nimport { Listr } from \"listr2\";\nimport chalk from \"chalk\";\nimport ora from \"ora\";\nimport type { Drive } from \"@vercel/sandbox\";\nimport { scope } from \"../args/scope\";\nimport { driveMaxSize, driveName, driveRegion } from \"../args/drive\";\nimport { driveClient } from \"../client\";\nimport { acquireRelease } from \"../util/disposables\";\nimport {\n  formatBytes,\n  formatNextCursorHint,\n  table,\n  timeAgo,\n} from \"../util/output\";\n\nconst list = cmd.command({\n  name: \"list\",\n  aliases: [\"ls\"],\n  description: \"List drives for the specified account and project.\",\n  args: {\n    scope,\n    namePrefix: cmd.option({\n      long: \"name-prefix\",\n      description: \"Filter drives by name prefix.\",\n      type: cmd.optional(cmd.string),\n    }),\n    sortOrder: cmd.option({\n      long: \"sort-order\",\n      description: \"Sort order. Options: asc, desc (default).\",\n      type: cmd.optional(cmd.oneOf([\"asc\", \"desc\"] as const)),\n    }),\n    limit: cmd.option({\n      long: \"limit\",\n      description: \"Maximum number of drives per page (default 50).\",\n      type: cmd.optional(cmd.number),\n    }),\n    cursor: cmd.option({\n      long: \"cursor\",\n      description: \"Pagination cursor from a previous 'More results' hint.\",\n      type: cmd.optional(cmd.string),\n    }),\n  },\n  async handler({\n    scope: { token, team, project },\n    namePrefix,\n    sortOrder,\n    limit,\n    cursor,\n  }) {\n    const { drives, pagination } = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Fetching drives...\").start(),\n        (s) => s.stop(),\n      );\n\n      return driveClient.list({\n        token,\n        teamId: team,\n        projectId: project,\n        limit: limit ?? 50,\n        ...(cursor && { cursor }),\n        ...(namePrefix && { namePrefix, sortBy: \"name\" as const }),\n        ...(sortOrder && { sortOrder }),\n      });\n    })();\n\n    printDrives(drives);\n\n    if (pagination.next !== null) {\n      console.log(formatNextCursorHint(pagination.next));\n    }\n  },\n});\n\nconst getOrCreate = cmd.command({\n  name: \"get-or-create\",\n  description: \"Create a drive if it does not already exist, or retrieve it.\",\n  args: {\n    name: cmd.positional({\n      type: driveName,\n      description: \"Drive name to create or retrieve\",\n    }),\n    maxSize: cmd.option({\n      long: \"max-size\",\n      description:\n        \"Maximum drive size, e.g. 200GiB or 2TiB (bytes if no unit). Fixed after creation. If omitted, a default of 1 TiB is used (1 GiB for Hobby).\",\n      type: cmd.optional(driveMaxSize),\n    }),\n    region: cmd.option({\n      long: \"region\",\n      description: \"Region where the drive is created.\",\n      type: cmd.optional(driveRegion),\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, name, maxSize, region }) {\n    const drive = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Creating drive...\").start(),\n        (s) => s.stop(),\n      );\n\n      return driveClient.getOrCreate({\n        token,\n        teamId: team,\n        projectId: project,\n        name,\n        maxSize,\n        region,\n      });\n    })();\n\n    process.stderr.write(\"✅ Drive \" + chalk.cyan(drive.name) + \" ready.\\n\");\n    printDriveSummary(drive, { showSizeHint: maxSize === undefined });\n  },\n});\n\nconst fork = cmd.command({\n  name: \"fork\",\n  description:\n    \"Fork a drive with a new name, inheriting the parent drive's data, max size and region.\",\n  args: {\n    parent: cmd.positional({\n      displayName: \"parent\",\n      type: driveName,\n      description: \"Parent drive name\",\n    }),\n    name: cmd.positional({\n      type: driveName,\n      description: \"Forked drive name\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, parent, name }) {\n    const forkedDrive = await (async () => {\n      using _spinner = acquireRelease(\n        () => ora(\"Forking drive...\").start(),\n        (spinner) => spinner.stop(),\n      );\n\n      const drive = await driveClient.get({\n        token,\n        teamId: team,\n        projectId: project,\n        name: parent,\n      });\n\n      return driveClient.fork(drive, { name });\n    })();\n\n    process.stderr.write(\n      \"✅ Drive \" + chalk.cyan(forkedDrive.name) + \" created.\\n\",\n    );\n    printDriveSummary(forkedDrive, { parentDriveName: parent });\n  },\n});\n\nconst remove = cmd.command({\n  name: \"delete\",\n  aliases: [\"rm\", \"remove\"],\n  description: \"Delete one or more drives.\",\n  args: {\n    name: cmd.positional({\n      type: driveName,\n      description: \"Drive name to delete\",\n    }),\n    names: cmd.restPositionals({\n      type: driveName,\n      description: \"More drive names to delete\",\n    }),\n    scope,\n  },\n  async handler({ scope: { token, team, project }, name, names }) {\n    const tasks = Array.from(new Set([name, ...names]), (driveName) => {\n      return {\n        title: `Deleting drive ${driveName}`,\n        async task() {\n          const drive = await getDriveByName({\n            token,\n            teamId: team,\n            projectId: project,\n            name: driveName,\n          });\n\n          if (drive.currentSandboxName || drive.currentSessionId) {\n            throw new Error(\n              `Drive ${driveName} is attached to a sandbox and cannot be deleted.`,\n            );\n          }\n\n          await driveClient.delete(drive);\n        },\n      };\n    });\n\n    try {\n      await new Listr(tasks, { concurrent: true }).run();\n    } catch {\n      // Listr already rendered the error; just set exit code.\n      process.exitCode = 1;\n    }\n  },\n});\n\nexport const drives = subcommands({\n  name: \"drives\",\n  description: \"Manage sandbox drives\",\n  cmds: {\n    list,\n    \"get-or-create\": getOrCreate,\n    fork,\n    delete: remove,\n  },\n});\n\nfunction printDriveSummary(\n  drive: Drive,\n  {\n    parentDriveName,\n    showSizeHint = false,\n  }: {\n    parentDriveName?: string;\n    showSizeHint?: boolean;\n  } = {},\n) {\n  if (parentDriveName) {\n    process.stderr.write(\n      chalk.dim(\"   │ \") + \"forked from: \" + chalk.cyan(parentDriveName) + \"\\n\",\n    );\n  }\n  process.stderr.write(\n    chalk.dim(\"   │ \") + \"region: \" + chalk.cyan(drive.region) + \"\\n\",\n  );\n  process.stderr.write(\n    chalk.dim(\"   │ \") +\n      \"max size: \" +\n      chalk.cyan(formatBytes(drive.maxSize)) +\n      (showSizeHint\n        ? chalk.dim(\" (set with --max-size at creation, fixed afterwards)\")\n        : \"\") +\n      \"\\n\",\n  );\n  process.stderr.write(\n    chalk.dim(\"   ╰ \") +\n      \"created: \" +\n      chalk.cyan(timeAgo(drive.createdAt)) +\n      \"\\n\",\n  );\n}\n\nfunction printDrives(drives: Drive[]) {\n  console.log(\n    table({\n      rows: drives,\n      columns: {\n        NAME: { value: (v) => v.name },\n        REGION: { value: (v) => v.region },\n        CREATED: { value: (v) => timeAgo(v.createdAt) },\n        UPDATED: { value: (v) => timeAgo(v.updatedAt) },\n        SIZE: { value: (v) => formatBytes(v.maxSize) },\n        [\"ATTACHED SANDBOX\"]: { value: (v) => v.currentSandboxName ?? \"-\" },\n        [\"ATTACHED SESSION\"]: { value: (v) => v.currentSessionId ?? \"-\" },\n      },\n    }),\n  );\n}\n\nasync function getDriveByName({\n  token,\n  teamId,\n  projectId,\n  name,\n}: {\n  token: string;\n  teamId: string;\n  projectId: string;\n  name: string;\n}): Promise<Drive> {\n  const { drives } = await driveClient.list({\n    token,\n    teamId,\n    projectId,\n    namePrefix: name,\n    sortBy: \"name\",\n    sortOrder: \"asc\",\n    limit: 50,\n  });\n  const drive = drives.find((drive) => drive.name === name);\n\n  if (!drive) {\n    throw new Error(\n      [\n        `Drive ${name} was not found.`,\n        `${chalk.bold(\"hint:\")} Create it with: sandbox drives get-or-create ${name}`,\n      ].join(\"\\n\"),\n    );\n  }\n\n  return drive;\n}\n","import * as cmd from \"cmd-ts\";\nimport chalk from \"chalk\";\nimport {\n  readTelemetryConfig,\n  writeTelemetryConfig,\n  telemetry,\n} from \"../telemetry\";\n\nfunction printStatus(): void {\n  const enabled = telemetry.enabled;\n  const status = enabled ? chalk.green(\"Enabled\") : chalk.red(\"Disabled\");\n  process.stderr.write(`Telemetry status: ${status}\\n\\n`);\n  if (enabled) {\n    process.stderr.write(\n      \"The Vercel Sandbox CLI collects anonymous usage data to improve the product.\\n\" +\n        `Opt out with ${chalk.cyan(\"sandbox telemetry disable\")} or by setting ${chalk.cyan(\"VERCEL_SANDBOX_TELEMETRY_DISABLED=1\")}.\\n` +\n        `Inspect what is collected by setting ${chalk.cyan(\"VERCEL_TELEMETRY_DEBUG=1\")}; events are printed and not sent.\\n`,\n    );\n  } else {\n    process.stderr.write(\n      `Re-enable with ${chalk.cyan(\"sandbox telemetry enable\")}.\\n`,\n    );\n  }\n}\n\nconst statusCommand = cmd.command({\n  name: \"status\",\n  description: \"Show whether telemetry collection is enabled\",\n  args: {},\n  async handler() {\n    printStatus();\n  },\n});\n\nconst enableCommand = cmd.command({\n  name: \"enable\",\n  description: \"Enable telemetry collection\",\n  args: {},\n  async handler() {\n    writeTelemetryConfig(true);\n    printStatus();\n  },\n});\n\nconst disableCommand = cmd.command({\n  name: \"disable\",\n  description: \"Disable telemetry collection\",\n  args: {},\n  async handler() {\n    writeTelemetryConfig(false);\n    printStatus();\n  },\n});\n\nexport const telemetryCommand = cmd.subcommands({\n  name: \"telemetry\",\n  description: \"Manage telemetry collection status\",\n  cmds: {\n    status: statusCommand,\n    enable: enableCommand,\n    disable: disableCommand,\n  },\n});\n","import { subcommands } from \"cmd-ts\";\nimport { create } from \"./commands/create\";\nimport { sh } from \"./commands/sh\";\nimport { fork } from \"./commands/fork\";\nimport { run } from \"./commands/run\";\nimport { list } from \"./commands/list\";\nimport { exec } from \"./commands/exec\";\nimport { connect } from \"./commands/connect\";\nimport { stop } from \"./commands/stop\";\nimport { extend } from \"./commands/extend\";\nimport { remove } from \"./commands/remove\";\nimport { cp } from \"./commands/cp\";\nimport { login } from \"./commands/login\";\nimport { logout } from \"./commands/logout\";\nimport { version } from \"./pkg\";\nimport { snapshot } from \"./commands/snapshot\";\nimport { snapshots } from \"./commands/snapshots\";\nimport { sessions } from \"./commands/sessions\";\nimport { config } from \"./commands/config\";\nimport { drives } from \"./commands/drives\";\nimport { telemetryCommand } from \"./commands/telemetry\";\n\nexport const app = (opts?: { withoutAuth?: boolean; appName?: string }) => {\n  const appName = opts?.appName ?? \"sandbox\";\n  return subcommands({\n    name: appName,\n    description: \"Interfacing with Vercel Sandbox\",\n    version,\n    cmds: {\n      list,\n      create,\n      sh,\n      fork,\n      config,\n      copy: cp,\n      exec,\n      connect,\n      stop,\n      extend,\n      remove,\n      run,\n      snapshot,\n      snapshots,\n      sessions,\n      drives,\n      telemetry: telemetryCommand,\n      ...(!opts?.withoutAuth && {\n        login,\n        logout,\n      }),\n    },\n    examples: [\n      {\n        description: \"Start a coding agent in a sandbox\",\n        command: `${appName} create opencode`,\n      },\n      {\n        description:\n          \"Create a sandbox on a Secure Compute network (requires an Enterprise plan)\",\n        command: `${appName} create --network-id your_network_id_here`,\n      },\n      {\n        description: \"Create a sandbox and start a shell\",\n        command: `${appName} sh`,\n      },\n      {\n        description: \"Run a command in a new sandbox\",\n        command: `${appName} run -- node -e \"console.log('hello')\"`,\n      },\n      {\n        description: \"Execute command in an existing sandbox\",\n        command: `${appName} exec <name> -- npm test`,\n      },\n    ],\n  });\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,179,180,181,182,183,216,217,218,219,220],"mappings":";;;;;;;;;;;;;;;;;;;;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Y;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,cAAc;GACb,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,uBAAuB;GACtB,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,aAAa;GACZ,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,gBAAgB;GACf,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,kBAAkB;GACjB,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,aAAa;GACZ,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,cAAc;GACb,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACS;IACA;IACA;IACA;IACA;IACT;IACA;IACA;IACA;IACA;GACD;EACD,OAAO;GACN,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,iBAAiB;GAChB,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,kBAAkB;GACjB,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,gBAAgB;GACf,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU,CACT,KACA,IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,eAAe;GACd,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,gBAAgB;GACf,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU,CACT,OACA,MACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,UAAU;GACT,YAAY;GACZ,UAAU,CACT,OACA,MACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,QAAQ;GACP,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,aAAa;GACZ,YAAY;GACZ,UAAU,CACT,MACA,KACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;GACD;EACD,SAAS;GACR,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,eAAe;GACd,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,YAAY;GACX,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,gBAAgB;GACf,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,aAAa;GACZ,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,WAAW;GACV,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;GACD;EACD,eAAe;GACd,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;GACD;EACD,aAAa;GACZ,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;GACD;EACD,mBAAmB;GAClB,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,cAAc;GACb,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,aAAa;GACZ,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD,iBAAiB;GAChB,YAAY;GACZ,UAAU;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACD;;;;;;CCnlDD,MAAMG,aAAW,OAAO,OAAO,EAAE,qBAA6B;CAE9D,MAAM,eAAe,OAAO,KAAKA,WAAS;AAE1C,QAAO,eAAeA,YAAU,UAAU,EACzC,MAAM;AAGL,SAAOA,WADa,aADA,KAAK,MAAM,KAAK,QAAQ,GAAG,aAAa,OAAO;IAIpE,CAAC;AAEF,QAAO,UAAUA;;;;;ACZjB,SAAwBC,uBAAqB;AAC5C,KAAIC,UAAQ,aAAa,QACxB,QAAOA,UAAQ,IAAI,SAAS;AAG7B,QAAO,QAAQA,UAAQ,IAAI,GAAG,IAC1B,QAAQA,UAAQ,IAAI,WAAW,IAC/B,QAAQA,UAAQ,IAAI,iBAAiB,IACrCA,UAAQ,IAAI,eAAe,k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