@georgedong32/ccs 7.67.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/opsx/apply.md +152 -0
- package/.claude/commands/opsx/archive.md +157 -0
- package/.claude/commands/opsx/continue.md +114 -0
- package/.claude/commands/opsx/explore.md +173 -0
- package/.claude/commands/opsx/ff.md +97 -0
- package/.claude/commands/opsx/new.md +69 -0
- package/.claude/commands/opsx/propose.md +106 -0
- package/.claude/commands/opsx/sync.md +134 -0
- package/.claude/commands/opsx/verify.md +164 -0
- package/.claude/settings.local.json +47 -1
- package/README.md +49 -4
- package/config/base-claude.settings.json +1 -1
- package/config/base-codebuddy.settings.json +10 -0
- package/config/base-codex.settings.json +4 -4
- package/config/base-cursor.settings.json +10 -0
- package/config/base-gitlab.settings.json +10 -0
- package/config/base-kilo.settings.json +10 -0
- package/dist/api/services/cliproxy-profile-bridge.d.ts.map +1 -1
- package/dist/api/services/cliproxy-profile-bridge.js +9 -10
- package/dist/api/services/cliproxy-profile-bridge.js.map +1 -1
- package/dist/api/services/index.d.ts +1 -0
- package/dist/api/services/index.d.ts.map +1 -1
- package/dist/api/services/index.js +3 -1
- package/dist/api/services/index.js.map +1 -1
- package/dist/api/services/local-runtime-readiness.d.ts +14 -0
- package/dist/api/services/local-runtime-readiness.d.ts.map +1 -0
- package/dist/api/services/local-runtime-readiness.js +89 -0
- package/dist/api/services/local-runtime-readiness.js.map +1 -0
- package/dist/api/services/openrouter-catalog.js +2 -2
- package/dist/api/services/openrouter-catalog.js.map +1 -1
- package/dist/api/services/profile-lifecycle-service.d.ts.map +1 -1
- package/dist/api/services/profile-lifecycle-service.js +6 -6
- package/dist/api/services/profile-lifecycle-service.js.map +1 -1
- package/dist/api/services/profile-lifecycle-validation.js +1 -1
- package/dist/api/services/profile-lifecycle-validation.js.map +1 -1
- package/dist/api/services/profile-reader.d.ts.map +1 -1
- package/dist/api/services/profile-reader.js +14 -15
- package/dist/api/services/profile-reader.js.map +1 -1
- package/dist/api/services/profile-writer.d.ts +1 -1
- package/dist/api/services/profile-writer.d.ts.map +1 -1
- package/dist/api/services/profile-writer.js +25 -19
- package/dist/api/services/profile-writer.js.map +1 -1
- package/dist/auth/account-profile-diagnostics.d.ts +21 -0
- package/dist/auth/account-profile-diagnostics.d.ts.map +1 -0
- package/dist/auth/account-profile-diagnostics.js +130 -0
- package/dist/auth/account-profile-diagnostics.js.map +1 -0
- package/dist/auth/auth-commands.d.ts +2 -1
- package/dist/auth/auth-commands.d.ts.map +1 -1
- package/dist/auth/auth-commands.js +30 -12
- package/dist/auth/auth-commands.js.map +1 -1
- package/dist/auth/commands/backup-command.d.ts.map +1 -1
- package/dist/auth/commands/backup-command.js +7 -2
- package/dist/auth/commands/backup-command.js.map +1 -1
- package/dist/auth/commands/create-command-env.d.ts +1 -0
- package/dist/auth/commands/create-command-env.d.ts.map +1 -1
- package/dist/auth/commands/create-command.d.ts.map +1 -1
- package/dist/auth/commands/create-command.js +23 -19
- package/dist/auth/commands/create-command.js.map +1 -1
- package/dist/auth/commands/default-command.d.ts +1 -1
- package/dist/auth/commands/default-command.d.ts.map +1 -1
- package/dist/auth/commands/default-command.js +13 -5
- package/dist/auth/commands/default-command.js.map +1 -1
- package/dist/auth/commands/index.d.ts +1 -0
- package/dist/auth/commands/index.d.ts.map +1 -1
- package/dist/auth/commands/index.js +3 -1
- package/dist/auth/commands/index.js.map +1 -1
- package/dist/auth/commands/list-command.d.ts.map +1 -1
- package/dist/auth/commands/list-command.js +16 -3
- package/dist/auth/commands/list-command.js.map +1 -1
- package/dist/auth/commands/remove-command.d.ts.map +1 -1
- package/dist/auth/commands/remove-command.js +7 -3
- package/dist/auth/commands/remove-command.js.map +1 -1
- package/dist/auth/commands/resources-command.d.ts +3 -0
- package/dist/auth/commands/resources-command.d.ts.map +1 -0
- package/dist/auth/commands/resources-command.js +115 -0
- package/dist/auth/commands/resources-command.js.map +1 -0
- package/dist/auth/commands/show-command.d.ts.map +1 -1
- package/dist/auth/commands/show-command.js +54 -3
- package/dist/auth/commands/show-command.js.map +1 -1
- package/dist/auth/commands/types.d.ts +31 -1
- package/dist/auth/commands/types.d.ts.map +1 -1
- package/dist/auth/commands/types.js +41 -2
- package/dist/auth/commands/types.js.map +1 -1
- package/dist/auth/profile-continuity-inheritance.d.ts.map +1 -1
- package/dist/auth/profile-continuity-inheritance.js +6 -5
- package/dist/auth/profile-continuity-inheritance.js.map +1 -1
- package/dist/auth/profile-detector.d.ts +2 -3
- package/dist/auth/profile-detector.d.ts.map +1 -1
- package/dist/auth/profile-detector.js +25 -25
- package/dist/auth/profile-detector.js.map +1 -1
- package/dist/auth/profile-registry.d.ts +2 -0
- package/dist/auth/profile-registry.d.ts.map +1 -1
- package/dist/auth/profile-registry.js +29 -17
- package/dist/auth/profile-registry.js.map +1 -1
- package/dist/auth/resume-lane-diagnostics.d.ts.map +1 -1
- package/dist/auth/resume-lane-diagnostics.js +2 -2
- package/dist/auth/resume-lane-diagnostics.js.map +1 -1
- package/dist/auth/shared-resource-policy.d.ts +20 -0
- package/dist/auth/shared-resource-policy.d.ts.map +1 -0
- package/dist/auth/shared-resource-policy.js +69 -0
- package/dist/auth/shared-resource-policy.js.map +1 -0
- package/dist/bin/ccsxp-runtime.d.ts +9 -0
- package/dist/bin/ccsxp-runtime.d.ts.map +1 -1
- package/dist/bin/ccsxp-runtime.js +62 -3
- package/dist/bin/ccsxp-runtime.js.map +1 -1
- package/dist/ccs.js +65 -1024
- package/dist/ccs.js.map +1 -1
- package/dist/channels/official-channels-ids.d.ts +21 -0
- package/dist/channels/official-channels-ids.d.ts.map +1 -0
- package/dist/channels/official-channels-ids.js +46 -0
- package/dist/channels/official-channels-ids.js.map +1 -0
- package/dist/channels/official-channels-runtime.d.ts +3 -5
- package/dist/channels/official-channels-runtime.d.ts.map +1 -1
- package/dist/channels/official-channels-runtime.js +25 -29
- package/dist/channels/official-channels-runtime.js.map +1 -1
- package/dist/channels/official-channels-store.d.ts +1 -0
- package/dist/channels/official-channels-store.d.ts.map +1 -1
- package/dist/channels/official-channels-store.js +5 -6
- package/dist/channels/official-channels-store.js.map +1 -1
- package/dist/cliproxy/accounts/account-manager.d.ts +16 -0
- package/dist/cliproxy/accounts/account-manager.d.ts.map +1 -0
- package/dist/cliproxy/accounts/account-manager.js +51 -0
- package/dist/cliproxy/accounts/account-manager.js.map +1 -0
- package/dist/cliproxy/accounts/account-safety.d.ts +103 -0
- package/dist/cliproxy/accounts/account-safety.d.ts.map +1 -0
- package/dist/cliproxy/accounts/account-safety.js +614 -0
- package/dist/cliproxy/accounts/account-safety.js.map +1 -0
- package/dist/cliproxy/accounts/account-stats-key.d.ts.map +1 -0
- package/dist/cliproxy/accounts/account-stats-key.js.map +1 -0
- package/dist/cliproxy/accounts/email-account-identity.d.ts.map +1 -1
- package/dist/cliproxy/accounts/email-account-identity.js +22 -2
- package/dist/cliproxy/accounts/email-account-identity.js.map +1 -1
- package/dist/cliproxy/accounts/registry.js +1 -1
- package/dist/cliproxy/accounts/registry.js.map +1 -1
- package/dist/cliproxy/accounts/token-file-ops.js +1 -1
- package/dist/cliproxy/accounts/token-file-ops.js.map +1 -1
- package/dist/cliproxy/accounts/types.d.ts +1 -1
- package/dist/cliproxy/accounts/types.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.d.ts +38 -0
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js +131 -0
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js.map +1 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts +71 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js +565 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js.map +1 -0
- package/dist/cliproxy/ai-providers/config-store.js +3 -3
- package/dist/cliproxy/ai-providers/config-store.js.map +1 -1
- package/dist/cliproxy/ai-providers/managed-model-prefixes.d.ts +7 -0
- package/dist/cliproxy/ai-providers/managed-model-prefixes.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/managed-model-prefixes.js +116 -0
- package/dist/cliproxy/ai-providers/managed-model-prefixes.js.map +1 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts +108 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.js +293 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.js.map +1 -0
- package/dist/cliproxy/ai-providers/openai-compat-manager.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/openai-compat-manager.js +203 -0
- package/dist/cliproxy/ai-providers/openai-compat-manager.js.map +1 -0
- package/dist/cliproxy/ai-providers/schema-sanitizer.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/schema-sanitizer.js.map +1 -0
- package/dist/cliproxy/ai-providers/service.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/service.js +10 -3
- package/dist/cliproxy/ai-providers/service.js.map +1 -1
- package/dist/cliproxy/ai-providers/tool-name-mapper.d.ts +108 -0
- package/dist/cliproxy/ai-providers/tool-name-mapper.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/tool-name-mapper.js +163 -0
- package/dist/cliproxy/ai-providers/tool-name-mapper.js.map +1 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.d.ts +66 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.js +138 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.js.map +1 -0
- package/dist/cliproxy/auth/antigravity-responsibility.d.ts.map +1 -0
- package/dist/cliproxy/auth/antigravity-responsibility.js +171 -0
- package/dist/cliproxy/auth/antigravity-responsibility.js.map +1 -0
- package/dist/cliproxy/auth/auth-handler.d.ts +31 -0
- package/dist/cliproxy/auth/auth-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-handler.js +60 -0
- package/dist/cliproxy/auth/auth-handler.js.map +1 -0
- package/dist/cliproxy/auth/auth-session-manager.d.ts +51 -0
- package/dist/cliproxy/auth/auth-session-manager.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-session-manager.js +141 -0
- package/dist/cliproxy/auth/auth-session-manager.js.map +1 -0
- package/dist/cliproxy/auth/auth-token-manager.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-token-manager.js +184 -0
- package/dist/cliproxy/auth/auth-token-manager.js.map +1 -0
- package/dist/cliproxy/auth/auth-types.d.ts +40 -7
- package/dist/cliproxy/auth/auth-types.d.ts.map +1 -1
- package/dist/cliproxy/auth/auth-types.js +90 -10
- package/dist/cliproxy/auth/auth-types.js.map +1 -1
- package/dist/cliproxy/auth/auth-utils.d.ts +17 -0
- package/dist/cliproxy/auth/auth-utils.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-utils.js +58 -0
- package/dist/cliproxy/auth/auth-utils.js.map +1 -0
- package/dist/cliproxy/auth/device-code-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth/device-code-handler.js.map +1 -0
- package/dist/cliproxy/auth/gitlab-pat-response.d.ts +9 -0
- package/dist/cliproxy/auth/gitlab-pat-response.d.ts.map +1 -0
- package/dist/cliproxy/auth/gitlab-pat-response.js +64 -0
- package/dist/cliproxy/auth/gitlab-pat-response.js.map +1 -0
- package/dist/cliproxy/auth/kiro-import.js +2 -2
- package/dist/cliproxy/auth/kiro-import.js.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.d.ts +50 -4
- package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.js +443 -51
- package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
- package/dist/cliproxy/auth/oauth-process.d.ts +27 -2
- package/dist/cliproxy/auth/oauth-process.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-process.js +409 -53
- package/dist/cliproxy/auth/oauth-process.js.map +1 -1
- package/dist/cliproxy/auth/oauth-start-failure-guidance.d.ts +22 -0
- package/dist/cliproxy/auth/oauth-start-failure-guidance.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-start-failure-guidance.js +82 -0
- package/dist/cliproxy/auth/oauth-start-failure-guidance.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.d.ts +24 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.js +159 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/index.d.ts +4 -0
- package/dist/cliproxy/auth/oauth-trace/index.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/index.js +14 -0
- package/dist/cliproxy/auth/oauth-trace/index.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.d.ts +22 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.js +120 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.d.ts +18 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.js +90 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.d.ts +13 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.js +31 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.d.ts +11 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.js +47 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.d.ts +51 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.js +44 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.d.ts +34 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.js +83 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.js.map +1 -0
- package/dist/cliproxy/auth/project-selection-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth/project-selection-handler.js.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.d.ts +17 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.d.ts.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.js +55 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.js.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-types.d.ts +16 -0
- package/dist/cliproxy/auth/provider-entitlement-types.d.ts.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-types.js +3 -0
- package/dist/cliproxy/auth/provider-entitlement-types.js.map +1 -0
- package/dist/cliproxy/auth/provider-refreshers/index.d.ts +1 -2
- package/dist/cliproxy/auth/provider-refreshers/index.d.ts.map +1 -1
- package/dist/cliproxy/auth/provider-refreshers/index.js +7 -26
- package/dist/cliproxy/auth/provider-refreshers/index.js.map +1 -1
- package/dist/cliproxy/auth/token-expiry-checker.js +1 -1
- package/dist/cliproxy/auth/token-expiry-checker.js.map +1 -1
- package/dist/cliproxy/auth/token-manager.d.ts +11 -2
- package/dist/cliproxy/auth/token-manager.d.ts.map +1 -1
- package/dist/cliproxy/auth/token-manager.js +117 -68
- package/dist/cliproxy/auth/token-manager.js.map +1 -1
- package/dist/cliproxy/auth/token-refresh-config.d.ts.map +1 -1
- package/dist/cliproxy/auth/token-refresh-config.js +2 -2
- package/dist/cliproxy/auth/token-refresh-config.js.map +1 -1
- package/dist/cliproxy/binary/extractor.js +1 -1
- package/dist/cliproxy/binary/extractor.js.map +1 -1
- package/dist/cliproxy/binary/installer.d.ts +1 -1
- package/dist/cliproxy/binary/installer.d.ts.map +1 -1
- package/dist/cliproxy/binary/installer.js +1 -1
- package/dist/cliproxy/binary/installer.js.map +1 -1
- package/dist/cliproxy/binary/lifecycle.d.ts.map +1 -1
- package/dist/cliproxy/binary/lifecycle.js +18 -6
- package/dist/cliproxy/binary/lifecycle.js.map +1 -1
- package/dist/cliproxy/binary/platform-detector.d.ts +106 -0
- package/dist/cliproxy/binary/platform-detector.d.ts.map +1 -0
- package/dist/cliproxy/binary/platform-detector.js +191 -0
- package/dist/cliproxy/binary/platform-detector.js.map +1 -0
- package/dist/cliproxy/binary/tar-extractor.d.ts.map +1 -1
- package/dist/cliproxy/binary/tar-extractor.js +1 -1
- package/dist/cliproxy/binary/tar-extractor.js.map +1 -1
- package/dist/cliproxy/binary/types.d.ts +3 -3
- package/dist/cliproxy/binary/types.d.ts.map +1 -1
- package/dist/cliproxy/binary/types.js +3 -3
- package/dist/cliproxy/binary/types.js.map +1 -1
- package/dist/cliproxy/binary/version-cache.d.ts +10 -0
- package/dist/cliproxy/binary/version-cache.d.ts.map +1 -1
- package/dist/cliproxy/binary/version-cache.js +31 -9
- package/dist/cliproxy/binary/version-cache.js.map +1 -1
- package/dist/cliproxy/binary/version-checker.d.ts +14 -3
- package/dist/cliproxy/binary/version-checker.d.ts.map +1 -1
- package/dist/cliproxy/binary/version-checker.js +66 -37
- package/dist/cliproxy/binary/version-checker.js.map +1 -1
- package/dist/cliproxy/binary/zip-extractor.d.ts.map +1 -1
- package/dist/cliproxy/binary/zip-extractor.js +1 -1
- package/dist/cliproxy/binary/zip-extractor.js.map +1 -1
- package/dist/cliproxy/binary-manager.d.ts +22 -1
- package/dist/cliproxy/binary-manager.d.ts.map +1 -1
- package/dist/cliproxy/binary-manager.js +126 -19
- package/dist/cliproxy/binary-manager.js.map +1 -1
- package/dist/cliproxy/config/base-config-loader.d.ts +43 -0
- package/dist/cliproxy/config/base-config-loader.d.ts.map +1 -0
- package/dist/cliproxy/config/base-config-loader.js +123 -0
- package/dist/cliproxy/config/base-config-loader.js.map +1 -0
- package/dist/cliproxy/config/composite-validator.d.ts.map +1 -0
- package/dist/cliproxy/config/composite-validator.js +94 -0
- package/dist/cliproxy/config/composite-validator.js.map +1 -0
- package/dist/cliproxy/config/config-generator.d.ts +15 -0
- package/dist/cliproxy/config/config-generator.d.ts.map +1 -0
- package/dist/cliproxy/config/config-generator.js +32 -0
- package/dist/cliproxy/config/config-generator.js.map +1 -0
- package/dist/cliproxy/config/env-builder.d.ts +6 -0
- package/dist/cliproxy/config/env-builder.d.ts.map +1 -1
- package/dist/cliproxy/config/env-builder.js +60 -65
- package/dist/cliproxy/config/env-builder.js.map +1 -1
- package/dist/cliproxy/config/extended-context-config.d.ts +1 -0
- package/dist/cliproxy/config/extended-context-config.d.ts.map +1 -1
- package/dist/cliproxy/config/generator.d.ts +14 -3
- package/dist/cliproxy/config/generator.d.ts.map +1 -1
- package/dist/cliproxy/config/generator.js +96 -19
- package/dist/cliproxy/config/generator.js.map +1 -1
- package/dist/cliproxy/config/model-config.d.ts +31 -0
- package/dist/cliproxy/config/model-config.d.ts.map +1 -0
- package/dist/cliproxy/config/model-config.js +264 -0
- package/dist/cliproxy/config/model-config.js.map +1 -0
- package/dist/cliproxy/config/path-resolver.d.ts +21 -0
- package/dist/cliproxy/config/path-resolver.d.ts.map +1 -1
- package/dist/cliproxy/config/path-resolver.js +45 -5
- package/dist/cliproxy/config/path-resolver.js.map +1 -1
- package/dist/cliproxy/config/port-manager.d.ts +6 -0
- package/dist/cliproxy/config/port-manager.d.ts.map +1 -1
- package/dist/cliproxy/config/port-manager.js +19 -1
- package/dist/cliproxy/config/port-manager.js.map +1 -1
- package/dist/cliproxy/config/thinking-config.d.ts +1 -0
- package/dist/cliproxy/config/thinking-config.d.ts.map +1 -1
- package/dist/cliproxy/config/thinking-config.js +21 -12
- package/dist/cliproxy/config/thinking-config.js.map +1 -1
- package/dist/cliproxy/executor/account-resolution.d.ts +52 -0
- package/dist/cliproxy/executor/account-resolution.d.ts.map +1 -0
- package/dist/cliproxy/executor/account-resolution.js +154 -0
- package/dist/cliproxy/executor/account-resolution.js.map +1 -0
- package/dist/cliproxy/executor/arg-parser.d.ts +96 -0
- package/dist/cliproxy/executor/arg-parser.d.ts.map +1 -0
- package/dist/cliproxy/executor/arg-parser.js +529 -0
- package/dist/cliproxy/executor/arg-parser.js.map +1 -0
- package/dist/cliproxy/executor/auth-coordinator.d.ts +96 -0
- package/dist/cliproxy/executor/auth-coordinator.d.ts.map +1 -0
- package/dist/cliproxy/executor/auth-coordinator.js +342 -0
- package/dist/cliproxy/executor/auth-coordinator.js.map +1 -0
- package/dist/cliproxy/executor/browser-launch-setup.d.ts +36 -0
- package/dist/cliproxy/executor/browser-launch-setup.d.ts.map +1 -0
- package/dist/cliproxy/executor/browser-launch-setup.js +80 -0
- package/dist/cliproxy/executor/browser-launch-setup.js.map +1 -0
- package/dist/cliproxy/executor/claude-launcher.d.ts +55 -0
- package/dist/cliproxy/executor/claude-launcher.d.ts.map +1 -0
- package/dist/cliproxy/executor/claude-launcher.js +125 -0
- package/dist/cliproxy/executor/claude-launcher.js.map +1 -0
- package/dist/cliproxy/executor/cliproxy-executor.d.ts +16 -0
- package/dist/cliproxy/executor/cliproxy-executor.d.ts.map +1 -0
- package/dist/cliproxy/executor/cliproxy-executor.js +27 -0
- package/dist/cliproxy/executor/cliproxy-executor.js.map +1 -0
- package/dist/cliproxy/executor/env-resolver.d.ts +7 -5
- package/dist/cliproxy/executor/env-resolver.d.ts.map +1 -1
- package/dist/cliproxy/executor/env-resolver.js +7 -6
- package/dist/cliproxy/executor/env-resolver.js.map +1 -1
- package/dist/cliproxy/executor/https-tunnel-policy.d.ts +17 -0
- package/dist/cliproxy/executor/https-tunnel-policy.d.ts.map +1 -0
- package/dist/cliproxy/executor/https-tunnel-policy.js +20 -0
- package/dist/cliproxy/executor/https-tunnel-policy.js.map +1 -0
- package/dist/cliproxy/executor/index.d.ts +6 -0
- package/dist/cliproxy/executor/index.d.ts.map +1 -1
- package/dist/cliproxy/executor/index.js +144 -693
- package/dist/cliproxy/executor/index.js.map +1 -1
- package/dist/cliproxy/executor/lifecycle-manager.js +1 -1
- package/dist/cliproxy/executor/lifecycle-manager.js.map +1 -1
- package/dist/cliproxy/executor/model-warnings.d.ts +22 -0
- package/dist/cliproxy/executor/model-warnings.d.ts.map +1 -0
- package/dist/cliproxy/executor/model-warnings.js +67 -0
- package/dist/cliproxy/executor/model-warnings.js.map +1 -0
- package/dist/cliproxy/executor/proxy-chain-builder.d.ts +71 -0
- package/dist/cliproxy/executor/proxy-chain-builder.d.ts.map +1 -0
- package/dist/cliproxy/executor/proxy-chain-builder.js +143 -0
- package/dist/cliproxy/executor/proxy-chain-builder.js.map +1 -0
- package/dist/cliproxy/executor/proxy-resolver.d.ts +44 -0
- package/dist/cliproxy/executor/proxy-resolver.d.ts.map +1 -0
- package/dist/cliproxy/executor/proxy-resolver.js +173 -0
- package/dist/cliproxy/executor/proxy-resolver.js.map +1 -0
- package/dist/cliproxy/executor/retry-handler.js +4 -4
- package/dist/cliproxy/executor/retry-handler.js.map +1 -1
- package/dist/cliproxy/executor/session-bridge.d.ts +16 -1
- package/dist/cliproxy/executor/session-bridge.d.ts.map +1 -1
- package/dist/cliproxy/executor/session-bridge.js +92 -57
- package/dist/cliproxy/executor/session-bridge.js.map +1 -1
- package/dist/cliproxy/index.d.ts +32 -32
- package/dist/cliproxy/index.d.ts.map +1 -1
- package/dist/cliproxy/index.js +20 -20
- package/dist/cliproxy/index.js.map +1 -1
- package/dist/cliproxy/management/management-api-client.d.ts +90 -0
- package/dist/cliproxy/management/management-api-client.d.ts.map +1 -0
- package/dist/cliproxy/management/management-api-client.js +396 -0
- package/dist/cliproxy/management/management-api-client.js.map +1 -0
- package/dist/cliproxy/management/management-api-types.d.ts.map +1 -0
- package/dist/cliproxy/management/management-api-types.js.map +1 -0
- package/dist/cliproxy/management/remote-token-uploader.d.ts.map +1 -0
- package/dist/cliproxy/management/remote-token-uploader.js +178 -0
- package/dist/cliproxy/management/remote-token-uploader.js.map +1 -0
- package/dist/cliproxy/model-catalog.d.ts +3 -1
- package/dist/cliproxy/model-catalog.d.ts.map +1 -1
- package/dist/cliproxy/model-catalog.js +60 -59
- package/dist/cliproxy/model-catalog.js.map +1 -1
- package/dist/cliproxy/provider-capabilities.d.ts +3 -0
- package/dist/cliproxy/provider-capabilities.d.ts.map +1 -1
- package/dist/cliproxy/provider-capabilities.js +63 -3
- package/dist/cliproxy/provider-capabilities.js.map +1 -1
- package/dist/cliproxy/proxy/https-tunnel-proxy.d.ts.map +1 -0
- package/dist/cliproxy/proxy/https-tunnel-proxy.js +229 -0
- package/dist/cliproxy/proxy/https-tunnel-proxy.js.map +1 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.d.ts +87 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.d.ts.map +1 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.js +254 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.js.map +1 -0
- package/dist/cliproxy/proxy/proxy-detector.d.ts +72 -0
- package/dist/cliproxy/proxy/proxy-detector.d.ts.map +1 -0
- package/dist/cliproxy/proxy/proxy-detector.js +200 -0
- package/dist/cliproxy/proxy/proxy-detector.js.map +1 -0
- package/dist/cliproxy/proxy/proxy-target-resolver.d.ts.map +1 -0
- package/dist/cliproxy/proxy/proxy-target-resolver.js +108 -0
- package/dist/cliproxy/proxy/proxy-target-resolver.js.map +1 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts +82 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts.map +1 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js +668 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js.map +1 -0
- package/dist/cliproxy/quota/gemini-cli-quota-normalizer.d.ts.map +1 -0
- package/dist/cliproxy/quota/gemini-cli-quota-normalizer.js +122 -0
- package/dist/cliproxy/quota/gemini-cli-quota-normalizer.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.d.ts +14 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.js +322 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts +21 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.js +292 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts +84 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.js +651 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js +828 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-ghcp.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-ghcp.js +218 -0
- package/dist/cliproxy/quota/quota-fetcher-ghcp.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher.d.ts +117 -0
- package/dist/cliproxy/quota/quota-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher.js +771 -0
- package/dist/cliproxy/quota/quota-fetcher.js.map +1 -0
- package/dist/cliproxy/quota/quota-manager.d.ts +109 -0
- package/dist/cliproxy/quota/quota-manager.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-manager.js +672 -0
- package/dist/cliproxy/quota/quota-manager.js.map +1 -0
- package/dist/cliproxy/quota/quota-response-cache.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-response-cache.js.map +1 -0
- package/dist/cliproxy/quota/quota-types.d.ts +262 -0
- package/dist/cliproxy/quota/quota-types.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-types.js.map +1 -0
- package/dist/cliproxy/routing/routing-strategy-http.d.ts +8 -0
- package/dist/cliproxy/routing/routing-strategy-http.d.ts.map +1 -0
- package/dist/cliproxy/routing/routing-strategy-http.js +120 -0
- package/dist/cliproxy/routing/routing-strategy-http.js.map +1 -0
- package/dist/cliproxy/routing/routing-strategy.d.ts +41 -0
- package/dist/cliproxy/routing/routing-strategy.d.ts.map +1 -0
- package/dist/cliproxy/routing/routing-strategy.js +272 -0
- package/dist/cliproxy/routing/routing-strategy.js.map +1 -0
- package/dist/cliproxy/service-manager.d.ts +17 -1
- package/dist/cliproxy/service-manager.d.ts.map +1 -1
- package/dist/cliproxy/service-manager.js +19 -11
- package/dist/cliproxy/service-manager.js.map +1 -1
- package/dist/cliproxy/services/binary-service.d.ts.map +1 -1
- package/dist/cliproxy/services/binary-service.js +16 -9
- package/dist/cliproxy/services/binary-service.js.map +1 -1
- package/dist/cliproxy/services/catalog-cache.d.ts +47 -0
- package/dist/cliproxy/services/catalog-cache.d.ts.map +1 -0
- package/dist/cliproxy/services/catalog-cache.js +347 -0
- package/dist/cliproxy/services/catalog-cache.js.map +1 -0
- package/dist/cliproxy/services/catalog-routing.d.ts +12 -0
- package/dist/cliproxy/services/catalog-routing.d.ts.map +1 -0
- package/dist/cliproxy/services/catalog-routing.js +19 -0
- package/dist/cliproxy/services/catalog-routing.js.map +1 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.d.ts +4 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.d.ts.map +1 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.js +162 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.js.map +1 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.d.ts +1 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.d.ts.map +1 -1
- package/dist/cliproxy/services/proxy-lifecycle-service.js +6 -6
- package/dist/cliproxy/services/proxy-lifecycle-service.js.map +1 -1
- package/dist/cliproxy/services/remote-auth-fetcher.d.ts +30 -0
- package/dist/cliproxy/services/remote-auth-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/services/remote-auth-fetcher.js +177 -0
- package/dist/cliproxy/services/remote-auth-fetcher.js.map +1 -0
- package/dist/cliproxy/services/remote-proxy-client.d.ts.map +1 -0
- package/dist/cliproxy/services/remote-proxy-client.js +281 -0
- package/dist/cliproxy/services/remote-proxy-client.js.map +1 -0
- package/dist/cliproxy/services/startup-lock.d.ts.map +1 -0
- package/dist/cliproxy/services/startup-lock.js +220 -0
- package/dist/cliproxy/services/startup-lock.js.map +1 -0
- package/dist/cliproxy/services/stats-fetcher.d.ts +162 -0
- package/dist/cliproxy/services/stats-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/services/stats-fetcher.js +354 -0
- package/dist/cliproxy/services/stats-fetcher.js.map +1 -0
- package/dist/cliproxy/services/stats-transformer.d.ts.map +1 -0
- package/dist/cliproxy/services/stats-transformer.js +224 -0
- package/dist/cliproxy/services/stats-transformer.js.map +1 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.d.ts +12 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.d.ts.map +1 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.js +458 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.js.map +1 -0
- package/dist/cliproxy/services/variant-config-adapter.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-config-adapter.js +11 -11
- package/dist/cliproxy/services/variant-config-adapter.js.map +1 -1
- package/dist/cliproxy/services/variant-service.d.ts +2 -1
- package/dist/cliproxy/services/variant-service.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-service.js +21 -24
- package/dist/cliproxy/services/variant-service.js.map +1 -1
- package/dist/cliproxy/services/variant-settings.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-settings.js +53 -42
- package/dist/cliproxy/services/variant-settings.js.map +1 -1
- package/dist/cliproxy/session-tracker.js +2 -2
- package/dist/cliproxy/session-tracker.js.map +1 -1
- package/dist/cliproxy/sync/auto-sync-watcher.js +3 -4
- package/dist/cliproxy/sync/auto-sync-watcher.js.map +1 -1
- package/dist/cliproxy/sync/local-config-sync.js +1 -1
- package/dist/cliproxy/sync/local-config-sync.js.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.d.ts +1 -1
- package/dist/cliproxy/sync/profile-mapper.d.ts.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.js +23 -2
- package/dist/cliproxy/sync/profile-mapper.js.map +1 -1
- package/dist/cliproxy/thinking-validator.d.ts +6 -1
- package/dist/cliproxy/thinking-validator.d.ts.map +1 -1
- package/dist/cliproxy/thinking-validator.js +22 -2
- package/dist/cliproxy/thinking-validator.js.map +1 -1
- package/dist/cliproxy/types/binary-types.d.ts +48 -0
- package/dist/cliproxy/types/binary-types.d.ts.map +1 -0
- package/dist/cliproxy/types/binary-types.js +6 -0
- package/dist/cliproxy/types/binary-types.js.map +1 -0
- package/dist/cliproxy/types/config-types.d.ts +89 -0
- package/dist/cliproxy/types/config-types.d.ts.map +1 -0
- package/dist/cliproxy/types/config-types.js +6 -0
- package/dist/cliproxy/types/config-types.js.map +1 -0
- package/dist/cliproxy/types/index.d.ts +5 -0
- package/dist/cliproxy/types/index.d.ts.map +1 -0
- package/dist/cliproxy/types/index.js +21 -0
- package/dist/cliproxy/types/index.js.map +1 -0
- package/dist/cliproxy/types/platform-types.d.ts +17 -0
- package/dist/cliproxy/types/platform-types.d.ts.map +1 -0
- package/dist/cliproxy/types/platform-types.js +6 -0
- package/dist/cliproxy/types/platform-types.js.map +1 -0
- package/dist/cliproxy/types/provider-types.d.ts +27 -0
- package/dist/cliproxy/types/provider-types.d.ts.map +1 -0
- package/dist/cliproxy/types/provider-types.js +16 -0
- package/dist/cliproxy/types/provider-types.js.map +1 -0
- package/dist/cliproxy/types.d.ts +4 -255
- package/dist/cliproxy/types.d.ts.map +1 -1
- package/dist/cliproxy/types.js +18 -7
- package/dist/cliproxy/types.js.map +1 -1
- package/dist/commands/api-command/create-command.d.ts +3 -0
- package/dist/commands/api-command/create-command.d.ts.map +1 -1
- package/dist/commands/api-command/create-command.js +24 -7
- package/dist/commands/api-command/create-command.js.map +1 -1
- package/dist/commands/api-command/help.d.ts.map +1 -1
- package/dist/commands/api-command/help.js +5 -0
- package/dist/commands/api-command/help.js.map +1 -1
- package/dist/commands/api-command/shared.d.ts +2 -1
- package/dist/commands/api-command/shared.d.ts.map +1 -1
- package/dist/commands/api-command/shared.js +9 -0
- package/dist/commands/api-command/shared.js.map +1 -1
- package/dist/commands/browser-command.d.ts +5 -0
- package/dist/commands/browser-command.d.ts.map +1 -0
- package/dist/commands/browser-command.js +349 -0
- package/dist/commands/browser-command.js.map +1 -0
- package/dist/commands/cleanup-command.d.ts +1 -1
- package/dist/commands/cleanup-command.d.ts.map +1 -1
- package/dist/commands/cleanup-command.js +58 -35
- package/dist/commands/cleanup-command.js.map +1 -1
- package/dist/commands/cliproxy/auth-subcommand.js +1 -1
- package/dist/commands/cliproxy/auth-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/catalog-subcommand.d.ts +6 -0
- package/dist/commands/cliproxy/catalog-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/catalog-subcommand.js +112 -46
- package/dist/commands/cliproxy/catalog-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.js +15 -4
- package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/index.d.ts.map +1 -1
- package/dist/commands/cliproxy/index.js +35 -7
- package/dist/commands/cliproxy/index.js.map +1 -1
- package/dist/commands/cliproxy/install-subcommand.js +2 -2
- package/dist/commands/cliproxy/install-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/proxy-lifecycle-subcommand.js +6 -6
- package/dist/commands/cliproxy/proxy-lifecycle-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand.d.ts +3 -1
- package/dist/commands/cliproxy/quota-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand.js +95 -32
- package/dist/commands/cliproxy/quota-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/routing-subcommand.d.ts +7 -0
- package/dist/commands/cliproxy/routing-subcommand.d.ts.map +1 -0
- package/dist/commands/cliproxy/routing-subcommand.js +193 -0
- package/dist/commands/cliproxy/routing-subcommand.js.map +1 -0
- package/dist/commands/cliproxy/variant-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/variant-subcommand.js +86 -13
- package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
- package/dist/commands/command-catalog.d.ts +6 -5
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +45 -8
- package/dist/commands/command-catalog.js.map +1 -1
- package/dist/commands/completion-backend.d.ts.map +1 -1
- package/dist/commands/completion-backend.js +62 -1
- package/dist/commands/completion-backend.js.map +1 -1
- package/dist/commands/config-auth/disable-command.d.ts.map +1 -1
- package/dist/commands/config-auth/disable-command.js +3 -3
- package/dist/commands/config-auth/disable-command.js.map +1 -1
- package/dist/commands/config-auth/setup-command.d.ts.map +1 -1
- package/dist/commands/config-auth/setup-command.js +2 -2
- package/dist/commands/config-auth/setup-command.js.map +1 -1
- package/dist/commands/config-auth/show-command.js +2 -2
- package/dist/commands/config-auth/show-command.js.map +1 -1
- package/dist/commands/config-channels-command.d.ts.map +1 -1
- package/dist/commands/config-channels-command.js +4 -4
- package/dist/commands/config-channels-command.js.map +1 -1
- package/dist/commands/config-command-options.d.ts.map +1 -1
- package/dist/commands/config-command-options.js +4 -2
- package/dist/commands/config-command-options.js.map +1 -1
- package/dist/commands/config-command.d.ts +1 -1
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/config-command.js +28 -5
- package/dist/commands/config-command.js.map +1 -1
- package/dist/commands/config-dashboard-host.d.ts +1 -0
- package/dist/commands/config-dashboard-host.d.ts.map +1 -1
- package/dist/commands/config-dashboard-host.js +16 -3
- package/dist/commands/config-dashboard-host.js.map +1 -1
- package/dist/commands/config-image-analysis-command.d.ts.map +1 -1
- package/dist/commands/config-image-analysis-command.js +4 -4
- package/dist/commands/config-image-analysis-command.js.map +1 -1
- package/dist/commands/config-thinking-command.d.ts.map +1 -1
- package/dist/commands/config-thinking-command.js +5 -5
- package/dist/commands/config-thinking-command.js.map +1 -1
- package/dist/commands/copilot-command.d.ts.map +1 -1
- package/dist/commands/copilot-command.js +7 -5
- package/dist/commands/copilot-command.js.map +1 -1
- package/dist/commands/cursor-command-display.d.ts +2 -0
- package/dist/commands/cursor-command-display.d.ts.map +1 -1
- package/dist/commands/cursor-command-display.js +63 -30
- package/dist/commands/cursor-command-display.js.map +1 -1
- package/dist/commands/cursor-command.d.ts.map +1 -1
- package/dist/commands/cursor-command.js +67 -61
- package/dist/commands/cursor-command.js.map +1 -1
- package/dist/commands/docker/up-subcommand.js +1 -1
- package/dist/commands/docker/up-subcommand.js.map +1 -1
- package/dist/commands/doctor-command.d.ts.map +1 -1
- package/dist/commands/doctor-command.js +9 -0
- package/dist/commands/doctor-command.js.map +1 -1
- package/dist/commands/env-command.d.ts.map +1 -1
- package/dist/commands/env-command.js +2 -2
- package/dist/commands/env-command.js.map +1 -1
- package/dist/commands/help-command.d.ts +2 -0
- package/dist/commands/help-command.d.ts.map +1 -1
- package/dist/commands/help-command.js +126 -5
- package/dist/commands/help-command.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/migrate-command.d.ts.map +1 -1
- package/dist/commands/migrate-command.js +2 -2
- package/dist/commands/migrate-command.js.map +1 -1
- package/dist/commands/proxy-command.d.ts +3 -0
- package/dist/commands/proxy-command.d.ts.map +1 -0
- package/dist/commands/proxy-command.js +237 -0
- package/dist/commands/proxy-command.js.map +1 -0
- package/dist/commands/root-command-router.d.ts.map +1 -1
- package/dist/commands/root-command-router.js +14 -0
- package/dist/commands/root-command-router.js.map +1 -1
- package/dist/commands/setup-command.d.ts.map +1 -1
- package/dist/commands/setup-command.js +6 -7
- package/dist/commands/setup-command.js.map +1 -1
- package/dist/commands/sync-command.d.ts.map +1 -1
- package/dist/commands/sync-command.js +3 -2
- package/dist/commands/sync-command.js.map +1 -1
- package/dist/commands/tokens-command.d.ts.map +1 -1
- package/dist/commands/tokens-command.js +27 -38
- package/dist/commands/tokens-command.js.map +1 -1
- package/dist/commands/update-command.d.ts +22 -5
- package/dist/commands/update-command.d.ts.map +1 -1
- package/dist/commands/update-command.js +211 -159
- package/dist/commands/update-command.js.map +1 -1
- package/dist/commands/version-command.d.ts.map +1 -1
- package/dist/commands/version-command.js +2 -1
- package/dist/commands/version-command.js.map +1 -1
- package/dist/config/config-loader-facade.d.ts +57 -0
- package/dist/config/config-loader-facade.d.ts.map +1 -0
- package/dist/config/config-loader-facade.js +131 -0
- package/dist/config/config-loader-facade.js.map +1 -0
- package/dist/config/loader/config-getters.d.ts +121 -0
- package/dist/config/loader/config-getters.d.ts.map +1 -0
- package/dist/config/loader/config-getters.js +260 -0
- package/dist/config/loader/config-getters.js.map +1 -0
- package/dist/config/loader/defaults-merger.d.ts +21 -0
- package/dist/config/loader/defaults-merger.d.ts.map +1 -0
- package/dist/config/loader/defaults-merger.js +278 -0
- package/dist/config/loader/defaults-merger.js.map +1 -0
- package/dist/config/loader/io-locks.d.ts +76 -0
- package/dist/config/loader/io-locks.d.ts.map +1 -0
- package/dist/config/loader/io-locks.js +297 -0
- package/dist/config/loader/io-locks.js.map +1 -0
- package/dist/config/loader/normalizers.d.ts +40 -0
- package/dist/config/loader/normalizers.d.ts.map +1 -0
- package/dist/config/loader/normalizers.js +172 -0
- package/dist/config/loader/normalizers.js.map +1 -0
- package/dist/config/loader/yaml-serializer.d.ts +19 -0
- package/dist/config/loader/yaml-serializer.d.ts.map +1 -0
- package/dist/config/loader/yaml-serializer.js +301 -0
- package/dist/config/loader/yaml-serializer.js.map +1 -0
- package/dist/config/migration-manager.d.ts.map +1 -1
- package/dist/config/migration-manager.js +14 -1
- package/dist/config/migration-manager.js.map +1 -1
- package/dist/config/reserved-names.d.ts +1 -1
- package/dist/config/reserved-names.d.ts.map +1 -1
- package/dist/config/reserved-names.js +10 -0
- package/dist/config/reserved-names.js.map +1 -1
- package/dist/config/schemas/auth.d.ts +99 -0
- package/dist/config/schemas/auth.d.ts.map +1 -0
- package/dist/config/schemas/auth.js +25 -0
- package/dist/config/schemas/auth.js.map +1 -0
- package/dist/config/schemas/browser.d.ts +53 -0
- package/dist/config/schemas/browser.d.ts.map +1 -0
- package/dist/config/schemas/browser.js +27 -0
- package/dist/config/schemas/browser.js.map +1 -0
- package/dist/config/schemas/channels.d.ts +27 -0
- package/dist/config/schemas/channels.d.ts.map +1 -0
- package/dist/config/schemas/channels.js +19 -0
- package/dist/config/schemas/channels.js.map +1 -0
- package/dist/config/schemas/cliproxy.d.ts +142 -0
- package/dist/config/schemas/cliproxy.d.ts.map +1 -0
- package/dist/config/schemas/cliproxy.js +18 -0
- package/dist/config/schemas/cliproxy.js.map +1 -0
- package/dist/config/schemas/copilot-cursor.d.ts +75 -0
- package/dist/config/schemas/copilot-cursor.d.ts.map +1 -0
- package/dist/config/schemas/copilot-cursor.js +36 -0
- package/dist/config/schemas/copilot-cursor.js.map +1 -0
- package/dist/config/schemas/index.d.ts +28 -0
- package/dist/config/schemas/index.d.ts.map +1 -0
- package/dist/config/schemas/index.js +51 -0
- package/dist/config/schemas/index.js.map +1 -0
- package/dist/config/schemas/logging.d.ts +43 -0
- package/dist/config/schemas/logging.d.ts.map +1 -0
- package/dist/config/schemas/logging.js +23 -0
- package/dist/config/schemas/logging.js.map +1 -0
- package/dist/config/schemas/providers.d.ts +14 -0
- package/dist/config/schemas/providers.d.ts.map +1 -0
- package/dist/config/schemas/providers.js +21 -0
- package/dist/config/schemas/providers.js.map +1 -0
- package/dist/config/schemas/proxy-server.d.ts +141 -0
- package/dist/config/schemas/proxy-server.d.ts.map +1 -0
- package/dist/config/schemas/proxy-server.js +71 -0
- package/dist/config/schemas/proxy-server.js.map +1 -0
- package/dist/config/schemas/quota.d.ts +88 -0
- package/dist/config/schemas/quota.d.ts.map +1 -0
- package/dist/config/schemas/quota.js +47 -0
- package/dist/config/schemas/quota.js.map +1 -0
- package/dist/config/schemas/thinking.d.ts +50 -0
- package/dist/config/schemas/thinking.d.ts.map +1 -0
- package/dist/config/schemas/thinking.js +26 -0
- package/dist/config/schemas/thinking.js.map +1 -0
- package/dist/config/schemas/unified-config.d.ts +74 -0
- package/dist/config/schemas/unified-config.d.ts.map +1 -0
- package/dist/config/schemas/unified-config.js +131 -0
- package/dist/config/schemas/unified-config.js.map +1 -0
- package/dist/config/schemas/version.d.ts +23 -0
- package/dist/config/schemas/version.d.ts.map +1 -0
- package/dist/config/schemas/version.js +26 -0
- package/dist/config/schemas/version.js.map +1 -0
- package/dist/config/schemas/websearch.d.ts +138 -0
- package/dist/config/schemas/websearch.d.ts.map +1 -0
- package/dist/config/schemas/websearch.js +12 -0
- package/dist/config/schemas/websearch.js.map +1 -0
- package/dist/config/unified-config-loader.d.ts +21 -113
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +104 -935
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +3 -723
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +19 -268
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/copilot/copilot-auth.d.ts.map +1 -1
- package/dist/copilot/copilot-auth.js +22 -0
- package/dist/copilot/copilot-auth.js.map +1 -1
- package/dist/copilot/copilot-daemon.d.ts.map +1 -1
- package/dist/copilot/copilot-daemon.js +28 -2
- package/dist/copilot/copilot-daemon.js.map +1 -1
- package/dist/copilot/copilot-executor.d.ts +1 -1
- package/dist/copilot/copilot-executor.d.ts.map +1 -1
- package/dist/copilot/copilot-executor.js +31 -12
- package/dist/copilot/copilot-executor.js.map +1 -1
- package/dist/copilot/copilot-package-manager.js +2 -2
- package/dist/copilot/copilot-package-manager.js.map +1 -1
- package/dist/cursor/constants.d.ts +4 -1
- package/dist/cursor/constants.d.ts.map +1 -1
- package/dist/cursor/constants.js +27 -1
- package/dist/cursor/constants.js.map +1 -1
- package/dist/cursor/cursor-anthropic-response.d.ts +1 -5
- package/dist/cursor/cursor-anthropic-response.d.ts.map +1 -1
- package/dist/cursor/cursor-anthropic-response.js +3 -186
- package/dist/cursor/cursor-anthropic-response.js.map +1 -1
- package/dist/cursor/cursor-anthropic-translator.d.ts.map +1 -1
- package/dist/cursor/cursor-anthropic-translator.js +17 -3
- package/dist/cursor/cursor-anthropic-translator.js.map +1 -1
- package/dist/cursor/cursor-anthropic-types.d.ts +3 -0
- package/dist/cursor/cursor-anthropic-types.d.ts.map +1 -1
- package/dist/cursor/cursor-auth.d.ts +1 -0
- package/dist/cursor/cursor-auth.d.ts.map +1 -1
- package/dist/cursor/cursor-auth.js +156 -34
- package/dist/cursor/cursor-auth.js.map +1 -1
- package/dist/cursor/cursor-daemon-entry.js +2 -2
- package/dist/cursor/cursor-daemon-entry.js.map +1 -1
- package/dist/cursor/cursor-daemon-pid.js +2 -2
- package/dist/cursor/cursor-daemon-pid.js.map +1 -1
- package/dist/cursor/cursor-daemon.d.ts.map +1 -1
- package/dist/cursor/cursor-daemon.js +28 -1
- package/dist/cursor/cursor-daemon.js.map +1 -1
- package/dist/cursor/cursor-default-models.d.ts +1 -1
- package/dist/cursor/cursor-default-models.d.ts.map +1 -1
- package/dist/cursor/cursor-default-models.js +11 -1
- package/dist/cursor/cursor-default-models.js.map +1 -1
- package/dist/cursor/cursor-executor.d.ts +2 -1
- package/dist/cursor/cursor-executor.d.ts.map +1 -1
- package/dist/cursor/cursor-executor.js +312 -161
- package/dist/cursor/cursor-executor.js.map +1 -1
- package/dist/cursor/cursor-models.d.ts.map +1 -1
- package/dist/cursor/cursor-models.js +26 -4
- package/dist/cursor/cursor-models.js.map +1 -1
- package/dist/cursor/cursor-profile-executor.d.ts +10 -1
- package/dist/cursor/cursor-profile-executor.d.ts.map +1 -1
- package/dist/cursor/cursor-profile-executor.js +14 -10
- package/dist/cursor/cursor-profile-executor.js.map +1 -1
- package/dist/cursor/cursor-protobuf-decoder.d.ts.map +1 -1
- package/dist/cursor/cursor-protobuf-decoder.js +1 -3
- package/dist/cursor/cursor-protobuf-decoder.js.map +1 -1
- package/dist/cursor/cursor-protobuf-schema.d.ts +12 -3
- package/dist/cursor/cursor-protobuf-schema.d.ts.map +1 -1
- package/dist/cursor/cursor-protobuf-schema.js +23 -5
- package/dist/cursor/cursor-protobuf-schema.js.map +1 -1
- package/dist/cursor/cursor-protobuf.d.ts +1 -1
- package/dist/cursor/cursor-protobuf.d.ts.map +1 -1
- package/dist/cursor/cursor-protobuf.js +2 -4
- package/dist/cursor/cursor-protobuf.js.map +1 -1
- package/dist/cursor/cursor-runtime-probe.d.ts +12 -0
- package/dist/cursor/cursor-runtime-probe.d.ts.map +1 -0
- package/dist/cursor/cursor-runtime-probe.js +220 -0
- package/dist/cursor/cursor-runtime-probe.js.map +1 -0
- package/dist/cursor/cursor-stream-parser.d.ts +10 -0
- package/dist/cursor/cursor-stream-parser.d.ts.map +1 -1
- package/dist/cursor/cursor-stream-parser.js +106 -10
- package/dist/cursor/cursor-stream-parser.js.map +1 -1
- package/dist/cursor/index.d.ts +1 -0
- package/dist/cursor/index.d.ts.map +1 -1
- package/dist/cursor/index.js +3 -1
- package/dist/cursor/index.js.map +1 -1
- package/dist/cursor/types.d.ts +6 -0
- package/dist/cursor/types.d.ts.map +1 -1
- package/dist/delegation/delegation-handler.d.ts.map +1 -1
- package/dist/delegation/delegation-handler.js +113 -36
- package/dist/delegation/delegation-handler.js.map +1 -1
- package/dist/delegation/headless-executor.d.ts.map +1 -1
- package/dist/delegation/headless-executor.js +67 -22
- package/dist/delegation/headless-executor.js.map +1 -1
- package/dist/delegation/session-manager.js +2 -2
- package/dist/delegation/session-manager.js.map +1 -1
- package/dist/dispatcher/cli-argument-parser.d.ts +70 -0
- package/dist/dispatcher/cli-argument-parser.d.ts.map +1 -0
- package/dist/dispatcher/cli-argument-parser.js +285 -0
- package/dist/dispatcher/cli-argument-parser.js.map +1 -0
- package/dist/dispatcher/dispatcher-context.d.ts +24 -0
- package/dist/dispatcher/dispatcher-context.d.ts.map +1 -0
- package/dist/dispatcher/dispatcher-context.js +11 -0
- package/dist/dispatcher/dispatcher-context.js.map +1 -0
- package/dist/dispatcher/environment-builder.d.ts +20 -0
- package/dist/dispatcher/environment-builder.d.ts.map +1 -0
- package/dist/dispatcher/environment-builder.js +95 -0
- package/dist/dispatcher/environment-builder.js.map +1 -0
- package/dist/dispatcher/flows/account-flow.d.ts +9 -0
- package/dist/dispatcher/flows/account-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/account-flow.js +50 -0
- package/dist/dispatcher/flows/account-flow.js.map +1 -0
- package/dist/dispatcher/flows/cliproxy-flow.d.ts +8 -0
- package/dist/dispatcher/flows/cliproxy-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/cliproxy-flow.js +165 -0
- package/dist/dispatcher/flows/cliproxy-flow.js.map +1 -0
- package/dist/dispatcher/flows/copilot-flow.d.ts +8 -0
- package/dist/dispatcher/flows/copilot-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/copilot-flow.js +72 -0
- package/dist/dispatcher/flows/copilot-flow.js.map +1 -0
- package/dist/dispatcher/flows/cursor-flow.d.ts +8 -0
- package/dist/dispatcher/flows/cursor-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/cursor-flow.js +62 -0
- package/dist/dispatcher/flows/cursor-flow.js.map +1 -0
- package/dist/dispatcher/flows/default-flow.d.ts +10 -0
- package/dist/dispatcher/flows/default-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/default-flow.js +99 -0
- package/dist/dispatcher/flows/default-flow.js.map +1 -0
- package/dist/dispatcher/flows/settings-flow.d.ts +9 -0
- package/dist/dispatcher/flows/settings-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/settings-flow.js +329 -0
- package/dist/dispatcher/flows/settings-flow.js.map +1 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.d.ts +28 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.d.ts.map +1 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.js +81 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.js.map +1 -0
- package/dist/dispatcher/pre-dispatch.d.ts +23 -0
- package/dist/dispatcher/pre-dispatch.d.ts.map +1 -0
- package/dist/dispatcher/pre-dispatch.js +156 -0
- package/dist/dispatcher/pre-dispatch.js.map +1 -0
- package/dist/dispatcher/profile-resolver.d.ts +65 -0
- package/dist/dispatcher/profile-resolver.d.ts.map +1 -0
- package/dist/dispatcher/profile-resolver.js +303 -0
- package/dist/dispatcher/profile-resolver.js.map +1 -0
- package/dist/dispatcher/target-executor.d.ts +26 -0
- package/dist/dispatcher/target-executor.d.ts.map +1 -0
- package/dist/dispatcher/target-executor.js +81 -0
- package/dist/dispatcher/target-executor.js.map +1 -0
- package/dist/docker/docker-assets.d.ts.map +1 -1
- package/dist/docker/docker-assets.js +2 -2
- package/dist/docker/docker-assets.js.map +1 -1
- package/dist/docker/docker-bootstrap.js +1 -1
- package/dist/docker/docker-bootstrap.js.map +1 -1
- package/dist/docker/docker-executor.d.ts +1 -0
- package/dist/docker/docker-executor.d.ts.map +1 -1
- package/dist/docker/supervisord-lifecycle.d.ts +17 -0
- package/dist/docker/supervisord-lifecycle.d.ts.map +1 -0
- package/dist/docker/supervisord-lifecycle.js +58 -0
- package/dist/docker/supervisord-lifecycle.js.map +1 -0
- package/dist/errors/error-handler.d.ts.map +1 -1
- package/dist/errors/error-handler.js +13 -0
- package/dist/errors/error-handler.js.map +1 -1
- package/dist/errors/error-types.d.ts +9 -0
- package/dist/errors/error-types.d.ts.map +1 -1
- package/dist/errors/error-types.js +15 -1
- package/dist/errors/error-types.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +3 -1
- package/dist/errors/index.js.map +1 -1
- package/dist/glmt/delta-accumulator.d.ts +4 -0
- package/dist/glmt/delta-accumulator.d.ts.map +1 -1
- package/dist/glmt/delta-accumulator.js +17 -5
- package/dist/glmt/delta-accumulator.js.map +1 -1
- package/dist/glmt/glmt-proxy.d.ts.map +1 -1
- package/dist/glmt/glmt-proxy.js +7 -0
- package/dist/glmt/glmt-proxy.js.map +1 -1
- package/dist/glmt/glmt-transformer.d.ts +1 -0
- package/dist/glmt/glmt-transformer.d.ts.map +1 -1
- package/dist/glmt/glmt-transformer.js +9 -2
- package/dist/glmt/glmt-transformer.js.map +1 -1
- package/dist/glmt/pipeline/stream-parser.d.ts +0 -3
- package/dist/glmt/pipeline/stream-parser.d.ts.map +1 -1
- package/dist/glmt/pipeline/stream-parser.js +20 -27
- package/dist/glmt/pipeline/stream-parser.js.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.d.ts +0 -7
- package/dist/glmt/pipeline/tool-call-handler.d.ts.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.js +15 -24
- package/dist/glmt/pipeline/tool-call-handler.js.map +1 -1
- package/dist/glmt/sse-parser.d.ts.map +1 -1
- package/dist/glmt/sse-parser.js +46 -41
- package/dist/glmt/sse-parser.js.map +1 -1
- package/dist/management/checks/config-check.d.ts.map +1 -1
- package/dist/management/checks/config-check.js +2 -2
- package/dist/management/checks/config-check.js.map +1 -1
- package/dist/management/checks/env-check.d.ts.map +1 -1
- package/dist/management/checks/env-check.js +2 -1
- package/dist/management/checks/env-check.js.map +1 -1
- package/dist/management/checks/image-analysis-check.d.ts.map +1 -1
- package/dist/management/checks/image-analysis-check.js +25 -7
- package/dist/management/checks/image-analysis-check.js.map +1 -1
- package/dist/management/checks/profile-check.d.ts.map +1 -1
- package/dist/management/checks/profile-check.js +6 -7
- package/dist/management/checks/profile-check.js.map +1 -1
- package/dist/management/checks/symlink-check.d.ts.map +1 -1
- package/dist/management/checks/symlink-check.js +4 -5
- package/dist/management/checks/symlink-check.js.map +1 -1
- package/dist/management/checks/system-check.d.ts.map +1 -1
- package/dist/management/checks/system-check.js +3 -3
- package/dist/management/checks/system-check.js.map +1 -1
- package/dist/management/instance-directory.d.ts +4 -0
- package/dist/management/instance-directory.d.ts.map +1 -0
- package/dist/management/instance-directory.js +54 -0
- package/dist/management/instance-directory.js.map +1 -0
- package/dist/management/instance-manager.d.ts.map +1 -1
- package/dist/management/instance-manager.js +18 -13
- package/dist/management/instance-manager.js.map +1 -1
- package/dist/management/plugin-path-normalizer.d.ts +7 -0
- package/dist/management/plugin-path-normalizer.d.ts.map +1 -0
- package/dist/management/plugin-path-normalizer.js +82 -0
- package/dist/management/plugin-path-normalizer.js.map +1 -0
- package/dist/management/recovery-manager.d.ts +6 -0
- package/dist/management/recovery-manager.d.ts.map +1 -1
- package/dist/management/recovery-manager.js +77 -7
- package/dist/management/recovery-manager.js.map +1 -1
- package/dist/management/repair/auto-repair.d.ts.map +1 -1
- package/dist/management/repair/auto-repair.js +2 -2
- package/dist/management/repair/auto-repair.js.map +1 -1
- package/dist/management/shared-manager.d.ts +3 -2
- package/dist/management/shared-manager.d.ts.map +1 -1
- package/dist/management/shared-manager.js +41 -84
- package/dist/management/shared-manager.js.map +1 -1
- package/dist/proxy/index.d.ts +9 -0
- package/dist/proxy/index.d.ts.map +1 -0
- package/dist/proxy/index.js +25 -0
- package/dist/proxy/index.js.map +1 -0
- package/dist/proxy/profile-router.d.ts +28 -0
- package/dist/proxy/profile-router.d.ts.map +1 -0
- package/dist/proxy/profile-router.js +43 -0
- package/dist/proxy/profile-router.js.map +1 -0
- package/dist/proxy/proxy-daemon-entry.d.ts +2 -0
- package/dist/proxy/proxy-daemon-entry.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon-entry.js +112 -0
- package/dist/proxy/proxy-daemon-entry.js.map +1 -0
- package/dist/proxy/proxy-daemon-paths.d.ts +12 -0
- package/dist/proxy/proxy-daemon-paths.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon-paths.js +58 -0
- package/dist/proxy/proxy-daemon-paths.js.map +1 -0
- package/dist/proxy/proxy-daemon-state.d.ts +25 -0
- package/dist/proxy/proxy-daemon-state.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon-state.js +199 -0
- package/dist/proxy/proxy-daemon-state.js.map +1 -0
- package/dist/proxy/proxy-daemon.d.ts +27 -0
- package/dist/proxy/proxy-daemon.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon.js +614 -0
- package/dist/proxy/proxy-daemon.js.map +1 -0
- package/dist/proxy/proxy-env.d.ts +3 -0
- package/dist/proxy/proxy-env.d.ts.map +1 -0
- package/dist/proxy/proxy-env.js +26 -0
- package/dist/proxy/proxy-env.js.map +1 -0
- package/dist/proxy/proxy-port-resolver.d.ts +9 -0
- package/dist/proxy/proxy-port-resolver.d.ts.map +1 -0
- package/dist/proxy/proxy-port-resolver.js +62 -0
- package/dist/proxy/proxy-port-resolver.js.map +1 -0
- package/dist/proxy/request-router.d.ts +12 -0
- package/dist/proxy/request-router.d.ts.map +1 -0
- package/dist/proxy/request-router.js +163 -0
- package/dist/proxy/request-router.js.map +1 -0
- package/dist/proxy/routing-config.d.ts +10 -0
- package/dist/proxy/routing-config.d.ts.map +1 -0
- package/dist/proxy/routing-config.js +79 -0
- package/dist/proxy/routing-config.js.map +1 -0
- package/dist/proxy/server/http-helpers.d.ts +8 -0
- package/dist/proxy/server/http-helpers.d.ts.map +1 -0
- package/dist/proxy/server/http-helpers.js +73 -0
- package/dist/proxy/server/http-helpers.js.map +1 -0
- package/dist/proxy/server/messages-route.d.ts +12 -0
- package/dist/proxy/server/messages-route.d.ts.map +1 -0
- package/dist/proxy/server/messages-route.js +244 -0
- package/dist/proxy/server/messages-route.js.map +1 -0
- package/dist/proxy/server/proxy-server.d.ts +12 -0
- package/dist/proxy/server/proxy-server.d.ts.map +1 -0
- package/dist/proxy/server/proxy-server.js +140 -0
- package/dist/proxy/server/proxy-server.js.map +1 -0
- package/dist/proxy/transformers/request-transformer.d.ts +60 -0
- package/dist/proxy/transformers/request-transformer.d.ts.map +1 -0
- package/dist/proxy/transformers/request-transformer.js +452 -0
- package/dist/proxy/transformers/request-transformer.js.map +1 -0
- package/dist/proxy/transformers/sse-stream-transformer.d.ts +11 -0
- package/dist/proxy/transformers/sse-stream-transformer.d.ts.map +1 -0
- package/dist/proxy/transformers/sse-stream-transformer.js +200 -0
- package/dist/proxy/transformers/sse-stream-transformer.js.map +1 -0
- package/dist/proxy/upstream-url.d.ts +3 -0
- package/dist/proxy/upstream-url.d.ts.map +1 -0
- package/dist/proxy/upstream-url.js +43 -0
- package/dist/proxy/upstream-url.js.map +1 -0
- package/dist/services/logging/index.d.ts +12 -0
- package/dist/services/logging/index.d.ts.map +1 -0
- package/dist/services/logging/index.js +37 -0
- package/dist/services/logging/index.js.map +1 -0
- package/dist/services/logging/log-buffer.d.ts +5 -0
- package/dist/services/logging/log-buffer.d.ts.map +1 -0
- package/dist/services/logging/log-buffer.js +20 -0
- package/dist/services/logging/log-buffer.js.map +1 -0
- package/dist/services/logging/log-config.d.ts +4 -0
- package/dist/services/logging/log-config.d.ts.map +1 -0
- package/dist/services/logging/log-config.js +68 -0
- package/dist/services/logging/log-config.js.map +1 -0
- package/dist/services/logging/log-context.d.ts +41 -0
- package/dist/services/logging/log-context.d.ts.map +1 -0
- package/dist/services/logging/log-context.js +51 -0
- package/dist/services/logging/log-context.js.map +1 -0
- package/dist/services/logging/log-paths.d.ts +8 -0
- package/dist/services/logging/log-paths.d.ts.map +1 -0
- package/dist/services/logging/log-paths.js +66 -0
- package/dist/services/logging/log-paths.js.map +1 -0
- package/dist/services/logging/log-reader.d.ts +5 -0
- package/dist/services/logging/log-reader.d.ts.map +1 -0
- package/dist/services/logging/log-reader.js +124 -0
- package/dist/services/logging/log-reader.js.map +1 -0
- package/dist/services/logging/log-redaction.d.ts +10 -0
- package/dist/services/logging/log-redaction.d.ts.map +1 -0
- package/dist/services/logging/log-redaction.js +90 -0
- package/dist/services/logging/log-redaction.js.map +1 -0
- package/dist/services/logging/log-storage.d.ts +4 -0
- package/dist/services/logging/log-storage.d.ts.map +1 -0
- package/dist/services/logging/log-storage.js +109 -0
- package/dist/services/logging/log-storage.js.map +1 -0
- package/dist/services/logging/log-types.d.ts +60 -0
- package/dist/services/logging/log-types.d.ts.map +1 -0
- package/dist/services/logging/log-types.js +33 -0
- package/dist/services/logging/log-types.js.map +1 -0
- package/dist/services/logging/logger.d.ts +26 -0
- package/dist/services/logging/logger.d.ts.map +1 -0
- package/dist/services/logging/logger.js +65 -0
- package/dist/services/logging/logger.js.map +1 -0
- package/dist/shared/agy-gemini-pro-compatibility.d.ts +15 -0
- package/dist/shared/agy-gemini-pro-compatibility.d.ts.map +1 -0
- package/dist/shared/agy-gemini-pro-compatibility.js +18 -0
- package/dist/shared/agy-gemini-pro-compatibility.js.map +1 -0
- package/dist/shared/claude-extension-setup.d.ts.map +1 -1
- package/dist/shared/claude-extension-setup.js +7 -3
- package/dist/shared/claude-extension-setup.js.map +1 -1
- package/dist/shared/cliproxy-model-routing.d.ts +45 -0
- package/dist/shared/cliproxy-model-routing.d.ts.map +1 -0
- package/dist/shared/cliproxy-model-routing.js +144 -0
- package/dist/shared/cliproxy-model-routing.js.map +1 -0
- package/dist/shared/provider-preset-catalog.d.ts +4 -2
- package/dist/shared/provider-preset-catalog.d.ts.map +1 -1
- package/dist/shared/provider-preset-catalog.js +17 -1
- package/dist/shared/provider-preset-catalog.js.map +1 -1
- package/dist/shared/toml-object.d.ts.map +1 -1
- package/dist/shared/toml-object.js +6 -2
- package/dist/shared/toml-object.js.map +1 -1
- package/dist/targets/claude-adapter.d.ts +6 -1
- package/dist/targets/claude-adapter.d.ts.map +1 -1
- package/dist/targets/claude-adapter.js +20 -5
- package/dist/targets/claude-adapter.js.map +1 -1
- package/dist/targets/codex-adapter.d.ts +2 -0
- package/dist/targets/codex-adapter.d.ts.map +1 -1
- package/dist/targets/codex-adapter.js +43 -11
- package/dist/targets/codex-adapter.js.map +1 -1
- package/dist/targets/codex-cliproxy-provider-config.d.ts +16 -0
- package/dist/targets/codex-cliproxy-provider-config.d.ts.map +1 -0
- package/dist/targets/codex-cliproxy-provider-config.js +156 -0
- package/dist/targets/codex-cliproxy-provider-config.js.map +1 -0
- package/dist/targets/codex-detector.d.ts.map +1 -1
- package/dist/targets/codex-detector.js +20 -9
- package/dist/targets/codex-detector.js.map +1 -1
- package/dist/targets/droid-adapter.d.ts +3 -2
- package/dist/targets/droid-adapter.d.ts.map +1 -1
- package/dist/targets/droid-adapter.js +15 -10
- package/dist/targets/droid-adapter.js.map +1 -1
- package/dist/targets/droid-config-manager.d.ts.map +1 -1
- package/dist/targets/droid-config-manager.js +40 -0
- package/dist/targets/droid-config-manager.js.map +1 -1
- package/dist/targets/droid-provider.d.ts.map +1 -1
- package/dist/targets/droid-provider.js +10 -5
- package/dist/targets/droid-provider.js.map +1 -1
- package/dist/targets/target-adapter.d.ts +5 -0
- package/dist/targets/target-adapter.d.ts.map +1 -1
- package/dist/targets/target-metadata.js +1 -1
- package/dist/targets/target-metadata.js.map +1 -1
- package/dist/targets/target-resolver.d.ts.map +1 -1
- package/dist/targets/target-resolver.js +15 -0
- package/dist/targets/target-resolver.js.map +1 -1
- package/dist/targets/target-runtime-compatibility.js +1 -1
- package/dist/targets/target-runtime-compatibility.js.map +1 -1
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +15 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/ui/assets/accounts-biinrjBy.js +1 -0
- package/dist/ui/assets/alert-dialog-B9kuXS_B.js +1 -0
- package/dist/ui/assets/api-BYTesAyV.js +4 -0
- package/dist/ui/assets/auth-section-BH7Y0zzE.js +1 -0
- package/dist/ui/assets/backups-section-JTiku4fB.js +1 -0
- package/dist/ui/assets/channels-BweRUtu-.js +1 -0
- package/dist/ui/assets/charts-eIPy2oG6.js +64 -0
- package/dist/ui/assets/checkbox-CsTXDim7.js +1 -0
- package/dist/ui/assets/claude-extension-BE4B2NkS.js +1 -0
- package/dist/ui/assets/cliproxy-Fl6HWxZ0.js +4 -0
- package/dist/ui/assets/cliproxy-ai-providers-NMOopK4K.js +15 -0
- package/dist/ui/assets/cliproxy-control-panel-BgiBcyzb.js +1 -0
- package/dist/ui/assets/code-highlight-ClSMkeL5.js +1 -0
- package/dist/ui/assets/codex-BsxF_eKF.js +30 -0
- package/dist/ui/assets/confirm-dialog-iyu6jSnb.js +1 -0
- package/dist/ui/assets/copilot-BSCdzbOk.js +3 -0
- package/dist/ui/assets/cursor-CjGT-EsR.js +1 -0
- package/dist/ui/assets/droid-MR-k0fbU.js +2 -0
- package/dist/ui/assets/form-utils-CuHzLhJZ.js +20 -0
- package/dist/ui/assets/globalenv-section-BGPR-lJN.js +1 -0
- package/dist/ui/assets/health-C7wQUXVn.js +1 -0
- package/dist/ui/assets/icons-bxdfpJdB.js +1 -0
- package/dist/ui/assets/index-7dfuc3Cf.js +56 -0
- package/dist/ui/assets/index-7rknm4m0.js +1 -0
- package/dist/ui/assets/index-BeLNgVQ9.js +1 -0
- package/dist/ui/assets/index-BvMWFZiH.js +1 -0
- package/dist/ui/assets/index-DrEPnpI3.css +1 -0
- package/dist/ui/assets/index-MAUysHQF.js +1 -0
- package/dist/ui/assets/index-nzImYtUK.js +1 -0
- package/dist/ui/assets/index-w9DZ42zc.js +1 -0
- package/dist/ui/assets/logs-Qr4G0AdK.js +1 -0
- package/dist/ui/assets/masked-input-Bl5OoUEZ.js +1 -0
- package/dist/ui/assets/notifications-B4_o8bcr.js +1 -0
- package/dist/ui/assets/providers/codebuddy.png +0 -0
- package/dist/ui/assets/providers/cursor.svg +5 -0
- package/dist/ui/assets/providers/gitlab.svg +22 -0
- package/dist/ui/assets/providers/kilo.png +0 -0
- package/dist/ui/assets/proxy-Br5aAkn0.js +9 -0
- package/dist/ui/assets/proxy-status-widget-703_vH2t.js +1 -0
- package/dist/ui/assets/radix-ui-DvRtHWGI.js +51 -0
- package/dist/ui/assets/raw-json-settings-editor-panel-DWTJY3og.js +1 -0
- package/dist/ui/assets/react-vendor-Bjx91N7w.js +3 -0
- package/dist/ui/assets/searchable-select-C8BA2Q6i.js +1 -0
- package/dist/ui/assets/separator-avUMnKG4.js +1 -0
- package/dist/ui/assets/shared-DsOKYLqq.js +8 -0
- package/dist/ui/assets/table-C6r_OOul.js +1 -0
- package/dist/ui/assets/tanstack-Dg84L5cM.js +4 -0
- package/dist/ui/assets/updates-K6jy3VXq.js +1 -0
- package/dist/ui/assets/use-accounts-ZouK2A2J.js +1 -0
- package/dist/ui/index.html +9 -9
- package/dist/utils/browser/browser-policy.d.ts +22 -0
- package/dist/utils/browser/browser-policy.d.ts.map +1 -0
- package/dist/utils/browser/browser-policy.js +65 -0
- package/dist/utils/browser/browser-policy.js.map +1 -0
- package/dist/utils/browser/browser-settings.d.ts +52 -0
- package/dist/utils/browser/browser-settings.d.ts.map +1 -0
- package/dist/utils/browser/browser-settings.js +257 -0
- package/dist/utils/browser/browser-settings.js.map +1 -0
- package/dist/utils/browser/browser-setup.d.ts +21 -0
- package/dist/utils/browser/browser-setup.d.ts.map +1 -0
- package/dist/utils/browser/browser-setup.js +68 -0
- package/dist/utils/browser/browser-setup.js.map +1 -0
- package/dist/utils/browser/browser-status.d.ts +42 -0
- package/dist/utils/browser/browser-status.d.ts.map +1 -0
- package/dist/utils/browser/browser-status.js +251 -0
- package/dist/utils/browser/browser-status.js.map +1 -0
- package/dist/utils/browser/chrome-reuse.d.ts +18 -0
- package/dist/utils/browser/chrome-reuse.d.ts.map +1 -0
- package/dist/utils/browser/chrome-reuse.js +194 -0
- package/dist/utils/browser/chrome-reuse.js.map +1 -0
- package/dist/utils/browser/claude-tool-args.d.ts +2 -0
- package/dist/utils/browser/claude-tool-args.d.ts.map +1 -0
- package/dist/utils/browser/claude-tool-args.js +22 -0
- package/dist/utils/browser/claude-tool-args.js.map +1 -0
- package/dist/utils/browser/index.d.ts +16 -0
- package/dist/utils/browser/index.d.ts.map +1 -0
- package/dist/utils/browser/index.js +45 -0
- package/dist/utils/browser/index.js.map +1 -0
- package/dist/utils/browser/mcp-installer.d.ts +14 -0
- package/dist/utils/browser/mcp-installer.d.ts.map +1 -0
- package/dist/utils/browser/mcp-installer.js +356 -0
- package/dist/utils/browser/mcp-installer.js.map +1 -0
- package/dist/utils/browser/platform.d.ts +4 -0
- package/dist/utils/browser/platform.d.ts.map +1 -0
- package/dist/utils/browser/platform.js +12 -0
- package/dist/utils/browser/platform.js.map +1 -0
- package/dist/utils/browser-codex-overrides.d.ts +3 -0
- package/dist/utils/browser-codex-overrides.d.ts.map +1 -0
- package/dist/utils/browser-codex-overrides.js +29 -0
- package/dist/utils/browser-codex-overrides.js.map +1 -0
- package/dist/utils/claude-detector.d.ts +1 -0
- package/dist/utils/claude-detector.d.ts.map +1 -1
- package/dist/utils/claude-detector.js +2 -1
- package/dist/utils/claude-detector.js.map +1 -1
- package/dist/utils/claude-spawner.d.ts +1 -0
- package/dist/utils/claude-spawner.d.ts.map +1 -1
- package/dist/utils/claude-spawner.js +1 -1
- package/dist/utils/claude-spawner.js.map +1 -1
- package/dist/utils/claude-subcommand-detector.d.ts +45 -0
- package/dist/utils/claude-subcommand-detector.d.ts.map +1 -0
- package/dist/utils/claude-subcommand-detector.js +179 -0
- package/dist/utils/claude-subcommand-detector.js.map +1 -0
- package/dist/utils/claude-tool-args.d.ts +7 -0
- package/dist/utils/claude-tool-args.d.ts.map +1 -0
- package/dist/utils/claude-tool-args.js +43 -0
- package/dist/utils/claude-tool-args.js.map +1 -0
- package/dist/utils/config-manager.d.ts +5 -0
- package/dist/utils/config-manager.d.ts.map +1 -1
- package/dist/utils/config-manager.js +16 -3
- package/dist/utils/config-manager.js.map +1 -1
- package/dist/utils/hooks/get-image-analysis-hook-env.d.ts +1 -1
- package/dist/utils/hooks/get-image-analysis-hook-env.d.ts.map +1 -1
- package/dist/utils/hooks/get-image-analysis-hook-env.js +11 -7
- package/dist/utils/hooks/get-image-analysis-hook-env.js.map +1 -1
- package/dist/utils/hooks/image-analysis-backend-resolver.js +2 -2
- package/dist/utils/hooks/image-analysis-backend-resolver.js.map +1 -1
- package/dist/utils/hooks/image-analysis-runtime-status.d.ts +4 -4
- package/dist/utils/hooks/image-analysis-runtime-status.d.ts.map +1 -1
- package/dist/utils/hooks/image-analysis-runtime-status.js +15 -11
- package/dist/utils/hooks/image-analysis-runtime-status.js.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-configuration.d.ts.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-configuration.js +2 -2
- package/dist/utils/hooks/image-analyzer-hook-configuration.js.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-installer.d.ts.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-installer.js +2 -2
- package/dist/utils/hooks/image-analyzer-hook-installer.js.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-utils.d.ts +21 -0
- package/dist/utils/hooks/image-analyzer-hook-utils.d.ts.map +1 -0
- package/dist/utils/hooks/image-analyzer-hook-utils.js +81 -0
- package/dist/utils/hooks/image-analyzer-hook-utils.js.map +1 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.d.ts +1 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.d.ts.map +1 -1
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.js +35 -14
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.js.map +1 -1
- package/dist/utils/hooks/index.d.ts +1 -0
- package/dist/utils/hooks/index.d.ts.map +1 -1
- package/dist/utils/hooks/index.js +3 -1
- package/dist/utils/hooks/index.js.map +1 -1
- package/dist/utils/image-analysis/claude-tool-args.d.ts +3 -0
- package/dist/utils/image-analysis/claude-tool-args.d.ts.map +1 -1
- package/dist/utils/image-analysis/claude-tool-args.js +25 -47
- package/dist/utils/image-analysis/claude-tool-args.js.map +1 -1
- package/dist/utils/image-analysis/index.d.ts +1 -0
- package/dist/utils/image-analysis/index.d.ts.map +1 -1
- package/dist/utils/image-analysis/index.js +6 -1
- package/dist/utils/image-analysis/index.js.map +1 -1
- package/dist/utils/image-analysis/mcp-installer.d.ts.map +1 -1
- package/dist/utils/image-analysis/mcp-installer.js +5 -5
- package/dist/utils/image-analysis/mcp-installer.js.map +1 -1
- package/dist/utils/image-analysis/repair.d.ts +12 -0
- package/dist/utils/image-analysis/repair.d.ts.map +1 -0
- package/dist/utils/image-analysis/repair.js +105 -0
- package/dist/utils/image-analysis/repair.js.map +1 -0
- package/dist/utils/openai-compat-launch-settings.d.ts +7 -0
- package/dist/utils/openai-compat-launch-settings.d.ts.map +1 -0
- package/dist/utils/openai-compat-launch-settings.js +61 -0
- package/dist/utils/openai-compat-launch-settings.js.map +1 -0
- package/dist/utils/package-manager-detector.d.ts +31 -4
- package/dist/utils/package-manager-detector.d.ts.map +1 -1
- package/dist/utils/package-manager-detector.js +249 -60
- package/dist/utils/package-manager-detector.js.map +1 -1
- package/dist/utils/prompt-injection-strategy.d.ts +54 -0
- package/dist/utils/prompt-injection-strategy.d.ts.map +1 -0
- package/dist/utils/prompt-injection-strategy.js +128 -0
- package/dist/utils/prompt-injection-strategy.js.map +1 -0
- package/dist/utils/retry-strategy.d.ts +37 -0
- package/dist/utils/retry-strategy.d.ts.map +1 -0
- package/dist/utils/retry-strategy.js +99 -0
- package/dist/utils/retry-strategy.js.map +1 -0
- package/dist/utils/shell-executor.d.ts +32 -1
- package/dist/utils/shell-executor.d.ts.map +1 -1
- package/dist/utils/shell-executor.js +193 -30
- package/dist/utils/shell-executor.js.map +1 -1
- package/dist/utils/update-checker.d.ts +1 -1
- package/dist/utils/update-checker.d.ts.map +1 -1
- package/dist/utils/websearch/claude-tool-args.d.ts +7 -0
- package/dist/utils/websearch/claude-tool-args.d.ts.map +1 -1
- package/dist/utils/websearch/claude-tool-args.js +32 -50
- package/dist/utils/websearch/claude-tool-args.js.map +1 -1
- package/dist/utils/websearch/hook-config.d.ts.map +1 -1
- package/dist/utils/websearch/hook-config.js +3 -3
- package/dist/utils/websearch/hook-config.js.map +1 -1
- package/dist/utils/websearch/hook-env.d.ts.map +1 -1
- package/dist/utils/websearch/hook-env.js +21 -3
- package/dist/utils/websearch/hook-env.js.map +1 -1
- package/dist/utils/websearch/hook-installer.d.ts.map +1 -1
- package/dist/utils/websearch/hook-installer.js +2 -2
- package/dist/utils/websearch/hook-installer.js.map +1 -1
- package/dist/utils/websearch/mcp-installer.d.ts.map +1 -1
- package/dist/utils/websearch/mcp-installer.js +5 -5
- package/dist/utils/websearch/mcp-installer.js.map +1 -1
- package/dist/utils/websearch/profile-hook-injector.d.ts.map +1 -1
- package/dist/utils/websearch/profile-hook-injector.js +3 -3
- package/dist/utils/websearch/profile-hook-injector.js.map +1 -1
- package/dist/utils/websearch/provider-secrets.js +2 -2
- package/dist/utils/websearch/provider-secrets.js.map +1 -1
- package/dist/utils/websearch/status.d.ts +1 -1
- package/dist/utils/websearch/status.d.ts.map +1 -1
- package/dist/utils/websearch/status.js +37 -16
- package/dist/utils/websearch/status.js.map +1 -1
- package/dist/utils/websearch/trace.d.ts +1 -0
- package/dist/utils/websearch/trace.d.ts.map +1 -1
- package/dist/utils/websearch/trace.js +27 -5
- package/dist/utils/websearch/trace.js.map +1 -1
- package/dist/utils/websearch/types.d.ts +12 -2
- package/dist/utils/websearch/types.d.ts.map +1 -1
- package/dist/utils/websearch/types.js +38 -0
- package/dist/utils/websearch/types.js.map +1 -1
- package/dist/web-server/file-watcher.js +2 -2
- package/dist/web-server/file-watcher.js.map +1 -1
- package/dist/web-server/health/cliproxy-checks.js +2 -2
- package/dist/web-server/health/cliproxy-checks.js.map +1 -1
- package/dist/web-server/health/config-checks.d.ts.map +1 -1
- package/dist/web-server/health/config-checks.js +3 -3
- package/dist/web-server/health/config-checks.js.map +1 -1
- package/dist/web-server/health/profile-checks.d.ts.map +1 -1
- package/dist/web-server/health/profile-checks.js +5 -6
- package/dist/web-server/health/profile-checks.js.map +1 -1
- package/dist/web-server/health/symlink-checks.d.ts.map +1 -1
- package/dist/web-server/health/symlink-checks.js +2 -3
- package/dist/web-server/health/symlink-checks.js.map +1 -1
- package/dist/web-server/health/websearch-checks.js +1 -1
- package/dist/web-server/health/websearch-checks.js.map +1 -1
- package/dist/web-server/health-service.d.ts.map +1 -1
- package/dist/web-server/health-service.js +7 -6
- package/dist/web-server/health-service.js.map +1 -1
- package/dist/web-server/index.d.ts.map +1 -1
- package/dist/web-server/index.js +102 -18
- package/dist/web-server/index.js.map +1 -1
- package/dist/web-server/jsonl-parser.d.ts.map +1 -1
- package/dist/web-server/jsonl-parser.js +22 -4
- package/dist/web-server/jsonl-parser.js.map +1 -1
- package/dist/web-server/middleware/auth-middleware.d.ts +7 -3
- package/dist/web-server/middleware/auth-middleware.d.ts.map +1 -1
- package/dist/web-server/middleware/auth-middleware.js +103 -8
- package/dist/web-server/middleware/auth-middleware.js.map +1 -1
- package/dist/web-server/middleware/request-logging-middleware.d.ts +3 -0
- package/dist/web-server/middleware/request-logging-middleware.d.ts.map +1 -0
- package/dist/web-server/middleware/request-logging-middleware.js +30 -0
- package/dist/web-server/middleware/request-logging-middleware.js.map +1 -0
- package/dist/web-server/model-pricing.d.ts +8 -6
- package/dist/web-server/model-pricing.d.ts.map +1 -1
- package/dist/web-server/model-pricing.js +184 -54
- package/dist/web-server/model-pricing.js.map +1 -1
- package/dist/web-server/models-dev/pricing-resolver.d.ts +18 -0
- package/dist/web-server/models-dev/pricing-resolver.d.ts.map +1 -0
- package/dist/web-server/models-dev/pricing-resolver.js +160 -0
- package/dist/web-server/models-dev/pricing-resolver.js.map +1 -0
- package/dist/web-server/models-dev/registry-cache.d.ts +19 -0
- package/dist/web-server/models-dev/registry-cache.d.ts.map +1 -0
- package/dist/web-server/models-dev/registry-cache.js +165 -0
- package/dist/web-server/models-dev/registry-cache.js.map +1 -0
- package/dist/web-server/models-dev/types.d.ts +39 -0
- package/dist/web-server/models-dev/types.d.ts.map +1 -0
- package/dist/web-server/models-dev/types.js +3 -0
- package/dist/web-server/models-dev/types.js.map +1 -0
- package/dist/web-server/overview-routes.d.ts.map +1 -1
- package/dist/web-server/overview-routes.js +3 -3
- package/dist/web-server/overview-routes.js.map +1 -1
- package/dist/web-server/routes/account-route-helpers.d.ts +3 -0
- package/dist/web-server/routes/account-route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/account-route-helpers.js.map +1 -1
- package/dist/web-server/routes/account-routes.d.ts.map +1 -1
- package/dist/web-server/routes/account-routes.js +105 -12
- package/dist/web-server/routes/account-routes.js.map +1 -1
- package/dist/web-server/routes/auth-routes.d.ts +10 -0
- package/dist/web-server/routes/auth-routes.d.ts.map +1 -1
- package/dist/web-server/routes/auth-routes.js +37 -10
- package/dist/web-server/routes/auth-routes.js.map +1 -1
- package/dist/web-server/routes/browser-routes.d.ts +3 -0
- package/dist/web-server/routes/browser-routes.d.ts.map +1 -0
- package/dist/web-server/routes/browser-routes.js +182 -0
- package/dist/web-server/routes/browser-routes.js.map +1 -0
- package/dist/web-server/routes/catalog-routes.d.ts.map +1 -1
- package/dist/web-server/routes/catalog-routes.js +9 -8
- package/dist/web-server/routes/catalog-routes.js.map +1 -1
- package/dist/web-server/routes/channels-routes.d.ts.map +1 -1
- package/dist/web-server/routes/channels-routes.js +4 -4
- package/dist/web-server/routes/channels-routes.js.map +1 -1
- package/dist/web-server/routes/claude-extension-routes.d.ts.map +1 -1
- package/dist/web-server/routes/claude-extension-routes.js +5 -0
- package/dist/web-server/routes/claude-extension-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts +8 -0
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.js +281 -89
- package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-local-proxy.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-local-proxy.js +27 -17
- package/dist/web-server/routes/cliproxy-local-proxy.js.map +1 -1
- package/dist/web-server/routes/cliproxy-routing-routes.d.ts +3 -0
- package/dist/web-server/routes/cliproxy-routing-routes.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-routing-routes.js +69 -0
- package/dist/web-server/routes/cliproxy-routing-routes.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts +35 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes.js +86 -42
- package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-sync-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-sync-routes.js +2 -2
- package/dist/web-server/routes/cliproxy-sync-routes.js.map +1 -1
- package/dist/web-server/routes/codex-routes.d.ts.map +1 -1
- package/dist/web-server/routes/codex-routes.js +7 -0
- package/dist/web-server/routes/codex-routes.js.map +1 -1
- package/dist/web-server/routes/config-routes.d.ts.map +1 -1
- package/dist/web-server/routes/config-routes.js +9 -6
- package/dist/web-server/routes/config-routes.js.map +1 -1
- package/dist/web-server/routes/copilot-routes.d.ts.map +1 -1
- package/dist/web-server/routes/copilot-routes.js +3 -3
- package/dist/web-server/routes/copilot-routes.js.map +1 -1
- package/dist/web-server/routes/copilot-settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/copilot-settings-routes.js +6 -7
- package/dist/web-server/routes/copilot-settings-routes.js.map +1 -1
- package/dist/web-server/routes/cursor-routes.d.ts +2 -0
- package/dist/web-server/routes/cursor-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cursor-routes.js +48 -6
- package/dist/web-server/routes/cursor-routes.js.map +1 -1
- package/dist/web-server/routes/cursor-settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cursor-settings-routes.js +8 -9
- package/dist/web-server/routes/cursor-settings-routes.js.map +1 -1
- package/dist/web-server/routes/image-analysis-routes.d.ts.map +1 -1
- package/dist/web-server/routes/image-analysis-routes.js +7 -17
- package/dist/web-server/routes/image-analysis-routes.js.map +1 -1
- package/dist/web-server/routes/index.d.ts.map +1 -1
- package/dist/web-server/routes/index.js +25 -0
- package/dist/web-server/routes/index.js.map +1 -1
- package/dist/web-server/routes/logs-routes.d.ts +3 -0
- package/dist/web-server/routes/logs-routes.d.ts.map +1 -0
- package/dist/web-server/routes/logs-routes.js +75 -0
- package/dist/web-server/routes/logs-routes.js.map +1 -0
- package/dist/web-server/routes/misc-routes.d.ts.map +1 -1
- package/dist/web-server/routes/misc-routes.js +10 -11
- package/dist/web-server/routes/misc-routes.js.map +1 -1
- package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
- package/dist/web-server/routes/profile-routes.js +21 -3
- package/dist/web-server/routes/profile-routes.js.map +1 -1
- package/dist/web-server/routes/provider-routes.js +1 -1
- package/dist/web-server/routes/provider-routes.js.map +1 -1
- package/dist/web-server/routes/proxy-routes.d.ts.map +1 -1
- package/dist/web-server/routes/proxy-routes.js +42 -12
- package/dist/web-server/routes/proxy-routes.js.map +1 -1
- package/dist/web-server/routes/route-helpers.d.ts +1 -0
- package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/route-helpers.js +19 -7
- package/dist/web-server/routes/route-helpers.js.map +1 -1
- package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/settings-routes.js +110 -23
- package/dist/web-server/routes/settings-routes.js.map +1 -1
- package/dist/web-server/routes/variant-routes.js +1 -1
- package/dist/web-server/routes/variant-routes.js.map +1 -1
- package/dist/web-server/routes/websearch-routes.d.ts.map +1 -1
- package/dist/web-server/routes/websearch-routes.js +41 -4
- package/dist/web-server/routes/websearch-routes.js.map +1 -1
- package/dist/web-server/services/claude-extension-binding-service.js +2 -2
- package/dist/web-server/services/claude-extension-binding-service.js.map +1 -1
- package/dist/web-server/services/cliproxy-dashboard-install-service.d.ts.map +1 -1
- package/dist/web-server/services/cliproxy-dashboard-install-service.js +22 -6
- package/dist/web-server/services/cliproxy-dashboard-install-service.js.map +1 -1
- package/dist/web-server/services/codex-dashboard-service.d.ts +1 -0
- package/dist/web-server/services/codex-dashboard-service.d.ts.map +1 -1
- package/dist/web-server/services/compatible-cli-docs-registry.d.ts.map +1 -1
- package/dist/web-server/services/compatible-cli-docs-registry.js +1 -0
- package/dist/web-server/services/compatible-cli-docs-registry.js.map +1 -1
- package/dist/web-server/services/droid-dashboard-service.d.ts +1 -0
- package/dist/web-server/services/droid-dashboard-service.d.ts.map +1 -1
- package/dist/web-server/services/logs-dashboard-service.d.ts +7 -0
- package/dist/web-server/services/logs-dashboard-service.d.ts.map +1 -0
- package/dist/web-server/services/logs-dashboard-service.js +33 -0
- package/dist/web-server/services/logs-dashboard-service.js.map +1 -0
- package/dist/web-server/shared-routes-collections.d.ts +13 -0
- package/dist/web-server/shared-routes-collections.d.ts.map +1 -0
- package/dist/web-server/shared-routes-collections.js +170 -0
- package/dist/web-server/shared-routes-collections.js.map +1 -0
- package/dist/web-server/shared-routes-content.d.ts +16 -0
- package/dist/web-server/shared-routes-content.d.ts.map +1 -0
- package/dist/web-server/shared-routes-content.js +152 -0
- package/dist/web-server/shared-routes-content.js.map +1 -0
- package/dist/web-server/shared-routes-markdown-walker.d.ts +12 -0
- package/dist/web-server/shared-routes-markdown-walker.d.ts.map +1 -0
- package/dist/web-server/shared-routes-markdown-walker.js +97 -0
- package/dist/web-server/shared-routes-markdown-walker.js.map +1 -0
- package/dist/web-server/shared-routes-markdown.d.ts +18 -0
- package/dist/web-server/shared-routes-markdown.d.ts.map +1 -0
- package/dist/web-server/shared-routes-markdown.js +167 -0
- package/dist/web-server/shared-routes-markdown.js.map +1 -0
- package/dist/web-server/shared-routes-path-guards.d.ts +16 -0
- package/dist/web-server/shared-routes-path-guards.d.ts.map +1 -0
- package/dist/web-server/shared-routes-path-guards.js +93 -0
- package/dist/web-server/shared-routes-path-guards.js.map +1 -0
- package/dist/web-server/shared-routes-plugin-registry-content.d.ts +12 -0
- package/dist/web-server/shared-routes-plugin-registry-content.d.ts.map +1 -0
- package/dist/web-server/shared-routes-plugin-registry-content.js +93 -0
- package/dist/web-server/shared-routes-plugin-registry-content.js.map +1 -0
- package/dist/web-server/shared-routes-plugins.d.ts +21 -0
- package/dist/web-server/shared-routes-plugins.d.ts.map +1 -0
- package/dist/web-server/shared-routes-plugins.js +197 -0
- package/dist/web-server/shared-routes-plugins.js.map +1 -0
- package/dist/web-server/shared-routes-symlink-status.d.ts +27 -0
- package/dist/web-server/shared-routes-symlink-status.d.ts.map +1 -0
- package/dist/web-server/shared-routes-symlink-status.js +135 -0
- package/dist/web-server/shared-routes-symlink-status.js.map +1 -0
- package/dist/web-server/shared-routes-types.d.ts +23 -0
- package/dist/web-server/shared-routes-types.d.ts.map +1 -0
- package/dist/web-server/shared-routes-types.js +15 -0
- package/dist/web-server/shared-routes-types.js.map +1 -0
- package/dist/web-server/shared-routes.d.ts +2 -1
- package/dist/web-server/shared-routes.d.ts.map +1 -1
- package/dist/web-server/shared-routes.js +50 -456
- package/dist/web-server/shared-routes.js.map +1 -1
- package/dist/web-server/usage/aggregator.d.ts +14 -7
- package/dist/web-server/usage/aggregator.d.ts.map +1 -1
- package/dist/web-server/usage/aggregator.js +164 -55
- package/dist/web-server/usage/aggregator.js.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-syncer.d.ts +1 -16
- package/dist/web-server/usage/cliproxy-usage-syncer.d.ts.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-syncer.js +186 -61
- package/dist/web-server/usage/cliproxy-usage-syncer.js.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-transformer.d.ts +22 -7
- package/dist/web-server/usage/cliproxy-usage-transformer.d.ts.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-transformer.js +278 -28
- package/dist/web-server/usage/cliproxy-usage-transformer.js.map +1 -1
- package/dist/web-server/usage/codex-native-usage-collector.d.ts +13 -0
- package/dist/web-server/usage/codex-native-usage-collector.d.ts.map +1 -0
- package/dist/web-server/usage/codex-native-usage-collector.js +291 -0
- package/dist/web-server/usage/codex-native-usage-collector.js.map +1 -0
- package/dist/web-server/usage/data-aggregator.d.ts.map +1 -1
- package/dist/web-server/usage/data-aggregator.js +45 -46
- package/dist/web-server/usage/data-aggregator.js.map +1 -1
- package/dist/web-server/usage/disk-cache.js +2 -2
- package/dist/web-server/usage/disk-cache.js.map +1 -1
- package/dist/web-server/usage/droid-native-usage-collector.d.ts +14 -0
- package/dist/web-server/usage/droid-native-usage-collector.d.ts.map +1 -0
- package/dist/web-server/usage/droid-native-usage-collector.js +201 -0
- package/dist/web-server/usage/droid-native-usage-collector.js.map +1 -0
- package/dist/web-server/usage/handlers.d.ts +11 -8
- package/dist/web-server/usage/handlers.d.ts.map +1 -1
- package/dist/web-server/usage/handlers.js +197 -74
- package/dist/web-server/usage/handlers.js.map +1 -1
- package/dist/web-server/usage/model-identity.d.ts +16 -0
- package/dist/web-server/usage/model-identity.d.ts.map +1 -0
- package/dist/web-server/usage/model-identity.js +70 -0
- package/dist/web-server/usage/model-identity.js.map +1 -0
- package/dist/web-server/usage/profile-filter.d.ts +13 -0
- package/dist/web-server/usage/profile-filter.d.ts.map +1 -0
- package/dist/web-server/usage/profile-filter.js +35 -0
- package/dist/web-server/usage/profile-filter.js.map +1 -0
- package/dist/web-server/usage/routes.d.ts.map +1 -1
- package/dist/web-server/usage/routes.js +19 -6
- package/dist/web-server/usage/routes.js.map +1 -1
- package/dist/web-server/usage/sqlite-cli.d.ts +27 -0
- package/dist/web-server/usage/sqlite-cli.d.ts.map +1 -0
- package/dist/web-server/usage/sqlite-cli.js +186 -0
- package/dist/web-server/usage/sqlite-cli.js.map +1 -0
- package/dist/web-server/usage/types.d.ts +14 -0
- package/dist/web-server/usage/types.d.ts.map +1 -1
- package/dist/web-server/websocket.d.ts.map +1 -1
- package/dist/web-server/websocket.js +25 -16
- package/dist/web-server/websocket.js.map +1 -1
- package/lib/hooks/image-analyzer-transformer.cjs +54 -3
- package/lib/hooks/websearch-transformer.cjs +136 -0
- package/lib/mcp/ccs-browser-server.cjs +6769 -0
- package/lib/mcp/ccs-websearch-server.cjs +1 -1
- package/package.json +6 -6
- package/scripts/ci-parity-gate.sh +22 -3
- package/scripts/dev-release.sh +4 -2
- package/scripts/ensure-deps.sh +18 -0
- package/scripts/run-test-bucket.js +188 -0
- package/scripts/verify-bundle.js +4 -1
- package/dist/cliproxy/account-manager.d.ts +0 -16
- package/dist/cliproxy/account-manager.d.ts.map +0 -1
- package/dist/cliproxy/account-manager.js +0 -51
- package/dist/cliproxy/account-manager.js.map +0 -1
- package/dist/cliproxy/account-safety.d.ts +0 -92
- package/dist/cliproxy/account-safety.d.ts.map +0 -1
- package/dist/cliproxy/account-safety.js +0 -496
- package/dist/cliproxy/account-safety.js.map +0 -1
- package/dist/cliproxy/account-stats-key.d.ts.map +0 -1
- package/dist/cliproxy/account-stats-key.js.map +0 -1
- package/dist/cliproxy/antigravity-responsibility.d.ts.map +0 -1
- package/dist/cliproxy/antigravity-responsibility.js +0 -171
- package/dist/cliproxy/antigravity-responsibility.js.map +0 -1
- package/dist/cliproxy/auth/gemini-token-refresh.d.ts +0 -40
- package/dist/cliproxy/auth/gemini-token-refresh.d.ts.map +0 -1
- package/dist/cliproxy/auth/gemini-token-refresh.js +0 -371
- package/dist/cliproxy/auth/gemini-token-refresh.js.map +0 -1
- package/dist/cliproxy/auth-handler.d.ts +0 -31
- package/dist/cliproxy/auth-handler.d.ts.map +0 -1
- package/dist/cliproxy/auth-handler.js +0 -60
- package/dist/cliproxy/auth-handler.js.map +0 -1
- package/dist/cliproxy/auth-session-manager.d.ts +0 -51
- package/dist/cliproxy/auth-session-manager.d.ts.map +0 -1
- package/dist/cliproxy/auth-session-manager.js +0 -134
- package/dist/cliproxy/auth-session-manager.js.map +0 -1
- package/dist/cliproxy/auth-token-manager.d.ts.map +0 -1
- package/dist/cliproxy/auth-token-manager.js +0 -184
- package/dist/cliproxy/auth-token-manager.js.map +0 -1
- package/dist/cliproxy/auth-utils.d.ts +0 -16
- package/dist/cliproxy/auth-utils.d.ts.map +0 -1
- package/dist/cliproxy/auth-utils.js +0 -33
- package/dist/cliproxy/auth-utils.js.map +0 -1
- package/dist/cliproxy/base-config-loader.d.ts +0 -42
- package/dist/cliproxy/base-config-loader.d.ts.map +0 -1
- package/dist/cliproxy/base-config-loader.js +0 -123
- package/dist/cliproxy/base-config-loader.js.map +0 -1
- package/dist/cliproxy/catalog-cache.d.ts +0 -39
- package/dist/cliproxy/catalog-cache.d.ts.map +0 -1
- package/dist/cliproxy/catalog-cache.js +0 -254
- package/dist/cliproxy/catalog-cache.js.map +0 -1
- package/dist/cliproxy/cliproxy-executor.d.ts +0 -16
- package/dist/cliproxy/cliproxy-executor.d.ts.map +0 -1
- package/dist/cliproxy/cliproxy-executor.js +0 -27
- package/dist/cliproxy/cliproxy-executor.js.map +0 -1
- package/dist/cliproxy/codex-plan-compatibility.d.ts +0 -39
- package/dist/cliproxy/codex-plan-compatibility.d.ts.map +0 -1
- package/dist/cliproxy/codex-plan-compatibility.js +0 -134
- package/dist/cliproxy/codex-plan-compatibility.js.map +0 -1
- package/dist/cliproxy/codex-reasoning-proxy.d.ts +0 -61
- package/dist/cliproxy/codex-reasoning-proxy.d.ts.map +0 -1
- package/dist/cliproxy/codex-reasoning-proxy.js +0 -495
- package/dist/cliproxy/codex-reasoning-proxy.js.map +0 -1
- package/dist/cliproxy/composite-validator.d.ts.map +0 -1
- package/dist/cliproxy/composite-validator.js +0 -94
- package/dist/cliproxy/composite-validator.js.map +0 -1
- package/dist/cliproxy/config-generator.d.ts +0 -15
- package/dist/cliproxy/config-generator.d.ts.map +0 -1
- package/dist/cliproxy/config-generator.js +0 -32
- package/dist/cliproxy/config-generator.js.map +0 -1
- package/dist/cliproxy/device-code-handler.d.ts.map +0 -1
- package/dist/cliproxy/device-code-handler.js.map +0 -1
- package/dist/cliproxy/gemini-cli-quota-normalizer.d.ts.map +0 -1
- package/dist/cliproxy/gemini-cli-quota-normalizer.js +0 -122
- package/dist/cliproxy/gemini-cli-quota-normalizer.js.map +0 -1
- package/dist/cliproxy/https-tunnel-proxy.d.ts.map +0 -1
- package/dist/cliproxy/https-tunnel-proxy.js +0 -224
- package/dist/cliproxy/https-tunnel-proxy.js.map +0 -1
- package/dist/cliproxy/management-api-client.d.ts +0 -81
- package/dist/cliproxy/management-api-client.d.ts.map +0 -1
- package/dist/cliproxy/management-api-client.js +0 -381
- package/dist/cliproxy/management-api-client.js.map +0 -1
- package/dist/cliproxy/management-api-types.d.ts.map +0 -1
- package/dist/cliproxy/management-api-types.js.map +0 -1
- package/dist/cliproxy/model-config.d.ts +0 -31
- package/dist/cliproxy/model-config.d.ts.map +0 -1
- package/dist/cliproxy/model-config.js +0 -271
- package/dist/cliproxy/model-config.js.map +0 -1
- package/dist/cliproxy/model-id-normalizer.d.ts +0 -105
- package/dist/cliproxy/model-id-normalizer.d.ts.map +0 -1
- package/dist/cliproxy/model-id-normalizer.js +0 -241
- package/dist/cliproxy/model-id-normalizer.js.map +0 -1
- package/dist/cliproxy/openai-compat-manager.d.ts.map +0 -1
- package/dist/cliproxy/openai-compat-manager.js +0 -191
- package/dist/cliproxy/openai-compat-manager.js.map +0 -1
- package/dist/cliproxy/platform-detector.d.ts +0 -99
- package/dist/cliproxy/platform-detector.d.ts.map +0 -1
- package/dist/cliproxy/platform-detector.js +0 -174
- package/dist/cliproxy/platform-detector.js.map +0 -1
- package/dist/cliproxy/project-selection-handler.d.ts.map +0 -1
- package/dist/cliproxy/project-selection-handler.js.map +0 -1
- package/dist/cliproxy/proxy-config-resolver.d.ts +0 -87
- package/dist/cliproxy/proxy-config-resolver.d.ts.map +0 -1
- package/dist/cliproxy/proxy-config-resolver.js +0 -254
- package/dist/cliproxy/proxy-config-resolver.js.map +0 -1
- package/dist/cliproxy/proxy-detector.d.ts +0 -72
- package/dist/cliproxy/proxy-detector.d.ts.map +0 -1
- package/dist/cliproxy/proxy-detector.js +0 -196
- package/dist/cliproxy/proxy-detector.js.map +0 -1
- package/dist/cliproxy/proxy-target-resolver.d.ts.map +0 -1
- package/dist/cliproxy/proxy-target-resolver.js +0 -108
- package/dist/cliproxy/proxy-target-resolver.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude-normalizer.d.ts +0 -18
- package/dist/cliproxy/quota-fetcher-claude-normalizer.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude-normalizer.js +0 -291
- package/dist/cliproxy/quota-fetcher-claude-normalizer.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude.d.ts +0 -21
- package/dist/cliproxy/quota-fetcher-claude.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude.js +0 -306
- package/dist/cliproxy/quota-fetcher-claude.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-codex.d.ts +0 -69
- package/dist/cliproxy/quota-fetcher-codex.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-codex.js +0 -599
- package/dist/cliproxy/quota-fetcher-codex.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-gemini-cli.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-gemini-cli.js +0 -661
- package/dist/cliproxy/quota-fetcher-gemini-cli.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-ghcp.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-ghcp.js +0 -207
- package/dist/cliproxy/quota-fetcher-ghcp.js.map +0 -1
- package/dist/cliproxy/quota-fetcher.d.ts +0 -107
- package/dist/cliproxy/quota-fetcher.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher.js +0 -657
- package/dist/cliproxy/quota-fetcher.js.map +0 -1
- package/dist/cliproxy/quota-manager.d.ts +0 -105
- package/dist/cliproxy/quota-manager.d.ts.map +0 -1
- package/dist/cliproxy/quota-manager.js +0 -485
- package/dist/cliproxy/quota-manager.js.map +0 -1
- package/dist/cliproxy/quota-response-cache.d.ts.map +0 -1
- package/dist/cliproxy/quota-response-cache.js.map +0 -1
- package/dist/cliproxy/quota-types.d.ts +0 -245
- package/dist/cliproxy/quota-types.d.ts.map +0 -1
- package/dist/cliproxy/quota-types.js.map +0 -1
- package/dist/cliproxy/remote-auth-fetcher.d.ts +0 -30
- package/dist/cliproxy/remote-auth-fetcher.d.ts.map +0 -1
- package/dist/cliproxy/remote-auth-fetcher.js +0 -177
- package/dist/cliproxy/remote-auth-fetcher.js.map +0 -1
- package/dist/cliproxy/remote-proxy-client.d.ts.map +0 -1
- package/dist/cliproxy/remote-proxy-client.js +0 -281
- package/dist/cliproxy/remote-proxy-client.js.map +0 -1
- package/dist/cliproxy/remote-token-uploader.d.ts.map +0 -1
- package/dist/cliproxy/remote-token-uploader.js +0 -178
- package/dist/cliproxy/remote-token-uploader.js.map +0 -1
- package/dist/cliproxy/schema-sanitizer.d.ts.map +0 -1
- package/dist/cliproxy/schema-sanitizer.js.map +0 -1
- package/dist/cliproxy/startup-lock.d.ts.map +0 -1
- package/dist/cliproxy/startup-lock.js +0 -216
- package/dist/cliproxy/startup-lock.js.map +0 -1
- package/dist/cliproxy/stats-fetcher.d.ts +0 -158
- package/dist/cliproxy/stats-fetcher.d.ts.map +0 -1
- package/dist/cliproxy/stats-fetcher.js +0 -246
- package/dist/cliproxy/stats-fetcher.js.map +0 -1
- package/dist/cliproxy/stats-transformer.d.ts.map +0 -1
- package/dist/cliproxy/stats-transformer.js +0 -152
- package/dist/cliproxy/stats-transformer.js.map +0 -1
- package/dist/cliproxy/tool-name-mapper.d.ts +0 -103
- package/dist/cliproxy/tool-name-mapper.d.ts.map +0 -1
- package/dist/cliproxy/tool-name-mapper.js +0 -149
- package/dist/cliproxy/tool-name-mapper.js.map +0 -1
- package/dist/cliproxy/tool-name-sanitizer.d.ts +0 -65
- package/dist/cliproxy/tool-name-sanitizer.d.ts.map +0 -1
- package/dist/cliproxy/tool-name-sanitizer.js +0 -118
- package/dist/cliproxy/tool-name-sanitizer.js.map +0 -1
- package/dist/cliproxy/tool-sanitization-proxy.d.ts +0 -77
- package/dist/cliproxy/tool-sanitization-proxy.d.ts.map +0 -1
- package/dist/cliproxy/tool-sanitization-proxy.js +0 -643
- package/dist/cliproxy/tool-sanitization-proxy.js.map +0 -1
- package/dist/commands/cliproxy/resolve-lifecycle-port.d.ts +0 -9
- package/dist/commands/cliproxy/resolve-lifecycle-port.d.ts.map +0 -1
- package/dist/commands/cliproxy/resolve-lifecycle-port.js +0 -14
- package/dist/commands/cliproxy/resolve-lifecycle-port.js.map +0 -1
- package/dist/ui/assets/accounts-DhtktAIG.js +0 -1
- package/dist/ui/assets/alert-dialog-DQK2Jxfk.js +0 -1
- package/dist/ui/assets/api-Den1YY2d.js +0 -4
- package/dist/ui/assets/auth-section-BQitOLMK.js +0 -1
- package/dist/ui/assets/backups-section-BLGK5re-.js +0 -1
- package/dist/ui/assets/channels-Dop1axTi.js +0 -1
- package/dist/ui/assets/charts-BBPXh0Ar.js +0 -64
- package/dist/ui/assets/checkbox-DDrDuGxi.js +0 -1
- package/dist/ui/assets/claude-extension-6WjTc0o8.js +0 -1
- package/dist/ui/assets/cliproxy-Ch7RdSMG.js +0 -3
- package/dist/ui/assets/cliproxy-ai-providers-DjybBlb5.js +0 -21
- package/dist/ui/assets/cliproxy-control-panel-DDif_QAT.js +0 -1
- package/dist/ui/assets/code-highlight-BRUf_pqB.js +0 -3
- package/dist/ui/assets/codex-DFAV50Ee.js +0 -27
- package/dist/ui/assets/confirm-dialog-CP26_Zko.js +0 -1
- package/dist/ui/assets/copilot-uZuyhqwv.js +0 -3
- package/dist/ui/assets/cursor-CuaM2FmN.js +0 -1
- package/dist/ui/assets/droid-DdjXJ2lF.js +0 -2
- package/dist/ui/assets/form-utils-Bcoyqxpq.js +0 -20
- package/dist/ui/assets/globalenv-section-D5_-EIlf.js +0 -1
- package/dist/ui/assets/health-BHhVKLNR.js +0 -1
- package/dist/ui/assets/icons-CQ3MLSan.js +0 -1
- package/dist/ui/assets/index-B8bAYHAs.js +0 -1
- package/dist/ui/assets/index-Ba-43jCS.js +0 -1
- package/dist/ui/assets/index-Bb2CPQik.css +0 -1
- package/dist/ui/assets/index-Bm09kGOw.js +0 -1
- package/dist/ui/assets/index-DHY37v8a.js +0 -1
- package/dist/ui/assets/index-DLCFe4s3.js +0 -1
- package/dist/ui/assets/index-TSYtCr3K.js +0 -69
- package/dist/ui/assets/masked-input-CTkIqCMg.js +0 -1
- package/dist/ui/assets/notifications-B2HqRBj7.js +0 -1
- package/dist/ui/assets/proxy-status-widget-DPhKjJFl.js +0 -1
- package/dist/ui/assets/radix-ui-BlliRfHq.js +0 -51
- package/dist/ui/assets/raw-json-settings-editor-panel-DQr_y0E4.js +0 -1
- package/dist/ui/assets/react-vendor-CNOkPC89.js +0 -3
- package/dist/ui/assets/searchable-select-C2sP7JW5.js +0 -1
- package/dist/ui/assets/separator-2lt47Sla.js +0 -1
- package/dist/ui/assets/shared-DPKtsiFQ.js +0 -8
- package/dist/ui/assets/table-DbsFACgT.js +0 -1
- package/dist/ui/assets/tanstack-BjiH4QZq.js +0 -4
- package/dist/ui/assets/updates-C5iL4KNn.js +0 -1
- package/scripts/github/build-ai-review-packet.mjs +0 -242
- package/scripts/github/normalize-ai-review-output.mjs +0 -934
- package/scripts/github/prepare-ai-review-scope.mjs +0 -324
- package/scripts/github/run-ai-review-direct.mjs +0 -349
- /package/dist/cliproxy/{account-stats-key.d.ts → accounts/account-stats-key.d.ts} +0 -0
- /package/dist/cliproxy/{account-stats-key.js → accounts/account-stats-key.js} +0 -0
- /package/dist/cliproxy/{openai-compat-manager.d.ts → ai-providers/openai-compat-manager.d.ts} +0 -0
- /package/dist/cliproxy/{schema-sanitizer.d.ts → ai-providers/schema-sanitizer.d.ts} +0 -0
- /package/dist/cliproxy/{schema-sanitizer.js → ai-providers/schema-sanitizer.js} +0 -0
- /package/dist/cliproxy/{antigravity-responsibility.d.ts → auth/antigravity-responsibility.d.ts} +0 -0
- /package/dist/cliproxy/{auth-token-manager.d.ts → auth/auth-token-manager.d.ts} +0 -0
- /package/dist/cliproxy/{device-code-handler.d.ts → auth/device-code-handler.d.ts} +0 -0
- /package/dist/cliproxy/{device-code-handler.js → auth/device-code-handler.js} +0 -0
- /package/dist/cliproxy/{project-selection-handler.d.ts → auth/project-selection-handler.d.ts} +0 -0
- /package/dist/cliproxy/{project-selection-handler.js → auth/project-selection-handler.js} +0 -0
- /package/dist/cliproxy/{composite-validator.d.ts → config/composite-validator.d.ts} +0 -0
- /package/dist/cliproxy/{management-api-types.d.ts → management/management-api-types.d.ts} +0 -0
- /package/dist/cliproxy/{management-api-types.js → management/management-api-types.js} +0 -0
- /package/dist/cliproxy/{remote-token-uploader.d.ts → management/remote-token-uploader.d.ts} +0 -0
- /package/dist/cliproxy/{https-tunnel-proxy.d.ts → proxy/https-tunnel-proxy.d.ts} +0 -0
- /package/dist/cliproxy/{proxy-target-resolver.d.ts → proxy/proxy-target-resolver.d.ts} +0 -0
- /package/dist/cliproxy/{gemini-cli-quota-normalizer.d.ts → quota/gemini-cli-quota-normalizer.d.ts} +0 -0
- /package/dist/cliproxy/{quota-fetcher-gemini-cli.d.ts → quota/quota-fetcher-gemini-cli.d.ts} +0 -0
- /package/dist/cliproxy/{quota-fetcher-ghcp.d.ts → quota/quota-fetcher-ghcp.d.ts} +0 -0
- /package/dist/cliproxy/{quota-response-cache.d.ts → quota/quota-response-cache.d.ts} +0 -0
- /package/dist/cliproxy/{quota-response-cache.js → quota/quota-response-cache.js} +0 -0
- /package/dist/cliproxy/{quota-types.js → quota/quota-types.js} +0 -0
- /package/dist/cliproxy/{remote-proxy-client.d.ts → services/remote-proxy-client.d.ts} +0 -0
- /package/dist/cliproxy/{startup-lock.d.ts → services/startup-lock.d.ts} +0 -0
- /package/dist/cliproxy/{stats-transformer.d.ts → services/stats-transformer.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-BlliRfHq.js";import{r as j}from"./react-vendor-CNOkPC89.js";import{t as o}from"./notifications-B2HqRBj7.js";import{b2 as N,b3 as We,a as Se,B as D,d as f,c as oe,A as E,X as $e,Y as Ye,Z as Y,_ as ee,L as _,I as se,az as ye,b8 as es,D as ss,j as as,k as ts,l as rs,m as ns,aw as os,b4 as is}from"./index-TSYtCr3K.js";import{a as cs,u as z,b as M}from"./tanstack-BjiH4QZq.js";import{D as ke}from"./default-ports-1QQSffYX.js";import{S as ls}from"./separator-2lt47Sla.js";import{S as ds}from"./searchable-select-C2sP7JW5.js";import{R as be,T as us,aG as ms,K as G,a9 as hs,aJ as Ce,aI as gs,L as A,D as xs,ao as fs,a6 as ps,Z as ae,ar as js,v as vs,z as ws}from"./icons-CQ3MLSan.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";async function Ps(){const s=await fetch(N("/cursor/status"));if(!s.ok)throw new Error("Failed to fetch cursor status");return s.json()}async function Ns(){const s=await fetch(N("/cursor/settings"));if(!s.ok)throw new Error("Failed to fetch cursor config");return s.json()}async function ys(){const s=await fetch(N("/cursor/models"));if(!s.ok)throw new Error("Failed to fetch cursor models");return s.json()}async function bs(){const s=await fetch(N("/cursor/settings/raw"));if(!s.ok)throw new Error("Failed to fetch cursor raw settings");return s.json()}async function Cs(s){const t=await fetch(N("/cursor/settings"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!t.ok)throw new Error("Failed to update cursor config");return t.json()}async function Ss(s){const t=await fetch(N("/cursor/settings/raw"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(t.status===409)throw new We("Cursor raw settings changed externally");if(!t.ok)throw new Error("Failed to save cursor raw settings");return t.json()}async function ks(){const s=await fetch(N("/cursor/auth/auto-detect"),{method:"POST"});if(!s.ok){const t=await s.json().catch(()=>({error:"Auto-detect failed"}));throw new Error(t.error||"Auto-detect failed")}return s.json()}async function Ds(s){const t=await fetch(N("/cursor/auth/import"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!t.ok){const l=await t.json().catch(()=>({error:"Manual import failed"}));throw new Error(l.error||"Manual import failed")}return t.json()}async function Ms(){const s=await fetch(N("/cursor/daemon/start"),{method:"POST"});if(!s.ok)throw new Error("Failed to start cursor daemon");return s.json()}async function As(){const s=await fetch(N("/cursor/daemon/stop"),{method:"POST"});if(!s.ok)throw new Error("Failed to stop cursor daemon");return s.json()}function _s(){const s=cs(),t=z({queryKey:["cursor-status"],queryFn:Ps,refetchInterval:5e3}),l=z({queryKey:["cursor-config"],queryFn:Ns}),u=z({queryKey:["cursor-models"],queryFn:ys}),g=z({queryKey:["cursor-raw-settings"],queryFn:bs}),m=()=>{s.invalidateQueries({queryKey:["cursor-status"]}),s.invalidateQueries({queryKey:["cursor-config"]}),s.invalidateQueries({queryKey:["cursor-models"]}),s.invalidateQueries({queryKey:["cursor-raw-settings"]})},h=M({mutationFn:Cs,onSuccess:m}),r=M({mutationFn:Ss,onSuccess:m}),d=M({mutationFn:ks,onSuccess:m}),p=M({mutationFn:Ds,onSuccess:m}),i=M({mutationFn:Ms,onSuccess:m}),c=M({mutationFn:As,onSuccess:m});return j.useMemo(()=>({status:t.data,statusLoading:t.isLoading,statusError:t.error,refetchStatus:t.refetch,config:l.data,configLoading:l.isLoading,models:u.data?.models??[],currentModel:u.data?.current??null,modelsLoading:u.isLoading,rawSettings:g.data,rawSettingsLoading:g.isLoading,refetchRawSettings:g.refetch,updateConfig:h.mutate,updateConfigAsync:h.mutateAsync,isUpdatingConfig:h.isPending,saveRawSettings:r.mutate,saveRawSettingsAsync:r.mutateAsync,isSavingRawSettings:r.isPending,autoDetectAuth:d.mutate,autoDetectAuthAsync:d.mutateAsync,isAutoDetectingAuth:d.isPending,autoDetectAuthResult:d.data,importManualAuth:p.mutate,importManualAuthAsync:p.mutateAsync,isImportingManualAuth:p.isPending,manualAuthResult:p.data,startDaemon:i.mutate,startDaemonAsync:i.mutateAsync,isStartingDaemon:i.isPending,stopDaemon:c.mutate,stopDaemonAsync:c.mutateAsync,isStoppingDaemon:c.isPending}),[t.data,t.isLoading,t.error,t.refetch,l.data,l.isLoading,u.data,u.isLoading,g.data,g.isLoading,g.refetch,h.mutate,h.mutateAsync,h.isPending,r.mutate,r.mutateAsync,r.isPending,d.mutate,d.mutateAsync,d.isPending,d.data,p.mutate,p.mutateAsync,p.isPending,p.data,i.mutate,i.mutateAsync,i.isPending,c.mutate,c.mutateAsync,c.isPending])}function te(s){return{port:String(s?.port??ke),auto_start:s?.auto_start??!1,ghost_mode:s?.ghost_mode??!0,model:s?.model?.trim()||"gpt-5.3-codex",opus_model:s?.opus_model?.trim()||"",sonnet_model:s?.sonnet_model?.trim()||"",haiku_model:s?.haiku_model?.trim()||""}}function y(s,t,l){return s.find(g=>t.some(m=>m.test(g.id)))?.id??l}function re(s){return s.toLowerCase().replace(/[^a-z0-9]/g,"")}function b(s,t,l){const u=new Set(t.map(re)),g=s.find(h=>u.has(re(h.id)));if(g)return g.id;const m=s.find(h=>u.has(re(h.name)));return m?m.id:l}function Ts(s){try{const t=JSON.parse(s||"{}");return!t||typeof t!="object"||Array.isArray(t)?{isValid:!1,error:"Raw settings must be a JSON object"}:{isValid:!0,settings:t}}catch(t){return{isValid:!1,error:t.message||"Invalid JSON"}}}function q({label:s,description:t,value:l,models:u,disabled:g,allowDefaultFallback:m=!1,onChange:h}){const{t:r}=Se(),d=l||(m?"__default":""),p=j.useMemo(()=>{const i=u.map(c=>({value:c.id,groupKey:"models",searchText:`${c.name||c.id} ${c.id}`,keywords:[c.provider],triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:c.name||c.id}),c.provider&&e.jsx(D,{variant:"outline",className:"text-[9px] h-4 px-1 capitalize",children:c.provider})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate text-xs font-mono",children:c.name||c.id}),e.jsx(D,{variant:"outline",className:"text-[9px] h-4 px-1 capitalize",children:c.provider})]})}));return m?[{value:"__default",groupKey:"models",searchText:r("cursorPage.useDefaultModel"),triggerContent:e.jsx("span",{className:"truncate font-mono text-xs",children:r("cursorPage.useDefaultModel")}),itemContent:e.jsx("span",{children:r("cursorPage.useDefaultModel")})},...i]:i},[m,u,r]);return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{children:[e.jsx(_,{className:"text-xs font-medium",children:s}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:t})]}),e.jsx(ds,{value:d||void 0,onChange:i=>{if(m&&i==="__default"){h("");return}h(i)},disabled:g,placeholder:r("cursorPage.selectModel"),searchPlaceholder:r("searchableSelect.searchModels"),emptyText:r("searchableSelect.noResults"),triggerClassName:"h-9",groups:[{key:"models",label:r("cursorPage.availableModelCount",{count:u.length})}],options:p})]})}function ne({icon:s,label:t,ok:l,detail:u}){return e.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-muted/50 px-3 py-2",children:[e.jsx(s,{className:"h-4 w-4 text-muted-foreground shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("p",{className:"text-sm",children:t})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[l?e.jsx(vs,{className:"h-4 w-4 text-green-500"}):e.jsx(ws,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:oe("text-xs",l?"text-green-500":"text-muted-foreground"),title:u,children:u})]})]})}function Us(){const{t:s}=Se(),{status:t,statusLoading:l,refetchStatus:u,config:g,updateConfigAsync:m,isUpdatingConfig:h,models:r,modelsLoading:d,currentModel:p,rawSettings:i,rawSettingsLoading:c,refetchRawSettings:De,saveRawSettingsAsync:Me,isSavingRawSettings:ie,autoDetectAuthAsync:Ae,isAutoDetectingAuth:ce,importManualAuthAsync:_e,isImportingManualAuth:le,startDaemonAsync:Te,isStartingDaemon:Fe,stopDaemonAsync:Re,isStoppingDaemon:de}=_s(),[k,ue]=j.useState(()=>te()),[v,me]=j.useState(!1),[he,Ie]=j.useState("{}"),[T,K]=j.useState(!1),[Le,I]=j.useState(!1),[B,ge]=j.useState(""),[J,xe]=j.useState(""),C=te(g),fe=v?k.port:C.port,U=v?k.auto_start:C.auto_start,Q=v?k.ghost_mode:C.ghost_mode,w=v?k.model:C.model,H=v?k.opus_model:C.opus_model,V=v?k.sonnet_model:C.sonnet_model,X=v?k.haiku_model:C.haiku_model,Z=T?he:JSON.stringify(i?.settings??{},null,2),pe=!!i,F=j.useMemo(()=>Ts(Z),[Z]),je=F.isValid,ve=v||T,Oe=!T||pe&&je,L=j.useMemo(()=>{const a=new Set,n=[...r].sort((S,$)=>S.name.localeCompare($.name)),x=n.filter(S=>a.has(S.id)?!1:(a.add(S.id),!0));return w&&!n.some(S=>S.id===w)?[{id:w,name:w,provider:"custom"},...x]:x},[r,w]),P=a=>{ue(n=>a(v?n:C)),me(!0)},Ee=!!(t?.enabled&&t?.authenticated&&!t?.token_expired),ze=j.useMemo(()=>t?.enabled?e.jsx(D,{children:s("cursorPage.enabled")}):e.jsx(D,{variant:"secondary",children:s("cursorPage.disabled")}),[t?.enabled,s]),Ge=async({suppressSuccessToast:a=!1}={})=>{const n=Number(fe);if(!Number.isInteger(n)||n<1||n>65535)return o.error(s("cursorPage.invalidPort")),!1;if(!w.trim())return o.error(s("cursorPage.defaultModelRequired")),!1;try{return await m({port:n,auto_start:U,ghost_mode:Q,model:w,opus_model:H||void 0,sonnet_model:V||void 0,haiku_model:X||void 0}),me(!1),ue(te({port:n,auto_start:U,ghost_mode:Q,model:w,opus_model:H||void 0,sonnet_model:V||void 0,haiku_model:X||void 0})),a||o.success(s("cursorPage.savedConfig")),!0}catch(x){return o.error(x.message||s("cursorPage.failedSaveConfig")),!1}},W=a=>{if(d){o.error(s("cursorPage.modelsLoadingWait"));return}if(r.length===0){o.error(s("cursorPage.noModelsAvailable"));return}const n=w||p||r[0]?.id||"gpt-5.3-codex",x=b(r,["gpt-5.3-codex","gpt53codex","GPT-5.3 Codex"],y(r,[/gpt[-.]?5.*codex/i],n)),S=b(r,["gpt-5.1-codex-max","gpt51codexmax","GPT-5.1 Codex Max"],y(r,[/gpt[-.]?5.*codex.*max/i],x)),$=b(r,["gpt-5-fast","gpt5fast","GPT-5 Fast"],y(r,[/gpt[-.]?5.*fast/i],x)),Ve=b(r,["gpt-5-mini","gpt5mini","GPT-5 Mini"],y(r,[/gpt[-.]?5.*mini/i],$)),Pe=b(r,["claude-4.6-opus","claude46opus","Claude 4.6 Opus"],y(r,[/claude[-.]?4\.?6.*opus/i,/claude.*opus/i],x)),Ne=b(r,["claude-4.5-sonnet","claude45sonnet","Claude 4.5 Sonnet"],y(r,[/claude[-.]?4\.?5.*sonnet/i,/claude.*sonnet/i],x)),Xe=b(r,["claude-4.5-haiku","claude45haiku","Claude 4.5 Haiku"],y(r,[/claude[-.]?4\.?5.*haiku/i,/haiku/i],Ne)),O=b(r,["gemini-3-pro","gemini3pro","Gemini 3 Pro"],y(r,[/gemini[-.]?3.*pro/i],x)),Ze=b(r,["gemini-3-flash","gemini3flash","Gemini 3 Flash"],y(r,[/gemini[-.]?3.*flash/i,/gemini[-.]?2\.?5.*flash/i],O));if(a==="codex53"){P(R=>({...R,model:x,opus_model:S,sonnet_model:x,haiku_model:Ve})),o.success(s("cursorPage.appliedCodexPreset"));return}if(a==="claude46"){P(R=>({...R,model:Pe,opus_model:Pe,sonnet_model:Ne,haiku_model:Xe})),o.success(s("cursorPage.appliedClaudePreset"));return}P(R=>({...R,model:O,opus_model:O,sonnet_model:O,haiku_model:Ze})),o.success(s("cursorPage.appliedGeminiPreset"))},we=async a=>{try{await m({enabled:a}),o.success(s(a?"cursorPage.integrationEnabled":"cursorPage.integrationDisabled"))}catch(n){o.error(n.message||s("cursorPage.failedUpdateIntegration"))}},qe=async()=>{try{await Ae(),o.success(s("cursorPage.credentialsImported"))}catch(a){o.error(a.message||s("cursorPage.autoDetectFailed"))}},Ke=async()=>{if(!B.trim()||!J.trim()){o.error(s("cursorPage.manualRequired"));return}try{await _e({accessToken:B.trim(),machineId:J.trim()}),o.success(s("cursorPage.credentialsImported")),I(!1),ge(""),xe("")}catch(a){o.error(a.message||s("cursorPage.manualImportFailed"))}},Be=async()=>{try{const a=await Te();if(!a.success){o.error(a.error||s("cursorPage.failedStartDaemon"));return}o.success(a.pid?s("cursorPage.daemonStartedWithPid",{pid:a.pid}):s("cursorPage.daemonStarted"))}catch(a){o.error(a.message||s("cursorPage.failedStartDaemon"))}},Je=async()=>{try{const a=await Re();if(!a.success){o.error(a.error||s("cursorPage.failedStopDaemon"));return}o.success(s("cursorPage.daemonStopped"))}catch(a){o.error(a.message||s("cursorPage.failedStopDaemon"))}},Ue=async({suppressSuccessToast:a=!1}={})=>{if(!pe)return o.error(s("cursorPage.rawLoading")),!1;if(!F.isValid||!F.settings)return o.error(F.error||s("cursorPage.invalidJson")),!1;try{return await Me({settings:F.settings,expectedMtime:i?.mtime}),K(!1),a||o.success(s("cursorPage.rawSaved")),!0}catch(n){return is(n)?o.error(s("cursorPage.rawChanged")):o.error(n.message||s("cursorPage.failedSaveRaw")),!1}},Qe=async()=>{if(!ve)return;const a=v,n=T;a&&!await Ge({suppressSuccessToast:n})||n&&!await Ue({suppressSuccessToast:a})||a&&n&&o.success(s("cursorPage.savedAll"))},He=()=>{K(!1),u(),De()};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/30 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:"/assets/sidebar/cursor.svg",alt:"",className:"w-5 h-5 object-contain shrink-0"}),e.jsx("h1",{className:"font-semibold",children:s("cursorPage.title")}),e.jsx(D,{variant:"outline",className:"h-5 border-amber-500/60 bg-amber-500/10 px-1.5 text-[10px] font-semibold uppercase tracking-wide text-amber-800 dark:text-amber-300",children:s("cursorPage.beta")}),ze]}),e.jsx(f,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>u(),disabled:l,children:e.jsx(be,{className:oe("w-4 h-4",l&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("cursorPage.subtitle")})]}),e.jsx(E,{className:"flex-1",children:e.jsxs("div",{className:"p-3 space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-yellow-500/50 bg-yellow-500/15 p-3 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(us,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-400 shrink-0"}),e.jsx("span",{className:"text-xs font-semibold text-yellow-800 dark:text-yellow-200",children:s("cursorPage.unofficialTitle")})]}),e.jsxs("ul",{className:"text-[11px] text-yellow-700 dark:text-yellow-300 space-y-0.5 pl-6 list-disc",children:[e.jsx("li",{children:s("cursorPage.unofficialItem1")}),e.jsx("li",{children:s("cursorPage.unofficialItem2")}),e.jsx("li",{children:s("cursorPage.unofficialItem3")})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ne,{icon:ms,label:s("cursorPage.integration"),ok:!!t?.enabled,detail:t?.enabled?s("cursorPage.enabled"):s("cursorPage.disabled")}),e.jsx(ne,{icon:G,label:s("cursorPage.authentication"),ok:!!(t?.authenticated&&!t?.token_expired),detail:t?.authenticated?t?.token_expired?s("cursorPage.expired"):t.auth_method??s("cursorPage.connected"):s("cursorPage.notConnected")}),e.jsx(ne,{icon:hs,label:s("cursorPage.daemon"),ok:!!t?.daemon_running,detail:t?.daemon_running?s("cursorPage.running"):s("cursorPage.stopped")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s("cursorPage.actions")}),t?.enabled?e.jsxs(f,{variant:"outline",size:"sm",className:"w-full",onClick:()=>we(!1),disabled:h,children:[e.jsx(Ce,{className:"w-3.5 h-3.5 mr-1.5"}),s("cursorPage.disableIntegration")]}):e.jsxs(f,{size:"sm",className:"w-full",onClick:()=>we(!0),disabled:h,children:[e.jsx(gs,{className:"w-3.5 h-3.5 mr-1.5"}),s("cursorPage.enableIntegration")]}),e.jsxs(f,{variant:"outline",size:"sm",className:"w-full",onClick:qe,disabled:ce,children:[ce?e.jsx(A,{className:"w-3.5 h-3.5 mr-1.5 animate-spin"}):e.jsx(G,{className:"w-3.5 h-3.5 mr-1.5"}),s("cursorPage.autoDetectAuth")]}),e.jsxs(f,{variant:"outline",size:"sm",className:"w-full",onClick:()=>I(!0),children:[e.jsx(G,{className:"w-3.5 h-3.5 mr-1.5"}),s("cursorPage.manualAuthImport")]}),t?.daemon_running?e.jsxs(f,{variant:"outline",size:"sm",className:"w-full",onClick:Je,disabled:de,children:[de?e.jsx(A,{className:"w-3.5 h-3.5 mr-1.5 animate-spin"}):e.jsx(Ce,{className:"w-3.5 h-3.5 mr-1.5"}),s("cursorPage.stopDaemon")]}):e.jsxs(f,{size:"sm",className:"w-full",onClick:Be,disabled:!Ee,children:[Fe?e.jsx(A,{className:"w-3.5 h-3.5 mr-1.5 animate-spin"}):e.jsx(xs,{className:"w-3.5 h-3.5 mr-1.5"}),s("cursorPage.startDaemon")]})]})]})}),e.jsx("div",{className:"p-3 border-t bg-background text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{children:s("cursorPage.port")}),e.jsx("span",{children:t?.port??g?.port??ke})]})})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-4 border-b bg-background flex items-center justify-between shrink-0",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s("cursorPage.configuration")}),i&&e.jsx(D,{variant:"outline",className:"text-xs",children:"cursor.settings.json"})]}),i&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[s("cursorPage.lastModified")," ",i.exists?new Date(i.mtime).toLocaleString():s("cursorPage.neverSaved")]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{variant:"ghost",size:"sm",onClick:He,disabled:l||c,children:e.jsx(be,{className:oe("w-4 h-4",(l||c)&&"animate-spin")})}),e.jsx(f,{size:"sm",onClick:Qe,disabled:h||ie||!ve||!Oe,children:h||ie?e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"w-4 h-4 mr-1 animate-spin"}),s("cursorPage.saving")]}):e.jsxs(e.Fragment,{children:[e.jsx(fs,{className:"w-4 h-4 mr-1"}),s("cursorPage.save")]})})]})]}),e.jsxs("div",{className:"flex-1 min-h-0 flex divide-x overflow-hidden",children:[e.jsx("div",{className:"w-[540px] shrink-0 flex flex-col min-h-0 overflow-hidden bg-muted/5",children:e.jsxs($e,{defaultValue:"config",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(Ye,{className:"w-full",children:[e.jsx(Y,{value:"config",className:"flex-1",children:s("cursorPage.modelConfig")}),e.jsx(Y,{value:"settings",className:"flex-1",children:s("cursorPage.settings")}),e.jsx(Y,{value:"info",className:"flex-1",children:s("cursorPage.info")})]})}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:[e.jsx(ee,{value:"config",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(E,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[e.jsx(ps,{className:"w-4 h-4"}),s("cursorPage.presets")]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:s("cursorPage.presetsDesc")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(f,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>W("codex53"),disabled:d||r.length===0,title:"OpenAI-only mapping: GPT-5.3 Codex / Codex Max / GPT-5 Mini",children:[e.jsx(ae,{className:"w-3 h-3"}),"GPT-5.3 Codex"]}),e.jsxs(f,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>W("claude46"),disabled:d||r.length===0,title:"Claude-first mapping: Opus 4.6 / Sonnet 4.5 / Haiku 4.5",children:[e.jsx(ae,{className:"w-3 h-3"}),"Claude 4.6"]}),e.jsxs(f,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>W("gemini3"),disabled:d||r.length===0,title:"Gemini-first mapping: Gemini 3 Pro + Gemini 3 Flash",children:[e.jsx(ae,{className:"w-3 h-3"}),"Gemini 3 Pro"]})]})]}),e.jsx(ls,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-2",children:s("cursorPage.modelMapping")}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:s("cursorPage.modelMappingDesc")}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(q,{label:s("cursorPage.defaultModel"),description:s("cursorPage.defaultModelDesc"),value:w,models:L,disabled:d,onChange:a=>{P(n=>({...n,model:a}))}}),e.jsx(q,{label:s("cursorPage.opusModel"),description:s("cursorPage.opusModelDesc"),value:H,models:L,disabled:d,allowDefaultFallback:!0,onChange:a=>{P(n=>({...n,opus_model:a}))}}),e.jsx(q,{label:s("cursorPage.sonnetModel"),description:s("cursorPage.sonnetModelDesc"),value:V,models:L,disabled:d,allowDefaultFallback:!0,onChange:a=>{P(n=>({...n,sonnet_model:a}))}}),e.jsx(q,{label:s("cursorPage.haikuModel"),description:s("cursorPage.haikuModelDesc"),value:X,models:L,disabled:d,allowDefaultFallback:!0,onChange:a=>{P(n=>({...n,haiku_model:a}))}})]})]})]})})}),e.jsx(ee,{value:"settings",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(E,{className:"flex-1",children:e.jsx("div",{className:"p-4 space-y-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-sm font-medium",children:s("cursorPage.runtimeSettings")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(_,{htmlFor:"cursor-port",className:"text-xs",children:"Port"}),e.jsx(se,{id:"cursor-port",type:"number",min:1,max:65535,className:"max-w-[150px] h-8",value:fe,onChange:a=>{P(n=>({...n,port:a.target.value}))}})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(_,{htmlFor:"cursor-auto-start",className:"text-xs",children:s("cursorPage.autoStartDaemon")}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:s("cursorPage.autoStartDesc")})]}),e.jsx(ye,{id:"cursor-auto-start",checked:U,onCheckedChange:a=>{P(n=>({...n,auto_start:a}))}})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(_,{htmlFor:"cursor-ghost-mode",className:"text-xs",children:s("cursorPage.ghostMode")}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:s("cursorPage.ghostModeDesc")})]}),e.jsx(ye,{id:"cursor-ghost-mode",checked:Q,onCheckedChange:a=>{P(n=>({...n,ghost_mode:a}))}})]})]})})})}),e.jsx(ee,{value:"info",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx(E,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:s("cursorPage.provider")}),e.jsx("span",{className:"font-mono",children:"Cursor IDE"})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:s("cursorPage.filePath")}),e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-xs break-all",children:i?.path??"~/.ccs/cursor.settings.json"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Model mapping writes `ANTHROPIC_MODEL`, `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, and `ANTHROPIC_DEFAULT_HAIKU_MODEL` in `cursor.settings.json`."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:s("cursorPage.availableModels")}),d?e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(A,{className:"w-4 h-4 animate-spin"}),s("cursorPage.loadingModels")]}):r.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:s("cursorPage.noModels")}):e.jsx("div",{className:"space-y-2",children:r.map(a=>e.jsxs("div",{className:"rounded-lg border px-3 py-2 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:a.id}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a.name," • ",a.provider]})]}),a.id===p&&e.jsx(D,{children:s("cursorPage.default")})]},a.id))})]})]})})})]})]})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-2 bg-muted/30 border-b flex items-center gap-2 shrink-0 h-[45px]",children:[e.jsx(js,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:s("cursorPage.rawConfiguration")})]}),e.jsx(es,{rawJsonContent:Z,isRawJsonValid:je,rawJsonEdits:T?he:null,rawSettingsEnv:i?.settings?.env,onChange:a=>{K(!0),Ie(a)}})]})]})]})})]}),e.jsx(ss,{open:Le,onOpenChange:I,children:e.jsxs(as,{children:[e.jsxs(ts,{children:[e.jsx(rs,{children:s("cursorPage.manualImportTitle")}),e.jsx(ns,{children:s("cursorPage.manualImportDesc")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(_,{htmlFor:"cursor-manual-token",children:s("cursorPage.accessToken")}),e.jsx(se,{id:"cursor-manual-token",value:B,onChange:a=>ge(a.target.value),placeholder:s("cursorPage.accessTokenPlaceholder")})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(_,{htmlFor:"cursor-manual-machine-id",children:s("cursorPage.machineId")}),e.jsx(se,{id:"cursor-manual-machine-id",value:J,onChange:a=>xe(a.target.value),placeholder:s("cursorPage.machineIdPlaceholder")})]})]}),e.jsxs(os,{children:[e.jsx(f,{variant:"outline",onClick:()=>I(!1),children:s("cursorPage.cancel")}),e.jsxs(f,{onClick:Ke,disabled:le,children:[le?e.jsx(A,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(G,{className:"w-4 h-4 mr-2"}),s("cursorPage.import")]})]})]})})]})}export{Us as CursorPage};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-BlliRfHq.js";import{r as Q}from"./react-vendor-CNOkPC89.js";import{t as j}from"./notifications-B2HqRBj7.js";import{b2 as X,b3 as be,C as v,o as y,p as b,B as P,b as N,v as H,w as q,x as Y,y as W,z as k,I as oe,a as Ne,b9 as we,ba as ne,bb as ke,X as Se,Y as Pe,Z as U,_ as V,A as T,b4 as Ee,c as Ce}from"./index-TSYtCr3K.js";import{a as Te,u as ae,b as Ae}from"./tanstack-BjiH4QZq.js";import{a as Re}from"./raw-json-settings-editor-panel-DQr_y0E4.js";import{aS as _e,as as De,I as Oe,L as Me,S as Be,aR as Fe,v as Le,z as Ie,T as Ke,a9 as Ue,aG as Ve,n as ie}from"./icons-CQ3MLSan.js";import{S as A}from"./separator-2lt47Sla.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function $e(s){try{const r=JSON.parse(s);return!r||typeof r!="object"||Array.isArray(r)?{settings:null,parseError:"JSON root must be an object."}:{settings:r,parseError:null}}catch(r){return{settings:null,parseError:r.message}}}async function ze(){const s=await fetch(X("/droid/diagnostics"));if(!s.ok)throw new Error("Failed to fetch Droid diagnostics");return s.json()}async function Je(){const s=await fetch(X("/droid/settings/raw"));if(!s.ok)throw new Error("Failed to fetch Droid raw settings");return s.json()}async function Qe(s){const r=await fetch(X("/droid/settings/raw"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(r.status===409)throw new be("Droid raw settings changed externally");if(!r.ok){const n=await r.json().catch(()=>null);throw new Error(n?.error||"Failed to save Droid raw settings")}return r.json()}function He(){const s=Te(),r=ae({queryKey:["droid-diagnostics"],queryFn:ze,refetchInterval:1e4}),n=ae({queryKey:["droid-raw-settings"],queryFn:Je}),o=Ae({mutationFn:Qe,onSuccess:(d,l)=>{s.setQueryData(["droid-raw-settings"],t=>{const a=t?.path??"~/.factory/settings.json",u=t?.resolvedPath??a,x=$e(l.rawText);return{path:a,resolvedPath:u,exists:!0,mtime:d.mtime,rawText:l.rawText,settings:x.settings,parseError:x.parseError}}),s.invalidateQueries({queryKey:["droid-diagnostics"]})}});return Q.useMemo(()=>({diagnostics:r.data,diagnosticsLoading:r.isLoading,diagnosticsError:r.error,refetchDiagnostics:r.refetch,rawSettings:n.data,rawSettingsLoading:n.isLoading,rawSettingsError:n.error,refetchRawSettings:n.refetch,saveRawSettings:o.mutate,saveRawSettingsAsync:o.mutateAsync,isSavingRawSettings:o.isPending}),[r.data,r.isLoading,r.error,r.refetch,n.data,n.isLoading,n.error,n.refetch,o.mutate,o.mutateAsync,o.isPending])}const qe=["customModels","custom_models"],Ye={low:4e3,medium:12e3,high:3e4,max:5e4,xhigh:64e3},We=["low","medium","high","max","xhigh"];function h(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)}function p(s){return typeof s=="string"&&s.trim()?s.trim():null}function _(s){return typeof s=="number"&&Number.isFinite(s)?s:null}function G(s){if(!s)return"unknown";const r=s.toLowerCase();return r==="anthropic"?"anthropic":r==="openai"?"openai":r==="generic-chat-completion-api"?"generic-chat-completion-api":"unknown"}function Ge(s,r,n){return`${s}:${r}:${encodeURIComponent(String(n))}`}function Xe(s){const r=s.indexOf(":"),n=s.indexOf(":",r+1);if(r<=0||n<=r+1)return null;const o=s.slice(0,r),d=s.slice(r+1,n),l=s.slice(n+1);if(o!=="customModels"&&o!=="custom_models"||d!=="array"&&d!=="object")return null;const t=decodeURIComponent(l);if(d==="array"){const a=Number.parseInt(t,10);return!Number.isInteger(a)||a<0?null:{rootKey:o,locationType:d,locationKey:a}}return{rootKey:o,locationType:d,locationKey:t}}function Ze(s){return!s||s<=0?null:s<=4e3?"low":s<=12e3?"medium":s<=3e4?"high":s<=5e4?"max":"xhigh"}function es(s){return Object.prototype.hasOwnProperty.call(s,"extraArgs")?"extraArgs":Object.prototype.hasOwnProperty.call(s,"extra_args")?"extra_args":"extraArgs"}function le(s){return JSON.parse(JSON.stringify(s))}function ss(s){const r=[];for(const n of qe){const o=s[n];if(Array.isArray(o)){o.forEach((d,l)=>{h(d)&&r.push({rootKey:n,locationType:"array",locationKey:l,entry:d})});continue}if(h(o))for(const[d,l]of Object.entries(o))h(l)&&r.push({rootKey:n,locationType:"object",locationKey:d,entry:l})}return r}function de(s,r){const n=Xe(r);if(!n)return null;const o=s[n.rootKey];if(n.locationType==="array"){if(!Array.isArray(o))return null;const t=o[n.locationKey];if(!h(t))return null;const a=p(t.provider);return{entry:t,providerKind:G(a)}}if(!h(o))return null;const d=o[n.locationKey];if(!h(d))return null;const l=p(d.provider);return{entry:d,providerKind:G(l)}}function rs(s,r){const n=r.extraArgs??r.extra_args,o=h(n)?n:null;if(!o)return{effort:null,anthropicBudgetTokens:null};const d=p(o.reasoning_effort)??p(o.reasoningEffort),l=h(o.reasoning)?o.reasoning:null,t=l?p(l.effort):null,a=h(o.thinking)?o.thinking:null,u=a?p(a.type):null,x=a?_(a.budget_tokens)??_(a.budgetTokens):null;return s==="openai"?{effort:t??d,anthropicBudgetTokens:null}:s==="anthropic"?u==="enabled"?{effort:Ze(x)??"high",anthropicBudgetTokens:x}:{effort:t??d,anthropicBudgetTokens:x}:{effort:d??t,anthropicBudgetTokens:null}}function ts(s){if(!s)return null;const r=s.trim().toLowerCase();return!r||r==="default"||r==="unset"||r==="off"||r==="none"||r==="disabled"?null:r}function ce(s){const r=es(s),n=s[r],o=h(n)?{...n}:{};return{extraArgsKey:r,extraArgs:o}}function ue(s,r,n){if(Object.keys(n).length===0){delete s[r];return}s[r]=n}function ns(s){return ss(s).map(({rootKey:r,locationType:n,locationKey:o,entry:d})=>{const l=p(d.displayName)??p(d.model_display_name)??"Unnamed model",t=p(d.model)??"",a=p(d.provider)??"unknown",u=G(a),x=rs(u,d);return{id:Ge(r,n,o),rootKey:r,locationType:n,locationKey:o,displayName:l,model:t,provider:a,providerKind:u,effort:x.effort,anthropicBudgetTokens:x.anthropicBudgetTokens}})}function as(s,r,n){const o=le(s),d=de(o,r);if(!d)return null;const l=ts(n),{extraArgsKey:t,extraArgs:a}=ce(d.entry);if(d.providerKind==="openai")if(delete a.reasoning_effort,delete a.reasoningEffort,!l)delete a.reasoning;else{const u=h(a.reasoning)?a.reasoning:{};a.reasoning={...u,effort:l}}else if(d.providerKind==="anthropic")if(delete a.reasoning_effort,delete a.reasoningEffort,delete a.reasoning,!l)delete a.thinking;else{const u=h(a.thinking)?{...a.thinking}:{},x=_(u.budget_tokens)??_(u.budgetTokens);delete u.budgetTokens,a.thinking={...u,type:"enabled",budget_tokens:x??Ye[l]??3e4}}else delete a.reasoning,delete a.reasoningEffort,l?a.reasoning_effort=l:delete a.reasoning_effort;return ue(d.entry,t,a),o}function is(s,r,n){const o=le(s),d=de(o,r);if(!d||d.providerKind!=="anthropic")return null;const{extraArgsKey:l,extraArgs:t}=ce(d.entry),a=h(t.thinking)?{...t.thinking}:{};if(a.type="enabled",n===null)delete a.budget_tokens,delete a.budgetTokens;else{const u=Math.max(1024,Math.floor(n));a.budget_tokens=u,delete a.budgetTokens}return t.thinking=a,ue(d.entry,l,t),o}const $="__unset__";function os(s){return s.providerKind==="openai"?"Writes: extraArgs.reasoning.effort":s.providerKind==="anthropic"?"Writes: extraArgs.thinking.{type,budget_tokens}":"Writes: extraArgs.reasoning_effort"}function ls({models:s,disabled:r,disabledReason:n,onEffortChange:o,onAnthropicBudgetChange:d}){return e.jsxs(v,{children:[e.jsx(y,{className:"pb-2",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(_e,{className:"h-4 w-4"}),"BYOK Reasoning / Thinking",e.jsx(P,{variant:"outline",className:"text-[10px] font-normal",children:"customModels"})]})}),e.jsxs(N,{className:"space-y-3",children:[n&&e.jsx("p",{className:"text-xs text-amber-600",children:n}),s.length===0?e.jsx("p",{className:"text-xs text-muted-foreground",children:"No BYOK custom models found in settings.json (`customModels` or `custom_models`)."}):e.jsx("div",{className:"space-y-2",children:s.map(l=>e.jsxs("div",{className:"rounded-md border p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-medium truncate",children:l.displayName}),e.jsx("p",{className:"text-[11px] font-mono text-muted-foreground truncate",children:l.model||"(missing model id)"})]}),e.jsx(P,{variant:"outline",className:"font-mono text-[10px] shrink-0",children:l.provider})]}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[11px] font-medium",children:"Reasoning Effort"}),e.jsxs(H,{value:l.effort??$,onValueChange:t=>o(l.id,t===$?null:t),disabled:r,children:[e.jsx(q,{className:"h-8 text-xs",children:e.jsx(Y,{placeholder:"Use provider default"})}),e.jsxs(W,{children:[e.jsx(k,{value:$,children:"Use provider default"}),We.map(t=>e.jsx(k,{value:t,children:t},t))]})]})]}),l.providerKind==="anthropic"&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[11px] font-medium",children:"Thinking Budget Tokens"}),e.jsx(oe,{type:"number",min:1024,step:1024,value:l.anthropicBudgetTokens??"",placeholder:"auto",className:"h-8 text-xs",disabled:r,onChange:t=>{const a=t.target.value.trim();if(!a){d(l.id,null);return}const u=Number.parseInt(a,10);Number.isFinite(u)&&d(l.id,Math.max(1024,u))}})]})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:os(l)})]},l.id))})]})]})}const C="__unset__",ds=[{key:"reasoningEffort",label:"Reasoning Effort",description:"none | medium | high | max",options:[{value:"none",label:"none"},{value:"medium",label:"medium"},{value:"high",label:"high"},{value:"max",label:"max"}]},{key:"autonomyLevel",label:"Autonomy Level",description:"suggest | aggressive | full",options:[{value:"suggest",label:"suggest"},{value:"aggressive",label:"aggressive"},{value:"full",label:"full"}]},{key:"diffMode",label:"Diff Mode",description:"auto | none | inline | split",options:[{value:"auto",label:"auto"},{value:"none",label:"none"},{value:"inline",label:"inline"},{value:"split",label:"split"}]}],cs=[{key:"todoEnabled",label:"Todo Enabled"},{key:"todoAutoRefresh",label:"Todo Auto Refresh"},{key:"autoCompactEnabled",label:"Auto Compact Enabled"},{key:"soundEnabled",label:"Sound Enabled"}],us=[{key:"maxTurns",label:"Max Turns",min:1,step:1},{key:"maxToolCalls",label:"Max Tool Calls",min:1,step:1},{key:"autoCompactThreshold",label:"Auto Compact Threshold",min:1e3,step:1e3}];function ms(s){return s===!0?"true":s===!1?"false":C}function xs(s){return s==="true"?!0:s==="false"?!1:null}function gs({values:s,disabled:r,disabledReason:n,onEnumSettingChange:o,onBooleanSettingChange:d,onNumberSettingChange:l}){return e.jsxs(v,{children:[e.jsx(y,{className:"pb-2",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(De,{className:"h-4 w-4"}),"Quick Settings",e.jsx(P,{variant:"outline",className:"text-[10px] font-normal",children:"settings.json"})]})}),e.jsxs(N,{className:"space-y-4",children:[n&&e.jsx("p",{className:"text-xs text-amber-600",children:n}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[ds.map(t=>e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:t.label}),e.jsxs(H,{value:s[t.key]??C,onValueChange:a=>o(t.key,a===C?null:a),disabled:r,children:[e.jsx(q,{className:"h-8 text-xs",children:e.jsx(Y,{placeholder:"Use default"})}),e.jsxs(W,{children:[e.jsx(k,{value:C,children:"Use default"}),t.options.map(a=>e.jsx(k,{value:a.value,children:a.label},a.value))]})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:t.description})]},t.key)),us.map(t=>e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:t.label}),e.jsx(oe,{type:"number",min:t.min,step:t.step,value:s[t.key]??"",onChange:a=>{const u=a.target.value.trim();if(!u){l(t.key,null);return}const x=Number.parseInt(u,10);Number.isFinite(x)&&l(t.key,Math.max(t.min,x))},className:"h-8 text-xs",disabled:r})]},t.key)),cs.map(t=>e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:t.label}),e.jsxs(H,{value:ms(s[t.key]),onValueChange:a=>d(t.key,xs(a)),disabled:r,children:[e.jsx(q,{className:"h-8 text-xs",children:e.jsx(Y,{placeholder:"Use default"})}),e.jsxs(W,{children:[e.jsx(k,{value:C,children:"Use default"}),e.jsx(k,{value:"true",children:"true"}),e.jsx(k,{value:"false",children:"false"})]})]})]},t.key))]})]})]})}const fs=[{id:"droid-cli-overview",label:"Droid CLI Overview",url:"https://docs.factory.ai/cli/",description:"Primary entry docs for setup, auth, and core CLI usage."},{id:"droid-byok-overview",label:"BYOK Overview",url:"https://docs.factory.ai/cli/byok/overview/",description:"BYOK model/provider shape, provider values, and migration notes."},{id:"droid-settings-reference",label:"settings.json Reference",url:"https://docs.factory.ai/cli/configuration/settings/",description:"Supported settings keys, defaults, and allowed values."}],hs=[{provider:"anthropic",label:"Anthropic Messages API",apiFormat:"Messages API",url:"https://docs.anthropic.com/en/api/messages"},{provider:"openai",label:"OpenAI Responses API",apiFormat:"Responses API",url:"https://platform.openai.com/docs/api-reference/responses"},{provider:"generic-chat-completion-api",label:"OpenAI Chat Completions Spec",apiFormat:"Chat Completions API",url:"https://platform.openai.com/docs/api-reference/chat"}];function ps(s){const r=/https?:\/\/[^\s)]+/g,n=[];let o=0,d;for(;(d=r.exec(s))!==null;){const[l]=d,t=d.index;t>o&&n.push(s.slice(o,t)),n.push(e.jsx("a",{href:l,target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:l},`${l}-${t}`)),o=t+l.length}return o<s.length&&n.push(s.slice(o)),n.length>0?n:[s]}function js(s){return!s||!Number.isFinite(s)?"N/A":new Date(s).toLocaleString()}function vs(s){return!s||s<=0?"0 B":s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(2)} MB`}function ys(s){try{const r=JSON.parse(s);return!r||typeof r!="object"||Array.isArray(r)?{valid:!1,error:"JSON root must be an object."}:{valid:!0,value:r}}catch(r){return{valid:!1,error:r.message}}}function z(s){return typeof s=="string"?s:null}function J(s){return typeof s=="number"&&Number.isFinite(s)?s:null}function R(s){return typeof s=="boolean"?s:null}function g({label:s,value:r,mono:n=!1}){return e.jsxs("div",{className:"flex items-start justify-between gap-3 text-sm",children:[e.jsx("span",{className:"text-muted-foreground shrink-0",children:s}),e.jsx("span",{className:Ce("text-right break-all",n&&"font-mono text-xs"),children:r})]})}function _s(){const{t:s}=Ne(),{diagnostics:r,diagnosticsLoading:n,diagnosticsError:o,refetchDiagnostics:d,rawSettings:l,rawSettingsLoading:t,refetchRawSettings:a,saveRawSettingsAsync:u,isSavingRawSettings:x}=He(),[D,O]=Q.useState(null),M=l?.rawText??"{}",B=D??M,Z=D!==null&&D!==M,c=ys(B),F=c.valid?{valid:!0}:{valid:!1,error:c.error},ee=m=>{if(m===M){O(null);return}O(m)},L=m=>{ee(JSON.stringify(m,null,2)+`
|
|
2
|
-
`)},I=(m,w)=>{if(!c.valid){j.error(s("droidPage.fixJsonBeforeQuickSettings"));return}const S={...c.value};w==null?delete S[m]:S[m]=w,L(S)},me=c.valid?{reasoningEffort:z(c.value.reasoningEffort),autonomyLevel:z(c.value.autonomyLevel),diffMode:z(c.value.diffMode),maxTurns:J(c.value.maxTurns),maxToolCalls:J(c.value.maxToolCalls),autoCompactThreshold:J(c.value.autoCompactThreshold),todoEnabled:R(c.value.todoEnabled),todoAutoRefresh:R(c.value.todoAutoRefresh),autoCompactEnabled:R(c.value.autoCompactEnabled),soundEnabled:R(c.value.soundEnabled)}:{reasoningEffort:null,autonomyLevel:null,diffMode:null,maxTurns:null,maxToolCalls:null,autoCompactThreshold:null,todoEnabled:null,todoAutoRefresh:null,autoCompactEnabled:null,soundEnabled:null},xe=c.valid?ns(c.value):[],ge=async()=>{await Promise.all([d(),a()])},fe=async()=>{if(!F.valid){j.error(s("droidPage.invalidJson",{value:F.error}));return}try{await u({rawText:B,expectedMtime:l?.exists?l.mtime:void 0}),O(null),j.success(s("droidPage.saved"))}catch(m){Ee(m)?j.error(s("droidPage.changedExternally")):j.error(m.message||s("droidPage.failedSave"))}},se=r?.byok.customModels??[],re=Q.useMemo(()=>Object.entries(r?.byok.providerBreakdown??{}).sort((m,w)=>w[1]-m[1]),[r?.byok.providerBreakdown]),he=()=>{if(n)return e.jsxs("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[e.jsx(Me,{className:"h-5 w-5 animate-spin mr-2"}),s("droidPage.loadingDiagnostics")]});if(o||!r)return e.jsx("div",{className:"flex h-full items-center justify-center text-destructive px-6 text-center",children:s("droidPage.failedDiagnostics")});const m=r.docsReference??{notes:[],links:[],providerDocs:[],providerValues:[],settingsHierarchy:[]},w=m.notes??[],S=m.links??[],te=m.providerDocs??[],pe=S.length>0?S:fs,je=te.length>0?te:hs,ve=m.providerValues??[],ye=m.settingsHierarchy??[],K="mt-0 h-full border-0 p-0 data-[state=inactive]:hidden";return e.jsxs(Se,{defaultValue:"byok",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(Pe,{className:"grid w-full grid-cols-3",children:[e.jsx(U,{value:"overview",children:s("droidPage.overview")}),e.jsx(U,{value:"byok",children:s("droidPage.byok")}),e.jsx(U,{value:"docs",children:s("droidPage.docs")})]})}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden px-4 pb-4 pt-3",children:[e.jsx(V,{value:"overview",className:K,children:e.jsx(T,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 pr-1",children:[e.jsxs(v,{children:[e.jsx(y,{className:"pb-2",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(Be,{className:"h-4 w-4"}),s("droidPage.runtimeInstall")]})}),e.jsxs(N,{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("droidPage.status")}),e.jsx(P,{variant:r.binary.installed?"default":"secondary",children:r.binary.installed?s("droidPage.detected"):s("droidPage.notFound")})]}),e.jsx(g,{label:s("droidPage.detectionSource"),value:r.binary.source,mono:!0}),e.jsx(g,{label:s("droidPage.binaryPath"),value:r.binary.path||s("droidPage.notFound"),mono:!0}),e.jsx(g,{label:s("droidPage.installDirectory"),value:r.binary.installDir||"N/A",mono:!0}),e.jsx(g,{label:s("droidPage.version"),value:r.binary.version||"Unknown",mono:!0}),e.jsx(g,{label:s("droidPage.overridePath"),value:r.binary.overridePath||"Not set",mono:!0})]})]}),e.jsxs(v,{children:[e.jsx(y,{className:"pb-2",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(Fe,{className:"h-4 w-4"}),s("droidPage.configFiles")]})}),e.jsx(N,{className:"space-y-3",children:[r.files.settings,r.files.legacyConfig].map(i=>e.jsxs("div",{className:"rounded-md border p-3 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-medium text-sm",children:i.label}),i.exists?e.jsx(Le,{className:"h-4 w-4 text-green-600"}):e.jsx(Ie,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(g,{label:s("droidPage.path"),value:i.path,mono:!0}),e.jsx(g,{label:s("droidPage.resolved"),value:i.resolvedPath,mono:!0}),e.jsx(g,{label:s("droidPage.size"),value:vs(i.sizeBytes)}),e.jsx(g,{label:s("droidPage.lastModified"),value:js(i.mtimeMs)}),i.parseError&&e.jsx("p",{className:"text-xs text-amber-600",children:s("droidPage.parseWarning",{value:i.parseError})}),i.readError&&e.jsx("p",{className:"text-xs text-destructive",children:s("droidPage.readWarning",{value:i.readError})})]},i.label))})]}),r.warnings.length>0&&e.jsxs(v,{className:"border-amber-200 bg-amber-50/50 dark:bg-amber-950/20",children:[e.jsx(y,{className:"pb-2",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(Ke,{className:"h-4 w-4 text-amber-600"}),s("droidPage.warnings")]})}),e.jsx(N,{className:"space-y-1.5",children:r.warnings.map(i=>e.jsxs("p",{className:"text-sm text-amber-800 dark:text-amber-300",children:["- ",i]},i))})]})]})})}),e.jsx(V,{value:"byok",className:K,children:e.jsx(T,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 pr-1",children:[e.jsx(gs,{values:me,disabled:t||!c.valid,disabledReason:c.valid?null:`Quick settings disabled: ${c.error}`,onEnumSettingChange:(i,f)=>{I(i,f)},onBooleanSettingChange:(i,f)=>{I(i,f)},onNumberSettingChange:(i,f)=>{I(i,f)}}),e.jsx(ls,{models:xe,disabled:t||!c.valid,disabledReason:c.valid?null:`${s("droidPage.byok")}: ${c.error}`,onEffortChange:(i,f)=>{if(!c.valid){j.error(s("droidPage.fixJsonBeforeReasoning"));return}const E=as(c.value,i,f);if(!E){j.error(s("droidPage.unableUpdateReasoning"));return}L(E)},onAnthropicBudgetChange:(i,f)=>{if(!c.valid){j.error(s("droidPage.fixJsonBeforeBudget"));return}const E=is(c.value,i,f);if(!E){j.error(s("droidPage.anthropicOnlyBudget"));return}L(E)}}),e.jsxs(v,{children:[e.jsx(y,{className:"pb-2",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(Ue,{className:"h-4 w-4"}),s("droidPage.byokSummary")]})}),e.jsxs(N,{className:"space-y-2",children:[e.jsx(g,{label:s("droidPage.activeModelSelector"),value:r.byok.activeModelSelector||"Not set",mono:!0}),e.jsx(g,{label:s("droidPage.customModels"),value:String(r.byok.customModelCount)}),e.jsx(g,{label:s("droidPage.ccsManaged"),value:String(r.byok.ccsManagedCount)}),e.jsx(g,{label:s("droidPage.userManaged"),value:String(r.byok.userManagedCount)}),e.jsx(g,{label:s("droidPage.malformedEntries"),value:String(r.byok.invalidModelEntryCount)}),e.jsx(A,{}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s("droidPage.providers")}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[re.length===0&&e.jsx(P,{variant:"secondary",className:"font-mono",children:s("droidPage.none")}),re.map(([i,f])=>e.jsxs(P,{variant:"outline",className:"font-mono text-xs",children:[i,": ",f]},i))]})]})]})]}),e.jsxs(v,{children:[e.jsx(y,{className:"pb-2",children:e.jsx(b,{className:"text-base",children:s("droidPage.customModelsTitle")})}),e.jsx(N,{children:e.jsxs("div",{className:"rounded-md border overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-[2fr_1fr_2fr] bg-muted/40 px-3 py-2 text-xs font-medium",children:[e.jsx("span",{children:s("droidPage.modelName")}),e.jsx("span",{children:s("droidPage.provider")}),e.jsx("span",{children:s("droidPage.baseUrl")})]}),e.jsx(T,{className:"h-52",children:e.jsxs("div",{className:"divide-y",children:[se.length===0&&e.jsx("div",{className:"px-3 py-4 text-xs text-muted-foreground",children:s("droidPage.noCustomModels")}),se.map(i=>e.jsxs("div",{className:"grid grid-cols-[2fr_1fr_2fr] gap-2 px-3 py-2 text-xs",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:i.displayName}),e.jsx("p",{className:"text-muted-foreground font-mono truncate",children:i.model})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate",children:i.provider}),e.jsx("p",{className:"text-muted-foreground",children:i.apiKeyPreview||"no-key"})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate",title:i.baseUrl,children:i.host||i.baseUrl}),e.jsx("p",{className:"text-muted-foreground font-mono truncate",children:i.baseUrl})]})]},`${i.displayName}-${i.model}-${i.baseUrl}`))]})})]})})]})]})})}),e.jsx(V,{value:"docs",className:K,children:e.jsx(T,{className:"h-full",children:e.jsx("div",{className:"space-y-4 pr-1",children:e.jsxs(v,{children:[e.jsx(y,{className:"pb-2",children:e.jsxs(b,{className:"text-base flex items-center gap-2",children:[e.jsx(Ve,{className:"h-4 w-4"}),s("droidPage.docsAlignedNotes")]})}),e.jsxs(N,{className:"space-y-2 text-sm",children:[w.map((i,f)=>e.jsxs("p",{className:"text-muted-foreground",children:["- ",ps(i)]},`${f}-${i}`)),e.jsx(A,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:s("droidPage.factoryDocs")}),e.jsx("div",{className:"space-y-1.5",children:pe.map(i=>e.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"block rounded-md border px-2.5 py-2 transition-colors hover:bg-muted/50",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium",children:i.label}),e.jsx(ie,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),e.jsx("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:i.description}),e.jsx("p",{className:"mt-1 break-all font-mono text-[11px] text-muted-foreground/90 underline underline-offset-2",children:i.url})]},i.id))})]}),e.jsx(A,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:s("droidPage.providerFactCheckDocs")}),e.jsx("div",{className:"space-y-1.5",children:je.map(i=>e.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"block rounded-md border px-2.5 py-2 transition-colors hover:bg-muted/50",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium",children:i.label}),e.jsx(ie,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),e.jsxs("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:["provider: ",i.provider," | format: ",i.apiFormat]}),e.jsx("p",{className:"mt-1 break-all font-mono text-[11px] text-muted-foreground/90 underline underline-offset-2",children:i.url})]},`${i.provider}-${i.url}`))})]}),e.jsx(A,{}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("droidPage.providerValues",{value:ve.join(", ")})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("droidPage.settingsHierarchy",{value:ye.join(" -> ")})})]})]})})})})]})]})};return e.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:e.jsxs(we,{direction:"horizontal",className:"h-full",children:[e.jsx(ne,{defaultSize:45,minSize:35,children:e.jsx("div",{className:"h-full border-r bg-muted/20",children:he()})}),e.jsx(ke,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:e.jsx(Oe,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),e.jsx(ne,{defaultSize:55,minSize:35,children:e.jsx(Re,{title:s("droidPage.settingsTitle"),pathLabel:l?.path||"~/.factory/settings.json",loading:t,parseWarning:l?.parseError,value:B,dirty:Z,saving:x,saveDisabled:!Z||x||t||!F.valid,onChange:m=>{ee(m)},onSave:fe,onRefresh:ge})})]})})}export{_s as DroidPage};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{c as P}from"./react-vendor-CNOkPC89.js";var xe=e=>e.type==="checkbox",_e=e=>e instanceof Date,G=e=>e==null;const ar=e=>typeof e=="object";var N=e=>!G(e)&&!Array.isArray(e)&&ar(e)&&!_e(e),qr=e=>N(e)&&e.target?xe(e.target)?e.target.checked:e.target.value:e,Jr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Kr=(e,t)=>e.has(Jr(t)),Hr=e=>{const t=e.constructor&&e.constructor.prototype;return N(t)&&t.hasOwnProperty("isPrototypeOf")},ft=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function B(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(ft&&(e instanceof Blob||n))&&(r||N(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Hr(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=B(e[o]));else return e;return t}var Be=e=>/^\w*$/.test(e),j=e=>e===void 0,dt=e=>Array.isArray(e)?e.filter(Boolean):[],ht=e=>dt(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,t,r)=>{if(!t||!N(e))return r;const n=(Be(t)?[t]:ht(t)).reduce((o,s)=>G(o)?o:o[s],e);return j(n)||n===e?j(e[t])?r:e[t]:n},ie=e=>typeof e=="boolean",D=(e,t,r)=>{let n=-1;const o=Be(t)?[t]:ht(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let p=r;if(n!==i){const _=e[a];p=N(_)||Array.isArray(_)?_:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=p,e=e[a]}};const Vt={BLUR:"blur",FOCUS_OUT:"focusout"},te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},lr=P.createContext(null);lr.displayName="HookFormContext";const Gr=()=>P.useContext(lr);var Xr=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==te.all&&(t._proxyFormState[i]=!n||te.all),e[i]}});return o};const fr=typeof window<"u"?P.useLayoutEffect:P.useEffect;var X=e=>typeof e=="string",st=(e,t,r,n,o)=>X(e)?(n&&t.watch.add(e),v(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),v(r,s))):(n&&(t.watchAll=!0),r),it=e=>G(e)||!ar(e);function re(e,t,r=new WeakSet){if(it(e)||it(t))return Object.is(e,t);if(_e(e)&&_e(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(_e(i)&&_e(a)||N(i)&&N(a)||Array.isArray(i)&&Array.isArray(a)?!re(i,a,r):!Object.is(i,a))return!1}}return!0}function gu(e){const t=Gr(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},p=P.useRef(o),_=P.useRef(a),y=P.useRef(void 0),k=P.useRef(r),m=P.useRef(n);_.current=a;const[O,I]=P.useState(()=>{const Z=r._getWatch(n,p.current);return _.current?_.current(Z):Z}),V=P.useCallback(Z=>{const $=st(n,r._names,Z||r._formValues,!1,p.current);return _.current?_.current($):$},[r._formValues,r._names,n]),q=P.useCallback(Z=>{if(!s){const $=st(n,r._names,Z||r._formValues,!1,p.current);if(_.current){const le=_.current($);re(le,y.current)||(I(le),y.current=le)}else I($)}},[r._formValues,r._names,s,n]);fr(()=>((k.current!==r||!re(m.current,n))&&(k.current=r,m.current=n,q()),r._subscribe({name:n,formState:{values:!0},exact:i,callback:Z=>{q(Z.values)}})),[r,i,n,q]),P.useEffect(()=>r._removeUnmounted());const ce=k.current!==r,z=m.current,R=P.useMemo(()=>{if(s)return null;const Z=!ce&&!re(z,n);return ce||Z?V():null},[s,ce,n,z,V]);return R!==null?R:O}var Yr=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Fe=e=>Array.isArray(e)?e:[e],xt=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function dr(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=t[n];if(o&&N(o)&&s){const i=dr(o,s);N(i)&&(r[n]=i)}else e[n]&&(r[n]=s)}return r}var K=e=>N(e)&&!Object.keys(e).length,pt=e=>e.type==="file",ne=e=>typeof e=="function",Ue=e=>{if(!ft)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hr=e=>e.type==="select-multiple",_t=e=>e.type==="radio",Qr=e=>_t(e)||xe(e),ot=e=>Ue(e)&&e.isConnected;function en(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=j(e)?n++:e[t[n++]];return e}function tn(e){for(const t in e)if(e.hasOwnProperty(t)&&!j(e[t]))return!1;return!0}function L(e,t){const r=Array.isArray(t)?t:Be(t)?[t]:ht(t),n=r.length===1?e:en(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(N(n)&&K(n)||Array.isArray(n)&&tn(n))&&L(e,r.slice(0,-1)),e}var rn=e=>{for(const t in e)if(ne(e[t]))return!0;return!1};function pr(e){return Array.isArray(e)||N(e)&&!rn(e)}function ut(e,t={}){for(const r in e){const n=e[r];pr(n)?(t[r]=Array.isArray(n)?[]:{},ut(n,t[r])):j(n)||(t[r]=!0)}return t}function ke(e,t,r){r||(r=ut(t));for(const n in e){const o=e[n];if(pr(o))j(t)||it(r[n])?r[n]=ut(o,Array.isArray(o)?[]:{}):ke(o,G(t)?{}:t[n],r[n]);else{const s=t[n];r[n]=!re(o,s)}}return r}const St={value:!1,isValid:!1},It={value:!0,isValid:!0};var _r=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!j(e[0].attributes.value)?j(e[0].value)||e[0].value===""?It:{value:e[0].value,isValid:!0}:It:St}return St},gr=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>j(e)?e:t?e===""?NaN:e&&+e:r&&X(e)?new Date(e):n?n(e):e;const Pt={isValid:!1,value:null};var mr=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Pt):Pt;function Tt(e){const t=e.ref;return pt(t)?t.files:_t(t)?mr(e.refs).value:hr(t)?[...t.selectedOptions].map(({value:r})=>r):xe(t)?_r(e.refs).value:gr(j(t.value)?e.ref.value:t.value,e)}var nn=(e,t,r,n)=>{const o={};for(const s of e){const i=v(t,s);i&&D(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},je=e=>e instanceof RegExp,Ee=e=>j(e)?e:je(e)?e.source:N(e)?je(e.value)?e.value.source:e.value:e,Ct=e=>({isOnSubmit:!e||e===te.onSubmit,isOnBlur:e===te.onBlur,isOnChange:e===te.onChange,isOnAll:e===te.all,isOnTouch:e===te.onTouched});const Rt="AsyncFunction";var on=e=>!!e&&!!e.validate&&!!(ne(e.validate)&&e.validate.constructor.name===Rt||N(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Rt)),sn=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ut=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const De=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=v(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(De(a,t))break}else if(N(a)&&De(a,t))break}}};function jt(e,t,r){const n=v(e,r);if(n||Be(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=v(t,s),a=v(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:r}}var un=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return K(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||te.all))},cn=(e,t,r)=>!e||!t||e===t||Fe(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),an=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,ln=(e,t)=>!dt(v(e,t)).length&&L(e,t),fn=(e,t,r)=>{const n=Fe(v(e,r));return D(n,"root",t[r]),D(e,r,n),e};function Lt(e,t,r="validate"){if(X(e)||Array.isArray(e)&&e.every(X)||ie(e)&&!e)return{type:r,message:X(e)?e:"",ref:t}}var be=e=>N(e)&&!je(e)?e:{value:e,message:""},Nt=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:p,maxLength:_,minLength:y,min:k,max:m,pattern:O,validate:I,name:V,valueAsNumber:q,mount:ce}=e._f,z=v(r,V);if(!ce||t.has(V))return{};const R=a?a[0]:i,Z=A=>{o&&R.reportValidity&&(R.setCustomValidity(ie(A)?"":A||""),R.reportValidity())},$={},le=_t(i),fe=xe(i),Ye=le||fe,ee=(q||pt(i))&&j(i.value)&&j(z)||Ue(i)&&i.value===""||z===""||Array.isArray(z)&&!z.length,pe=Yr.bind(null,V,n,$),oe=(A,F,U,J=ae.maxLength,H=ae.minLength)=>{const se=A?F:U;$[V]={type:A?J:H,message:se,ref:i,...pe(A?J:H,se)}};if(s?!Array.isArray(z)||!z.length:p&&(!Ye&&(ee||G(z))||ie(z)&&!z||fe&&!_r(a).isValid||le&&!mr(a).isValid)){const{value:A,message:F}=X(p)?{value:!!p,message:p}:be(p);if(A&&($[V]={type:ae.required,message:F,ref:R,...pe(ae.required,F)},!n))return Z(F),$}if(!ee&&(!G(k)||!G(m))){let A,F;const U=be(m),J=be(k);if(!G(z)&&!isNaN(z)){const H=i.valueAsNumber||z&&+z;G(U.value)||(A=H>U.value),G(J.value)||(F=H<J.value)}else{const H=i.valueAsDate||new Date(z),se=Se=>new Date(new Date().toDateString()+" "+Se),Ae=i.type=="time",we=i.type=="week";X(U.value)&&z&&(A=Ae?se(z)>se(U.value):we?z>U.value:H>new Date(U.value)),X(J.value)&&z&&(F=Ae?se(z)<se(J.value):we?z<J.value:H<new Date(J.value))}if((A||F)&&(oe(!!A,U.message,J.message,ae.max,ae.min),!n))return Z($[V].message),$}if((_||y)&&!ee&&(X(z)||s&&Array.isArray(z))){const A=be(_),F=be(y),U=!G(A.value)&&z.length>+A.value,J=!G(F.value)&&z.length<+F.value;if((U||J)&&(oe(U,A.message,F.message),!n))return Z($[V].message),$}if(O&&!ee&&X(z)){const{value:A,message:F}=be(O);if(je(A)&&!z.match(A)&&($[V]={type:ae.pattern,message:F,ref:i,...pe(ae.pattern,F)},!n))return Z(F),$}if(I){if(ne(I)){const A=await I(z,r),F=Lt(A,R);if(F&&($[V]={...F,...pe(ae.validate,F.message)},!n))return Z(F.message),$}else if(N(I)){let A={};for(const F in I){if(!K(A)&&!n)break;const U=Lt(await I[F](z,r),R,F);U&&(A={...U,...pe(F,U.message)},Z(U.message),n&&($[V]=A))}if(!K(A)&&($[V]={ref:R,...A},!n))return $}}return Z(!0),$};const dn={mode:te.onSubmit,reValidateMode:te.onChange,shouldFocusError:!0};function hn(e={}){let t={...dn,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:ne(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=N(t.defaultValues)||N(t.values)?B(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:B(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},p,_=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let k={...y};const m={array:xt(),state:xt()},O=t.criteriaMode===te.all,I=u=>c=>{clearTimeout(_),_=setTimeout(u,c)},V=async u=>{if(!t.disabled&&(y.isValid||k.isValid||u)){const c=t.resolver?K((await fe()).errors):await ee(n,!0);c!==r.isValid&&m.state.next({isValid:c})}},q=(u,c)=>{!t.disabled&&(y.isValidating||y.validatingFields||k.isValidating||k.validatingFields)&&((u||Array.from(a.mount)).forEach(l=>{l&&(c?D(r.validatingFields,l,c):L(r.validatingFields,l))}),m.state.next({validatingFields:r.validatingFields,isValidating:!K(r.validatingFields)}))},ce=(u,c=[],l,g,h=!0,d=!0)=>{if(g&&l&&!t.disabled){if(i.action=!0,d&&Array.isArray(v(n,u))){const w=l(v(n,u),g.argA,g.argB);h&&D(n,u,w)}if(d&&Array.isArray(v(r.errors,u))){const w=l(v(r.errors,u),g.argA,g.argB);h&&D(r.errors,u,w),ln(r.errors,u)}if((y.touchedFields||k.touchedFields)&&d&&Array.isArray(v(r.touchedFields,u))){const w=l(v(r.touchedFields,u),g.argA,g.argB);h&&D(r.touchedFields,u,w)}(y.dirtyFields||k.dirtyFields)&&(r.dirtyFields=ke(o,s)),m.state.next({name:u,isDirty:oe(u,c),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else D(s,u,c)},z=(u,c)=>{D(r.errors,u,c),m.state.next({errors:r.errors})},R=u=>{r.errors=u,m.state.next({errors:r.errors,isValid:!1})},Z=(u,c,l,g)=>{const h=v(n,u);if(h){const d=v(s,u,j(l)?v(o,u):l);j(d)||g&&g.defaultChecked||c?D(s,u,c?d:Tt(h._f)):U(u,d),i.mount&&!i.action&&V()}},$=(u,c,l,g,h)=>{let d=!1,w=!1;const E={name:u};if(!t.disabled){if(!l||g){(y.isDirty||k.isDirty)&&(w=r.isDirty,r.isDirty=E.isDirty=oe(),d=w!==E.isDirty);const x=re(v(o,u),c);w=!!v(r.dirtyFields,u),x?L(r.dirtyFields,u):D(r.dirtyFields,u,!0),E.dirtyFields=r.dirtyFields,d=d||(y.dirtyFields||k.dirtyFields)&&w!==!x}if(l){const x=v(r.touchedFields,u);x||(D(r.touchedFields,u,l),E.touchedFields=r.touchedFields,d=d||(y.touchedFields||k.touchedFields)&&x!==l)}d&&h&&m.state.next(E)}return d?E:{}},le=(u,c,l,g)=>{const h=v(r.errors,u),d=(y.isValid||k.isValid)&&ie(c)&&r.isValid!==c;if(t.delayError&&l?(p=I(()=>z(u,l)),p(t.delayError)):(clearTimeout(_),p=null,l?D(r.errors,u,l):L(r.errors,u)),(l?!re(h,l):h)||!K(g)||d){const w={...g,...d&&ie(c)?{isValid:c}:{},errors:r.errors,name:u};r={...r,...w},m.state.next(w)}},fe=async u=>{q(u,!0);const c=await t.resolver(s,t.context,nn(u||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return q(u),c},Ye=async u=>{const{errors:c}=await fe(u);if(u)for(const l of u){const g=v(c,l);g?D(r.errors,l,g):L(r.errors,l)}else r.errors=c;return c},ee=async(u,c,l={valid:!0})=>{for(const g in u){const h=u[g];if(h){const{_f:d,...w}=h;if(d){const E=a.array.has(d.name),x=h._f&&on(h._f);x&&y.validatingFields&&q([d.name],!0);const Y=await Nt(h,a.disabled,s,O,t.shouldUseNativeValidation&&!c,E);if(x&&y.validatingFields&&q([d.name]),Y[d.name]&&(l.valid=!1,c))break;!c&&(v(Y,d.name)?E?fn(r.errors,Y,d.name):D(r.errors,d.name,Y[d.name]):L(r.errors,d.name))}!K(w)&&await ee(w,c,l)}}return l.valid},pe=()=>{for(const u of a.unMount){const c=v(n,u);c&&(c._f.refs?c._f.refs.every(l=>!ot(l)):!ot(c._f.ref))&&Qe(u)}a.unMount=new Set},oe=(u,c)=>!t.disabled&&(u&&c&&D(s,u,c),!re(Se(),o)),A=(u,c,l)=>st(u,a,{...i.mount?s:j(c)?o:X(u)?{[u]:c}:c},l,c),F=u=>dt(v(i.mount?s:o,u,t.shouldUnregister?v(o,u,[]):[])),U=(u,c,l={})=>{const g=v(n,u);let h=c;if(g){const d=g._f;d&&(!d.disabled&&D(s,u,gr(c,d)),h=Ue(d.ref)&&G(c)?"":c,hr(d.ref)?[...d.ref.options].forEach(w=>w.selected=h.includes(w.value)):d.refs?xe(d.ref)?d.refs.forEach(w=>{(!w.defaultChecked||!w.disabled)&&(Array.isArray(h)?w.checked=!!h.find(E=>E===w.value):w.checked=h===w.value||!!h)}):d.refs.forEach(w=>w.checked=w.value===h):pt(d.ref)?d.ref.value="":(d.ref.value=h,d.ref.type||m.state.next({name:u,values:B(s)})))}(l.shouldDirty||l.shouldTouch)&&$(u,h,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&we(u)},J=(u,c,l)=>{for(const g in c){if(!c.hasOwnProperty(g))return;const h=c[g],d=u+"."+g,w=v(n,d);(a.array.has(u)||N(h)||w&&!w._f)&&!_e(h)?J(d,h,l):U(d,h,l)}},H=(u,c,l={})=>{const g=v(n,u),h=a.array.has(u),d=B(c);D(s,u,d),h?(m.array.next({name:u,values:B(s)}),(y.isDirty||y.dirtyFields||k.isDirty||k.dirtyFields)&&l.shouldDirty&&m.state.next({name:u,dirtyFields:ke(o,s),isDirty:oe(u,d)})):g&&!g._f&&!G(d)?J(u,d,l):U(u,d,l),Ut(u,a)&&m.state.next({...r,name:u}),m.state.next({name:i.mount?u:void 0,values:B(s)})},se=async u=>{i.mount=!0;const c=u.target;let l=c.name,g=!0;const h=v(n,l),d=x=>{g=Number.isNaN(x)||_e(x)&&isNaN(x.getTime())||re(x,v(s,l,x))},w=Ct(t.mode),E=Ct(t.reValidateMode);if(h){let x,Y;const Ie=c.type?Tt(h._f):qr(u),de=u.type===Vt.BLUR||u.type===Vt.FOCUS_OUT,Mr=!sn(h._f)&&!t.resolver&&!v(r.errors,l)&&!h._f.deps||an(de,v(r.touchedFields,l),r.isSubmitted,E,w),rt=Ut(l,a,de);D(s,l,Ie),de?(!c||!c.readOnly)&&(h._f.onBlur&&h._f.onBlur(u),p&&p(0)):h._f.onChange&&h._f.onChange(u);const nt=$(l,Ie,de),Br=!K(nt)||rt;if(!de&&m.state.next({name:l,type:u.type,values:B(s)}),Mr)return(y.isValid||k.isValid)&&(t.mode==="onBlur"?de&&V():de||V()),Br&&m.state.next({name:l,...rt?{}:nt});if(!de&&rt&&m.state.next({...r}),t.resolver){const{errors:Dt}=await fe([l]);if(d(Ie),g){const Wr=jt(r.errors,n,l),Ot=jt(Dt,n,Wr.name||l);x=Ot.error,l=Ot.name,Y=K(Dt)}}else q([l],!0),x=(await Nt(h,a.disabled,s,O,t.shouldUseNativeValidation))[l],q([l]),d(Ie),g&&(x?Y=!1:(y.isValid||k.isValid)&&(Y=await ee(n,!0)));g&&(h._f.deps&&(!Array.isArray(h._f.deps)||h._f.deps.length>0)&&we(h._f.deps),le(l,Y,x,nt))}},Ae=(u,c)=>{if(v(r.errors,c)&&u.focus)return u.focus(),1},we=async(u,c={})=>{let l,g;const h=Fe(u);if(t.resolver){const d=await Ye(j(u)?u:h);l=K(d),g=u?!h.some(w=>v(d,w)):l}else u?(g=(await Promise.all(h.map(async d=>{const w=v(n,d);return await ee(w&&w._f?{[d]:w}:w)}))).every(Boolean),!(!g&&!r.isValid)&&V()):g=l=await ee(n);return m.state.next({...!X(u)||(y.isValid||k.isValid)&&l!==r.isValid?{}:{name:u},...t.resolver||!u?{isValid:l}:{},errors:r.errors}),c.shouldFocus&&!g&&De(n,Ae,u?h:a.mount),g},Se=(u,c)=>{let l={...i.mount?s:o};return c&&(l=dr(c.dirtyFields?r.dirtyFields:r.touchedFields,l)),j(u)?l:X(u)?v(l,u):u.map(g=>v(l,g))},bt=(u,c)=>({invalid:!!v((c||r).errors,u),isDirty:!!v((c||r).dirtyFields,u),error:v((c||r).errors,u),isValidating:!!v(r.validatingFields,u),isTouched:!!v((c||r).touchedFields,u)}),Tr=u=>{u&&Fe(u).forEach(c=>L(r.errors,c)),m.state.next({errors:u?r.errors:{}})},kt=(u,c,l)=>{const g=(v(n,u,{_f:{}})._f||{}).ref,h=v(r.errors,u)||{},{ref:d,message:w,type:E,...x}=h;D(r.errors,u,{...x,...c,ref:g}),m.state.next({name:u,errors:r.errors,isValid:!1}),l&&l.shouldFocus&&g&&g.focus&&g.focus()},Cr=(u,c)=>ne(u)?m.state.subscribe({next:l=>"values"in l&&u(A(void 0,c),l)}):A(u,c,!0),zt=u=>m.state.subscribe({next:c=>{cn(u.name,c.name,u.exact)&&un(c,u.formState||y,Nr,u.reRenderRoot)&&u.callback({values:{...s},...r,...c,defaultValues:o})}}).unsubscribe,Rr=u=>(i.mount=!0,k={...k,...u.formState},zt({...u,formState:k})),Qe=(u,c={})=>{for(const l of u?Fe(u):a.mount)a.mount.delete(l),a.array.delete(l),c.keepValue||(L(n,l),L(s,l)),!c.keepError&&L(r.errors,l),!c.keepDirty&&L(r.dirtyFields,l),!c.keepTouched&&L(r.touchedFields,l),!c.keepIsValidating&&L(r.validatingFields,l),!t.shouldUnregister&&!c.keepDefaultValue&&L(o,l);m.state.next({values:B(s)}),m.state.next({...r,...c.keepDirty?{isDirty:oe()}:{}}),!c.keepIsValid&&V()},Zt=({disabled:u,name:c})=>{(ie(u)&&i.mount||u||a.disabled.has(c))&&(u?a.disabled.add(c):a.disabled.delete(c))},et=(u,c={})=>{let l=v(n,u);const g=ie(c.disabled)||ie(t.disabled);return D(n,u,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:u}},name:u,mount:!0,...c}}),a.mount.add(u),l?Zt({disabled:ie(c.disabled)?c.disabled:t.disabled,name:u}):Z(u,!0,c.value),{...g?{disabled:c.disabled||t.disabled}:{},...t.progressive?{required:!!c.required,min:Ee(c.min),max:Ee(c.max),minLength:Ee(c.minLength),maxLength:Ee(c.maxLength),pattern:Ee(c.pattern)}:{},name:u,onChange:se,onBlur:se,ref:h=>{if(h){et(u,c),l=v(n,u);const d=j(h.value)&&h.querySelectorAll&&h.querySelectorAll("input,select,textarea")[0]||h,w=Qr(d),E=l._f.refs||[];if(w?E.find(x=>x===d):d===l._f.ref)return;D(n,u,{_f:{...l._f,...w?{refs:[...E.filter(ot),d,...Array.isArray(v(o,u))?[{}]:[]],ref:{type:d.type,name:u}}:{ref:d}}}),Z(u,!1,void 0,d)}else l=v(n,u,{}),l._f&&(l._f.mount=!1),(t.shouldUnregister||c.shouldUnregister)&&!(Kr(a.array,u)&&i.action)&&a.unMount.add(u)}}},tt=()=>t.shouldFocusError&&De(n,Ae,a.mount),Ur=u=>{ie(u)&&(m.state.next({disabled:u}),De(n,(c,l)=>{const g=v(n,l);g&&(c.disabled=g._f.disabled||u,Array.isArray(g._f.refs)&&g._f.refs.forEach(h=>{h.disabled=g._f.disabled||u}))},0,!1))},$t=(u,c)=>async l=>{let g;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let h=B(s);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:d,values:w}=await fe();r.errors=d,h=B(w)}else await ee(n);if(a.disabled.size)for(const d of a.disabled)L(h,d);if(L(r.errors,"root"),K(r.errors)){m.state.next({errors:{}});try{await u(h,l)}catch(d){g=d}}else c&&await c({...r.errors},l),tt(),setTimeout(tt);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:K(r.errors)&&!g,submitCount:r.submitCount+1,errors:r.errors}),g)throw g},jr=(u,c={})=>{v(n,u)&&(j(c.defaultValue)?H(u,B(v(o,u))):(H(u,c.defaultValue),D(o,u,B(c.defaultValue))),c.keepTouched||L(r.touchedFields,u),c.keepDirty||(L(r.dirtyFields,u),r.isDirty=c.defaultValue?oe(u,B(v(o,u))):oe()),c.keepError||(L(r.errors,u),y.isValid&&V()),m.state.next({...r}))},At=(u,c={})=>{const l=u?B(u):o,g=B(l),h=K(u),d=h?o:g;if(c.keepDefaultValues||(o=l),!c.keepValues){if(c.keepDirtyValues){const w=new Set([...a.mount,...Object.keys(ke(o,s))]);for(const E of Array.from(w))v(r.dirtyFields,E)?D(d,E,v(s,E)):H(E,v(d,E))}else{if(ft&&j(u))for(const w of a.mount){const E=v(n,w);if(E&&E._f){const x=Array.isArray(E._f.refs)?E._f.refs[0]:E._f.ref;if(Ue(x)){const Y=x.closest("form");if(Y){Y.reset();break}}}}if(c.keepFieldsRef)for(const w of a.mount)H(w,v(d,w));else n={}}s=t.shouldUnregister?c.keepDefaultValues?B(o):{}:B(d),m.array.next({values:{...d}}),m.state.next({values:{...d}})}a={mount:c.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!y.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!K(d),i.watch=!!t.shouldUnregister,i.action=!1,c.keepErrors||(r.errors={}),m.state.next({submitCount:c.keepSubmitCount?r.submitCount:0,isDirty:h?!1:c.keepDirty?r.isDirty:!!(c.keepDefaultValues&&!re(u,o)),isSubmitted:c.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:h?{}:c.keepDirtyValues?c.keepDefaultValues&&s?ke(o,s):r.dirtyFields:c.keepDefaultValues&&u?ke(o,u):c.keepDirty?r.dirtyFields:{},touchedFields:c.keepTouched?r.touchedFields:{},errors:c.keepErrors?r.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Et=(u,c)=>At(ne(u)?u(s):u,c),Lr=(u,c={})=>{const l=v(n,u),g=l&&l._f;if(g){const h=g.refs?g.refs[0]:g.ref;h.focus&&(h.focus(),c.shouldSelect&&ne(h.select)&&h.select())}},Nr=u=>{r={...r,...u}},Ft={control:{register:et,unregister:Qe,getFieldState:bt,handleSubmit:$t,setError:kt,_subscribe:zt,_runSchema:fe,_focusError:tt,_getWatch:A,_getDirty:oe,_setValid:V,_setFieldArray:ce,_setDisabledField:Zt,_setErrors:R,_getFieldArray:F,_reset:At,_resetDefaultValues:()=>ne(t.defaultValues)&&t.defaultValues().then(u=>{Et(u,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:pe,_disableForm:Ur,_subjects:m,_proxyFormState:y,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(u){i=u},get _defaultValues(){return o},get _names(){return a},set _names(u){a=u},get _formState(){return r},get _options(){return t},set _options(u){t={...t,...u}}},subscribe:Rr,trigger:we,register:et,handleSubmit:$t,watch:Cr,setValue:H,getValues:Se,reset:Et,resetField:jr,clearErrors:Tr,unregister:Qe,setError:kt,setFocus:Lr,getFieldState:bt};return{...Ft,formControl:Ft}}function mu(e={}){const t=P.useRef(void 0),r=P.useRef(void 0),[n,o]=P.useState({isDirty:!1,isValidating:!1,isLoading:ne(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:ne(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ne(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=hn(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,fr(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),P.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),P.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),P.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),P.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),P.useEffect(()=>{var i;e.values&&!re(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((i=s._options.resetOptions)===null||i===void 0)&&i.keepIsValid||s._setValid(),r.current=e.values,o(a=>({...a}))):s._resetDefaultValues()},[s,e.values]),P.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=Xr(n,s),t.current}const Mt=(e,t,r)=>{if(e&&"reportValidity"in e){const n=v(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},pn=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Mt(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Mt(o,r,e))}},vu=(e,t)=>{t.shouldUseNativeValidation&&pn(e,t);const r={};for(const n in e){const o=v(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(_n(t.names||Object.keys(e),n)){const i=Object.assign({},v(r,n));D(i,"root",s),D(r,n,i)}else D(r,n,s)}return r},_n=(e,t)=>{const r=Bt(t);return e.some(n=>Bt(n).match(`^${r}\\.\\d+`))};function Bt(e){return e.replace(/\]|\[/g,"")}function f(e,t,r){function n(a,p){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:p,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,p);const _=i.prototype,y=Object.keys(_);for(let k=0;k<y.length;k++){const m=y[k];m in a||(a[m]=_[m].bind(a))}}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var p;const _=r?.Parent?new s:this;n(_,a),(p=_._zod).deferred??(p.deferred=[]);for(const y of _._zod.deferred)y();return _}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Ze extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class vr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const yr={};function ge(e){return yr}function gn(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function ct(e,t){return typeof t=="bigint"?t.toString():t}function gt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function mt(e){return e==null}function vt(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const Wt=Symbol("evaluating");function S(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Wt)return n===void 0&&(n=Wt,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ve(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ye(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function qt(e){return JSON.stringify(e)}function mn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const wr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Le(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const vn=gt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Oe(e){if(Le(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Le(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function br(e){return Oe(e)?{...e}:Array.isArray(e)?[...e]:e}const yn=new Set(["string","number","symbol"]);function We(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function b(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function wn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function bn(e,t){const r=e._zod.def,n=ye(e._zod.def,{get shape(){const o={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return ve(this,"shape",o),o},checks:[]});return he(e,n)}function kn(e,t){const r=e._zod.def,n=ye(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return ve(this,"shape",o),o},checks:[]});return he(e,n)}function zn(e,t){if(!Oe(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=ye(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return ve(this,"shape",s),s},checks:[]});return he(e,o)}function Zn(e,t){if(!Oe(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return ve(this,"shape",n),n},checks:e._zod.def.checks};return he(e,r)}function $n(e,t){const r=ye(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return ve(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return he(e,r)}function An(e,t,r){const n=ye(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(const i in o)s[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return ve(this,"shape",s),s},checks:[]});return he(t,n)}function En(e,t,r){const n=ye(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return ve(this,"shape",s),s},checks:[]});return he(t,n)}function ze(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function kr(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Pe(e){return typeof e=="string"?e:e?.message}function me(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Pe(e.inst?._zod.def?.error?.(e))??Pe(t?.error?.(e))??Pe(r.customError?.(e))??Pe(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function yt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ve(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const zr=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ct,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Zr=f("$ZodError",zr),qe=f("$ZodError",zr,{Parent:Error});function Fn(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function Dn(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>n({issues:i}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let i=r,a=0;for(;a<s.path.length;){const p=s.path[a];a===s.path.length-1?(i[p]=i[p]||{_errors:[]},i[p]._errors.push(t(s))):i[p]=i[p]||{_errors:[]},i=i[p],a++}}};return n(e),r}const Je=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Ze;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(p=>me(p,s,ge())));throw wr(a,o?.callee),a}return i.value},yu=Je(qe),Ke=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(p=>me(p,s,ge())));throw wr(a,o?.callee),a}return i.value},wu=Ke(qe),He=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Ze;return s.issues.length?{success:!1,error:new(e??Zr)(s.issues.map(i=>me(i,o,ge())))}:{success:!0,data:s.value}},On=He(qe),Ge=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>me(i,o,ge())))}:{success:!0,data:s.value}},Vn=Ge(qe),xn=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Je(e)(t,r,o)},Sn=e=>(t,r,n)=>Je(e)(t,r,n),In=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ke(e)(t,r,o)},Pn=e=>async(t,r,n)=>Ke(e)(t,r,n),Tn=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return He(e)(t,r,o)},Cn=e=>(t,r,n)=>He(e)(t,r,n),Rn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ge(e)(t,r,o)},Un=e=>async(t,r,n)=>Ge(e)(t,r,n),jn=/^[cC][^\s-]{8,}$/,Ln=/^[0-9a-z]+$/,Nn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Mn=/^[0-9a-vA-V]{20}$/,Bn=/^[A-Za-z0-9]{27}$/,Wn=/^[a-zA-Z0-9_-]{21}$/,qn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Jn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Kn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Gn(){return new RegExp(Hn,"u")}const Xn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Yn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Qn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,eo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,to=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$r=/^[A-Za-z0-9_-]*$/,ro=/^\+(?:[0-9]){6,14}[0-9]$/,Ar="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",no=new RegExp(`^${Ar}$`);function Er(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function oo(e){return new RegExp(`^${Er(e)}$`)}function so(e){const t=Er({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Ar}T(?:${n})$`)}const io=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},uo=/^[^A-Z]*$/,co=/^[^a-z]*$/,ue=f("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ao=f("$ZodCheckMaxLength",(e,t)=>{var r;ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!mt(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=yt(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),lo=f("$ZodCheckMinLength",(e,t)=>{var r;ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!mt(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=yt(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fo=f("$ZodCheckLengthEquals",(e,t)=>{var r;ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!mt(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=yt(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Xe=f("$ZodCheckStringFormat",(e,t)=>{var r,n;ue.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ho=f("$ZodCheckRegex",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),po=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=uo),Xe.init(e,t)}),_o=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=co),Xe.init(e,t)}),go=f("$ZodCheckIncludes",(e,t)=>{ue.init(e,t);const r=We(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),mo=f("$ZodCheckStartsWith",(e,t)=>{ue.init(e,t);const r=new RegExp(`^${We(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),vo=f("$ZodCheckEndsWith",(e,t)=>{ue.init(e,t);const r=new RegExp(`.*${We(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),yo=f("$ZodCheckOverwrite",(e,t)=>{ue.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class wo{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
2
|
-
`).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),s=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
|
|
3
|
-
`))}}const bo={major:4,minor:1,patch:13},M=f("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=bo;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,p)=>{let _=ze(i),y;for(const k of a){if(k._zod.def.when){if(!k._zod.def.when(i))continue}else if(_)continue;const m=i.issues.length,O=k._zod.check(i);if(O instanceof Promise&&p?.async===!1)throw new Ze;if(y||O instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await O,i.issues.length!==m&&(_||(_=ze(i,m)))});else{if(i.issues.length===m)continue;_||(_=ze(i,m))}}return y?y.then(()=>i):i},s=(i,a,p)=>{if(ze(i))return i.aborted=!0,i;const _=o(a,n,p);if(_ instanceof Promise){if(p.async===!1)throw new Ze;return _.then(y=>e._zod.parse(y,p))}return e._zod.parse(_,p)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const _=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return _ instanceof Promise?_.then(y=>s(y,i,a)):s(_,i,a)}const p=e._zod.parse(i,a);if(p instanceof Promise){if(a.async===!1)throw new Ze;return p.then(_=>o(_,n,a))}return o(p,n,a)}}e["~standard"]={validate:o=>{try{const s=On(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Vn(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),wt=f("$ZodString",(e,t)=>{M.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??io(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),T=f("$ZodStringFormat",(e,t)=>{Xe.init(e,t),wt.init(e,t)}),ko=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Jn),T.init(e,t)}),zo=f("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Jt(n))}else t.pattern??(t.pattern=Jt());T.init(e,t)}),Zo=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Kn),T.init(e,t)}),$o=f("$ZodURL",(e,t)=>{T.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ao=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Gn()),T.init(e,t)}),Eo=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Wn),T.init(e,t)}),Fo=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=jn),T.init(e,t)}),Do=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ln),T.init(e,t)}),Oo=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Nn),T.init(e,t)}),Vo=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Mn),T.init(e,t)}),xo=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Bn),T.init(e,t)}),So=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=so(t)),T.init(e,t)}),Io=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=no),T.init(e,t)}),Po=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=oo(t)),T.init(e,t)}),To=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=qn),T.init(e,t)}),Co=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Xn),T.init(e,t),e._zod.bag.format="ipv4"}),Ro=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Yn),T.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Uo=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Qn),T.init(e,t)}),jo=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=eo),T.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,s]=n;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Fr(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Lo=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=to),T.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Fr(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function No(e){if(!$r.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Fr(r)}const Mo=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$r),T.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{No(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Bo=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ro),T.init(e,t)});function Wo(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const qo=f("$ZodJWT",(e,t)=>{T.init(e,t),e._zod.check=r=>{Wo(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Jo=f("$ZodUnknown",(e,t)=>{M.init(e,t),e._zod.parse=r=>r}),Ko=f("$ZodNever",(e,t)=>{M.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Kt(e,t,r){e.issues.length&&t.issues.push(...kr(r,e.issues)),t.value[r]=e.value}const Ho=f("$ZodArray",(e,t)=>{M.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],p=t.element._zod.run({value:a,issues:[]},n);p instanceof Promise?s.push(p.then(_=>Kt(_,r,i))):Kt(p,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Ne(e,t,r,n){e.issues.length&&t.issues.push(...kr(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Dr(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=wn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Or(e,t,r,n,o,s){const i=[],a=o.keySet,p=o.catchall._zod,_=p.def.type;for(const y in t){if(a.has(y))continue;if(_==="never"){i.push(y);continue}const k=p.run({value:t[y],issues:[]},n);k instanceof Promise?e.push(k.then(m=>Ne(m,r,y,t))):Ne(k,r,y,t)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const Go=f("$ZodObject",(e,t)=>{if(M.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const p={...a};return Object.defineProperty(t,"shape",{value:p}),p}})}const n=gt(()=>Dr(t));S(e._zod,"propValues",()=>{const a=t.shape,p={};for(const _ in a){const y=a[_]._zod;if(y.values){p[_]??(p[_]=new Set);for(const k of y.values)p[_].add(k)}}return p});const o=Le,s=t.catchall;let i;e._zod.parse=(a,p)=>{i??(i=n.value);const _=a.value;if(!o(_))return a.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),a;a.value={};const y=[],k=i.shape;for(const m of i.keys){const I=k[m]._zod.run({value:_[m],issues:[]},p);I instanceof Promise?y.push(I.then(V=>Ne(V,a,m,_))):Ne(I,a,m,_)}return s?Or(y,_,a,p,n.value,e):y.length?Promise.all(y).then(()=>a):a}}),Xo=f("$ZodObjectJIT",(e,t)=>{Go.init(e,t);const r=e._zod.parse,n=gt(()=>Dr(t)),o=m=>{const O=new wo(["shape","payload","ctx"]),I=n.value,V=R=>{const Z=qt(R);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`};O.write("const input = payload.value;");const q=Object.create(null);let ce=0;for(const R of I.keys)q[R]=`key_${ce++}`;O.write("const newResult = {};");for(const R of I.keys){const Z=q[R],$=qt(R);O.write(`const ${Z} = ${V(R)};`),O.write(`
|
|
4
|
-
if (${Z}.issues.length) {
|
|
5
|
-
payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
|
|
6
|
-
...iss,
|
|
7
|
-
path: iss.path ? [${$}, ...iss.path] : [${$}]
|
|
8
|
-
})));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (${Z}.value === undefined) {
|
|
13
|
-
if (${$} in input) {
|
|
14
|
-
newResult[${$}] = undefined;
|
|
15
|
-
}
|
|
16
|
-
} else {
|
|
17
|
-
newResult[${$}] = ${Z}.value;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
`)}O.write("payload.value = newResult;"),O.write("return payload;");const z=O.compile();return(R,Z)=>z(m,R,Z)};let s;const i=Le,a=!yr.jitless,_=a&&vn.value,y=t.catchall;let k;e._zod.parse=(m,O)=>{k??(k=n.value);const I=m.value;return i(I)?a&&_&&O?.async===!1&&O.jitless!==!0?(s||(s=o(t.shape)),m=s(m,O),y?Or([],I,m,O,k,e):m):r(m,O):(m.issues.push({expected:"object",code:"invalid_type",input:I,inst:e}),m)}});function Ht(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!ze(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>me(i,n,ge())))}),t)}const Yo=f("$ZodUnion",(e,t)=>{M.init(e,t),S(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),S(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),S(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),S(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>vt(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let i=!1;const a=[];for(const p of t.options){const _=p._zod.run({value:o.value,issues:[]},s);if(_ instanceof Promise)a.push(_),i=!0;else{if(_.issues.length===0)return _;a.push(_)}}return i?Promise.all(a).then(p=>Ht(p,o,e,s)):Ht(a,o,e,s)}}),Qo=f("$ZodIntersection",(e,t)=>{M.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([p,_])=>Gt(r,p,_)):Gt(r,s,i)}});function at(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Oe(e)&&Oe(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=at(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=at(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Gt(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),ze(e))return e;const n=at(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const es=f("$ZodEnum",(e,t)=>{M.init(e,t);const r=gn(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>yn.has(typeof o)).map(o=>typeof o=="string"?We(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),ts=f("$ZodTransform",(e,t)=>{M.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new vr(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new Ze;return r.value=o,r}});function Xt(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const rs=f("$ZodOptional",(e,t)=>{M.init(e,t),e._zod.optin="optional",e._zod.optout="optional",S(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),S(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${vt(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Xt(s,r.value)):Xt(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),ns=f("$ZodNullable",(e,t)=>{M.init(e,t),S(e._zod,"optin",()=>t.innerType._zod.optin),S(e._zod,"optout",()=>t.innerType._zod.optout),S(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${vt(r.source)}|null)$`):void 0}),S(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),os=f("$ZodDefault",(e,t)=>{M.init(e,t),e._zod.optin="optional",S(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Yt(s,t)):Yt(o,t)}});function Yt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ss=f("$ZodPrefault",(e,t)=>{M.init(e,t),e._zod.optin="optional",S(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),is=f("$ZodNonOptional",(e,t)=>{M.init(e,t),S(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Qt(s,e)):Qt(o,e)}});function Qt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const us=f("$ZodCatch",(e,t)=>{M.init(e,t),S(e._zod,"optin",()=>t.innerType._zod.optin),S(e._zod,"optout",()=>t.innerType._zod.optout),S(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>me(i,n,ge()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>me(s,n,ge()))},input:r.value}),r.issues=[]),r)}}),cs=f("$ZodPipe",(e,t)=>{M.init(e,t),S(e._zod,"values",()=>t.in._zod.values),S(e._zod,"optin",()=>t.in._zod.optin),S(e._zod,"optout",()=>t.out._zod.optout),S(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>Te(i,t.in,n)):Te(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Te(s,t.out,n)):Te(o,t.out,n)}});function Te(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const as=f("$ZodReadonly",(e,t)=>{M.init(e,t),S(e._zod,"propValues",()=>t.innerType._zod.propValues),S(e._zod,"values",()=>t.innerType._zod.values),S(e._zod,"optin",()=>t.innerType?._zod?.optin),S(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(er):er(o)}});function er(e){return e.value=Object.freeze(e.value),e}const ls=f("$ZodCustom",(e,t)=>{ue.init(e,t),M.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>tr(s,r,n,e));tr(o,r,n,e)}});function tr(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Ve(o))}}var rr;class fs{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function ds(){return new fs}(rr=globalThis).__zod_globalRegistry??(rr.__zod_globalRegistry=ds());const Ce=globalThis.__zod_globalRegistry;function hs(e,t){return new e({type:"string",...b(t)})}function ps(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function nr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function _s(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function gs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function ms(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function vs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function ys(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function ws(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function bs(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function ks(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function zs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function Zs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function $s(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function As(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function Es(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function Fs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function Ds(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function Os(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function Vs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function xs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function Ss(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function Is(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}function Ps(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function Ts(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function Cs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function Rs(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function Us(e){return new e({type:"unknown"})}function js(e,t){return new e({type:"never",...b(t)})}function Vr(e,t){return new ao({check:"max_length",...b(t),maximum:e})}function Me(e,t){return new lo({check:"min_length",...b(t),minimum:e})}function xr(e,t){return new fo({check:"length_equals",...b(t),length:e})}function Ls(e,t){return new ho({check:"string_format",format:"regex",...b(t),pattern:e})}function Ns(e){return new po({check:"string_format",format:"lowercase",...b(e)})}function Ms(e){return new _o({check:"string_format",format:"uppercase",...b(e)})}function Bs(e,t){return new go({check:"string_format",format:"includes",...b(t),includes:e})}function Ws(e,t){return new mo({check:"string_format",format:"starts_with",...b(t),prefix:e})}function qs(e,t){return new vo({check:"string_format",format:"ends_with",...b(t),suffix:e})}function $e(e){return new yo({check:"overwrite",tx:e})}function Js(e){return $e(t=>t.normalize(e))}function Ks(){return $e(e=>e.trim())}function Hs(){return $e(e=>e.toLowerCase())}function Gs(){return $e(e=>e.toUpperCase())}function Xs(){return $e(e=>mn(e))}function Ys(e,t,r){return new e({type:"array",element:t,...b(r)})}function Qs(e,t,r){return new e({type:"custom",check:"custom",fn:t,...b(r)})}function ei(e){const t=ti(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ve(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Ve(o))}},e(r.value,r)));return t}function ti(e,t){const r=new ue({check:"custom",...b(t)});return r._zod.check=e,r}const ri=f("ZodISODateTime",(e,t)=>{So.init(e,t),C.init(e,t)});function ni(e){return Ps(ri,e)}const oi=f("ZodISODate",(e,t)=>{Io.init(e,t),C.init(e,t)});function si(e){return Ts(oi,e)}const ii=f("ZodISOTime",(e,t)=>{Po.init(e,t),C.init(e,t)});function ui(e){return Cs(ii,e)}const ci=f("ZodISODuration",(e,t)=>{To.init(e,t),C.init(e,t)});function ai(e){return Rs(ci,e)}const li=(e,t)=>{Zr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Dn(e,r)},flatten:{value:r=>Fn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ct,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ct,2)}},isEmpty:{get(){return e.issues.length===0}}})},Q=f("ZodError",li,{Parent:Error}),fi=Je(Q),di=Ke(Q),hi=He(Q),pi=Ge(Q),_i=xn(Q),gi=Sn(Q),mi=In(Q),vi=Pn(Q),yi=Tn(Q),wi=Cn(Q),bi=Rn(Q),ki=Un(Q),W=f("ZodType",(e,t)=>(M.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(ye(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(r,n)=>he(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>fi(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>hi(e,r,n),e.parseAsync=async(r,n)=>di(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>pi(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>_i(e,r,n),e.decode=(r,n)=>gi(e,r,n),e.encodeAsync=async(r,n)=>mi(e,r,n),e.decodeAsync=async(r,n)=>vi(e,r,n),e.safeEncode=(r,n)=>yi(e,r,n),e.safeDecode=(r,n)=>wi(e,r,n),e.safeEncodeAsync=async(r,n)=>bi(e,r,n),e.safeDecodeAsync=async(r,n)=>ki(e,r,n),e.refine=(r,n)=>e.check(du(r,n)),e.superRefine=r=>e.check(hu(r)),e.overwrite=r=>e.check($e(r)),e.optional=()=>ir(e),e.nullable=()=>ur(e),e.nullish=()=>ir(ur(e)),e.nonoptional=r=>su(e,r),e.array=()=>Wi(e),e.or=r=>Ki([e,r]),e.and=r=>Gi(e,r),e.transform=r=>cr(e,Qi(r)),e.default=r=>ru(e,r),e.prefault=r=>ou(e,r),e.catch=r=>uu(e,r),e.pipe=r=>cr(e,r),e.readonly=()=>lu(e),e.describe=r=>{const n=e.clone();return Ce.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Ce.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ce.get(e);const n=e.clone();return Ce.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Sr=f("_ZodString",(e,t)=>{wt.init(e,t),W.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Ls(...n)),e.includes=(...n)=>e.check(Bs(...n)),e.startsWith=(...n)=>e.check(Ws(...n)),e.endsWith=(...n)=>e.check(qs(...n)),e.min=(...n)=>e.check(Me(...n)),e.max=(...n)=>e.check(Vr(...n)),e.length=(...n)=>e.check(xr(...n)),e.nonempty=(...n)=>e.check(Me(1,...n)),e.lowercase=n=>e.check(Ns(n)),e.uppercase=n=>e.check(Ms(n)),e.trim=()=>e.check(Ks()),e.normalize=(...n)=>e.check(Js(...n)),e.toLowerCase=()=>e.check(Hs()),e.toUpperCase=()=>e.check(Gs()),e.slugify=()=>e.check(Xs())}),zi=f("ZodString",(e,t)=>{wt.init(e,t),Sr.init(e,t),e.email=r=>e.check(ps(Zi,r)),e.url=r=>e.check(ys($i,r)),e.jwt=r=>e.check(Is(ji,r)),e.emoji=r=>e.check(ws(Ai,r)),e.guid=r=>e.check(nr(or,r)),e.uuid=r=>e.check(_s(Re,r)),e.uuidv4=r=>e.check(gs(Re,r)),e.uuidv6=r=>e.check(ms(Re,r)),e.uuidv7=r=>e.check(vs(Re,r)),e.nanoid=r=>e.check(bs(Ei,r)),e.guid=r=>e.check(nr(or,r)),e.cuid=r=>e.check(ks(Fi,r)),e.cuid2=r=>e.check(zs(Di,r)),e.ulid=r=>e.check(Zs(Oi,r)),e.base64=r=>e.check(Vs(Ci,r)),e.base64url=r=>e.check(xs(Ri,r)),e.xid=r=>e.check($s(Vi,r)),e.ksuid=r=>e.check(As(xi,r)),e.ipv4=r=>e.check(Es(Si,r)),e.ipv6=r=>e.check(Fs(Ii,r)),e.cidrv4=r=>e.check(Ds(Pi,r)),e.cidrv6=r=>e.check(Os(Ti,r)),e.e164=r=>e.check(Ss(Ui,r)),e.datetime=r=>e.check(ni(r)),e.date=r=>e.check(si(r)),e.time=r=>e.check(ui(r)),e.duration=r=>e.check(ai(r))});function bu(e){return hs(zi,e)}const C=f("ZodStringFormat",(e,t)=>{T.init(e,t),Sr.init(e,t)}),Zi=f("ZodEmail",(e,t)=>{Zo.init(e,t),C.init(e,t)}),or=f("ZodGUID",(e,t)=>{ko.init(e,t),C.init(e,t)}),Re=f("ZodUUID",(e,t)=>{zo.init(e,t),C.init(e,t)}),$i=f("ZodURL",(e,t)=>{$o.init(e,t),C.init(e,t)}),Ai=f("ZodEmoji",(e,t)=>{Ao.init(e,t),C.init(e,t)}),Ei=f("ZodNanoID",(e,t)=>{Eo.init(e,t),C.init(e,t)}),Fi=f("ZodCUID",(e,t)=>{Fo.init(e,t),C.init(e,t)}),Di=f("ZodCUID2",(e,t)=>{Do.init(e,t),C.init(e,t)}),Oi=f("ZodULID",(e,t)=>{Oo.init(e,t),C.init(e,t)}),Vi=f("ZodXID",(e,t)=>{Vo.init(e,t),C.init(e,t)}),xi=f("ZodKSUID",(e,t)=>{xo.init(e,t),C.init(e,t)}),Si=f("ZodIPv4",(e,t)=>{Co.init(e,t),C.init(e,t)}),Ii=f("ZodIPv6",(e,t)=>{Ro.init(e,t),C.init(e,t)}),Pi=f("ZodCIDRv4",(e,t)=>{Uo.init(e,t),C.init(e,t)}),Ti=f("ZodCIDRv6",(e,t)=>{jo.init(e,t),C.init(e,t)}),Ci=f("ZodBase64",(e,t)=>{Lo.init(e,t),C.init(e,t)}),Ri=f("ZodBase64URL",(e,t)=>{Mo.init(e,t),C.init(e,t)}),Ui=f("ZodE164",(e,t)=>{Bo.init(e,t),C.init(e,t)}),ji=f("ZodJWT",(e,t)=>{qo.init(e,t),C.init(e,t)}),Li=f("ZodUnknown",(e,t)=>{Jo.init(e,t),W.init(e,t)});function sr(){return Us(Li)}const Ni=f("ZodNever",(e,t)=>{Ko.init(e,t),W.init(e,t)});function Mi(e){return js(Ni,e)}const Bi=f("ZodArray",(e,t)=>{Ho.init(e,t),W.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Me(r,n)),e.nonempty=r=>e.check(Me(1,r)),e.max=(r,n)=>e.check(Vr(r,n)),e.length=(r,n)=>e.check(xr(r,n)),e.unwrap=()=>e.element});function Wi(e,t){return Ys(Bi,e,t)}const qi=f("ZodObject",(e,t)=>{Xo.init(e,t),W.init(e,t),S(e,"shape",()=>t.shape),e.keyof=()=>Xi(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:sr()}),e.loose=()=>e.clone({...e._zod.def,catchall:sr()}),e.strict=()=>e.clone({...e._zod.def,catchall:Mi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>zn(e,r),e.safeExtend=r=>Zn(e,r),e.merge=r=>$n(e,r),e.pick=r=>bn(e,r),e.omit=r=>kn(e,r),e.partial=(...r)=>An(Ir,e,r[0]),e.required=(...r)=>En(Pr,e,r[0])});function ku(e,t){const r={type:"object",shape:e??{},...b(t)};return new qi(r)}const Ji=f("ZodUnion",(e,t)=>{Yo.init(e,t),W.init(e,t),e.options=t.options});function Ki(e,t){return new Ji({type:"union",options:e,...b(t)})}const Hi=f("ZodIntersection",(e,t)=>{Qo.init(e,t),W.init(e,t)});function Gi(e,t){return new Hi({type:"intersection",left:e,right:t})}const lt=f("ZodEnum",(e,t)=>{es.init(e,t),W.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new lt({...t,checks:[],...b(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new lt({...t,checks:[],...b(o),entries:s})}});function Xi(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new lt({type:"enum",entries:r,...b(t)})}const Yi=f("ZodTransform",(e,t)=>{ts.init(e,t),W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new vr(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ve(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Ve(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function Qi(e){return new Yi({type:"transform",transform:e})}const Ir=f("ZodOptional",(e,t)=>{rs.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ir(e){return new Ir({type:"optional",innerType:e})}const eu=f("ZodNullable",(e,t)=>{ns.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ur(e){return new eu({type:"nullable",innerType:e})}const tu=f("ZodDefault",(e,t)=>{os.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ru(e,t){return new tu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():br(t)}})}const nu=f("ZodPrefault",(e,t)=>{ss.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ou(e,t){return new nu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():br(t)}})}const Pr=f("ZodNonOptional",(e,t)=>{is.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function su(e,t){return new Pr({type:"nonoptional",innerType:e,...b(t)})}const iu=f("ZodCatch",(e,t)=>{us.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uu(e,t){return new iu({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const cu=f("ZodPipe",(e,t)=>{cs.init(e,t),W.init(e,t),e.in=t.in,e.out=t.out});function cr(e,t){return new cu({type:"pipe",in:e,out:t})}const au=f("ZodReadonly",(e,t)=>{as.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function lu(e){return new au({type:"readonly",innerType:e})}const fu=f("ZodCustom",(e,t)=>{ls.init(e,t),W.init(e,t)});function du(e,t={}){return Qs(fu,e,t)}function hu(e){return ei(e)}export{Zr as $,Xi as _,wu as a,Yr as b,bu as c,ku as d,gu as e,pn as o,yu as p,vu as s,mu as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-BlliRfHq.js";import{r as g}from"./react-vendor-CNOkPC89.js";import{bj as C,bk as w,a as G,bl as y,b5 as k,b7 as S,A as R,az as A,d as f,I as j}from"./index-TSYtCr3K.js";import{R as N,u as D,v as L,aj as T,a5 as I}from"./icons-CQ3MLSan.js";import"./tanstack-BjiH4QZq.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function _(){const{state:s}=C(),n=w(),[o,r]=g.useState(""),[c,m]=g.useState(""),u=g.useCallback(async()=>{try{n.setGlobalEnvLoading(!0),n.setGlobalEnvError(null);const a=await fetch("/api/global-env");if(!a.ok)throw new Error("Failed to load Global Env config");const l=await a.json();n.setGlobalEnvConfig(l)}catch(a){n.setGlobalEnvError(a.message)}finally{n.setGlobalEnvLoading(!1)}},[n]),i=g.useCallback(async a=>{const l=s.globalEnvConfig;if(!l)return;const x={...l,...a};n.setGlobalEnvConfig(x);try{n.setGlobalEnvSaving(!0),n.setGlobalEnvError(null);const d=await fetch("/api/global-env",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)});if(!d.ok){const h=await d.json();throw new Error(h.error||"Failed to save")}const v=await d.json();n.setGlobalEnvConfig(v.config),n.setGlobalEnvSuccess(!0),setTimeout(()=>n.setGlobalEnvSuccess(!1),1500)}catch(d){n.setGlobalEnvConfig(l),n.setGlobalEnvError(d.message)}finally{n.setGlobalEnvSaving(!1)}},[s.globalEnvConfig,n]),E=g.useCallback(()=>{if(!o.trim()||!s.globalEnvConfig)return;const a={...s.globalEnvConfig.env,[o.trim()]:c};i({env:a}),r(""),m("")},[o,c,s.globalEnvConfig,i]),b=g.useCallback(a=>{if(!s.globalEnvConfig)return;const l={...s.globalEnvConfig.env};delete l[a],i({env:l})},[s.globalEnvConfig,i]);return{config:s.globalEnvConfig,loading:s.globalEnvLoading,saving:s.globalEnvSaving,error:s.globalEnvError,success:s.globalEnvSuccess,newEnvKey:o,setNewEnvKey:r,newEnvValue:c,setNewEnvValue:m,fetchConfig:u,saveConfig:i,addEnvVar:E,removeEnvVar:b}}function Y(){const{t:s}=G(),{config:n,loading:o,saving:r,error:c,success:m,newEnvKey:u,setNewEnvKey:i,newEnvValue:E,setNewEnvValue:b,fetchConfig:a,saveConfig:l,addEnvVar:x,removeEnvVar:d}=_(),{fetchRawConfig:v}=y();g.useEffect(()=>{a(),v()},[a,v]);const h=()=>{l({enabled:!n?.enabled})};return o?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(N,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:s("settings.loading")})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${c||m?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[c&&e.jsxs(k,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(D,{className:"h-4 w-4"}),e.jsx(S,{children:c})]}),m&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(L,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:s("settings.saved")})]})]}),e.jsx(R,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("settingsGlobalEnv.description")}),e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:n?.enabled?s("settingsGlobalEnv.enabled"):s("settingsGlobalEnv.disabled")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:n?.enabled?s("settingsGlobalEnv.enabledDesc"):s("settingsGlobalEnv.disabledDesc")})]}),e.jsx(A,{checked:n?.enabled??!0,onCheckedChange:h})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:s("settingsGlobalEnv.envVars")}),n?.env&&Object.keys(n.env).length>0?e.jsx("div",{className:"space-y-2",children:Object.entries(n.env).map(([t,p])=>e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg border bg-background",children:[e.jsx("code",{className:"flex-1 font-mono text-sm truncate",children:t}),e.jsx("span",{className:"text-muted-foreground",children:"="}),e.jsx("code",{className:"font-mono text-sm px-2 py-1 bg-muted rounded",children:p}),e.jsx(f,{variant:"ghost",size:"sm",onClick:()=>d(t),disabled:r,className:"h-8 w-8 p-0 text-destructive hover:text-destructive hover:bg-destructive/10",children:e.jsx(T,{className:"w-4 h-4"})})]},t))}):e.jsx("div",{className:"p-4 rounded-lg border border-dashed text-center text-muted-foreground",children:e.jsx("p",{children:s("settingsGlobalEnv.noneConfigured")})}),e.jsxs("div",{className:"p-4 rounded-lg border bg-muted/30",children:[e.jsx("h4",{className:"text-sm font-medium mb-3",children:s("settingsGlobalEnv.addNew")}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{value:u,onChange:t=>i(t.target.value.toUpperCase()),placeholder:s("settingsGlobalEnv.keyName"),className:"flex-1 font-mono text-sm h-9",disabled:r}),e.jsx("span",{className:"flex items-center text-muted-foreground",children:"="}),e.jsx(j,{value:E,onChange:t=>b(t.target.value),placeholder:s("settingsGlobalEnv.value"),className:"flex-1 font-mono text-sm h-9",disabled:r}),e.jsxs(f,{size:"sm",onClick:x,disabled:r||!u.trim(),className:"h-9",children:[e.jsx(I,{className:"w-4 h-4 mr-1"}),s("settingsGlobalEnv.add")]})]})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-muted/30",children:[e.jsx("h4",{className:"text-sm font-medium mb-3",children:s("settingsGlobalEnv.quickAdd")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[[{key:"DISABLE_BUG_COMMAND",value:"1"},{key:"DISABLE_ERROR_REPORTING",value:"1"},{key:"DISABLE_TELEMETRY",value:"1"}].map(({key:t,value:p})=>!n?.env?.[t]&&e.jsxs(f,{variant:"outline",size:"sm",onClick:()=>{i(t),b(p)},className:"text-xs font-mono",children:["+ ",t]},t)),n?.env&&["DISABLE_BUG_COMMAND","DISABLE_ERROR_REPORTING","DISABLE_TELEMETRY"].every(t=>n.env[t])&&e.jsx("span",{className:"text-sm text-muted-foreground",children:s("settingsGlobalEnv.allConfigured")})]})]})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(f,{variant:"outline",size:"sm",onClick:()=>{a(),v()},disabled:o||r,className:"w-full",children:[e.jsx(N,{className:`w-4 h-4 mr-2 ${o?"animate-spin":""}`}),s("settings.refresh")]})})]})}export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-BlliRfHq.js";import{a as N,c as l,d as p,U as k,V as C,W as S,B as W,S as h}from"./index-TSYtCr3K.js";import{u as R,a as E,b as O}from"./tanstack-BjiH4QZq.js";import{t as g}from"./notifications-B2HqRBj7.js";import{r as j}from"./react-vendor-CNOkPC89.js";import{aY as y,C as P,V as I,m as z,Z as T,h as H,U as $,d as A,aZ as M,q as F,O as B,R as q}from"./icons-CQ3MLSan.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";const D={sm:{dimension:80,strokeWidth:6,fontSize:"text-lg",labelSize:"text-[10px]"},md:{dimension:120,strokeWidth:8,fontSize:"text-3xl",labelSize:"text-xs"},lg:{dimension:160,strokeWidth:10,fontSize:"text-4xl",labelSize:"text-sm"}},G={ok:{stroke:"#22C55E",glow:"rgba(34, 197, 94, 0.4)"},warning:{stroke:"#EAB308",glow:"rgba(234, 179, 8, 0.4)"},error:{stroke:"#EF4444",glow:"rgba(239, 68, 68, 0.4)"}};function K({passed:s,total:t,status:a,size:r="md"}){const{t:i}=N(),o=D[r],c=G[a],n=t>0?Math.round(s/t*100):0,d=(o.dimension-o.strokeWidth)/2,u=2*Math.PI*d,f=u-n/100*u,x=o.dimension/2;return e.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[e.jsxs("svg",{width:o.dimension,height:o.dimension,className:"transform -rotate-90",style:{filter:`drop-shadow(0 0 8px ${c.glow})`},children:[e.jsx("circle",{cx:x,cy:x,r:d,fill:"none",stroke:"currentColor",strokeWidth:o.strokeWidth,className:"text-muted/30"}),e.jsx("circle",{cx:x,cy:x,r:d,fill:"none",stroke:c.stroke,strokeWidth:o.strokeWidth,strokeLinecap:"round",strokeDasharray:u,strokeDashoffset:f,className:"transition-all duration-1000 ease-out"}),n>0&&e.jsx("circle",{cx:x+d*Math.cos(n/100*2*Math.PI-Math.PI/2),cy:x+d*Math.sin(n/100*2*Math.PI-Math.PI/2),r:o.strokeWidth/2,fill:c.stroke,className:"animate-pulse",style:{filter:`drop-shadow(0 0 4px ${c.glow})`}})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsx("span",{className:l("font-mono font-bold tracking-tight",o.fontSize),children:n}),e.jsx("span",{className:l("font-mono uppercase tracking-widest text-muted-foreground",o.labelSize),children:i("health.healthLabel")})]})]})}function b({label:s,value:t,color:a,bgColor:r}){return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:l("w-2 h-2 rounded-full animate-pulse",r)}),e.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:s}),e.jsx("span",{className:l("font-mono font-bold text-sm",a),children:t})]})}function L({total:s,passed:t,warnings:a,errors:r,info:i}){const{t:o}=N(),c=t/s*100,n=a/s*100,d=r/s*100,u=i/s*100;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"h-2 rounded-full overflow-hidden bg-muted/50 flex",children:[d>0&&e.jsx("div",{className:"h-full bg-red-500 transition-all duration-500",style:{width:`${d}%`}}),n>0&&e.jsx("div",{className:"h-full bg-yellow-500 transition-all duration-500",style:{width:`${n}%`}}),u>0&&e.jsx("div",{className:"h-full bg-blue-500 transition-all duration-500",style:{width:`${u}%`}}),c>0&&e.jsx("div",{className:"h-full bg-green-500 transition-all duration-500",style:{width:`${c}%`}})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("health.checks")}),e.jsx("span",{className:"font-mono font-bold text-lg",children:s})]}),e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsx(b,{label:"OK",value:t,color:"text-green-500",bgColor:"bg-green-500"}),e.jsx(b,{label:"WARN",value:a,color:"text-yellow-500",bgColor:"bg-yellow-500"}),e.jsx(b,{label:"ERR",value:r,color:"text-red-500",bgColor:"bg-red-500"}),e.jsx(b,{label:"INFO",value:i,color:"text-blue-500",bgColor:"bg-blue-500"})]})]})]})}function U(){return R({queryKey:["health"],queryFn:async()=>(await fetch("/api/health")).json(),refetchInterval:3e4})}function Q(){const s=E();return O({mutationFn:async t=>{const a=await fetch(`/api/health/fix/${t}`,{method:"POST"}),r=await a.json();if(!a.ok)throw new Error(r.message);return r},onSuccess:t=>{s.invalidateQueries({queryKey:["health"]}),g.success(t.message)},onError:t=>{g.error(t.message)}})}const Z={ok:{dot:"bg-green-500",label:"OK",labelColor:"text-green-500"},warning:{dot:"bg-yellow-500",label:"WARN",labelColor:"text-yellow-500"},error:{dot:"bg-red-500",label:"ERR",labelColor:"text-red-500"},info:{dot:"bg-blue-500",label:"INFO",labelColor:"text-blue-500"}};function V({check:s}){const{t}=N(),a=Q(),r=Z[s.status],[i,o]=j.useState(!1),c=s.details||s.fix,n=d=>{navigator.clipboard.writeText(d),g.success(t("health.copied"))};return c?e.jsx(k,{open:i,onOpenChange:o,children:e.jsxs("div",{className:l("group rounded-lg border transition-all duration-150",i?"border-border bg-muted/30":"border-transparent hover:border-border/50 hover:bg-muted/50"),children:[e.jsx(C,{asChild:!0,children:e.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-2 text-left",children:[e.jsxs("div",{className:"relative flex items-center justify-center w-4 h-4",children:[e.jsx("div",{className:l("w-2 h-2 rounded-full",r.dot)}),s.status!=="ok"&&e.jsx("div",{className:l("absolute w-2 h-2 rounded-full animate-ping opacity-75",r.dot)})]}),e.jsx("span",{className:"flex-1 text-sm font-medium truncate",children:s.name}),e.jsxs("span",{className:l("font-mono text-xs font-semibold",r.labelColor),children:["[",r.label,"]"]}),e.jsx(P,{className:l("w-4 h-4 text-muted-foreground transition-transform duration-200",i&&"rotate-90")})]})}),e.jsx(S,{children:e.jsxs("div",{className:"px-3 pb-3 pt-1 space-y-2 ml-7",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s.message}),s.details&&e.jsx("pre",{className:"text-xs font-mono text-muted-foreground bg-background/50 rounded p-2 overflow-x-auto border border-border/50",children:s.details}),s.fix&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 bg-background/50 rounded px-2 py-1.5 border border-border/50",children:[e.jsx(I,{className:"w-3 h-3 text-muted-foreground shrink-0"}),e.jsx("code",{className:"text-xs font-mono flex-1 truncate",children:s.fix}),e.jsx(p,{variant:"ghost",size:"sm",onClick:()=>s.fix&&n(s.fix),className:"h-5 w-5 p-0",children:e.jsx(z,{className:"w-3 h-3"})})]}),s.fixable&&s.status!=="ok"&&e.jsxs(p,{size:"sm",onClick:()=>a.mutate(s.id),disabled:a.isPending,className:"h-7 px-3 text-xs",children:[e.jsx(y,{className:"w-3 h-3 mr-1"}),t("health.applyFix")]})]})]})})]})}):e.jsxs("div",{className:l("group flex items-center gap-3 px-3 py-2 rounded-lg","hover:bg-muted/50 transition-colors duration-150","border border-transparent hover:border-border/50"),children:[e.jsxs("div",{className:"relative flex items-center justify-center w-4 h-4",children:[e.jsx("div",{className:l("w-2 h-2 rounded-full",r.dot)}),s.status!=="ok"&&e.jsx("div",{className:l("absolute w-2 h-2 rounded-full animate-ping opacity-75",r.dot)})]}),e.jsx("span",{className:"flex-1 text-sm font-medium truncate",children:s.name}),e.jsxs("span",{className:l("font-mono text-xs font-semibold",r.labelColor),children:["[",r.label,"]"]}),s.fixable&&s.status!=="ok"&&e.jsxs(p,{size:"sm",variant:"ghost",onClick:()=>a.mutate(s.id),disabled:a.isPending,className:"h-6 px-2 text-xs opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx(y,{className:"w-3 h-3 mr-1"}),t("health.fix")]})]})}const Y={Monitor:M,Settings:A,Users:$,Shield:H,Zap:T};function J({group:s,defaultOpen:t=!0}){const[a,r]=j.useState(t),i=Y[s.icon]||M,o=s.checks.filter(m=>m.status==="ok").length,c=s.checks.length,n=s.checks.some(m=>m.status==="error"),d=s.checks.some(m=>m.status==="warning"),u=Math.round(o/c*100),f=n?"text-red-500":d?"text-yellow-500":"text-green-500",x=n?"bg-red-500":d?"bg-yellow-500":"bg-green-500";return e.jsx(k,{open:a,onOpenChange:r,children:e.jsxs("div",{className:l("rounded-lg border transition-all duration-200",n?"border-red-500/30":d?"border-yellow-500/30":"border-border"),children:[e.jsx(C,{asChild:!0,children:e.jsxs("button",{className:l("w-full flex items-center gap-3 p-3 text-left rounded-lg","hover:bg-muted/50 transition-colors duration-150",a&&"rounded-b-none border-b border-border/50"),children:[e.jsx("div",{className:l("p-1.5 rounded-md",n?"bg-red-500/10 text-red-500":d?"bg-yellow-500/10 text-yellow-500":"bg-muted text-muted-foreground"),children:e.jsx(i,{className:"w-4 h-4"})}),e.jsx("span",{className:"flex-1 text-sm font-semibold",children:s.name}),!a&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("div",{className:"w-16 h-1.5 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{className:l("h-full transition-all duration-500",x),style:{width:`${u}%`}})})}),e.jsxs("span",{className:l("font-mono text-xs font-semibold",f),children:[o,"/",c]}),e.jsx(F,{className:l("w-4 h-4 text-muted-foreground transition-transform duration-200",a&&"rotate-180")})]})}),e.jsx(S,{children:e.jsx("div",{className:"p-2 space-y-0.5",children:s.checks.map(m=>e.jsx(V,{check:m},m.id))})})]})})}function X(s){return s.errors>0?"error":s.warnings>0?"warning":"ok"}function _(s,t){const a=Math.floor((Date.now()-s)/1e3);if(a<5)return t("health.justNow");if(a<60)return t("health.secondsAgo",{count:a});const r=Math.floor(a/60);if(r<60)return t("health.minutesAgo",{count:r});const i=Math.floor(r/60);return t("health.hoursAgo",{count:i})}function ee(s){return[...s].sort((t,a)=>{const r=t.checks.filter(n=>n.status==="error").length,i=a.checks.filter(n=>n.status==="error").length,o=t.checks.filter(n=>n.status==="warning").length,c=a.checks.filter(n=>n.status==="warning").length;return r!==i?i-r:c-o})}function se(){return e.jsxs("div",{className:"font-mono text-sm text-muted-foreground flex items-center gap-2",children:[e.jsx("span",{className:"text-green-500",children:"$"}),e.jsx("span",{children:"ccs doctor"})]})}function te(){return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-6",children:[e.jsx("div",{className:"rounded-xl border bg-gradient-to-br from-background to-muted/20 p-6",children:e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsx(h,{className:"w-[120px] h-[120px] rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-3",children:[e.jsx(h,{className:"h-5 w-48"}),e.jsx(h,{className:"h-8 w-64"}),e.jsx(h,{className:"h-4 w-32"})]})]})}),e.jsx(h,{className:"h-16 w-full rounded-lg"}),e.jsx("div",{className:"space-y-3",children:[1,2,3,4].map(s=>e.jsx(h,{className:"h-20 rounded-lg"},s))})]})}function xe(){const{t:s}=N(),{data:t,isLoading:a,refetch:r,dataUpdatedAt:i}=U(),o=i,[c,n]=j.useState(0);j.useEffect(()=>{const m=setInterval(()=>n(v=>v+1),1e3);return()=>clearInterval(m)},[]);const d=()=>{navigator.clipboard.writeText("ccs doctor"),g.success(s("health.copied"))},u=()=>{r(),g.info(s("health.refreshing"))};if(a&&!t)return e.jsx(te,{});const f=t?X(t.summary):"ok",x=t?.groups?ee(t.groups):[];return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-6",children:[e.jsxs("div",{className:l("relative overflow-hidden rounded-xl border p-6","bg-gradient-to-br from-background via-background to-muted/30"),children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.02] pointer-events-none",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent, transparent 2px, currentColor 2px, currentColor 3px)"}}),e.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",children:e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)",backgroundSize:"24px 24px"}})}),e.jsxs("div",{className:"relative flex flex-col md:flex-row items-start md:items-center gap-6",children:[t&&e.jsx("div",{className:"shrink-0",children:e.jsx(K,{passed:t.summary.passed,total:t.summary.total-t.summary.info,status:f,size:"md"})}),e.jsxs("div",{className:"flex-1 space-y-3",children:[e.jsx(se,{}),e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("h1",{className:"text-2xl font-bold font-mono tracking-tight",children:s("health.systemHealth")}),t?.version&&e.jsx(W,{variant:"outline",className:"font-mono text-xs bg-muted/50",children:s("health.build",{version:t.version})})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(B,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:s("health.lastScan")}),e.jsx("span",{className:"font-mono",children:o?_(o,s):"--"}),e.jsx("span",{className:"text-muted-foreground",children:"|"}),e.jsx("span",{className:"text-muted-foreground",children:s("health.autoRefresh")}),e.jsx("span",{className:"font-mono text-green-500",children:"30s"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs(p,{variant:"outline",size:"sm",onClick:d,className:"gap-2 font-mono text-xs",children:[e.jsx(I,{className:"w-3 h-3"}),"ccs doctor",e.jsx(z,{className:"w-3 h-3 opacity-50"})]}),e.jsxs(p,{variant:"outline",size:"sm",onClick:u,disabled:a,className:"gap-2",children:[e.jsx(q,{className:l("w-4 h-4",a&&"animate-spin")}),e.jsx("span",{className:"hidden sm:inline",children:s("health.refresh")}),e.jsx("kbd",{className:"hidden md:inline-flex h-5 items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",children:"R"})]})]})]})]}),t&&e.jsx("div",{className:"rounded-lg border bg-card p-4",children:e.jsx(L,{total:t.summary.total,passed:t.summary.passed,warnings:t.summary.warnings,errors:t.summary.errors,info:t.summary.info})}),x.length>0&&e.jsx("div",{className:"space-y-3",children:x.map((m,v)=>e.jsx(J,{group:m,defaultOpen:v<2||m.checks.some(w=>w.status==="error"||w.status==="warning")},m.id))}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground border-t pt-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{children:[s("health.version")," ",e.jsx("span",{className:"font-mono",children:t?.version??"--"})]}),e.jsxs("span",{children:[s("health.platform")," ",e.jsx("span",{className:"font-mono",children:typeof navigator<"u"?navigator.platform:"linux"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{children:s("health.liveMonitoring")})]})]})]})}export{xe as HealthPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d}from"./react-vendor-CNOkPC89.js";const M=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,c,o)=>o?o.toUpperCase():c.toLowerCase()),s=t=>{const e=_(t);return e.charAt(0).toUpperCase()+e.slice(1)},k=(...t)=>t.filter((e,c,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===c).join(" ").trim(),v=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var m={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const x=d.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:y="",children:h,iconNode:p,...n},r)=>d.createElement("svg",{ref:r,...m,width:e,height:e,stroke:t,strokeWidth:o?Number(c)*24/Number(e):c,className:k("lucide",y),...!h&&!v(n)&&{"aria-hidden":"true"},...n},[...p.map(([i,l])=>d.createElement(i,l)),...Array.isArray(h)?h:[h]]));const a=(t,e)=>{const c=d.forwardRef(({className:o,...y},h)=>d.createElement(x,{ref:h,iconNode:e,className:k(`lucide-${M(s(t))}`,`lucide-${t}`,o),...y}));return c.displayName=s(t),c};const g=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],D2=a("activity",g);const f=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Z2=a("archive",f);const w=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],E2=a("arrow-down-left",w);const $=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],W2=a("arrow-down-right",$);const N=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],O2=a("arrow-down",N);const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],G2=a("arrow-left",u);const z=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],T2=a("arrow-right",z);const b=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],I2=a("arrow-up-right",b);const q=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],K2=a("arrow-up",q);const C=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],X2=a("book-open",C);const A=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Q2=a("bot",A);const j=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],J2=a("box",j);const H=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],Y2=a("brain-circuit",H);const V=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],a0=a("brain",V);const L=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],e0=a("bug",L);const S=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],t0=a("calendar-clock",S);const P=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],c0=a("calendar-days",P);const B=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],o0=a("calendar",B);const F=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],h0=a("chart-column",F);const R=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],d0=a("chart-pie",R);const U=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],y0=a("check-check",U);const D=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],n0=a("check",D);const Z=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],s0=a("chevron-down",Z);const E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],k0=a("chevron-left",E);const W=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],p0=a("chevron-right",W);const O=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],r0=a("chevron-up",O);const G=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],i0=a("chevrons-up-down",G);const T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],l0=a("circle-alert",T);const I=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],M0=a("circle-check-big",I);const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],_0=a("circle-check",K);const X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],v0=a("circle-question-mark",X);const Q=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],m0=a("circle-x",Q);const J=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],x0=a("circle",J);const Y=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],g0=a("clock",Y);const a1=[["path",{d:"m10.852 19.772-.383.924",key:"r7sl7d"}],["path",{d:"m13.148 14.228.383-.923",key:"1d5zpm"}],["path",{d:"M13.148 19.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1ydik7"}],["path",{d:"m13.53 20.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1m1vsf"}],["path",{d:"m14.772 15.852.923-.383",key:"660p6e"}],["path",{d:"m14.772 18.148.923.383",key:"hrcpis"}],["path",{d:"M4.2 15.1a7 7 0 1 1 9.93-9.858A7 7 0 0 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.2",key:"j2q98n"}],["path",{d:"m9.228 15.852-.923-.383",key:"1p9ong"}],["path",{d:"m9.228 18.148-.923.383",key:"6558rz"}]],f0=a("cloud-cog",a1);const e1=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],w0=a("cloud",e1);const t1=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],$0=a("code-xml",t1);const c1=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],N0=a("code",c1);const o1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],u0=a("copy",o1);const h1=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],z0=a("cpu",h1);const d1=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],b0=a("database",d1);const y1=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],q0=a("dollar-sign",y1);const n1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],C0=a("download",n1);const s1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],A0=a("ellipsis",s1);const k1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],j0=a("external-link",k1);const p1=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],H0=a("eye-off",p1);const r1=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],V0=a("eye",r1);const i1=[["path",{d:"M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6",key:"14cnrg"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1",key:"sr0ebq"}],["path",{d:"M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1",key:"w793db"}]],L0=a("file-braces-corner",i1);const l1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],S0=a("file-braces",l1);const M1=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],P0=a("file-code-corner",M1);const _1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],B0=a("file-code",_1);const v1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],F0=a("file-down",v1);const m1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],R0=a("file-exclamation-point",m1);const x1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],U0=a("file-text",x1);const g1=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]],D0=a("folder-check",g1);const f1=[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z",key:"1u1bxd"}]],Z0=a("folder-code",f1);const w1=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],E0=a("folder-open",w1);const $1=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],W0=a("folder",$1);const N1=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],O0=a("gauge",N1);const u1=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],G0=a("git-branch",u1);const z1=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],T0=a("github",z1);const b1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],I0=a("globe",b1);const q1=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],K0=a("grip-horizontal",q1);const C1=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],X0=a("grip-vertical",C1);const A1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Q0=a("history",A1);const j1=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],J0=a("house",j1);const H1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Y0=a("image",H1);const V1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],aa=a("info",V1);const L1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],ea=a("key-round",L1);const S1=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],ta=a("key",S1);const P1=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],ca=a("laptop",P1);const B1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],oa=a("layers",B1);const F1=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],ha=a("link-2",F1);const R1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],da=a("list-filter",R1);const U1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ya=a("loader-circle",U1);const D1=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],na=a("lock",D1);const Z1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],sa=a("log-out",Z1);const E1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],ka=a("megaphone",E1);const W1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],pa=a("message-square",W1);const O1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],ra=a("monitor",O1);const G1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],ia=a("moon",G1);const T1=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],la=a("network",T1);const I1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Ma=a("panel-left",I1);const K1=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],_a=a("pause",K1);const X1=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],va=a("pen-line",X1);const Q1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ma=a("pencil",Q1);const J1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],xa=a("play",J1);const Y1=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],ga=a("plug-zap",Y1);const a2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],fa=a("plus",a2);const e2=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],wa=a("power-off",e2);const t2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],$a=a("power",t2);const c2=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Na=a("puzzle",c2);const o2=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],ua=a("radio",o2);const h2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],za=a("refresh-cw",h2);const d2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],ba=a("rotate-ccw",d2);const y2=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],qa=a("rotate-cw",y2);const n2=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],Ca=a("route",n2);const s2=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Aa=a("save",s2);const k2=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],ja=a("scale",k2);const p2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ha=a("search",p2);const r2=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Va=a("server",r2);const i2=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],La=a("settings-2",i2);const l2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Sa=a("settings",l2);const M2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Pa=a("shield-alert",M2);const _2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ba=a("shield-check",_2);const v2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Fa=a("shield",v2);const m2=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],Ra=a("sliders-horizontal",m2);const x2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ua=a("sparkles",x2);const g2=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Da=a("square-terminal",g2);const f2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Za=a("square",f2);const w2=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Ea=a("star",w2);const $2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Wa=a("sun",$2);const N2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Oa=a("terminal",N2);const u2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ga=a("trash-2",u2);const z2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Ta=a("trending-up",z2);const b2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ia=a("triangle-alert",b2);const q2=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],Ka=a("unlink",q2);const C2=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Xa=a("upload",C2);const A2=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Qa=a("user",A2);const j2=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ja=a("users",j2);const H2=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Ya=a("wand-sparkles",H2);const V2=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],ae=a("waves",V2);const L2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ee=a("wifi-off",L2);const S2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],te=a("wifi",S2);const P2=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],ce=a("workflow",P2);const B2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],oe=a("wrench",B2);const F2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],he=a("x",F2);const R2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],de=a("zap",R2);export{E2 as $,D2 as A,X2 as B,p0 as C,xa as D,H0 as E,E0 as F,O0 as G,J0 as H,X0 as I,ba as J,ta as K,ya as L,ia as M,ua as N,z0 as O,Ma as P,aa as Q,za as R,Da as S,Ia as T,Ja as U,Oa as V,ee as W,he as X,N0 as Y,de as Z,I2 as _,h0 as a,t0 as a$,U0 as a0,R0 as a1,K0 as a2,La as a3,Y0 as a4,fa as a5,Ua as a6,pa as a7,a0 as a8,Va as a9,A0 as aA,Z0 as aB,G0 as aC,da as aD,ce as aE,Ca as aF,Ba as aG,L0 as aH,$a as aI,wa as aJ,i0 as aK,ga as aL,oa as aM,D0 as aN,va as aO,Q0 as aP,P0 as aQ,W0 as aR,Y2 as aS,Ka as aT,ha as aU,ae as aV,ma as aW,y0 as aX,oe as aY,ra as aZ,Q2 as a_,Z2 as aa,B0 as ab,k0 as ac,na as ad,q0 as ae,b0 as af,W2 as ag,o0 as ah,Xa as ai,Ga as aj,ja as ak,c0 as al,Ta as am,d0 as an,Aa as ao,Ha as ap,Ya as aq,$0 as ar,Ra as as,f0 as at,T2 as au,S0 as av,C0 as aw,G2 as ax,Pa as ay,la as az,T0 as b,ka as b0,w0 as b1,ca as b2,J2 as b3,e0 as b4,F0 as b5,qa as b6,Za as b7,O2 as b8,K2 as b9,Na as c,Sa as d,Wa as e,V0 as f,te as g,Fa as h,M0 as i,x0 as j,n0 as k,ea as l,u0 as m,j0 as n,Qa as o,sa as p,s0 as q,r0 as r,I0 as s,g0 as t,l0 as u,_0 as v,v0 as w,Ea as x,_a as y,m0 as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-BlliRfHq.js";import{r as o}from"./react-vendor-CNOkPC89.js";import{a as q,b5 as J,b7 as Q,d as I,A as X,L as A,v as R,w as M,x as z,y as K,z as E,I as F,az as Y}from"./index-TSYtCr3K.js";import{R as B,u as Z,v as ee,a8 as se,Q as te,q as re}from"./icons-CQ3MLSan.js";import"./tanstack-BjiH4QZq.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";const $={mode:"auto",tier_defaults:{opus:"high",sonnet:"medium",haiku:"low"},show_warnings:!0},U=1e4;function ie(){const[t,i]=o.useState(null),[b,d]=o.useState(!0),[_,N]=o.useState(!1),[p,g]=o.useState(null),[P,y]=o.useState(!1),f=o.useRef(void 0),w=o.useRef(!1),k=o.useCallback(async()=>{const r=new AbortController,c=setTimeout(()=>r.abort(),U);try{d(!0),g(null);const n=await fetch("/api/thinking",{signal:r.signal});if(clearTimeout(c),!n.ok)throw n.headers.get("content-type")?.includes("text/html")?new Error(`Server error (${n.status})`):new Error("Failed to load Thinking config");const m=await n.json();i(m.config||$),f.current=m.lastModified,w.current=!0}catch(n){clearTimeout(c),n.name==="AbortError"?g("Request timeout - please try again"):g(n.message)}finally{d(!1)}return()=>r.abort()},[]),l=o.useCallback(async r=>{if(!w.current||t===null){g("Cannot save settings before they load. Click Refresh and try again.");return}const c=t,n={...c,...r.mode!==void 0?{mode:r.mode}:{},...r.tier_defaults!==void 0?{tier_defaults:r.tier_defaults}:{},...r.show_warnings!==void 0?{show_warnings:r.show_warnings}:{}};r.clear_override||r.override===null?delete n.override:r.override!==void 0&&(n.override=r.override),r.clear_provider_overrides||r.provider_overrides===null?delete n.provider_overrides:r.provider_overrides!==void 0&&(n.provider_overrides=r.provider_overrides),i(n);const m=new AbortController,h=setTimeout(()=>m.abort(),U);try{N(!0),g(null);const x={...n,lastModified:f.current},u=await fetch("/api/thinking",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(x),signal:m.signal});if(clearTimeout(h),!u.ok){if(u.headers.get("content-type")?.includes("text/html"))throw new Error(`Server error (${u.status})`);const s=await u.json();throw u.status===409?new Error("Config changed by another session. Refreshing..."):new Error(s.error||"Failed to save")}const v=await u.json();i(v.config),f.current=v.lastModified,y(!0),setTimeout(()=>y(!1),1500)}catch(x){clearTimeout(h),i(c),x.name==="AbortError"?g("Request timeout - please try again"):(g(x.message),x.message.includes("another session")&&setTimeout(()=>k(),1e3))}finally{N(!1)}},[t,k]),T=o.useCallback(r=>{l({mode:r})},[l]),C=o.useCallback((r,c)=>{const n=t?.tier_defaults||$.tier_defaults;l({tier_defaults:{...n,[r]:c}})},[t,l]),O=o.useCallback(r=>{l({show_warnings:r})},[l]),D=o.useCallback(r=>{if(r===void 0){l({override:null,clear_override:!0});return}l({override:r,clear_override:!1})},[l]),L=o.useCallback((r,c,n)=>{const m=t?.provider_overrides||{},h=m[r]||{};if(n===void 0){const{[c]:x,...u}=h,v=Object.keys(u).length>0?u:void 0,{[r]:S,...s}=m,a=v?{...s,[r]:v}:s;l({provider_overrides:Object.keys(a).length>0?a:null,clear_provider_overrides:Object.keys(a).length===0})}else l({provider_overrides:{...m,[r]:{...h,[c]:n}},clear_provider_overrides:!1})},[t,l]);return{config:t||$,loading:b,saving:_,error:p,success:P,fetchConfig:k,saveConfig:l,setMode:T,setTierDefault:C,setShowWarnings:O,setOverride:D,setProviderOverride:L}}const H=[{value:"minimal",label:"Minimal (512 tokens)"},{value:"low",label:"Low (1K tokens)"},{value:"medium",label:"Medium (8K tokens)"},{value:"high",label:"High (24K tokens)"},{value:"xhigh",label:"Extra High (32K tokens)"},{value:"auto",label:"Auto (dynamic)"}],ne=[{value:"__none__",label:"None (use CLI flags only)"},...H,{value:"__custom__",label:"Custom budget (number)"},{value:"off",label:"Off (disable thinking)"}],ae=["agy","gemini","codex"],G=0,V=1e5;function fe(){const{t}=q(),{config:i,loading:b,saving:d,error:_,success:N,fetchConfig:p,setMode:g,setTierDefault:P,setShowWarnings:y,setOverride:f,setProviderOverride:w}=ie(),[k,l]=o.useState(null),[T,C]=o.useState(""),[O,D]=o.useState([]),[L,r]=o.useState(null),c=o.useMemo(()=>Array.from(new Set([...ae,...Object.keys(i.provider_overrides??{}),...O])),[O,i.provider_overrides]),n=i.override===void 0?"__none__":typeof i.override=="number"||/^\d+$/.test(String(i.override))?"__custom__":String(i.override),m=typeof i.override=="number"||/^\d+$/.test(String(i.override??""))?String(i.override):"",h=L??m,x=Object.keys(i.provider_overrides??{}).length>0,u=k??x;o.useEffect(()=>{p()},[p]);const v=()=>{const s=T.trim().toLowerCase();s&&(c.includes(s)||D(a=>[...a,s]),C(""),l(!0))},S=()=>{const s=h.trim();if(!s){f(void 0);return}const a=Number.parseInt(s,10);Number.isNaN(a)||a<G||a>V||!/^\d+$/.test(s)||f(a)};return b?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(B,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:t("settings.loading")})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${_||N?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[_&&e.jsx(J,{variant:"destructive",className:"py-2 shadow-lg",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"h-4 w-4"}),e.jsx(Q,{children:_})]}),e.jsxs(I,{variant:"outline",size:"sm",onClick:p,className:"h-7 px-2 text-xs border-destructive/50 hover:bg-destructive/10",children:[e.jsx(B,{className:"w-3 h-3 mr-1"}),t("sharedPage.retry")]})]})}),N&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(ee,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:t("settings.saved")})]})]}),e.jsx(X,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{className:"w-5 h-5 text-primary"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("settingsThinking.description")})]}),e.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800",children:[e.jsx(te,{className:"w-4 h-4 text-blue-600 dark:text-blue-400 shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-blue-700 dark:text-blue-300",children:[e.jsx("p",{className:"font-medium",children:t("settingsThinking.supportedProviders")}),e.jsxs("ul",{className:"mt-1 space-y-0.5 text-blue-600 dark:text-blue-400",children:[e.jsxs("li",{children:[t("settingsThinking.supportLine1Prefix")," ",e.jsx("strong",{children:"agy"}),","," ",e.jsx("strong",{children:"gemini"})," ",t("settingsThinking.supportLine1Suffix")]}),e.jsxs("li",{children:[t("settingsThinking.supportLine2Prefix")," ",e.jsx("strong",{children:"codex"})," ",t("settingsThinking.supportLine2SuffixPrefix"),e.jsx("code",{children:"--effort"}),t("settingsThinking.supportLine2SuffixPostfix")]}),e.jsxs("li",{children:[t("settingsThinking.supportLine3Prefix")," ",e.jsx("code",{children:"-high"}),t("settingsThinking.supportLine3Suffix")]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:t("settingsThinking.modeTitle")}),e.jsx("div",{className:"space-y-2",children:["auto","off","manual"].map(s=>e.jsxs("div",{className:`flex items-center justify-between p-4 rounded-lg cursor-pointer transition-colors ${i.mode===s?"bg-primary/10 border border-primary/30":"bg-muted/50 hover:bg-muted/80"} ${d?"opacity-70 pointer-events-none":""}`,onClick:()=>{d||g(s)},children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium capitalize",children:s}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s==="auto"&&t("settingsThinking.modeAutoDesc"),s==="off"&&t("settingsThinking.modeOffDesc"),s==="manual"&&t("settingsThinking.modeManualDesc")]})]}),e.jsx("div",{className:`w-4 h-4 rounded-full border-2 ${i.mode===s?"bg-primary border-primary":"border-muted-foreground/50"}`})]},s))})]}),i.mode==="auto"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:t("settingsThinking.tierDefaults")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("settingsThinking.tierDefaultsDesc")}),e.jsx("div",{className:"space-y-3",children:["opus","sonnet","haiku"].map(s=>e.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-muted/30",children:[e.jsx(A,{className:"w-20 capitalize font-medium",children:s}),e.jsxs(R,{value:i.tier_defaults[s],onValueChange:a=>P(s,a),disabled:d,children:[e.jsx(M,{className:"flex-1",children:e.jsx(z,{})}),e.jsx(K,{children:H.map(a=>e.jsx(E,{value:a.value,children:a.label},a.value))})]})]},s))})]}),i.mode==="manual"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:t("settingsThinking.persistentOverride")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("settingsThinking.persistentOverrideDesc")}),e.jsxs(R,{value:n,onValueChange:s=>{if(s==="__none__"){f(void 0);return}if(s==="__custom__"){h||r("8192");return}r(null),f(s)},disabled:d,children:[e.jsx(M,{children:e.jsx(z,{})}),e.jsx(K,{children:ne.map(s=>e.jsx(E,{value:s.value,children:s.label},s.value))})]}),n==="__custom__"&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{type:"number",min:G,max:V,value:h,onChange:s=>r(s.target.value),onBlur:S,disabled:d,placeholder:t("settingsThinking.enterCustomBudget")}),e.jsx(I,{type:"button",size:"sm",variant:"outline",onClick:S,disabled:d,children:t("settingsThinking.apply")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Range: ",G," to ",V]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("button",{type:"button",className:"flex items-center gap-2 text-base font-medium w-full text-left",onClick:()=>l(s=>!(s??x)),disabled:d,children:[e.jsx(re,{className:`w-4 h-4 transition-transform ${u?"rotate-0":"-rotate-90"}`}),t("settingsThinking.providerOverrides",{count:Object.keys(i.provider_overrides??{}).length})]}),u&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:t("settingsThinking.providerOverridesDesc")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{value:T,onChange:s=>C(s.target.value),disabled:d,placeholder:t("settingsThinking.addProviderPlaceholder")}),e.jsx(I,{type:"button",size:"sm",variant:"outline",onClick:v,disabled:d,children:t("settingsGlobalEnv.add")})]}),c.map(s=>e.jsxs("div",{className:"space-y-2 p-3 rounded-lg bg-muted/30",children:[e.jsx(A,{className:"capitalize font-medium text-sm",children:s}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:["opus","sonnet","haiku"].map(a=>{const W=i.provider_overrides?.[s]?.[a]||"__default__";return e.jsxs("div",{className:"space-y-1",children:[e.jsx(A,{className:"text-xs text-muted-foreground capitalize",children:a}),e.jsxs(R,{value:W,onValueChange:j=>w(s,a,j==="__default__"?void 0:j),disabled:d,children:[e.jsx(M,{className:"h-8 text-xs",children:e.jsx(z,{})}),e.jsxs(K,{children:[e.jsx(E,{value:"__default__",children:t("cursorPage.default")}),H.map(j=>e.jsx(E,{value:j.value,children:j.label},j.value))]})]})]},a)})})]},s))]})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:t("settingsThinking.showWarnings")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("settingsThinking.showWarningsDesc")})]}),e.jsx(Y,{checked:i.show_warnings??!0,onCheckedChange:y,disabled:d})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-muted/30",children:[e.jsx("h4",{className:"text-sm font-medium mb-2",children:t("settingsThinking.cliEnvOverride")}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:["Override per session with flags or"," ",e.jsx("code",{className:"px-1.5 py-0.5 rounded bg-muted",children:"CCS_THINKING"})," env var. Priority: flag > env > config."]}),e.jsxs("div",{className:"space-y-1 text-sm font-mono text-muted-foreground",children:[e.jsx("p",{children:"ccs gemini --thinking high"}),e.jsx("p",{children:"ccs codex --effort xhigh"}),e.jsx("p",{children:'CCS_THINKING=high ccs codex "debug this"'}),e.jsx("p",{children:"ccs config thinking --mode auto"})]})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(I,{variant:"outline",size:"sm",onClick:p,disabled:b||d,className:"w-full",children:[e.jsx(B,{className:`w-4 h-4 mr-2 ${b?"animate-spin":""}`}),t("settings.refresh")]})})]})}export{fe as default};
|