9router 0.5.91 → 0.5.99
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/README.md +90 -0
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +11 -8
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +20 -20
- package/app/.next-cli-build/react-loadable-manifest.json +1 -1
- package/app/.next-cli-build/required-server-files.json +2 -1
- package/app/.next-cli-build/routes-manifest.json +20 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +12 -8
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +5 -5
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +17 -41
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +8 -8
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +25 -0
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -26
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +8 -8
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +68 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +7 -7
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +11 -8
- package/app/.next-cli-build/server/chunks/1220.js +2 -2
- package/app/.next-cli-build/server/chunks/1679.js +1 -1
- package/app/.next-cli-build/server/chunks/1757.js +25 -0
- package/app/.next-cli-build/server/chunks/2132.js +1 -1
- package/app/.next-cli-build/server/chunks/2220.js +1 -1
- package/app/.next-cli-build/server/chunks/238.js +1 -0
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/2416.js +4 -2
- package/app/.next-cli-build/server/chunks/3459.js +1 -1
- package/app/.next-cli-build/server/chunks/3535.js +1 -1
- package/app/.next-cli-build/server/chunks/3558.js +1 -1
- package/app/.next-cli-build/server/chunks/3593.js +2 -2
- package/app/.next-cli-build/server/chunks/3662.js +1 -1
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/3966.js +1 -1
- package/app/.next-cli-build/server/chunks/4049.js +1 -1
- package/app/.next-cli-build/server/chunks/4055.js +2 -2
- package/app/.next-cli-build/server/chunks/412.js +3 -3
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4199.js +1 -0
- package/app/.next-cli-build/server/chunks/4252.js +1 -0
- package/app/.next-cli-build/server/chunks/436.js +1 -1
- package/app/.next-cli-build/server/chunks/4663.js +1 -0
- package/app/.next-cli-build/server/chunks/4739.js +2 -2
- package/app/.next-cli-build/server/chunks/4780.js +2 -2
- package/app/.next-cli-build/server/chunks/507.js +2 -2
- package/app/.next-cli-build/server/chunks/5217.js +2 -2
- package/app/.next-cli-build/server/chunks/5245.js +1 -0
- package/app/.next-cli-build/server/chunks/5258.js +2 -2
- package/app/.next-cli-build/server/chunks/5299.js +21 -20
- package/app/.next-cli-build/server/chunks/5330.js +7 -7
- package/app/.next-cli-build/server/chunks/5615.js +2 -2
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6249.js +2 -2
- package/app/.next-cli-build/server/chunks/{4037.js → 6540.js} +1 -1
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6922.js +1 -1
- package/app/.next-cli-build/server/chunks/698.js +2 -2
- package/app/.next-cli-build/server/chunks/7011.js +1 -1
- package/app/.next-cli-build/server/chunks/7211.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7285.js +1 -0
- package/app/.next-cli-build/server/chunks/7525.js +1 -1
- package/app/.next-cli-build/server/chunks/7552.js +1 -0
- package/app/.next-cli-build/server/chunks/7557.js +1 -1
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7774.js +1 -1
- package/app/.next-cli-build/server/chunks/7828.js +1 -1
- package/app/.next-cli-build/server/chunks/7868.js +1 -1
- package/app/.next-cli-build/server/chunks/7965.js +2 -2
- package/app/.next-cli-build/server/chunks/7995.js +2 -2
- package/app/.next-cli-build/server/chunks/8251.js +1 -0
- package/app/.next-cli-build/server/chunks/827.js +1 -1
- package/app/.next-cli-build/server/chunks/8363.js +1 -1
- package/app/.next-cli-build/server/chunks/8402.js +1 -1
- package/app/.next-cli-build/server/chunks/8416.js +1 -1
- package/app/.next-cli-build/server/chunks/8499.js +13 -13
- package/app/.next-cli-build/server/chunks/8520.js +2 -2
- package/app/.next-cli-build/server/chunks/8635.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +8 -8
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/9100.js +21 -0
- package/app/.next-cli-build/server/chunks/915.js +2 -2
- package/app/.next-cli-build/server/chunks/936.js +1 -0
- package/app/.next-cli-build/server/chunks/9378.js +1 -0
- package/app/.next-cli-build/server/chunks/9604.js +1 -0
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/chunks/9696.js +7 -0
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +4 -4
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/E7kVCQHn2zq2eycdAqlPc/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1321-759582fef9434912.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-2887349975c87933.js +7 -0
- package/app/.next-cli-build/static/chunks/{6808-d08581bd3ec10128.js → 6808-539a26dc25829cf4.js} +1 -1
- package/app/.next-cli-build/static/chunks/{761-cdfc24b04958e1db.js → 761-6d91e711de1388f5.js} +18 -17
- package/app/.next-cli-build/static/chunks/8720-65bbe237f14f33c9.js +5 -0
- package/app/.next-cli-build/static/chunks/{8982-116f9df4aeaaf6cb.js → 8982-d321f5a7b4ecd757.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-109d99636a7cb2c3.js → page-28c766c2dcb3fdfa.js} +15 -11
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-830e87bc2fab032d.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-e5d73ba422004783.js +4 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-d09da5db607424de.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-2de4c147da76ae92.js → layout-9bd8956f68c478a0.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/landing/page-e4fa97ee1554342b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-69d91e61421e854e.js → webpack-30d34428c43081e0.js} +1 -1
- package/app/.next-cli-build/static/css/2e0bdc15d566d63b.css +1 -0
- package/app/.next-cli-build/static/css/{8f9ac5a7bd3a79e5.css → 2e1a9a933f2e668f.css} +1 -1
- package/app/cli/.build-home/.9router/db/backups/schema-1-to-2-0.5.99-20261008-195023/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
- package/app/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +131 -0
- package/app/node_modules/@aws/lambda-invoke-store/package.json +55 -0
- package/app/node_modules/@aws-sdk/core/client.js +5 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +984 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +349 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +2949 -0
- package/app/node_modules/@aws-sdk/core/httpAuthSchemes.js +5 -0
- package/app/node_modules/@aws-sdk/core/package.json +146 -0
- package/app/node_modules/@aws-sdk/core/protocols.js +5 -0
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js +202 -0
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/loadCognitoIdentity-v413cIIq.js +4 -0
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +59 -0
- package/app/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +39 -0
- package/app/node_modules/@aws-sdk/credential-provider-env/package.json +63 -0
- package/app/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +179 -0
- package/app/node_modules/@aws-sdk/credential-provider-http/package.json +75 -0
- package/app/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +229 -0
- package/app/node_modules/@aws-sdk/credential-provider-ini/package.json +73 -0
- package/app/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +290 -0
- package/app/node_modules/@aws-sdk/credential-provider-login/package.json +66 -0
- package/app/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +166 -0
- package/app/node_modules/@aws-sdk/credential-provider-node/package.json +71 -0
- package/app/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +76 -0
- package/app/node_modules/@aws-sdk/credential-provider-process/package.json +63 -0
- package/app/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +192 -0
- package/app/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
- package/app/node_modules/@aws-sdk/credential-provider-sso/package.json +67 -0
- package/app/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +58 -0
- package/app/node_modules/@aws-sdk/credential-provider-web-identity/package.json +71 -0
- package/app/node_modules/@aws-sdk/credential-providers/dist-cjs/index.js +284 -0
- package/app/node_modules/@aws-sdk/credential-providers/dist-cjs/loadSts-C4jOcYxJ.js +3 -0
- package/app/node_modules/@aws-sdk/credential-providers/package.json +85 -0
- package/app/node_modules/@aws-sdk/nested-clients/cognito-identity.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +616 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +590 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +468 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +674 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +881 -0
- package/app/node_modules/@aws-sdk/nested-clients/package.json +121 -0
- package/app/node_modules/@aws-sdk/nested-clients/signin.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/sso-oidc.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/sso.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/sts.js +5 -0
- package/app/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +155 -0
- package/app/node_modules/@aws-sdk/signature-v4-multi-region/package.json +60 -0
- package/app/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +158 -0
- package/app/node_modules/@aws-sdk/token-providers/package.json +69 -0
- package/app/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +372 -0
- package/app/node_modules/@aws-sdk/xml-builder/package.json +63 -0
- package/app/node_modules/@smithy/core/cbor.js +5 -0
- package/app/node_modules/@smithy/core/checksum.js +5 -0
- package/app/node_modules/@smithy/core/client.js +5 -0
- package/app/node_modules/@smithy/core/config.js +5 -0
- package/app/node_modules/@smithy/core/dist-cjs/index.js +344 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2550 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +577 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1200 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +779 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +878 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +924 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1099 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +848 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +709 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +1765 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +189 -0
- package/app/node_modules/@smithy/core/endpoints.js +5 -0
- package/app/node_modules/@smithy/core/event-streams.js +5 -0
- package/app/node_modules/@smithy/core/package.json +258 -0
- package/app/node_modules/@smithy/core/protocols.js +5 -0
- package/app/node_modules/@smithy/core/retry.js +5 -0
- package/app/node_modules/@smithy/core/schema.js +5 -0
- package/app/node_modules/@smithy/core/serde.js +5 -0
- package/app/node_modules/@smithy/core/transport.js +5 -0
- package/app/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +370 -0
- package/app/node_modules/@smithy/credential-provider-imds/package.json +57 -0
- package/app/node_modules/@smithy/node-http-handler/dist-cjs/index.js +859 -0
- package/app/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/app/node_modules/@smithy/signature-v4/dist-cjs/index.js +585 -0
- package/app/node_modules/@smithy/signature-v4/package.json +53 -0
- package/app/node_modules/@smithy/types/dist-cjs/index.js +96 -0
- package/app/node_modules/@smithy/types/package.json +50 -0
- package/app/node_modules/bowser/es5.js +1 -0
- package/app/node_modules/bowser/package.json +93 -0
- package/app/package.json +4 -1
- package/app/public/providers/bedrock-xai.png +0 -0
- package/app/public/providers/bedrock.png +0 -0
- package/app/public/providers/muse.png +0 -0
- package/app/public/providers/tinyfish.png +0 -0
- package/app/public/providers/v1m.png +0 -0
- package/app/server.js +1 -1
- package/app/src/mitm/server.js +24 -24
- package/cli.js +18 -0
- package/hooks/postinstall.js +4 -0
- package/package.json +3 -2
- package/src/cli/api/client.js +17 -4
- package/src/cli/commands/connect.js +409 -0
- package/src/cli/commands/connectTools.js +558 -0
- package/src/cli/commands/show.js +101 -0
- package/src/cli/menus/cliTools.js +116 -17
- package/src/cli/menus/combos.js +9 -2
- package/src/cli/menus/providers.js +11 -2
- package/src/cli/utils/comboModelId.js +10 -0
- package/src/cli/utils/modelSelector.js +1 -1
- package/app/.next-cli-build/server/chunks/1731.js +0 -1
- package/app/.next-cli-build/server/chunks/4572.js +0 -1
- package/app/.next-cli-build/server/chunks/4884.js +0 -21
- package/app/.next-cli-build/server/chunks/5315.js +0 -1
- package/app/.next-cli-build/server/chunks/5524.js +0 -1
- package/app/.next-cli-build/server/chunks/5670.js +0 -1
- package/app/.next-cli-build/server/chunks/700.js +0 -1
- package/app/.next-cli-build/server/chunks/7220.js +0 -1
- package/app/.next-cli-build/server/chunks/8145.js +0 -1
- package/app/.next-cli-build/server/chunks/9128.js +0 -1
- package/app/.next-cli-build/server/chunks/9866.js +0 -1
- package/app/.next-cli-build/static/JwK09RQ_bBz2fzOX7dkNE/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-a87b4fa8cd302a0f.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-b868b97201a1d557.js +0 -7
- package/app/.next-cli-build/static/chunks/8720-25e3ea26eb583e94.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-060e4856389ef940.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-1a2bc6aa2b324191.js +0 -4
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-1faac22f38ea330b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/landing/page-aad89e3261bbcd7a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-6680a0968873a9a5.js +0 -1
- package/app/.next-cli-build/static/css/8f3253c444713bee.css +0 -1
- package/app/cli/.build-home/.9router/db/backups/upgrade-0.5.15-to-0.5.18-0.5.18-20260703-152217/data.sqlite +0 -0
- /package/app/.next-cli-build/static/{JwK09RQ_bBz2fzOX7dkNE → E7kVCQHn2zq2eycdAqlPc}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8720],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>d,Nv:()=>u,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>o});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],u=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},20242:(e,t,s)=>{"use strict";s.d(t,{default:()=>g});var a=s(95155),l=s(12115),n=s(14051),r=s.n(n),i=s(35497),o=s(11059),c=s(15536);async function d(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(c.Iv)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(d);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}var u=s(72767);function x({label:e,url:t,copyId:s,copied:l,onCopy:n,badge:r,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===r||"TS"===r?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,a.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),o]})}function h({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function p({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function b({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}function g({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[y,f]=(0,l.useState)(!1),[j,k]=(0,l.useState)(""),[w,v]=(0,l.useState)(null),[N,C]=(0,l.useState)(null),[S,T]=(0,l.useState)(!1),[_,P]=(0,l.useState)(!0),[E,$]=(0,l.useState)(!0),[A,I]=(0,l.useState)(!1),[U,D]=(0,l.useState)(!0),[O,F]=(0,l.useState)(!1),[R,L]=(0,l.useState)(!1),[W,q]=(0,l.useState)(""),[K,z]=(0,l.useState)(""),[H,J]=(0,l.useState)(!1),[B,M]=(0,l.useState)(""),[Q,X]=(0,l.useState)(null),[Z,G]=(0,l.useState)(!1),[V,Y]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(!1),[el,en]=(0,l.useState)(""),[er,ei]=(0,l.useState)(!1),[eo,ec]=(0,l.useState)(""),[ed,em]=(0,l.useState)(null),[eu,ex]=(0,l.useState)(""),[eh,ep]=(0,l.useState)(""),[eb,eg]=(0,l.useState)(null),[ey,ef]=(0,l.useState)(!1),[ej,ek]=(0,l.useState)([]),[ew,ev]=(0,l.useState)(""),[eN,eC]=(0,l.useState)(!1),[eS,eT]=(0,l.useState)(!1),[e_,eP]=(0,l.useState)(!1),eE=(0,l.useRef)(null),e$=(0,l.useRef)(0),eA=(0,l.useRef)(0),eI=(0,l.useRef)(!1),eU=(0,l.useRef)(!1),eD=(0,l.useRef)(!1),eO=(0,l.useRef)(!1),[eF,eR]=(0,l.useState)(!1),[eL,eW]=(0,l.useState)(!1),[eq,eK]=(0,l.useState)(new Set),[ez,eH]=(0,l.useState)(!1);(0,l.useEffect)(()=>{eH(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:eJ,copy:eB}=(0,o.C)(),eM=!_||!E,eQ=_?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eE.current&&(eE.current.scrollTop=eE.current.scrollHeight)},[ej]),(0,l.useEffect)(()=>{e0(),eG()},[]),(0,l.useEffect)(()=>{if(!(O||ee))return;let e=!O||R,t=!ee||es,s=()=>{document.hidden||eZ()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||eZ()},c.fl);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[O,ee,R,es]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(O&&(W||K)){let e=await m(K,W);eI.current=e,e?(e$.current=0,L(!0),eD.current||(eD.current=!0,eR(!0))):(e$.current+=1,e$.current>=c.t6&&L(!1))}else eI.current=!1;if(ee&&el){let e=await d(el);eU.current=e,e?(eA.current=0,ea(!0),eO.current||(eO.current=!0,eW(!0))):(eA.current+=1,eA.current>=c.t6&&ea(!1))}else eU.current=!1}};if(!(O&&(W||K)||ee&&el))return;e();let t=!ee||es;if((!O||R)&&t)return;let s=setInterval(e,c.RL);return()=>clearInterval(s)},[O,W,K,ee,el,R,es]);let eX=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=c.t6&&a(!1))},[]),eZ=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";q(a),z(t.tunnel?.publicUrl||""),F(s),eX(null,eI,e$,L,eD,eR);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";en(n),et(l),eX(null,eU,eA,ea,eO,eW)}catch{}},eG=async()=>{D(!0);try{let[e,t]=await Promise.all([u.A.getState().fetchSettings(),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e&&(T(e.requireApiKey||!1),P(!1!==e.requireLogin),$(e.hasPassword||!1),I(e.tunnelDashboardAccess||!1)),t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";q(a),z(e.tunnel?.publicUrl||""),F(s),eX(null,eI,e$,L,eD,eR);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";en(n),et(l),eX(null,eU,eA,ea,eO,eW)}}catch(e){console.log("Error loading settings:",e)}finally{D(!1)}},eV=async e=>{try{await u.A.getState().patchSettings({tunnelDashboardAccess:e})&&I(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},eY=async e=>{try{await u.A.getState().patchSettings({requireApiKey:e})&&T(e)}catch(e){console.log("Error updating requireApiKey:",e)}},e0=async()=>{try{let e=async()=>{let e=await fetch("/api/keys");return e.ok&&(await e.json()).keys||[]},t=await e();if(0===t.length)try{(await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"Default Key"})})).ok&&(t=await e())}catch{}s(t)}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},e1=async(...e)=>{J(!0),M("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<c.Cp;){if(await new Promise(e=>setTimeout(e,c.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return F(!0),J(!1),M(""),!0;if((Date.now()-s)%1e4<c.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return X({type:"error",message:"Tunnel process stopped unexpectedly."}),J(!1),M(""),!1}}catch{}}return X({type:"error",message:"Tunnel created but not reachable. Please try again."}),J(!1),M(""),!1},e5=async()=>{G(!1),J(!0),X(null),M("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?M(`Downloading cloudflared... ${s.download.progress}%`):e&&M("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void X({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void X({type:"error",message:"No tunnel URL returned"});q(a),z(s.publicUrl||""),await e1(s.publicUrl,a)}catch(e){X({type:"error",message:e.message})}finally{e=!1,J(!1),M("")}},e2=async()=>{J(!0),X(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(F(!1),q(""),Y(!1),X({type:"success",message:"Tunnel disabled"})):X({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){X({type:"error",message:e.message})}finally{J(!1)}},e4=async()=>{eg(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eg(t.installed),t}}catch{}return eg(!1),{installed:!1}},e3=async()=>{ef(!0),em(null),ek([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:ew})});ev("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)ek(e=>[...e.slice(-50),a.message]);else if("done"===s){eg(!0),ef(!1),eT(!1),e9();return}else"error"===s&&em({type:"error",message:a.error||"Install failed"})}}}catch(e){em({type:"error",message:e.message})}finally{ef(!1)}},e8=async e=>{ec("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<c.Cp;){await new Promise(e=>setTimeout(e,c.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},e6=(e,t)=>{ex(e),ep(t)},e7=()=>{ex(""),ep("")},e9=async()=>{eT(!1),eC(!0),ei(!0),em(null),ec("Connecting..."),e7();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){en(t.tunnelUrl||"");let e=await e8(t.tunnelUrl);et(!0),em(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){e6(t.authUrl,"Open Login Page"),ec('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){e7(),ec("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){en(t.tunnelUrl||"");let e=await e8(t.tunnelUrl);et(!0),em(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await te(t.enableUrl):em({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}e7(),em({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await te(t.enableUrl);em({type:"error",message:t.error||"Failed to connect"})}catch(e){em({type:"error",message:e.message})}finally{ei(!1),eC(!1),ec(""),e7()}},te=async e=>{e6(e,"Open Funnel Settings"),ec('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){e7(),en(t.tunnelUrl||"");let e=await e8(t.tunnelUrl);et(!0),em(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){e7(),em({type:"error",message:t.error});return}}catch{}}e7(),em({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tt=async()=>{ei(!0),em(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(et(!1),en(""),eP(!1),em({type:"success",message:"Tailscale disabled"})):em({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){em({type:"error",message:e.message})}finally{ei(!1)}},ts=async()=>{em(null),ek([]);let e=await e4();e?.installed&&e?.hasCachedPassword?e9():eT(!0)},ta=async()=>{if(j.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j})}),t=await e.json();e.ok&&(v(t.key),await e0(),k(""),f(!1))}catch(e){console.log("Error creating key:",e)}},tl=async e=>{C({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{C(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),eK(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},tn=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[tr,ti]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{ti(`${window.location.origin}/v1`)},[]),n)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(x,{label:"Local",url:tr,copyId:"local_url",copied:eJ,onCopy:eB}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${O?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),O&&!H&&R?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${K||W}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eB(`${K||W}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===eJ?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>Y(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!O||H||R?H?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),B||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{J(!1),M("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):Q?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),Q.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>G(!0),children:"Enable"})]}):U?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>D(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{eM?X({type:"error",message:`Security required: ${eQ}`}):S?G(!0):X({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eF?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>Y(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${ee?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),ee&&!er&&es?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${el}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eB(`${el}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===eJ?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eP(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ee||er||es?er||eN?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eo||"Connecting..."]}),eu&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eu,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eh||"Open"}),(0,a.jsx)("button",{onClick:()=>{ei(!1),eC(!1),ec(""),e7()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ed?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ed.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:ts,children:"Enable"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{eM?em({type:"error",message:`Security required: ${eQ}`}):ts()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eL?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>eP(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),eM&&!O&&!ee&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(b,{message:eQ,action:{label:"Open settings",href:"/dashboard/profile"}})}),(O||ee)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!S&&(0,a.jsx)(b,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!_||!E)&&(0,a.jsx)(b,{message:_?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:_?"Change password":"Enable",href:"/dashboard/profile"}})]}),(O||ee)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(i.lM,{checked:A,onChange:()=>eV(!A)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(p,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>f(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(i.lM,{checked:S,onChange:()=>eY(!S)})]}),ez&&!S&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(b,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>f(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:eq.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void eK(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:eq.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eq.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>eB(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eJ===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?C({title:"Pause API Key",message:`Pause API key "${e.name}"?
|
|
2
|
-
|
|
3
|
-
This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{C(null),tn(e.id,t)}}):tn(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>tl(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:y,title:"Create API Key",onClose:()=>{f(!1),k("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:j,onChange:e=>k(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ta,fullWidth:!0,disabled:!j.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{f(!1),k("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!w,title:"API Key Created",onClose:()=>v(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:w||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===eJ?"check":"content_copy",onClick:()=>eB(w,"created_key"),children:"created_key"===eJ?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>v(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:Z,title:"Enable Tunnel",onClose:()=>G(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.oX.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e5,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>G(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:V,title:"Disable Tunnel",onClose:()=>!H&&Y(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e2,fullWidth:!0,disabled:H,variant:"danger",children:H?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>Y(!1),variant:"ghost",fullWidth:!0,disabled:H,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eS,title:"Tailscale Funnel",onClose:()=>{ey||(eT(!1),ev(""),em(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eb&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eb&&!ey&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e3,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eT(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ey&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),ej.length>0&&(0,a.jsx)("div",{ref:eE,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:ej.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eb&&!ey&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>e9(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eT(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ed&&(0,a.jsx)(h,{status:ed})]})}),(0,a.jsx)(i.aF,{isOpen:e_,title:"Disable Tailscale",onClose:()=>!er&&eP(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tt,fullWidth:!0,disabled:er,variant:"danger",children:er?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eP(!1),variant:"ghost",fullWidth:!0,disabled:er,children:"Cancel"})]})]})}),(0,a.jsx)(i.uo,{isOpen:!!N,onClose:()=>C(null),onConfirm:N?.onConfirm,title:N?.title||"Confirm",message:N?.message,variant:"danger"})]})}g.propTypes={machineId:r().string.isRequired}},58720:(e,t,s)=>{Promise.resolve().then(s.bind(s,20242))}}]);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{70217:(e,t,s)=>{"use strict";function i(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>i})},77458:(e,t,s)=>{Promise.resolve().then(s.bind(s,80873))},80873:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>G});var i=s(95155),a=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(8247),c=s(35497),m=s(88105),p=s(28777),u=s(67899),x=s(62630);s(67468);var h=s(45564);let f=["none","low","medium","high"],g=["none","thinking"],y=["none","low","medium","high","max"],b={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":y,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":f,zai:g,qwen:f,kimi:y,deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:g,hunyuan:f,step:f},v=["none","minimal","low","medium","high","xhigh","max"],j=[{provider:"codex",pattern:"*gpt-6*",levels:v},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:v},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function w(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let s=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!s)return null;let[,i,a]=s,l=Number(i),r=void 0===a?null:Number(a);return l<4||4===l&&(null===r||r<=5||null!==r&&r>=1e3)?null:"output_config"}(t))return null;let s=(0,u.nl)(e,t);if(!s.reasoning)return null;let i=String(t||"").replace(/\([^()]+\)\s*$/,""),a="codex"===e?(0,h.SM)("cx").find(e=>e.id===i)?.thinkingLevels:null,l=j.find(s=>(!s.provider||s.provider===e)&&(0,x.gH)(s.pattern,t)),r=a||l?.levels||b[s.thinkingFormat]||f;return!1===s.thinkingCanDisable&&(r=r.filter(e=>"none"!==e)),r}var k=s(11059),N=s(929),C=s(73006);let S=new Map;async function A(e){if(!e?.url||!e?.type)return[];let t=S.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let i=(await s.json()).data??[];return S.set(e.url,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}function T({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:i=[],type:a="llm",includeLegacyAliases:l=!0}){let r=new Set(i.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(a&&e!==a||r.has(t.id))continue;let i=`${s}/${t.id}`;n.has(i)||(n.add(i),o.push({id:t.id,name:t.name||t.id,fullModel:i,source:"custom",type:e}))}if(!l)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||r.has(t)||n.has(s)||(n.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:a||"llm"}))}return o}var $=s(14051),O=s.n($);function P({model:e,fullModel:t,alias:s,copied:a,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:m,isTesting:p,onDisable:u,caps:x,thinkingSuffix:h}){let f=h?`${t}(${h})`:t,g="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,i.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:g?{color:g}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,i.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:f}),(0,i.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,i.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,i.jsx)(c.nh,{caps:x,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:()=>l(f,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,i.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,i.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function E({modelId:e,fullModel:t,copied:s,onCopy:a,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,i.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,i.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,i.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function I({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:l,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:m,connections:p,isAnthropic:u}){let[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),[v,j]=(0,a.useState)(null),[w,k]=(0,a.useState)({}),N=async t=>{if(!v){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),i=await s.json();k(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{k(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=T({customModels:l,modelAliases:s,providerAlias:e,type:"llm"}),S=async()=>{if(!x.trim()||f)return;let e=x.trim();if(C.some(t=>t.id===e))return void alert("Model already exists for this provider.");g(!0);try{await d(e),h("")}catch(e){console.log("Error adding model:",e)}finally{g(!1)}},A=async()=>{if(y)return;let e=p.find(e=>!1!==e.isActive);if(e){b(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||"Failed to import models");let i=s.models||[];if(0===i.length)return void alert("No models returned from /models.");let a=0;for(let e of i){let t=e.id||e.name||e.model;t&&(C.some(e=>e.id===t)||(await d(t),a+=1))}0===a&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{b(!1)}}},$=p.some(e=>!1!==e.isActive);return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,i.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,i.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,i.jsx)("input",{id:"new-compatible-model-input",type:"text",value:x,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:u?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:S,disabled:!x.trim()||f,children:f?"Adding...":"Add"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!$||y,children:y?"Importing...":"Import from /models"})]}),!$&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({id:s,alias:a,source:l})=>(0,i.jsx)(E,{modelId:s,fullModel:`${t}/${s}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===l?m(s):o(a),onTest:p.length>0?()=>N(s):void 0,testStatus:w[s],isTesting:v===s},`${l}-${e}/${s}`))})]})}P.propTypes={model:O().shape({id:O().string.isRequired}).isRequired,fullModel:O().string.isRequired,alias:O().string,copied:O().string,onCopy:O().func.isRequired,testStatus:O().oneOf(["ok","error"]),isCustom:O().bool,isFree:O().bool,onDeleteAlias:O().func,onTest:O().func,isTesting:O().bool,onDisable:O().func,caps:O().object,thinkingSuffix:O().string},O().string.isRequired,O().string.isRequired,O().string,O().func.isRequired,O().func.isRequired,O().func,O().oneOf(["ok","error"]),O().bool,O().string.isRequired,O().object.isRequired,O().arrayOf(O().object),O().string,O().func.isRequired,O().func.isRequired,O().func.isRequired,O().func.isRequired,I.propTypes={providerStorageAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,modelAliases:O().object.isRequired,customModels:O().arrayOf(O().object),copied:O().string,onCopy:O().func.isRequired,onDeleteAlias:O().func.isRequired,onAddCustomModel:O().func.isRequired,onDeleteCustomModel:O().func.isRequired,connections:O().arrayOf(O().shape({id:O().string,isActive:O().bool})).isRequired,isAnthropic:O().bool};var D=s(70217);function R({until:e}){let[t,s]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let i=Math.floor(t/1e3);if(i<60)s(`${i}s`);else if(i<3600)s(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);s(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),t)?(0,i.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function _({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:d,onUpdateProxy:m,onEdit:p,onDelete:u,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),v=(0,a.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,k=w?j.get(w):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!w||N,S=k?`Pool: ${k.name}`:w?`Pool: ${w} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",T="";if(k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);T=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{T=t}}let $=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",O="default";k?.isActive===!0?O="success":(w||N)&&(O="error"),(0,a.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let P=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),g(!1)}},E=e.authType||(s?"oauth":"apikey"),I="oauth"===E,q="cookie"===E,z=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(I?"OAuth Account":q?"Cookie Account":"API Key"),U=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[K,M]=(0,a.useState)(!1),J=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{M(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=J?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[J]);let F="unavailable"!==e.testStatus||K?e.testStatus:"active",L=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,i.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,i.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,i.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:q?"cookie":I?"lock":"key"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:z}),U&&(0,i.jsx)("p",{className:"text-xs text-text-muted truncate",children:U}),(0,i.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,i.jsx)(c.Ex,{variant:(0,D.g)(e.isActive,F),size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,i.jsx)(c.Ex,{variant:"default",size:"sm",children:I?"OAuth":q?"Cookie":"API Key"}),C&&(0,i.jsx)(c.Ex,{variant:O,size:"sm",children:"Proxy"}),K&&!1!==e.isActive&&(0,i.jsx)(R,{until:J}),e.lastError&&!1!==e.isActive&&(0,i.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),L()&&(0,i.jsx)(c.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:L()})]}),C&&(0,i.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,i.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),T&&(0,i.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:T}),$&&(0,i.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:$,children:["no_proxy: ",$]})]})]})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,i.jsxs)("div",{className:"relative",ref:v,children:[(0,i.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,i.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,i.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,i.jsx)("button",{onClick:()=>P(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,i.jsx)(c.m_,{text:A,children:(0,i.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,i.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,i.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,i.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}R.propTypes={until:O().string.isRequired},_.propTypes={connection:O().shape({id:O().string,name:O().string,email:O().string,displayName:O().string,modelLockUntil:O().string,testStatus:O().string,isActive:O().bool,lastError:O().string,priority:O().number,globalPriority:O().number}).isRequired,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string,proxyUrl:O().string,noProxy:O().string,isActive:O().bool})),isOAuth:O().bool.isRequired,isFirst:O().bool.isRequired,isLast:O().bool.isRequired,onMoveUp:O().func.isRequired,onMoveDown:O().func.isRequired,onToggleActive:O().func.isRequired,onUpdateProxy:O().func,onEdit:O().func.isRequired,onDelete:O().func.isRequired,oneByOneStatus:O().shape({state:O().string,error:O().string}),autoPing:O().shape({on:O().bool,onToggle:O().func,provider:O().string})};let q=`name1|sk-key1
|
|
2
|
-
name2|sk-key2
|
|
3
|
-
sk-key-only-auto-named`;function z({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:d,proxyPools:p,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",b="ollama-local"===t,v="cookie"===n,j="xai"===t&&!v,w=v?"Cookie Value":"qoder"===t||"qoder-cn"===t?"Personal Access Token (PAT)":"API Key",k="azure"===t,N="cloudflare-ai"===t,C=m.Q2?.[t]?.regions||null,S=m.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[A,T]=(0,a.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[$,O]=(0,a.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[P,E]=(0,a.useState)({accountId:""}),[I,D]=(0,a.useState)(S),[R,_]=(0,a.useState)(!1),[U,K]=(0,a.useState)(null),[M,J]=(0,a.useState)(!1),F=N?`name1|sk-key1|acc123456
|
|
4
|
-
name2|sk-key2|def789012
|
|
5
|
-
sk-key-only-auto-named`:"qoder"===t||"qoder-cn"===t?`name1|pt-xxxxx
|
|
6
|
-
name2|pt-yyyyy
|
|
7
|
-
pt-only-auto-named`:q,[L,W]=(0,a.useState)("single"),[B,H]=(0,a.useState)(""),[G,Q]=(0,a.useState)(null),V=()=>b&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:k?{azureEndpoint:$.azureEndpoint,apiVersion:$.apiVersion,deployment:$.deployment,organization:$.organization}:N?{accountId:P.accountId}:C&&I?{region:I}:void 0,Z=async()=>{_(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})}),s=await e.json();K(s.valid?"success":"failed")}catch{K("failed")}finally{_(!1)}},X=async()=>{if(t&&(b||A.apiKey)&&(b||A.name)&&(!l||A.defaultModel.trim())){J(!0);try{let e=!1;try{_(!0),K(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,K(e?"success":"failed")}catch{K("failed")}finally{_(!1)}await h({name:A.name||(b?"Ollama Local":""),apiKey:A.apiKey,defaultModel:l?A.defaultModel.trim():void 0,priority:A.priority,proxyPoolId:A.proxyPoolId===y?null:A.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{J(!1)}}},Y=async()=>{let e=B.split("\n");if(!e.length)return;let s=function(e,t,s={}){let{isCloudflareAi:i=!1}=s,a=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let r=function(e,t={}){let{isCloudflareAi:s=!1}=t,i=e.split("|");if(s&&i.length>=3){let e=i[0].trim();return{baseName:e||"Key",apiKey:i.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:i[i.length-1].trim()}}}return i.length>=2?{baseName:i[0].trim()||"Key",apiKey:i.slice(1).join("|").trim()}:{baseName:"Key",apiKey:i[0].trim()}}(s,{isCloudflareAi:i});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,a.has(e.toLowerCase());)o+=1;a.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),l.push(d)}return l}(e,x,{isCloudflareAi:N});if(!s.length)return;J(!0),Q(null);let i=0,a=0;for(let e of s)try{let s=!1;try{let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});s=!!(await i.json().catch(()=>({}))).valid}catch{s=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:s?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?i++:a++}catch{a++}J(!1),Q({success:i,failed:a}),i>0&&f&&f()};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Add ${s||t} ${w}`,onClose:g,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{size:"sm",variant:"single"===L?"primary":"ghost",onClick:()=>{W("single"),Q(null)},children:"Single"}),(0,i.jsx)(c.$n,{size:"sm",variant:"bulk"===L?"primary":"ghost",onClick:()=>{W("bulk"),Q(null)},children:"Bulk Add"})]}),"bulk"===L&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:N?(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t||"qoder-cn"===t?(0,i.jsxs)(i.Fragment,{children:["One PAT per line. Format: ",(0,i.jsx)("code",{children:"name|pt-..."})," or just ",(0,i.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:F,value:B,onChange:e=>H(e.target.value)}),G&&(0,i.jsxs)("div",{className:`text-sm font-medium ${G.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",G.success," added",G.failed>0?`, ✗ ${G.failed} failed`:""]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:Y,fullWidth:!0,disabled:M||!B.trim(),children:M?"Adding...":"Add All Keys"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===L&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:"Name",value:A.name,onChange:e=>T({...A,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>T({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:Z,disabled:R||M,variant:"secondary",children:R?"Checking...":"Check"})})]}),!b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:w,type:v?"text":"password",value:A.apiKey,onChange:e=>T({...A,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t||"qoder-cn"===t?"pt-...":"",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:Z,disabled:!A.apiKey||R||M,variant:"secondary",children:R?"Checking...":"Check"})})]}),j&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),v&&o&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),C&&(0,i.jsx)(c.l6,{label:"Region",value:I,onChange:e=>D(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),l&&(0,i.jsx)(c.pd,{label:"Default Model",value:A.defaultModel,onChange:e=>T({...A,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,i.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,i.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),U&&(0,i.jsx)(c.Ex,{variant:"success"===U?"success":"error",children:"success"===U?"Valid":"Invalid"}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),l&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,i.jsx)(c.pd,{label:"Account ID",value:P.accountId,onChange:e=>E({...P,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,i.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.pd,{label:"Azure Endpoint",value:$.azureEndpoint,onChange:e=>O({...$,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,i.jsx)(c.pd,{label:"Deployment Name",value:$.deployment,onChange:e=>O({...$,deployment:e.target.value}),placeholder:"gpt-4"}),(0,i.jsx)(c.pd,{label:"API Version",value:$.apiVersion,onChange:e=>O({...$,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,i.jsx)(c.pd,{label:"Organization",value:$.organization,onChange:e=>O({...$,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,i.jsx)(c.pd,{label:"Priority",type:"number",value:A.priority,onChange:e=>T({...A,priority:Number.parseInt(e.target.value)||1})}),(0,i.jsx)(c.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>T({...A,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:X,fullWidth:!0,disabled:M||!b&&(!A.name||!A.apiKey)||l&&!A.defaultModel.trim()||k&&(!$.azureEndpoint||!$.deployment||!$.organization)||N&&!P.accountId,children:M?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function U({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,m]=(0,a.useState)(!1),[p,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(c.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,i.jsx)(c.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,i.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,i.jsx)(c.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>u(e.target.value),className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,i.jsx)(c.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,i.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}z.propTypes={isOpen:O().bool.isRequired,provider:O().string,providerName:O().string,isCompatible:O().bool,isAnthropic:O().bool,authType:O().string,authHint:O().string,website:O().string,proxyPools:O().arrayOf(O().shape({id:O().string,name:O().string})),error:O().string,existingNames:O().arrayOf(O().string),onSave:O().func.isRequired,onBulkDone:O().func,onClose:O().func.isRequired},U.propTypes={isOpen:O().bool.isRequired,node:O().shape({id:O().string,name:O().string,prefix:O().string,apiType:O().string,baseUrl:O().string}),onSave:O().func.isRequired,onClose:O().func.isRequired,isAnthropic:O().bool};let K=()=>Object.fromEntries(Object.keys(p.bs).map(e=>[e,!1]));function M({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,a.useState)(""),[d,m]=(0,a.useState)(K),[u,x]=(0,a.useState)(null),[h,f]=(0,a.useState)(""),[g,y]=(0,a.useState)(!1),[b,v]=(0,a.useState)("");(0,a.useEffect)(()=>{e&&(o(""),m(K()),v(""),x(null),f(""))},[e]);let j=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},w=async()=>{let e=j(n.trim());if(e){x("testing"),f("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),i=await s.json();x(i.ok?"ok":"error"),f(i.error||"")}catch(e){x("error"),f(e.message)}}},k=async()=>{let e=j(n.trim());if(e&&!g){y(!0);try{await l(e,d,d.stt?b:null)}finally{y(!1)}}};return(0,i.jsx)(c.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),x(null),f("")},onKeyDown:e=>{"Enter"===e.key&&w()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,i.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===u,onClick:w,disabled:!n.trim()||"testing"===u,children:"testing"===u?"Testing...":"Test"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,i.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:j(n.trim())||"model-id"})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(p.bs).map(([e,t])=>(0,i.jsx)(c.lM,{checked:!!d[e],onChange:t=>m(s=>({...s,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(c.lM,{checked:!!d.stt,onChange:e=>{m(t=>({...t,stt:e})),e||v("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),d.stt&&(0,i.jsx)("div",{className:"mt-3",children:(0,i.jsx)(c.l6,{label:"Transport",value:b,onChange:e=>v(e.target.value),placeholder:"Provider default (REST)",options:p.vp.map(e=>({value:e,label:p.qw[e].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"ok"===u&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===u&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,i.jsx)("span",{children:h||"Model not reachable"})]}),(0,i.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,i.jsx)(c.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,i.jsx)(c.$n,{onClick:k,fullWidth:!0,size:"sm",disabled:!n.trim()||g,children:g?"Adding...":"Add Model"})]})]})})}M.propTypes={isOpen:O().bool.isRequired,providerAlias:O().string.isRequired,providerDisplayAlias:O().string.isRequired,onSave:O().func.isRequired,onClose:O().func.isRequired};let J=`[
|
|
8
|
-
{
|
|
9
|
-
"accessToken": "eyJhbGc...",
|
|
10
|
-
"refreshToken": "rt_...",
|
|
11
|
-
"idToken": "eyJhbGc...",
|
|
12
|
-
"email": "user@example.com"
|
|
13
|
-
}
|
|
14
|
-
]`;function F({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,a.useState)(""),[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(null),x=()=>{n||(r(""),m(""),u(null),t())},h=async()=>{var e;let t;m(""),u(null);let i=l.trim();if(!i)return;try{t=JSON.parse(i)}catch(e){m(`${(0,C.Tl)("Invalid JSON")}: ${e.message}`);return}let a=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!a||0===a.length)return void m((0,C.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,C.Tl)("Request failed"))}finally{o(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,C.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,C.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:J,value:l,onChange:e=>r(e.target.value),disabled:n}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,C.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,C.Tl)("failed")}`:""]}),f.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,C.Tl)("Importing..."):(0,C.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,C.Tl)("Close")})]})]})})}F.propTypes={isOpen:O().bool.isRequired,onClose:O().func.isRequired,onSuccess:O().func};let L=`[
|
|
15
|
-
{
|
|
16
|
-
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
17
|
-
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
18
|
-
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
19
|
-
"email": "account1@example.com"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
23
|
-
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
24
|
-
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
25
|
-
"email": "account2@example.com"
|
|
26
|
-
}
|
|
27
|
-
]`;function W(e){let t,s=e.trim();if(!s)return[];try{t=JSON.parse(s)}catch(e){try{let e=s;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function B({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,a.useState)(""),[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)(""),[p,u]=(0,a.useState)(null),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),y=(0,a.useRef)(null),b=()=>{n||(r(""),m(""),u(null),g(null),h(!1),t())},v=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,C.Tl)("Please select valid .json files"));try{let e=[];for(let s of t){let t=await s.text(),i=W(t);Array.isArray(i)?e.push(...i):i&&e.push(i)}if(0===e.length)return void m((0,C.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,C.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;m(""),u(null);try{e=W(l)}catch(e){m(`${(0,C.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,C.Tl)("No accounts found in input"));o(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),i=await t.json();if(!t.ok)return void m(i?.error||`Request failed: ${t.status}`);u(i),i.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,C.Tl)("Request failed"))}finally{o(!1)}},w=p?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,C.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,C.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,i.jsx)("input",{ref:y,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{v(e.target.files),e.target&&(e.target.value="")}}),(0,i.jsx)(c.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,C.Tl)("Upload JSON Files")})]}),(0,i.jsxs)("div",{onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer?.files?.length>0&&v(e.dataTransfer.files)},className:`relative rounded border transition-colors ${x?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,i.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:L,value:l,onChange:e=>{r(e.target.value),g(null)},disabled:n}),x&&(0,i.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,i.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,C.Tl)("Drop .json files here")})]})]}),f&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,i.jsxs)("span",{children:[(0,C.Tl)("Loaded")," ",f.accountsCount," ",(0,C.Tl)("account(s) from")," ",f.filesCount," ",(0,C.Tl)("file(s)")]})]}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&p.failed>0&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",p.failed," ",(0,C.Tl)("failed")]}),w.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:j,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,C.Tl)("Importing..."):(0,C.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,C.Tl)("Close")})]})]})})}let H={claude:"claudeAutoPing",codex:"codexAutoPing"};function G(){let e,t,s,r,u,x=(0,l.useParams)(),h=(0,l.useRouter)(),f=x.id,{getCaps:g}=(0,N.y)(),[y,b]=(0,a.useState)([]),[v,j]=(0,a.useState)(!0),[S,$]=(0,a.useState)(null),[O,E]=(0,a.useState)([]),[D,R]=(0,a.useState)(!1),[q,K]=(0,a.useState)(!1),[J,L]=(0,a.useState)(!1),[W,G]=(0,a.useState)(!1),[Q,V]=(0,a.useState)(""),[Z,X]=(0,a.useState)(!1),[Y,ee]=(0,a.useState)(!1),[et,es]=(0,a.useState)(!1),[ei,ea]=(0,a.useState)(!1),[el,er]=(0,a.useState)(!1),[en,eo]=(0,a.useState)(null),[ed,ec]=(0,a.useState)({}),[em,ep]=(0,a.useState)([]),[eu,ex]=(0,a.useState)(!1),[eh,ef]=(0,a.useState)({}),[eg,ey]=(0,a.useState)(""),[eb,ev]=(0,a.useState)(()=>new Set),[ej,ew]=(0,a.useState)(!1),[ek,eN]=(0,a.useState)([]),[eC,eS]=(0,a.useState)("__none__"),[eA,eT]=(0,a.useState)(!1),[e$,eO]=(0,a.useState)(null),[eP,eE]=(0,a.useState)(""),[eI,eD]=(0,a.useState)("auto"),[eR,e_]=(0,a.useState)({enabled:!1,connections:{}}),[eq,ez]=(0,a.useState)([]),[eU,eK]=(0,a.useState)([]),[eM,eJ]=(0,a.useState)(null),[eF,eL]=(0,a.useState)([]),[eW,eB]=(0,a.useState)([]),[eH,eG]=(0,a.useState)(null),[eQ,eV]=(0,a.useState)(!1),[eZ,eX]=(0,a.useState)(!1),[eY,e0]=(0,a.useState)(!1),[e1,e5]=(0,a.useState)(null),[e2,e3]=(0,a.useState)({}),[e4,e6]=(0,a.useState)(null),e7=(0,a.useRef)(!1),[e8,e9]=(0,a.useState)(!1),[te,tt]=(0,a.useState)(!1),{copied:ts,copy:ti}=(0,k.C)(),ta="ag_risk_confirmed",tl=()=>{R(!0)},tr=()=>{"antigravity"===f&&"true"!==window.localStorage.getItem(ta)?eV(!0):"xiaomi-mimo"===f?K(!0):tm?tl():(V(""),G(!0))},tn=()=>{V(""),G(!0)},to=()=>{tm?tr():tn()},td=S?{id:S.id,name:S.name||("anthropic-compatible"===S.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===S.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===S.type?"AC":"OC",apiType:S.apiType,baseUrl:S.baseUrl,type:S.type}:m.zN[f]||m.fg[f]||m.IS[f]||m.nJ[f]||m.br[f],tc=td?.authModes||[],tm=!!m.zN[f]||!!m.IS[f]||tc.includes("oauth"),tp=!!m.fg[f]||tc.includes("apikey"),tu=!!m.IS[f]?.noAuth,tx=(0,p.KC)(f),th=("cursor"===f||"zed"===f)&&eU.length>0?eU:tx,tf=(0,m.wG)(f),tg=(0,m.mq)(f),ty=(0,m.gb)(f),tb=tg||ty,tv=!tb&&tm&&tp,tj="xai"===f?"Grok Build OAuth":"grok-cli"===f?"Grok CLI Device Login":"kimi"===f?"Kimi Coding OAuth":"OAuth",tw="xai"===f?"xAI API Key":"kimi"===f?"Kimi API Key":"qoder"===f||"qoder-cn"===f?"PAT":"API Key",tk=e=>{if(!eI||"auto"===eI)return null;let t=w(f,e);return t&&t.includes(eI)?eI:null},tN=tb?f:tf,tC=(()=>{let e=new Set,t=new Set,s=s=>{if(!s||t.has(s))return;t.add(s);let i=w(f,s);i&&i.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of th)s(e.id);for(let e of eF)s(e.id);for(let e of em)e.providerAlias===tN&&"llm"===(e.kind||e.type||"llm")&&s(e.id);return e.size?["auto",...e]:null})(),tS=tb?S?.prefix||f:tf,tA=(0,a.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tN)}`,{cache:"no-store"}),t=await e.json();e.ok&&eB(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tN]),tT=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tN,ids:[e]})})).ok&&await tA()}catch(e){console.log("Error disabling model:",e)}},t$=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tN)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tA()}catch(e){console.log("Error enabling model:",e)}},tO=async e=>{e.length&&eG({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eG(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tN,ids:e})})).ok&&await tA()}catch(e){console.log("Error disabling all models:",e)}}})},tP=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tN)}`,{method:"DELETE"})).ok&&await tA()}catch(e){console.log("Error enabling all models:",e)}},tE=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ec(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tI=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ep(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,a.useEffect)(()=>{"kilocode"===f&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eL(e.models)}).catch(()=>{})},[f]);let tD=(0,a.useCallback)(async()=>{try{let[e,t,s,i]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),a=await e.json(),l=await t.json(),r=await s.json(),n=i.ok?await i.json():{};if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===f);b(e)}s.ok&&E(r.proxyPools||[]);let o=(n.providerStrategies||{})[f]||{};eO(o.fallbackStrategy||null),eE(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[f]||{};eD(d.mode||"auto");let c=H[f],m=c&&n[c]||{};if(e_({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===f)||null;if(!e&&tb)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===f)||null))break}$(e)}}catch(e){console.log("Error fetching connections:",e)}finally{j(!1)}},[f,tb]),tR=async e=>{try{let t=await fetch(`/api/provider-nodes/${f}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&($(s.node),await tD(),ea(!1))}catch(e){console.log("Error updating provider node:",e)}},t_=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},a={};e&&(a.fallbackStrategy=e),"round-robin"===e&&""!==t&&(a.stickyRoundRobinLimit=Number(t)||3);let l={...i};0===Object.keys(a).length?delete l[f]:l[f]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tq=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[f]={mode:e}:delete s[f],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},tz=async e=>{let t=H[f];if(t){e_(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,a.useEffect)(()=>{tD(),tE(),tI(),tA()},[tD,tE,tI,tA]),(0,a.useEffect)(()=>{if("cursor"!==f&&"zed"!==f)return void eK([]);let e=y.find(e=>!1!==e.isActive);if(!e?.id){eK([]),"zed"===f&&eJ(null);return}let t=!1;return"zed"===f&&eJ(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:s})=>{if(!t){if(e&&Array.isArray(s?.models)&&s.models.length>0){eK(s.models),"zed"===f&&s?.warning&&eJ(s.warning);return}"zed"===f&&(eK([]),eJ(s?.warning||s?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==f||(eK([]),eJ("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[f,y]),(0,a.useEffect)(()=>{let e=(m.zN[f]||m.fg[f]||m.IS[f]||m.nJ[f])?.modelsFetcher;e&&A(e).then(ez)},[f]);let tU=async(e,t,s=tf)=>{let i=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,alias:t})});if(e.ok)await tE();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tK=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tE()}catch(e){console.log("Error deleting alias:",e)}},tM=async(e,t="llm",s=tN,i,a)=>{try{let l=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t,...i?{caps:i}:{},...a?{transport:a}:{}})});if(l.ok)await tI(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await l.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tJ=async(e,t="llm",s=tN)=>{try{let i=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${i}`,{method:"DELETE"})).ok&&(await tI(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tF=async()=>{if(e8)return;let e=y.find(e=>!1!==e.isActive);if(!e)return void alert((0,C.Tl)("Please add an active Qoder connection first"));e9(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,C.Tl)("Failed to fetch models"));let i=s.models||[];if(0===i.length)return void alert((0,C.Tl)("No models returned"));let a=0;for(let e of i){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^(qoder-cn|qoder)\//,"");em.some(e=>e.providerAlias===tN&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(ed).includes(`${tN}/${s}`)||(await tM(s,"llm",tN),a+=1)}0===a?alert((0,C.Tl)("All models already exist, no new models added")):alert((0,C.Tl)("Successfully added")+` ${a} `+(0,C.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,C.Tl)("Error fetching models")+": "+e.message)}finally{e9(!1)}},tL=async()=>{if(te)return;let e=y.find(e=>!1!==e.isActive);if(!e)return void alert((0,C.Tl)("Please add an active Cline connection first"));tt(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,C.Tl)("Failed to fetch models"));let i=s.models||[];if(0===i.length)return void alert((0,C.Tl)("No models returned"));let a=0;for(let e of i){let t=e.id||e.name;t&&(em.some(e=>e.providerAlias===tN&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(ed).includes(`${tN}/${t}`)||(await tM(t,"llm",tN),a+=1))}0===a?alert((0,C.Tl)("All models already exist, no new models added")):alert((0,C.Tl)("Successfully added")+` ${a} `+(0,C.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,C.Tl)("Error fetching models")+": "+e.message)}finally{tt(!1)}},tW=async()=>{if(eZ||0===y.length)return;let e=Object.fromEntries(y.map(e=>[e.id,{state:"queued",error:null}]));e7.current=!1,eX(!0),e0(!1),e5(null),e3(e),e6({total:y.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<y.length;e+=1){if(e7.current){e6({total:y.length,completed:e,passed:t,failed:s,stopped:!0});break}let i=y[e];e5(i.id),e3(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),a=await e.json(),l=!!a.valid;l?t+=1:s+=1,e3(e=>({...e,[i.id]:{state:l?"success":"failed",error:l?null:a.error||null}}))}catch(e){s+=1,e3(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}e6({total:y.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<y.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{e5(null),eX(!1),e0(!1),e7.current=!1}},tB=async e=>{eG({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eG(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&b(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tH=()=>{tD(),R(!1)},tG=async e=>{V("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:f,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tD(),G(!1);return}V(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),V("Failed to save connection")}},tQ=async e=>{try{(await fetch(`/api/providers/${en.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tD(),es(!1))}catch(e){console.log("Error updating connection:",e)}},tV=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&b(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tZ=async(e,t)=>{let s=[...y];[s[e],s[t]]=[s[t],s[e]],b(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tD()}},tX=y.filter(e=>ek.includes(e.id)),tY=y.length>0&&ek.length===y.length;(0,a.useEffect)(()=>{eN(e=>e.filter(e=>y.some(t=>t.id===e)))},[y]),(()=>{if(0===tX.length)return;let e=new Set(tX.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=O.find(e=>e.id===t);return s?.name}})();let t0=()=>{eA||er(!1)},t1=async e=>{eT(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:i}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:i})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tD(),er(!1)}finally{eT(!1)}},t5=e=>t1(y.map(t=>({connectionId:t.id,proxyPoolId:e}))),t2=(0,i.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:y.map((e,t)=>{let s;return(0,i.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,i.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,i.jsx)("input",{type:"checkbox",checked:(s=e.id,ek.includes(s)),onChange:()=>{var t;return t=e.id,void eN(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,i.jsx)("div",{className:"flex-1 min-w-0",children:(0,i.jsx)(_,{connection:e,proxyPools:O,isOAuth:tm,isFirst:0===t,isLast:t===y.length-1,onMoveUp:()=>tZ(t,t-1),onMoveDown:()=>tZ(t,t+1),onToggleActive:t=>tV(e.id,t),autoPing:H[f]&&"oauth"===e.authType?{on:!0===eR.connections[e.id],onToggle:t=>{var s;return s=e.id,void tz({...eR,connections:{...eR.connections,[s]:t}})},provider:f}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&b(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{eo(e),es(!0)},onDelete:()=>tB(e.id),oneByOneStatus:e2[e.id]||null})})]},e.id)})}),t3=O.filter(e=>!0===e.isActive),t4=(0,i.jsx)(c.aF,{isOpen:el,onClose:t0,title:`Apply Proxy (${y.length} connections)`,children:(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("button",{onClick:()=>{let e=O.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t1(y.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eA||0===t3.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,i.jsxs)("button",{onClick:()=>t5(null),disabled:eA,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),O.map(e=>(0,i.jsxs)("button",{onClick:()=>t5(e.id),disabled:eA||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,i.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,i.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eA&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,i.jsx)(c.$n,{onClick:t0,variant:"ghost",fullWidth:!0,disabled:eA,children:"Cancel"})]})}),t6=async e=>{if(!eb.has(e)){ev(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tN}/${e}`})}),s=await t.json();ef(t=>({...t,[e]:s.ok?"ok":"error"})),ey(s.ok?"":s.error||"Model not reachable")}catch{ef(t=>({...t,[e]:"error"})),ey("Network error")}finally{ev(t=>{let s=new Set(t);return s.delete(e),s})}}};if(v)return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(c.Qv,{}),(0,i.jsx)(c.Qv,{})]});if(!td)return(0,i.jsxs)("div",{className:"text-center py-20",children:[(0,i.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,i.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let t7=()=>tg&&td.apiType?"responses"===td.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ty?"/providers/anthropic-m.png":(0,d.HY)(td.id);return(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,i.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${td.color}15`},children:eu||!t7()?(0,i.jsx)("span",{className:"text-sm font-bold",style:{color:td.color},children:td.textIcon||td.id.slice(0,2).toUpperCase()}):(0,i.jsx)(o.default,{src:t7(),alt:td.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(td.id),ex(!0)},loading:"lazy",decoding:"async"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,i.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:td.name}),(td.notice?.apiKeyUrl||td.notice?.signupUrl||td.website)&&(0,i.jsxs)("a",{href:td.notice?.apiKeyUrl||td.notice?.signupUrl||td.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),td.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,i.jsxs)("p",{className:"text-text-muted",children:[y.length," connection",1===y.length?"":"s"]})]})]})]}),td.deprecated&&(0,i.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,i.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:td.deprecationNotice})]}),td.notice?.text&&!td.deprecated&&(0,i.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,i.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:td.notice.text}),td.notice.apiKeyUrl&&(0,i.jsx)("a",{href:td.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tb&&S&&(0,i.jsx)(c.Zp,{children:(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:ty?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,i.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ty?"Messages API":"responses"===S.apiType?"Responses API":"Chat Completions"," \xb7 ",(S.baseUrl||"").replace(/\/$/,""),"/",ty?"messages":"responses"===S.apiType?"responses":"chat/completions"]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{V(""),G(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ea(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eG({title:"Delete Compatible Node",message:`Delete this ${ty?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eG(null);try{(await fetch(`/api/provider-nodes/${f}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tu?(0,i.jsx)(c.gw,{providerId:f}):(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[y.length>0&&O.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>er(!0),children:"Apply Proxy"}),y.length>0&&(0,i.jsxs)(i.Fragment,{children:[ek.length>0&&(0,i.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ek.length;0!==e&&eG({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eG(null);let e=0,t=[...ek];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}b(e=>e.filter(e=>!t.includes(e.id))),eN([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ek.length,")"]}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tW,disabled:eZ,children:eZ?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eZ&&(0,i.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eZ&&(e7.current=!0,e0(!0))},disabled:eY,children:eY?"Stopping...":"Stop"})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,i.jsx)(c.lM,{checked:"round-robin"===e$,onChange:e=>{let t=e?"round-robin":null,s=e?eP||"1":eP;e&&!eP&&eE("1"),eO(t),t_(t,s)}}),"round-robin"===e$&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,i.jsx)("input",{type:"number",min:1,value:eP,onChange:e=>{var t;eE(t=e.target.value),t_("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===y.length?(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tm?"lock":"key"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tv&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tj," or ",tw,"."]})]})]}),(0,i.jsx)("div",{className:"flex gap-2",children:tv?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tr,children:tj}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tn,children:tw})]}):(0,i.jsxs)(i.Fragment,{children:[!tb&&"iflow"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),children:"Cookie"}),"codex"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),children:(0,C.Tl)("Bulk Add")}),"grok-cli"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ee(!0),children:(0,C.Tl)("Bulk Add")}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:to,children:tb?"Add API Key":"iflow"===f?"OAuth":"Add Connection"})]})})]}):(0,i.jsxs)(i.Fragment,{children:[e4&&(0,i.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)("span",{children:["Total: ",e4.total]}),(0,i.jsxs)("span",{children:["Completed: ",e4.completed]}),(0,i.jsxs)("span",{children:["Passed: ",e4.passed]}),(0,i.jsxs)("span",{children:["Failed: ",e4.failed]}),e4.stopped&&(0,i.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eZ&&e1&&(0,i.jsxs)("span",{children:["Running: ",y.find(e=>e.id===e1)?.name||e1]})]})}),y.length>0&&(0,i.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,i.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,i.jsx)("input",{type:"checkbox",checked:tY,onChange:()=>{tY?eN([]):eN(y.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),t2,!tb&&(0,i.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),title:(0,C.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,C.Tl)("Bulk Add")}),"grok-cli"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ee(!0),title:(0,C.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,C.Tl)("Bulk Add")}),tv?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tr,className:"w-full sm:w-auto",children:tj}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tn,className:"w-full sm:w-auto",children:tw})]}):(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:to,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tC&&(0,i.jsx)("select",{value:eI,onChange:e=>{var t;eD(t=e.target.value),tq(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tC.map(e=>(0,i.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tb&&(e=[...th,...eF.filter(e=>!th.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eW.includes(e)),(0,i.jsxs)("div",{className:"flex gap-2",children:[eW.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tP,children:"Active All"}),e.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tO(e),children:"Disable All"})]}))]}),!!eg&&(0,i.jsxs)("div",{className:"mb-3",children:[(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:eg}),/RegionError|hosted in China|regionNotAllowed/i.test(eg)&&(s=(t="string"==typeof eg?eg:JSON.stringify(eg)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),r=t.match(/wrk_[0-9A-Za-z]+/),u=s?s[0].endsWith("/go")?s[0]:`${s[0]}/go`:r?`https://opencode.ai/workspace/${r[0]}/go`:"https://opencode.ai",(0,i.jsx)("div",{className:"mt-1.5",children:(0,i.jsxs)("a",{href:u,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,i.jsx)("span",{children:"Allow China-hosted models"}),(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"})]})}))]}),"zed"===f&&!!eM&&(0,i.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:eM}),(()=>{let e,t,s;if(tb)return(0,i.jsx)(I,{providerStorageAlias:tN,providerDisplayAlias:tS,modelAliases:ed,customModels:em,copied:ts,onCopy:ti,onSetAlias:tU,onDeleteAlias:tK,onAddCustomModel:e=>tM(e,"llm",tN),onDeleteCustomModel:e=>tJ(e,"llm",tN),connections:y,isAnthropic:ty});let a=[...th,...eF.filter(e=>!th.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}),l=new Set(eW),r=a.filter(e=>!l.has(e.id)),n=a.filter(e=>l.has(e.id)),o=T({customModels:em,modelAliases:ed,providerAlias:tN,builtInModels:th,type:"llm"});return(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o.map(e=>(0,i.jsx)(P,{model:{id:e.id,name:e.name},fullModel:`${tS}/${e.id}`,alias:e.alias,copied:ts,onCopy:ti,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tJ(e.id,"llm",tN):tK(e.alias)},testStatus:eh[e.id],onTest:y.length>0||tu?()=>t6(e.id):void 0,isTesting:eb.has(e.id),isCustom:!0,isFree:!1,caps:g(`${f}/${e.id}`),thinkingSuffix:tk(e.id)},`${e.source}-${e.fullModel}`)),r.map(e=>{let t=`${tN}/${e.id}`,s=`${f}/${e.id}`,a=Object.entries(ed).find(([,e])=>e===t||e===s)?.[0];return(0,i.jsx)(P,{model:e,fullModel:`${tS}/${e.id}`,alias:a,copied:ts,onCopy:ti,onSetAlias:t=>tU(e.id,t,tN),onDeleteAlias:()=>tK(a),testStatus:eh[e.id],onTest:y.length>0||tu?()=>t6(e.id):void 0,isTesting:eb.has(e.id),isFree:e.isFree,onDisable:()=>tT(e.id),caps:g(`${f}/${e.id}`),thinkingSuffix:tk(e.id)},e.id)}),(0,i.jsxs)("button",{onClick:()=>ew(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),("qoder"===f||"qoder-cn"===f)&&y.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:tF,disabled:e8,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:e8?{animation:"spin 1s linear infinite"}:void 0,children:e8?"progress_activity":"download"}),e8?(0,C.Tl)("Fetching..."):(0,C.Tl)("Fetch Qoder Models")]}),("cline"===f||"clinepass"===f)&&y.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:tL,disabled:te,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:te?{animation:"spin 1s linear infinite"}:void 0,children:te?"progress_activity":"download"}),te?(0,C.Tl)("Fetching..."):(0,C.Tl)("Import from /models")]}),eq.length>0&&(e=new Set([...Object.values(ed),...o.map(e=>e.fullModel)]),t=new Set(th.map(e=>e.id)),0===(s=eq.filter(s=>!e.has(`${tN}/${s.id}`)&&!t.has(s.id))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,i.jsxs)("button",{onClick:async()=>{await tM(e.id,"llm",tN)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,i.jsxs)("button",{onClick:()=>t$(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t4,"kiro"===f?(0,i.jsx)(c.Mh,{isOpen:D,providerInfo:td,onSuccess:tH,onClose:()=>R(!1)}):"cursor"===f?(0,i.jsx)(c.G9,{isOpen:D,onSuccess:tH,onClose:()=>R(!1)}):"zed"===f?(0,i.jsx)(c.TE,{isOpen:D,providerInfo:td,onSuccess:tH,onClose:()=>R(!1)}):"gitlab"===f?(0,i.jsx)(c.vj,{isOpen:D,providerInfo:td,onSuccess:tH,onClose:()=>R(!1)}):(0,i.jsx)(c.LF,{isOpen:D,provider:f,providerInfo:td,onSuccess:tH,onClose:()=>R(!1)}),(0,i.jsx)(c.LH,{isOpen:q,onSuccess:tH,onClose:()=>K(!1)}),"iflow"===f&&(0,i.jsx)(c.vE,{isOpen:J,onSuccess:()=>{tD(),L(!1)},onClose:()=>L(!1)}),(0,i.jsx)(z,{isOpen:W,provider:f,providerName:td.name,isCompatible:tb,isAnthropic:ty,authType:td?.authType,authHint:td?.authHint,website:td?.website,proxyPools:O,error:Q,existingNames:y.map(e=>e.name).filter(Boolean),onSave:tG,onBulkDone:tD,onClose:()=>{V(""),G(!1)}}),(0,i.jsx)(c.wI,{isOpen:et,connection:en,proxyPools:O,onSave:tQ,onClose:()=>es(!1)}),tb&&(0,i.jsx)(U,{isOpen:ei,node:S,onSave:tR,onClose:()=>ea(!1),isAnthropic:ty}),!tb&&(0,i.jsx)(M,{isOpen:ej,providerAlias:tN,providerDisplayAlias:tS,onSave:async(e,t,s)=>{await tM(e,t?.stt?"stt":"llm",tN,t,s),ew(!1)},onClose:()=>ew(!1)}),"codex"===f&&(0,i.jsx)(F,{isOpen:Z,onClose:()=>X(!1),onSuccess:tD}),"grok-cli"===f&&(0,i.jsx)(B,{isOpen:Y,onClose:()=>ee(!1),onSuccess:tD}),(0,i.jsx)(c.uo,{isOpen:eQ,onClose:()=>eV(!1),onConfirm:()=>{(window.localStorage.setItem(ta,"true"),eV(!1),tm)?tl():tn()},title:"Risk Notice",message:td?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,i.jsx)(c.uo,{isOpen:!!eH,onClose:()=>eG(null),onConfirm:eH?.onConfirm,title:eH?.title||"Confirm",message:eH?.message,variant:"danger"})]})}}},e=>{e.O(0,[763,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=77458)),_N_E=e.O()}]);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{57076:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>n});var r=l(95155),s=l(12115),o=l(35497),a=l(65921);function i(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}function n(){let[e,t]=(0,s.useState)([]),[l,n]=(0,s.useState)(!0),[d,c]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(!1),[u,y]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null),[N,w]=(0,s.useState)(i()),[C,P]=(0,s.useState)(""),[$,D]=(0,s.useState)({vercelToken:"",projectName:"vercel-relay"}),[S,T]=(0,s.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[A,E]=(0,s.useState)({denoToken:"",orgDomain:"",projectName:""}),[I,U]=(0,s.useState)(!1),[O,z]=(0,s.useState)(!1),[F,W]=(0,s.useState)(!1),[R,_]=(0,s.useState)(null),[L,q]=(0,s.useState)([]),[V,J]=(0,s.useState)(!1),[B,G]=(0,s.useState)({current:0,total:0}),[M,H]=(0,s.useState)(!1),[Y,Q]=(0,s.useState)(null),K=(0,s.useRef)(null),Z=(0,a.i)();(0,s.useEffect)(()=>{let e=e=>{K.current&&!K.current.contains(e.target)&&b(!1)};return j&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let X=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),l=await e.json();e.ok&&t(l.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{n(!1)}},[]);(0,s.useEffect)(()=>{X()},[X]);let ee=()=>{k(null),w(i())},et=()=>{ee(),c(!0)},el=()=>{c(!1),ee()},er=async()=>{let e={name:N.name.trim(),proxyUrl:N.proxyUrl.trim(),noProxy:N.noProxy.trim(),isActive:!0===N.isActive,strictProxy:!0===N.strictProxy};if(e.name&&e.proxyUrl){U(!0);try{let t=!!v,l=await fetch(t?`/api/proxy-pools/${v.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(l.ok)await X(),el(),Z.success(v?"Proxy pool updated":"Proxy pool created");else{let e=await l.json();Z.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{U(!1)}}},es=async e=>{Q({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{Q(null);try{let l=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(l.ok){t(t=>t.filter(t=>t.id!==e.id)),Z.success("Proxy pool deleted");return}let r=await l.json();409===l.status?Z.warning(`Cannot delete: ${r.boundConnectionCount||0} connection(s) are still using this pool.`):Z.error(r.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),Z.error("Failed to delete proxy pool")}}})},eo=async e=>{_(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),l=await t.json();if(!t.ok)return void Z.error(l.error||"Failed to test proxy");await X(),Z.success(l.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),Z.error("Failed to test proxy")}finally{_(null)}},ea=async e=>{let l=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:l}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:l})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),Z.error("Failed to update active state"))}catch(l){console.log("Error toggling active:",l),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},ei=e.length>0&&L.length===e.length,en=()=>q([]),ed=async t=>{let l=L.length>0?L:e.map(e=>e.id);if(0!==l.length){H(!0);try{let e=0,r=0;for(let s of l)try{(await fetch(`/api/proxy-pools/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?e+=1:r+=1}catch{r+=1}await X(),Z.success(`${t?"Activated":"Deactivated"} ${e}${r?`, failed ${r}`:""}`)}finally{H(!1)}}},ec=async()=>{0!==L.length&&Q({title:"Delete Proxy Pools",message:`Delete ${L.length} proxy pool(s)?`,onConfirm:async()=>{Q(null),H(!0);try{let e=0,t=0,l=0;for(let r of L)try{let s=await fetch(`/api/proxy-pools/${r}`,{method:"DELETE"});s.ok?e+=1:409===s.status?t+=1:l+=1}catch{l+=1}await X(),en(),Z.success(`Deleted ${e}${t?`, ${t} bound`:""}${l?`, ${l} failed`:""}`)}finally{H(!1)}}})},ex=async()=>{let t=L.length>0?e.filter(e=>L.includes(e.id)):e;if(0===t.length)return;J(!0),G({current:0,total:t.length});let l=0,r=[],s=0,o=[...t],a=async()=>{for(;o.length>0;){let e=o.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),s=await t.json();t.ok&&s.ok?l+=1:r.push(e.id)}catch{r.push(e.id)}finally{G({current:s+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},a)),await X(),J(!1),G({current:0,total:0}),r.length>0?Q({title:"Disable Dead Proxies",message:`Alive: ${l}, Dead: ${r.length}.
|
|
2
|
-
|
|
3
|
-
Disable ${r.length} dead proxies?`,onConfirm:async()=>{Q(null),H(!0);try{for(let e of r)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await X(),Z.success(`Disabled ${r.length} dead proxies`)}finally{H(!1)}}}):Z.success(`Health check done. Alive: ${l}, Dead: ${r.length}`)};(0,s.useEffect)(()=>{q(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let ep=()=>{O||p(!1)},em=()=>{F||h(!1)},eh=()=>{F||y(!1)},eu=()=>{F||g(!1)},ey=async()=>{if($.vercelToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),t=await e.json();e.ok?(await X(),em(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ef=async()=>{if(S.accountId.trim()&&S.apiToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),t=await e.json();e.ok?(await X(),eh(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},eg=async()=>{if(A.denoToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),t=await e.json();e.ok?(await X(),eu(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ej=async()=>{let t=C.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void Z.warning("Please paste at least one proxy line.");let l=[],r=[];if(t.forEach((e,t)=>{try{let r=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),l=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${l}`}}let l=t.split(":");if(4===l.length){let[e,t,r,s]=l;if(!e||!t||!r||!s)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(r)}:${encodeURIComponent(s)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);r&&l.push({...r,lineNumber:t+1})}catch(e){r.push(`Line ${t+1}: ${e.message}`)}}),r.length>0)return void Z.error(`Invalid proxy format:
|
|
4
|
-
${r.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),r=0,s=0,o=0;for(let e of l){let l=`${e.proxyUrl}|||`;if(t.has(l)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(r+=1,t.add(l)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${r}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},eb=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return l?(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsx)(o.Qv,{}),(0,r.jsx)(o.Qv,{})]}):(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("h1",{className:"text-xl font-semibold sm:text-2xl",children:"Proxy Pools"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,r.jsxs)("div",{className:"relative",ref:K,children:[(0,r.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>b(!j),children:["Deploy Relay",(0,r.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,r.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-xl border border-black/10 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-zinc-900 sm:left-auto sm:right-0",children:[(0,r.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,r.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,r.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]})]})]}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})]}),(0,r.jsxs)(o.Zp,{children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,r.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,r.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,r.jsxs)(o.Ex,{variant:"success",children:["Active: ",eb]})]}),(L.length>0||V)&&(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,r.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,r.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,r.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,r.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,r.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,r.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,r.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,r.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,r.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,r.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,r.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,r.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,r.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,r.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,r.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,r.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,r.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,r.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,r.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,r.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,r.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,r.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,r.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"My Profile"})," → ",(0,r.jsx)("b",{children:"API Tokens"})," → ",(0,r.jsx)("b",{children:"Create Token"})]}),(0,r.jsxs)("li",{children:["Scroll down to ",(0,r.jsx)("b",{children:"Custom Token"})," and click ",(0,r.jsx)("b",{children:"Get started"})]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,r.jsx)("i",{children:"Your Account Name"})]}),(0,r.jsxs)("li",{children:["Click ",(0,r.jsx)("b",{children:"Continue to summary"})," → ",(0,r.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,r.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,r.jsx)(r.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,r.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,r.jsxs)(r.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,r.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,r.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,r.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,r.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,r.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"console.deno.com"})]}),(0,r.jsxs)("li",{children:["Select your ",(0,r.jsx)("b",{children:"Organization"})," → ",(0,r.jsx)("b",{children:"Settings"})," → ",(0,r.jsx)("b",{children:"Organization Tokens"})]}),(0,r.jsxs)("li",{children:["Create a ",(0,r.jsx)("b",{children:"Organization Token"})," (prefix ",(0,r.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,r.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,r.jsx)(r.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,r.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,r.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,r.jsx)(o.aF,{isOpen:d,title:v?"Edit Proxy Pool":"Add Proxy Pool",onClose:el,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,r.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,r.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,r.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,r.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(o.$n,{fullWidth:!0,onClick:er,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,r.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:el,disabled:I,children:"Cancel"})]})]})}),(0,r.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}},77920:(e,t,l)=>{Promise.resolve().then(l.bind(l,57076))}},e=>{e.O(0,[763,1321,705,5497,8441,3794,7358],()=>e(e.s=77920)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-1faac22f38ea330b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>F});var a=r(95155),i=r(12115),s=r(57250),n=r(45564);let l="quotaCacheData",o="quotaAutoRefresh",d=[10,20,50,100],c=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],u=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function m(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function x(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function h(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function p(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function b(e,t){return await e(t)}function g(){try{let e=window.localStorage.getItem(l);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function f(e,t){try{let r=g();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(l,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function y(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function w(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function k(e,t,r=[]){let a=t?.[e]?.hidden;return Array.isArray(a)&&0!==a.length?new Set((r.length>0?function(e=[],t=[]){if(!Array.isArray(e)||0===e.length)return[];let r=new Set(t.map(w).filter(Boolean));return[...new Set(e.map(e=>String(e).trim()).filter(e=>r.has(e)))]}(a,r):a).map(String)):new Set}function v({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:s=!1,onHideQuota:n=null}){let[l,o]=(0,i.useState)(1),d=(0,i.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):y(e?.used,e?.total)})),[e]),c=(0,i.useMemo)(()=>"remaining-asc"===r?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,r]),u=Math.max(1,Math.ceil(c.length/10));if((0,i.useEffect)(()=>{o(1)},[r,e]),(0,i.useEffect)(()=>{o(e=>Math.min(e,u))},[u]),!e||0===e.length)return null;let m=c.slice((l-1)*10,10*l),x=0===c.length?0:(l-1)*10+1,h=Math.min(10*l,c.length),p=t?"py-1 px-1.5":"py-2 px-3",b=t?"text-[11px]":"text-sm",g=t?"text-[11px]":"text-sm",f=t?"text-[10px] leading-tight":"text-xs",w="function"==typeof n;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[c.length," quota",c.length>1?"s":""]}),s&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"space-y-px",children:m.map(e=>{var r;let i=!0===e.unlimited,s=!0===e.isCreditBalance,l=s?{text:"text-blue-600 dark:text-blue-400",bg:"bg-blue-500",bgLight:"bg-blue-500/10",emoji:"\uD83D\uDCB0"}:(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},o=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let i=Math.ceil(a/6e4);if(i<60)return`${i}m`;let s=Math.floor(i/60),n=i%60;if(s<24)return`${s}h ${n}m`;let l=Math.floor(s/24);return`${l}d ${s%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),d=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),i=new Date(a);i.setDate(i.getDate()+1);let s="";s=t>=a&&t<i?"Today":t>=i&&t<new Date(i.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${s}, ${n}`}catch{return null}}(e.resetAt),c=!1!==e.recurring?`in ${o}`:`expires in ${o}`;return(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${p}`,children:[(0,a.jsxs)("div",{className:"flex w-36 min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:l.emoji}),(0,a.jsx)("span",{className:`${b} font-medium text-text-primary truncate`,children:e.name})]}),(0,a.jsxs)("div",{className:`min-w-0 flex-1 ${t?"space-y-1":"space-y-1.5"}`,children:[!i&&!s&&(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${l.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${l.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between gap-1 min-w-0 ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted truncate",title:i?`${e.used.toLocaleString()} used \xb7 Unlimited`:s?`Credit balance: ${e.total.toFixed(2)} ${e.currency||""}`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}`,children:i?`${e.used.toLocaleString()} used \xb7 Unlimited`:s?`Credit: ${e.total.toFixed(2)} ${e.currency||""}`:`${e.used.toLocaleString()} / ${e.total>0?e.total.toLocaleString():"∞"}`}),(0,a.jsx)("span",{className:`font-medium ${i?"text-green-600 dark:text-green-400":s?"text-blue-600 dark:text-blue-400":l.text} shrink-0`,children:i?"Unlimited":s?"":`${e.remaining}%`})]})]}),(0,a.jsx)("div",{className:"min-w-0 shrink",children:"-"!==o||d?t?(0,a.jsx)("div",{className:`${g} text-text-primary font-medium truncate`,title:d||"",children:"-"!==o?c:d}):(0,a.jsxs)("div",{className:"min-w-0 space-y-0.5",children:["-"!==o&&(0,a.jsx)("div",{className:`${g} text-text-primary font-medium truncate`,children:c}),d&&(0,a.jsx)("div",{className:`${f} text-text-muted truncate`,children:d})]}):(0,a.jsx)("div",{className:`${g} text-text-muted italic`,children:"N/A"})}),w&&(0,a.jsx)("button",{type:"button",onClick:()=>n(e),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5",title:"Hide this quota row","aria-label":`Hide quota ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"visibility_off"})})]},`${e.name}-${e.index}`)})}),u>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",x,"-",h," of ",c.length]}),(0,a.jsxs)("span",{children:["Page ",l," / ",u]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>o(e=>Math.max(1,e-1)),disabled:1===l,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>o(e=>Math.min(u,e+1)),disabled:l===u,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var j=r(98542),N=r(97677),C=r(84588),A=r(35497),S=r(88105),$=r(11059);let P={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},q={claude:"claudeAutoPing",codex:"codexAutoPing"},_={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function E(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function T(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}let D={five_hour:"session",seven_day:"weekly",seven_day_overage_included:"weekly",seven_day_opus:"Opus weekly",seven_day_sonnet:"Sonnet weekly"};function O(e){let t=[...new Set((e||[]).map(e=>D[e]).filter(Boolean))];return t.length?`${t.join(" + ")} limits`:"limits"}function M(e){return S.Q2[e]?.name||e}function L(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function I(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),i=r%24;return a>0?`${a}d ${i}h`:`${i}h`}function F(){let{copied:e,copy:t}=(0,$.C)(),[r,D]=(0,i.useState)([]),[F,R]=(0,i.useState)({}),[z,U]=(0,i.useState)({}),[W,J]=(0,i.useState)({}),[K,B]=(0,i.useState)(!0),[H,G]=(0,i.useState)({claude:{},codex:{}}),[V,Q]=(0,i.useState)(null),[Y,X]=(0,i.useState)(!1),[Z,ee]=(0,i.useState)(!1),[et,er]=(0,i.useState)(60),[ea,ei]=(0,i.useState)(!0),[es,en]=(0,i.useState)(null),[el,eo]=(0,i.useState)(null),[ed,ec]=(0,i.useState)(null),[eu,em]=(0,i.useState)(null),[ex,eh]=(0,i.useState)(null),[ep,eb]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[ey,ew]=(0,i.useState)([]),[ek,ev]=(0,i.useState)("all"),[ej,eN]=(0,i.useState)([]),[eC,eA]=(0,i.useState)("all"),[eS,e$]=(0,i.useState)("default"),[eP,eq]=(0,i.useState)({}),[e_,eE]=(0,i.useState)(!1),[eT,eD]=(0,i.useState)(!1),[eO,eM]=(0,i.useState)(!1),[eL,eI]=(0,i.useState)(1),[eF,eR]=(0,i.useState)(20),[ez,eU]=(0,i.useState)(String(20)),[eW,eJ]=(0,i.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eK,eB]=(0,i.useState)({eligibleConnections:0,providerFilteredConnections:0}),eH=(0,i.useRef)(null),eG=(0,i.useRef)(null),eV=(0,i.useRef)(0),eQ=(0,i.useCallback)(async(e=eL)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(eF),accountStatus:eC,sort:"priority"});"all"!==ek&&a.set("provider",ek);let i=await fetch(`/api/providers/client?${a.toString()}`);if(!i.ok)throw Error("Failed to fetch connections");let s=await i.json(),n=s.connections||[],l=(t=s.pagination,t||{page:1,pageSize:eF,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(s.totals,n.length);return D(n),eN(s.providerOptions||[]),eJ(l),eB(o),eI((r=s.pagination,r?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),D([]),eN([]),eJ({page:1,pageSize:eF,total:0,totalPages:1}),eB({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eC,e_,eL,eF,ek]),eY=(0,i.useCallback)(async(e,t,{force:r=!1}={})=>{U(t=>({...t,[e]:!0})),J(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let a=`/api/usage/${e}${r?"?force=1":""}`,i=await fetch(a);if(!i.ok){let r=(await i.json().catch(()=>({}))).error||i.statusText;if(404===i.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===i.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r};R(t=>({...t,[e]:a})),f(e,a);return}throw Error(`HTTP ${i.status}: ${r}`)}let s=await i.json();console.log(`[ProviderLimits] Got quota for ${t}:`,s);let l={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":if(t.quotas){let e=Object.entries(t.quotas),a=new Set(["gemini_weekly","claude_gpt_weekly"]),i=new Set(["gemini_session","claude_gpt_session"]),s=new Set([...a,...i]),n=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),l=e.filter(([e])=>e.startsWith("claude-")),o=e.filter(([e])=>e.includes("image")),d=e.filter(([e])=>s.has(e)),c=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.includes("image")&&!s.has(e)),u=!!t.quotas.gemini_weekly,m=!!t.quotas.gemini_session,x=!!t.quotas.claude_gpt_weekly,h=!!t.quotas.claude_gpt_session;if(m)d.filter(([e])=>"gemini_session"===e).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});else if(n.length>0){let e=n.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],a=t.quotas.gemini_weekly?.resetAt;u&&e.resetAt===a&&(e.remainingPercentage??0)===0||r.push({name:"Gemini (Flash / Pro)",modelKey:"gemini",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}if(u&&d.filter(([e])=>"gemini_weekly"===e).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),h)d.filter(([e])=>"claude_gpt_session"===e).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});else if(l.length>0){let e=l.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],a=t.quotas.claude_gpt_weekly?.resetAt;x&&e.resetAt===a&&(e.remainingPercentage??0)===0||r.push({name:"Claude (Sonnet / Opus)",modelKey:"claude",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}x&&d.filter(([e])=>"claude_gpt_weekly"===e).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),o.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),x||h||c.forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})})}break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=e;"spark_session"===e?a="Spark (5h)":"spark_weekly"===e?a="Spark (Weekly)":"session"===e?a="5h":"weekly"===e?a="Weekly":"review_session"===e?a="Review (5h)":"review_weekly"===e&&(a="Review (Weekly)"),r.push({name:a,quotaType:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":case"qoder-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||100)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:y(t.used,t.total),resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"kimi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"deepseek":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,isCreditBalance:t.isCreditBalance??!0,currency:t.currency||(e.includes("(")?e.slice(e.indexOf("(")+1,e.indexOf(")")):"USD")})});break;case"groq":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"ollama":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"zed":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,unlimited:t.unlimited})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if(e?.toLowerCase()==="claude"){let e={"session (5h)":0,"weekly (7d)":1,"weekly fable (7d)":2,"weekly opus (7d)":3,"weekly sonnet (7d)":4};return r.sort((t,r)=>(e[t.name]??99)-(e[r.name]??99)),r}let a=(0,n.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,i=r.modelKey||r.name;return("gemini"===a||"gemini_session"===a)&&(a="gemini-3.8-flash-high"),("claude"===a||"claude_gpt_session"===a)&&(a="claude-sonnet-4-6"),("gemini"===i||"gemini_session"===i)&&(i="gemini-3.8-flash-high"),("claude"===i||"claude_gpt_session"===i)&&(i="claude-sonnet-4-6"),(e.get(a)??999)-(e.get(i)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:s};R(t=>({...t,[e]:l})),f(e,l)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),J(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{U(t=>({...t,[e]:!1}))}},[]),eX=(0,i.useCallback)(async(e,t)=>{await eY(e,t,{force:!0}),Q(new Date)},[eY]),eZ=(0,i.useCallback)(async(e,t)=>{if(("codex"===t||"claude"===t)&&!ed){ec(e),J(t=>({...t,[e]:null}));try{let r="claude"===t?await fetch(`/api/usage/${e}/claude-reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantId:F[e]?.raw?.resetCredits?.nextGrantId})}):await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset limit");await eY(e,t,{force:!0}),Q(new Date)}catch(t){J(r=>({...r,[e]:t.message||"Failed to reset limit"}))}finally{ec(null)}}},[eY,ed,F]),e0=(0,i.useCallback)((e,t)=>{eh({connection:e,loading:!1,error:null,data:{kind:"claude",...t}})},[]),e1=(0,i.useCallback)(async e=>{eh({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eh({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eh({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),e5=(0,i.useCallback)(async e=>{if(confirm("Delete this connection?")){en(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){R(t=>{let r={...t};return delete r[e],r}),U(t=>{let r={...t};return delete r[e],r}),J(t=>{let r={...t};return delete r[e],r});try{let t=g();t[e]&&(delete t[e],window.localStorage.setItem(l,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await b(eQ,eL)}}catch(e){console.error("Error deleting connection:",e)}finally{en(null)}}},[eQ,eL]),e2=(0,i.useCallback)(async(e,t)=>{eo(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(R(e=>({...e})),await b(eQ,eL))}catch(e){console.error("Error updating connection status:",e)}finally{eo(null)}},[eQ,eL]),e3=(0,i.useCallback)(async e=>{if(!eg?.id)return;let t=eg.id,r=eg.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eQ(),eb(!1),ef(null),S.wb.includes(r)&&await eY(t,r))}catch(e){console.error("Error saving connection:",e)}},[eg,eQ,eY]);(0,i.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&ew(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let e4=(0,i.useCallback)(async(e=!1)=>{if(Z)return;ee(!0),er(60);let t=eV.current+=1,r=Math.round(10);try{let a=await eQ(eL);U(h(a)),J(e=>p(e,a)),R(e=>p(e,a)),await Promise.all(a.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eY(e.id,e.provider))),Q(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{ee(!1)}},[Z,eQ,eY,eL]);(0,i.useEffect)(()=>{(async()=>{ei(!0);let e=await eQ(eL);ei(!1),U(h(e)),J(t=>p(t,e)),R(t=>p(t,e)),await Promise.all(e.map(e=>eY(e.id,e.provider))),Q(new Date)})()},[eQ,eY,eL]),(0,i.useEffect)(()=>{let e=window.localStorage.getItem(o);B(null===e||"true"===e),X(!0)},[]),(0,i.useEffect)(()=>{Y&&window.localStorage.setItem(o,String(K))},[K,Y]),(0,i.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{G({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}}),eq(e?.quotaVisibility||{})}).catch(()=>{})},[]);let e8=(0,i.useCallback)(async(e,t,r)=>{let a=q[t];if(!a)return;let i={...H[t]||{},[e]:r};G({...H,[t]:i});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:i};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{G(H)}},[H]),e6=(0,i.useCallback)(async(e,t)=>{eq(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eq(t)}},[]),e7=(0,i.useCallback)((e,t)=>{let r=w(t);if(!e||!r)return;let a=eP[e]||{},i=new Set(a.hidden||[]);if(i.add(r),"antigravity"===e){if("gemini"===r)for(let e of i)e.startsWith("gemini-")&&!e.includes("image")&&i.delete(e);else if("claude"===r)for(let e of i)e.startsWith("claude-")&&i.delete(e)}e6({...eP,[e]:{...a,hidden:[...i]}},eP)},[eP,e6]),e9=(0,i.useCallback)((e,t)=>{let r=w(t);if(!e||!r)return;let a=eP[e]||{},i=new Set(a.hidden||[]);if(i.delete(r),"antigravity"===e){if("gemini"===r)for(let e of i)e.startsWith("gemini-")&&!e.includes("image")&&i.delete(e);else if("claude"===r)for(let e of i)e.startsWith("claude-")&&i.delete(e)}e6({...eP,[e]:{...a,hidden:[...i]}},eP)},[eP,e6]);(0,i.useEffect)(()=>{if(!Y||!K){eH.current&&(clearInterval(eH.current),eH.current=null),eG.current&&(clearInterval(eG.current),eG.current=null);return}return eH.current=setInterval(()=>{e4()},6e4),eG.current=setInterval(()=>{er(e=>e<=1?60:e-1)},1e3),()=>{eH.current&&clearInterval(eH.current),eG.current&&clearInterval(eG.current)}},[K,e4,Y]),(0,i.useEffect)(()=>{let e=()=>{document.hidden?(eH.current&&(clearInterval(eH.current),eH.current=null),eG.current&&(clearInterval(eG.current),eG.current=null)):K&&Y&&(eH.current=setInterval(()=>e4(),6e4),eG.current=setInterval(()=>{er(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[K,e4,Y]);let te=(0,i.useMemo)(()=>(function(e,t,r,a,i){if("codex"===a&&"default"!==i)return[...e].sort((e,r)=>{let a=x(e,t),s=x(r,t),n="remaining-asc"===i?a-s:s-a;return 0!==n?n:(m(e)||"").localeCompare(m(r)||"")});if(!r){let t=new Map;for(let r of e){let e=r.provider||"";t.has(e)||t.set(e,[]),t.get(e).push(r)}return Array.from(t.values()).flat()}let s=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=s(e)-s(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(m(e)||"").localeCompare(m(t)||"")})})(r,F,e_,ek,eS),[r,F,e_,ek,eS]),tt=e=>{let t=F[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=y(e.used,e.total))},tr=(0,i.useCallback)(async(e,t)=>{if(e.length&&!eO){eM(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await b(eQ,eL)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eM(!1)}}},[eO,eQ,eL]),ta="all"===ek?"All providers":M(ek),ti=eK.eligibleConnections>0,ts=te.length>0,tn=eK.eligibleConnections?eK.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ek?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eC?"turned off":"active"===eC?"active":"matching"} accounts found for ${ek}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tl=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(eW),to=!d.includes(eF);return ea||ti?ea||ts?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eD(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":eT,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ek?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(s.A,{src:`/providers/${ek}.png`,alt:ek,size:18,className:"size-[18px] rounded object-contain",fallbackText:ek.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate hidden lg:inline",children:ta})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eT&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eD(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ek&&eI(1),ev("all"),eD(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ek?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ek&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ej.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ek!==e&&eI(1),ev(e),eD(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ek===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(s.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium",children:M(e)}),ek===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eC,onChange:e=>{let t=e.target.value;eC!==t&&eI(1),eA(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:c.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ek&&(0,a.jsx)("select",{value:eS,onChange:e=>e$(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eE(e=>!e),"aria-pressed":e_,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${e_?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tr(te.filter(e=>(e.isActive??!0)&&tt(e)).map(e=>e.id),!1)},disabled:eO,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{tr(te.filter(e=>!(e.isActive??!0)&&!tt(e)).map(e=>e.id),!0)},disabled:eO,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>B(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:K?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${K?"text-primary":"text-text-muted"}`,children:K?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),K&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",et,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>e4(!0),disabled:Z,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${Z?"animate-spin":""}`,children:"refresh"})})]})}),e_&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:te.map(r=>{let i,n,l,o=F[r.id],d=z[r.id],c=W[r.id],u=!1===r.isActive,x="codex"===r.provider,h="claude"===r.provider?o?.raw?.resetCredits:null,p=x?"Codex reset credit":"Claude limit reset",b=Number.isFinite(n="number"==typeof(i=o?.raw?.resetCredits?.availableCount)?i:Number(i))?Math.max(0,n):0,g=ed===r.id,f=es===r.id||el===r.id||g,y=o?.quotas||[],A=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=k(e,r,t);return 0===a.size?t:t.filter(e=>!a.has(w(e)))}(r.provider,y,eP),S=function(e,t=[],r={}){if(!Array.isArray(t)||0===t.length)return[];let a=k(e,r,t);return 0===a.size?[]:t.filter(e=>a.has(w(e)))}(r.provider,y,eP);return(0,a.jsxs)(C.default,{padding:"none",className:`min-w-0 ${u?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(s.A,{src:`/providers/${r.provider}.png`,alt:r.provider,size:32,className:"object-contain",fallbackText:r.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary truncate",children:M(r.provider)}),m(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:m(r)}):null,E(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:E(r)}):null,"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(l=r.providerSpecificData?.authMethod)&&P[l]?P[l]:"api_key"===r.authType?"API Key":"OAuth"}),T(r)&&(0,a.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:T(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${u?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:u?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(x||h)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.default,{text:b>0?h?`Use your reset now (${b} left, use by ${L(h.expiresAt)}) \xb7 refills ${O(h.clears)}`:`Use one ${p}. Available: ${b}`:`No ${p}s available`,children:(0,a.jsxs)("button",{type:"button",onClick:()=>em({connection:r,resetCreditCount:b}),disabled:b<=0||d||f,"aria-label":b>0?`Use one ${p}. ${b} available.`:`No ${p}s available`,className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${b>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${g?"animate-spin":""}`,children:g?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:b})]})}),(0,a.jsx)(N.default,{text:x?"View Codex reset credit expiry":"View Claude Code reset expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>x?e1(r):e0(r,h),disabled:d||f,"aria-label":x?"View Codex reset credit expiry":"View Claude Code reset expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),q[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(N.default,{text:_[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>e8(r.id,r.provider,H[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${H[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(N.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>eX(r.id,r.provider),disabled:d||f,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${d?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(N.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{ef(r),eb(!0)},disabled:f,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(N.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>e5(r.id),disabled:f,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${es===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(j.default,{size:"sm",checked:r.isActive??!0,disabled:f,onChange:e=>e2(r.id,e)})})]})]})}),(0,a.jsxs)("div",{className:"px-2 py-1.5",children:[d?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):c?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:c})]}):o?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:o.message})}):(0,a.jsx)(v,{quotas:A,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==eS,onHideQuota:e=>e7(r.provider,e)}),o?.message&&!c&&!d&&(0,a.jsx)("p",{className:"mt-2 px-1 text-[10px] leading-relaxed text-text-muted",children:o.message}),S.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-black/5 pt-2 text-[10px] text-text-muted dark:border-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,a.jsx)("span",{className:"shrink-0",children:"Hidden:"}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap pb-2",children:S.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>e9(r.provider,e),className:"shrink-0 rounded-md border border-black/10 px-1.5 py-0.5 transition-colors hover:bg-black/5 hover:text-text-primary dark:border-white/10 dark:hover:bg-white/5",title:"Show this quota row",children:e.name},w(e)))})]})]})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:tl}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:to?"custom":String(eF),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eI(1),eR(r),eU(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[d.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:ez,onChange:e=>eU(e.target.value),onBlur:()=>{let e=Number.parseInt(ez,10);if(!Number.isFinite(e))return void eU(String(eF));let t=Math.min(500,Math.max(1,e));eI(1),eR(t),eU(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(ez,10);if(!Number.isFinite(t))return void eU(String(eF));let r=Math.min(500,Math.max(1,t));eI(1),eR(r),eU(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eW.page," / ",eW.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eI(1),disabled:eW.page<=1||ea||Z,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eI(e=>Math.max(1,e-1)),disabled:eW.page<=1||ea||Z,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eI(e=>Math.min(eW.totalPages,e+1)),disabled:eW.page>=eW.totalPages||ea||Z,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eI(eW.totalPages),disabled:eW.page>=eW.totalPages||ea||Z,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(A.uo,{isOpen:!!eu,onClose:()=>{ed||em(null)},onConfirm:async()=>{let e=eu?.connection;e&&(await eZ(e.id,e.provider),em(null))},title:eu?.connection?.provider==="claude"?"Reset Claude limits?":"Reset Codex limit?",message:eu?.connection?.provider==="claude"?`Refills your ${O(F[eu.connection.id]?.raw?.resetCredits?.clears)} now for ${m(eu.connection)||"this account"} \xb7 your weekly reset day stays ${L(F[eu.connection.id]?.raw?.resetCredits?.weeklyResetsAt)}. This cannot be undone. Resets left: ${eu.resetCreditCount??0}.`:`Use 1 Codex reset credit for ${m(eu?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${eu?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!ed}),ex&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:ex.data?.kind==="claude"?"Claude Code Limit Resets":"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:m(ex.connection)||(ex.data?.kind==="claude"?"Claude account":"Codex account")})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eh(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:ex.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):ex.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:ex.error}):ex.data?.kind==="claude"&&ex.data.grants?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ex.data.availableCount??0," reset",1===ex.data.availableCount?"":"s"," left"]}),(0,a.jsxs)("span",{children:["Weekly reset day: ",L(ex.data.weeklyResetsAt)]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Reset"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Left"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Refills"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Use By"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:(ex.data.grants||[]).map(e=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsxs)("td",{className:"px-3 py-2",children:[(0,a.jsx)("div",{className:"text-text-primary",children:e.label||e.id}),(0,a.jsx)("span",{className:"mt-1 inline-block rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.resetsLeft<=0?"used":e.paused?"paused":e.endsAt&&new Date(e.endsAt).getTime()<=Date.now()?"expired":e.usableNow?"usable now":e.startsAt&&new Date(e.startsAt).getTime()>Date.now()?"not started":e.useRequiresLimit?"at limit only":"unavailable"})]}),(0,a.jsxs)("td",{className:"whitespace-nowrap px-3 py-2 font-medium tabular-nums text-text-primary",children:[e.resetsLeft," / ",e.resetsTotal]}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:O(e.clears)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:L(e.endsAt)}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-2 font-medium text-text-primary",children:I(e.endsAt)})]},e.id))})]})})]}):ex.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ex.data.credits.length," reset credit",1===ex.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ex.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:ex.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:L(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:L(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:I(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:ex.data?.kind==="claude"?"No limit resets available for this account.":"No reset credit details returned for this account."})})]})}),(0,a.jsx)(A.wI,{isOpen:ep,connection:eg,proxyPools:ey,onSave:e3,onClose:()=>{eb(!1),ef(null)}})]}):(0,a.jsx)(C.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:tn.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:tn.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:tn.description})]})}):(0,a.jsx)(C.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}},96002:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[763,1321,705,5497,8441,3794,7358],()=>e(e.s=96002)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,383,387,501,516,543,552,649,675,710,747,748,907,931,948,992,997,999,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1626,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2185,2198,2284,2296,2366,2536,2772,2785,2797,2802,2845,2919,2922,3025,3038,3079,3152,3397,3472,3486,3549,3562,3568,3584,3648,3679,3739,3883,3888,4010,4061,4093,4242,4245,4286,4310,4422,4444,4527,4612,4648,4656,4664,4674,4761,4896,4993,5018,5107,5177,5211,5226,5293,5466,5637,5685,5693,5745,5922,6089,6091,6102,6121,6260,6268,6319,6463,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,6996,7131,7158,7231,7241,7311,7329,7429,7445,7473,7508,7520,7631,7758,7824,7851,7852,8026,8141,8167,8207,8246,8264,8321,8453,8489,8573,8648,8736,8791,8814,8832,8835,8870,8879,8948,8974,8975,9027,9033,9036,9056,9069,9079,9088,9141,9199,9321,9427,9461,9606,9678,9709,9738],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|