@yina-npm/openrouterx 0.4.32 → 0.4.33
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 +40 -17
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +3 -1
- package/app/.next/build-manifest.json +5 -5
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +5 -5
- package/app/.next/routes-manifest.json +13 -27
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/admin/users/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/focus-ui/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/network-analysis/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/user/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/user/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/user/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +3 -3
- package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +5 -6
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +5 -6
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -4
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/me/route.js +1 -1
- package/app/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js +1 -1
- package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/all-statuses/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/inject-auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/test/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/activate-account/route.js +2 -0
- package/app/.next/server/app/api/cli-tools/codex-settings/activate-account/route.js.nft.json +1 -0
- package/app/.next/server/app/api/cli-tools/codex-settings/activate-account/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cowork-settings/route.js +1 -2
- package/app/.next/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/health/route.js +1 -1
- package/app/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/locale/route.js +1 -1
- package/app/.next/server/app/api/locale/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -1
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/custom/route.js +1 -1
- package/app/.next/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/disabled/route.js +1 -1
- package/app/.next/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/test/route.js +1 -1
- package/app/.next/server/app/api/models/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/network-analysis/route.js +2 -2
- package/app/.next/server/app/api/network-analysis/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +2 -2
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/database/route.js +1 -1
- package/app/.next/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/startup-notices/route.js +2 -0
- package/app/.next/server/app/api/startup-notices/route.js.nft.json +1 -0
- package/app/.next/server/app/api/startup-notices/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/tags/route.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-login/route.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
- package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/api-keys/route.js +1 -1
- package/app/.next/server/app/api/usage/api-keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/chart/route.js +1 -1
- package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js +1 -1
- package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/stats/route.js +1 -1
- package/app/.next/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/stream/route.js +2 -2
- package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/users/[id]/route.js +1 -1
- package/app/.next/server/app/api/users/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/users/route.js +1 -1
- package/app/.next/server/app/api/users/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/search/route.js +1 -1
- package/app/.next/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/version/route.js +1 -1
- package/app/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/version/update/route.js +1 -1
- package/app/.next/server/app/api/version/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +6 -7
- package/app/.next/server/app/callback.segments/_full.segment.rsc +6 -7
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +3 -4
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +6 -7
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -7
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/favicon.ico/route.js +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +5 -6
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +5 -6
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/index.segments/_tree.segment.rsc +3 -4
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +6 -7
- package/app/.next/server/app/landing.segments/_full.segment.rsc +6 -7
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +3 -4
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +6 -7
- package/app/.next/server/app/login.segments/_full.segment.rsc +6 -7
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_tree.segment.rsc +3 -4
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +3 -1
- package/app/.next/server/chunks/1350.js +2 -1
- package/app/.next/server/chunks/1679.js +1 -1
- package/app/.next/server/chunks/2560.js +1 -1
- package/app/.next/server/chunks/{9528.js → 2750.js} +2 -3
- package/app/.next/server/chunks/3110.js +1 -1
- package/app/.next/server/chunks/319.js +45 -0
- package/app/.next/server/chunks/3493.js +2 -1
- package/app/.next/server/chunks/3855.js +1 -1
- package/app/.next/server/chunks/3913.js +3 -3
- package/app/.next/server/chunks/412.js +1 -1
- package/app/.next/server/chunks/4126.js +1 -1
- package/app/.next/server/chunks/4394.js +1 -0
- package/app/.next/server/chunks/4741.js +2 -2
- package/app/.next/server/chunks/4922.js +2 -2
- package/app/.next/server/chunks/5330.js +1 -1
- package/app/.next/server/chunks/5627.js +5 -5
- package/app/.next/server/chunks/5789.js +1 -1
- package/app/.next/server/chunks/6182.js +3 -3
- package/app/.next/server/chunks/6393.js +1 -1
- package/app/.next/server/chunks/723.js +3 -3
- package/app/.next/server/chunks/7595.js +1 -1
- package/app/.next/server/chunks/7774.js +2 -2
- package/app/.next/server/chunks/8866.js +1 -0
- package/app/.next/server/chunks/9300.js +3 -0
- package/app/.next/server/chunks/9718.js +1 -1
- package/app/.next/server/chunks/9856.js +1 -0
- package/app/.next/server/functions-config-manifest.json +8 -8
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +4 -4
- package/app/.next/server/next-font-manifest.js +1 -1
- package/app/.next/server/next-font-manifest.json +1 -1
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/XHWEINo8HqIhskxHTrvjk/_buildManifest.js +1 -0
- package/app/.next/static/chunks/1051-a02f07646d97d6ca.js +64 -0
- package/app/.next/static/chunks/{1321-4d97c0c20625b433.js → 1321-194580b028caec3a.js} +1 -1
- package/app/.next/static/chunks/{3794-3fb4e6ee851037bb.js → 3794-ba2500baa4c52d55.js} +3 -3
- package/app/.next/static/chunks/{5555-fe35208b285372b6.js → 4072-91de6609dc7e6753.js} +1 -1
- package/app/.next/static/chunks/5095-fea302b55a08f07b.js +2 -0
- package/app/.next/static/chunks/5497-4a0f0c365aea0ea7.js +7 -0
- package/app/.next/static/chunks/{5964-87a3fc549eda915f.js → 5964-08d6048e026d4245.js} +4 -4
- package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/keys/page-0d5b57da4abb6962.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/users/{page-78953d3b1df0d645.js → page-972703d59d2a3986.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-c86af5c8f255b3b1.js → page-e1bd21507327d2bc.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-211e322f002d5464.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-69469b6440aff8d0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/{page-24fbb3b59653700e.js → page-55598932923e41ce.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-c8f75b084231c080.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/focus-ui/page-fb59dea0e48968bf.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-43a004ab7a9b604a.js → page-95d31a6372622fcf.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-d7972070450d7abc.js → page-c64dd1d0b2bd9caf.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-82cfc464b5e01f4f.js → page-9586c0b67f30a21b.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-1862080d556d8e9e.js → page-c7fbf29bdbdabee9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-320446d3e8bf8cdf.js → page-7ae37df256035f59.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/network-analysis/{page-b1347cd5ca75819b.js → page-0ad4db60f9d14f60.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-8fceba7ec6407143.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-f005d7a30159ce4f.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-bafdc36ddde43d0d.js → page-31a6e1cb19ebc4d8.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-b93ecb2589105e47.js → page-0bf3048423ab0128.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-d799365a8ef51d37.js → page-9d071b63170b7f71.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-abd7d942ceae9293.js → page-7762d83be0982941.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/{page-8228cc70494a195b.js → page-e089ffa4138753d7.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-9202b5ce0650c3ab.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-f77dc916ed5a6f99.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/user/page-12765c664b3c1f6d.js +4 -0
- package/app/.next/static/chunks/app/(dashboard)/layout-00b66bc0e6b38a14.js +1 -0
- package/app/.next/static/chunks/app/_global-error/page-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/_not-found/page-7927650ca4037264.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/auth/me/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/auth/status/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/inject-auth/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/restart/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/test/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/activate-account/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/health/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/locale/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/models/custom/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/models/disabled/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/models/test/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/network-analysis/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/settings/database/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/startup-notices/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/disable/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/enable/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/status/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/api-keys/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/chart/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/logs/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/providers/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-details/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stats/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stream/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/users/[id]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/users/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/info/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/search/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/version/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/version/shutdown/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/api/version/update/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/callback/{page-612232d68e5ef104.js → page-97a750f0d51c3dbe.js} +1 -1
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-9d24273d41fadd28.js +1 -0
- package/app/.next/static/chunks/app/landing/{page-d345c7018be3c351.js → page-bf42a9c80c1e6776.js} +1 -1
- package/app/.next/static/chunks/app/layout-2f20e93bb64f203d.js +1 -0
- package/app/.next/static/chunks/app/login/page-ef8d8c379c2ef99b.js +1 -0
- package/app/.next/static/chunks/app/manifest.webmanifest/route-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/app/page-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/main-9b9267659a73e61e.js +5 -0
- package/app/.next/static/chunks/main-app-d5f2701c08554961.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-8d51a00b6c966622.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1879675a73caf73c.js +1 -0
- package/app/.next/static/chunks/{webpack-786de0e184ffd859.js → webpack-b9b0d264958323b9.js} +1 -1
- package/app/.next/static/css/f6642f5333f94810.css +1 -0
- package/app/.next/static/css/fe3b2b4e527f4e99.css +1 -0
- package/app/node_modules/@next/env/package.json +1 -1
- package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
- package/app/node_modules/baseline-browser-mapping/package.json +3 -3
- package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/app/node_modules/better-sqlite3/package.json +3 -3
- package/app/node_modules/caniuse-lite/data/agents.js +1 -1
- package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
- package/app/node_modules/caniuse-lite/package.json +7 -7
- package/app/node_modules/nanoid/package.json +1 -1
- package/app/node_modules/next/dist/build/analysis/get-page-static-info.js +12 -1
- package/app/node_modules/next/dist/build/static-paths/app.js +2 -1
- package/app/node_modules/next/dist/build/swc/index.js +1 -1
- package/app/node_modules/next/dist/build/utils.js +2 -1
- package/app/node_modules/next/dist/build/webpack-config.js +3 -3
- package/app/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +2 -2
- package/app/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +8 -2
- package/app/node_modules/next/dist/client/route-params.js +23 -6
- package/app/node_modules/next/dist/client/script.js +5 -4
- package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +11 -11
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +13 -13
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +11 -11
- package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +11 -11
- package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
- package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
- package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +10 -10
- package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/app/node_modules/next/dist/server/app-render/action-handler.js +3 -6
- package/app/node_modules/next/dist/server/app-render/app-render.js +62 -9
- package/app/node_modules/next/dist/server/app-render/create-component-tree.js +49 -19
- package/app/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +8 -20
- package/app/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +8 -7
- package/app/node_modules/next/dist/server/app-render/use-flight-response.js +2 -2
- package/app/node_modules/next/dist/server/async-storage/work-store.js +2 -1
- package/app/node_modules/next/dist/server/base-server.js +13 -5
- package/app/node_modules/next/dist/server/config.js +1 -1
- package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/app/node_modules/next/dist/server/dev/next-dev-server.js +1 -0
- package/app/node_modules/next/dist/server/dev/static-paths-worker.js +2 -1
- package/app/node_modules/next/dist/server/image-optimizer.js +22 -2
- package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/app/node_modules/next/dist/server/lib/is-rsc-request.js +18 -0
- package/app/node_modules/next/dist/server/lib/mock-request.js +30 -5
- package/app/node_modules/next/dist/server/lib/patch-set-header.js +7 -0
- package/app/node_modules/next/dist/server/lib/router-server.js +6 -3
- package/app/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +18 -4
- package/app/node_modules/next/dist/server/lib/server-ipc/utils.js +3 -1
- package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/app/node_modules/next/dist/server/next-server.js +1 -1
- package/app/node_modules/next/dist/server/request/fallback-params.js +27 -1
- package/app/node_modules/next/dist/server/route-modules/route-module.js +11 -1
- package/app/node_modules/next/dist/server/server-utils.js +19 -2
- package/app/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +5 -5
- package/app/node_modules/next/dist/server/web/adapter.js +4 -1
- package/app/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/app/node_modules/next/dist/{server → shared/lib}/htmlescape.js +15 -0
- package/app/node_modules/next/dist/shared/lib/router/routes/app.js +13 -1
- package/app/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +56 -10
- package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/app/node_modules/next/package.json +15 -15
- package/app/node_modules/sharp/node_modules/semver/internal/re.js +1 -1
- package/app/node_modules/sharp/node_modules/semver/package.json +3 -3
- package/app/package.json +3 -3
- package/app/server.js +1 -1
- package/app/src/lib/updater/updater.js +1 -1
- package/app/src/mitm/dns/dnsConfig.js +73 -10
- package/app/src/mitm/handlers/base.js +19 -10
- package/app/src/mitm/manager.js +39 -4
- package/app/src/mitm/server.js +106 -43
- package/app/src/mitm/upstreamResolver.js +123 -0
- package/cli.js +171 -1
- package/hooks/postinstall.js +92 -0
- package/package.json +1 -1
- package/src/cli/api/client.js +2 -2
- package/src/cli/menus/providers.js +1 -1
- package/src/cli/menus/settings.js +1 -1
- package/app/.next/server/chunks/1263.js +0 -3
- package/app/.next/server/chunks/63.js +0 -45
- package/app/.next/server/chunks/7540.js +0 -1
- package/app/.next/server/chunks/906.js +0 -1
- package/app/.next/server/chunks/9546.js +0 -1
- package/app/.next/static/BuJLCErn-QhhM6_1rkOm9/_buildManifest.js +0 -1
- package/app/.next/static/chunks/1051-a791905d1279a341.js +0 -64
- package/app/.next/static/chunks/5095-ca2b12905f37ff4d.js +0 -1
- package/app/.next/static/chunks/5497-83030cc3d92a3519.js +0 -7
- package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/keys/page-0b0deda6732f2c17.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-e6ab107aa0c88255.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-32b908ea6b23f583.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-5d8f38767b098c6c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/focus-ui/page-0e1c6e92394e082a.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-af68b6268c3a68fd.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-653d43b972894dc8.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-6252e05d8d534383.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-4319007c3ca0a634.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/user/page-cb9bce72dd4d0df2.js +0 -4
- package/app/.next/static/chunks/app/(dashboard)/layout-f01d55c89fabcb07.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/_not-found/page-216b39470d34c6d6.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/auth/me/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/callback/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/start/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/auth/oidc/test/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/auth/status/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/inject-auth/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/restart/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/test/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/health/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/locale/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/models/custom/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/models/disabled/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/models/test/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/network-analysis/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/suggested-models/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/settings/database/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy-test/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/disable/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/enable/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/status/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/api-keys/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/chart/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/logs/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/providers/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-details/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stats/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/usage/stream/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/users/[id]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/users/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/voices/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/[kind]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/info/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/compact/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/search/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1/web/fetch/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/version/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/version/shutdown/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/api/version/update/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-ac222da48f591dee.js +0 -1
- package/app/.next/static/chunks/app/layout-e2bc0634eb8e25c2.js +0 -1
- package/app/.next/static/chunks/app/login/page-618b0ac3d3cefbb3.js +0 -1
- package/app/.next/static/chunks/app/manifest.webmanifest/route-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/app/page-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/main-97913ac7e699408f.js +0 -5
- package/app/.next/static/chunks/main-app-92b26c94bc214d97.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-3f5de978bebc0f0d.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1172e1764d69e954.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1172e1764d69e954.js +0 -1
- package/app/.next/static/css/2e1b7d528c228ec3.css +0 -1
- package/app/.next/static/css/d0e6cedf3e986854.css +0 -1
- package/app/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/app/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/app/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/app/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/app/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/app/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/app/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- /package/app/.next/static/{BuJLCErn-QhhM6_1rkOm9 → XHWEINo8HqIhskxHTrvjk}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(52679);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{13080:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))},22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(52679);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20502${ee} \\
|
|
2
2
|
-H "Content-Type: application/json" \\
|
|
3
3
|
-H "Authorization: Bearer ${E||"YOUR_KEY"}" \\
|
|
4
|
-
-d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}}
|
|
4
|
+
-d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=13080)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),o&&(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),[c,n]=(0,l.useState)([]),[m,x]=(0,l.useState)(!1),h=async()=>{try{let[e,s,r]=await Promise.all([fetch("/api/auth/me",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);if(e.ok){let s=await e.json();x("sub_user"===s.role),n("sub_user"===s.role&&s.allowedProviders||[])}s.ok&&t((await s.json()).connections||[]),r.ok&&i((await r.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{h()},[]);let b=(0,d.o5)("webSearch").filter(e=>!m||c.includes(e.id)),u=(0,d.o5)("webFetch").filter(e=>!m||c.includes(e.id)),f=a.filter(e=>"webSearch"===e.kind),j=a.filter(e=>"webFetch"===e.kind),v=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:b,connections:s,combos:f,onCreateCombo:m?void 0:()=>v("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:u,connections:s,combos:j,onCreateCombo:m?void 0:()=>v("webFetch")})]})}},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),o&&(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),[c,n]=(0,l.useState)([]),[m,x]=(0,l.useState)(!1),h=async()=>{try{let[e,s,r]=await Promise.all([fetch("/api/auth/me",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);if(e.ok){let s=await e.json();x("sub_user"===s.role),n("sub_user"===s.role&&s.allowedProviders||[])}s.ok&&t((await s.json()).connections||[]),r.ok&&i((await r.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{h()},[]);let b=(0,d.o5)("webSearch").filter(e=>!m||c.includes(e.id)),u=(0,d.o5)("webFetch").filter(e=>!m||c.includes(e.id)),f=a.filter(e=>"webSearch"===e.kind),j=a.filter(e=>"webFetch"===e.kind),v=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:b,connections:s,combos:f,onCreateCombo:m?void 0:()=>v("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:u,connections:s,combos:j,onCreateCombo:m?void 0:()=>v("webFetch")})]})}},87854:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=87854)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,a)=>{"use strict";a.d(s,{default:()=>l});var t=a(95155),n=a(12115),i=a(3534),d=a(28777),o=a(52679),c=a(70151);function l(){let[e,s]=(0,n.useState)([]),[a,l]=(0,n.useState)([]),[r,u]=(0,n.useState)({}),[h,f]=(0,n.useState)(!1),[p,w]=(0,n.useState)(null),[g,v]=(0,n.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,n.useEffect)(()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{}),S(),y(),k(),b()},[]);let S=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let a=await e.json();s(a.connections||[])}}catch{}},y=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();l(s.keys||[])}}catch{}},k=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();f(s.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),m=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsx)(c.tA,{apiKeys:a,cloudEnabled:h,onStatusChange:v}),(0,t.jsx)("div",{className:"grid gap-3 sm:gap-4",children:m.map(([e,s])=>(0,t.jsx)(c.kn,{tool:s,isExpanded:p===e,onToggle:()=>w(p===e?null:e),serverRunning:g.running,dnsActive:g.dnsStatus?.[e]||!1,hasCachedPassword:g.hasCachedPassword||!1,needsSudoPassword:!1!==g.needsSudoPassword,isWin:!0===g.isWin,apiKeys:a,activeProviders:j(),hasActiveProviders:j().some(e=>(0,d.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:r,cloudEnabled:h,onDnsChange:e=>v(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,a)=>{"use strict";a.d(s,{default:()=>l});var t=a(95155),n=a(12115),i=a(3534),d=a(28777),o=a(52679),c=a(70151);function l(){let[e,s]=(0,n.useState)([]),[a,l]=(0,n.useState)([]),[r,u]=(0,n.useState)({}),[h,f]=(0,n.useState)(!1),[p,w]=(0,n.useState)(null),[g,v]=(0,n.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,n.useEffect)(()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{}),S(),y(),k(),b()},[]);let S=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let a=await e.json();s(a.connections||[])}}catch{}},y=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();l(s.keys||[])}}catch{}},k=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();f(s.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),m=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsx)(c.tA,{apiKeys:a,cloudEnabled:h,onStatusChange:v}),(0,t.jsx)("div",{className:"grid gap-3 sm:gap-4",children:m.map(([e,s])=>(0,t.jsx)(c.kn,{tool:s,isExpanded:p===e,onToggle:()=>w(p===e?null:e),serverRunning:g.running,dnsActive:g.dnsStatus?.[e]||!1,hasCachedPassword:g.hasCachedPassword||!1,needsSudoPassword:!1!==g.needsSudoPassword,isWin:!0===g.isWin,apiKeys:a,activeProviders:j(),hasActiveProviders:j().some(e=>(0,d.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:r,cloudEnabled:h,onDnsChange:e=>v(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},31760:(e,s,a)=>{Promise.resolve().then(a.bind(a,23879))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,5964,8441,3794,7358],()=>e(e.s=31760)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7537],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7537],{12657:(e,t,s)=>{Promise.resolve().then(s.bind(s,45699))},45699:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(12115),l=s(35497);function n(e){return Array.isArray(e)?e.length:0}function i({label:e,value:t,skipValue:s=!1}){return(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-xs font-semibold uppercase text-text-muted/70",children:e}),(0,a.jsx)("p",{className:"mt-1 break-words text-sm text-text-main","data-i18n-skip":s?"true":void 0,children:t||"None"})]})}function o({icon:e,label:t,value:s,tone:r="default"}){let l={default:"text-text-main",warning:"text-yellow-600 dark:text-yellow-400",error:"text-red-600 dark:text-red-400",success:"text-green-600 dark:text-green-400"}[r];return(0,a.jsxs)("div",{className:"flex min-h-20 items-center gap-3 rounded-lg border border-border-subtle bg-bg px-4 py-3",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[22px] ${l}`,children:e}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:t}),(0,a.jsx)("p",{className:`mt-1 text-lg font-semibold ${l}`,children:s})]})]})}function d(){let[e,t]=(0,r.useState)(null),[s,d]=(0,r.useState)(!0),[c,x]=(0,r.useState)(""),m=(0,r.useCallback)(async({setBusy:e=!0}={})=>{e&&d(!0),e&&x("");try{let e=await fetch("/api/network-analysis",{cache:"no-store"}),s=await e.json();if(!e.ok)throw Error(s.error||"Failed to load diagnostics");t(s)}catch(e){x(e.message||"Failed to load diagnostics")}finally{d(!1)}},[]);(0,r.useEffect)(()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{});let e=setTimeout(()=>{m({setBusy:!1})},0);return()=>clearTimeout(e)},[m]);let u=(0,r.useMemo)(()=>{var t;return"healthy"===(t=e?.verdict)?{label:"Healthy",variant:"success",title:"No transport errors in sampled logs",detail:"The current app log window does not show route loss, DNS failures, proxy timeout, or socket reset patterns."}:"upstream_or_socket_instability"===t?{label:"Socket resets",variant:"warning",title:"Upstream sockets were interrupted",detail:"Requests were reset while in flight. This can come from upstream, Wi-Fi churn, or an intermediate proxy."}:{label:"External route instability",variant:"warning",title:"Network path instability is affecting OpenrouterX",detail:"The log pattern points to local route loss, transient TLS disconnects, or the configured upstream proxy timing out before API calls complete."}},[e?.verdict]),p=e?.logs?.errorCounts||{},b=e?.project||{},h=b.outboundProxy||{},g=b.mitm||{};return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(l.Ex,{variant:u.variant,dot:!0,children:u.label}),e?.generatedAt&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[(0,a.jsx)("span",{children:"Updated"})," ",(0,a.jsx)("span",{"data-i18n-skip":"true",children:function(e){if(!e)return"Unknown";let t=new Date(e);return Number.isNaN(t.getTime())?"Unknown":t.toLocaleString()}(e.generatedAt)})]})]}),(0,a.jsx)("h2",{className:"mt-2 text-xl font-semibold text-text-main",children:u.title}),(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-text-muted",children:u.detail})]}),(0,a.jsx)(l.$n,{icon:"refresh",variant:"outline",loading:s,onClick:m,children:"Refresh"})]}),c&&(0,a.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 p-4 text-sm text-red-600 dark:text-red-400",children:c}),(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[(0,a.jsx)(o,{icon:"route",label:"Route loss",value:p.EADDRNOTAVAIL||0,tone:(p.EADDRNOTAVAIL||0)>0?"warning":"success"}),(0,a.jsx)(o,{icon:"sync_problem",label:"Socket resets",value:(p.ECONNRESET||0)+(p.TLS_DISCONNECTED||0),tone:p.ECONNRESET||p.TLS_DISCONNECTED?"warning":"success"}),(0,a.jsx)(o,{icon:"vpn_lock",label:"Proxy failures",value:p.PROXY_FAILED||0,tone:(p.PROXY_FAILED||0)>0?"warning":"success"}),(0,a.jsx)(o,{icon:"dns",label:"DNS errors",value:(p.ENOTFOUND||0)+(p.EAI_AGAIN||0),tone:p.ENOTFOUND||p.EAI_AGAIN?"error":"success"})]}),(0,a.jsxs)("div",{className:"grid gap-5 xl:grid-cols-[1fr_1.1fr]",children:[(0,a.jsx)(l.Zp,{title:"Project Network Scope",icon:"hub",padding:"md",children:(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsx)(i,{label:"System proxy",value:b.systemProxyEnabled?"Enabled outside OpenrouterX":"No macOS system proxy detected"}),(0,a.jsx)(i,{label:"Risk level",value:b.riskLevel||"Unknown"}),(0,a.jsx)(i,{label:"Outbound proxy",value:h.enabled?h.url:"Disabled",skipValue:h.enabled}),(0,a.jsx)(i,{label:"Outbound scope",value:"targeted"===h.scope?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"Targeted"}),": ",(0,a.jsx)("span",{"data-i18n-skip":"true",children:(h.targets||[]).join(", ")})]}):h.scope}),(0,a.jsx)(i,{label:"MITM",value:g.enabled?"Enabled":"Disabled"}),(0,a.jsx)(i,{label:"MITM DNS tools",value:n(g.enabledTools)?g.enabledTools.join(", "):"None",skipValue:n(g.enabledTools)>0}),(0,a.jsx)(i,{label:"Cloudflare tunnel",value:b.tunnels?.cloudflareEnabled?"Enabled":"Disabled"}),(0,a.jsx)(i,{label:"Tailscale",value:b.tunnels?.tailscaleEnabled?"Enabled":"Disabled"})]})}),(0,a.jsxs)(l.Zp,{title:"Current Machine State",icon:"monitor_heart",padding:"md",children:[(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsx)(i,{label:"Platform",value:e?.system?.platform,skipValue:!0}),(0,a.jsx)(i,{label:"Hostname",value:e?.system?.hostname,skipValue:!0}),(0,a.jsx)(i,{label:"Default route",value:(e?.system?.route?.output||"").match(/interface:\s*(\S+)/)?.[1]||"Unknown",skipValue:!0}),(0,a.jsx)(i,{label:"Wi-Fi status",value:(e?.system?.ifconfig?.output||"").match(/status:\s*(\S+)/)?.[1]||"Unknown"})]}),(0,a.jsxs)("details",{className:"mt-4 rounded-lg border border-border-subtle bg-bg p-3",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-sm font-semibold text-text-main",children:"Raw DNS and proxy snapshot"}),(0,a.jsx)("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap break-words text-xs text-text-muted",children:["--- scutil --proxy ---",e?.system?.proxy?.output||"Unavailable","--- scutil --dns ---",e?.system?.dns?.output||"Unavailable"].join("\n")})]})]})]}),(0,a.jsx)(l.Zp,{title:"Findings",icon:"fact_check",padding:"md",children:(0,a.jsx)("div",{className:"space-y-3",children:(e?.logs?.findings||[]).map((e,t)=>(0,a.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-bg p-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(l.Ex,{variant:"warning"===e.severity?"warning":"success"===e.severity?"success":"info",children:e.severity}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e.title})]}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted",children:e.detail})]},`${e.title}-${t}`))})}),(0,a.jsx)(l.Zp,{title:"Network Error Timeline",icon:"timeline",padding:"md",children:0===(e?.logs?.timeline||[]).length?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No network transport errors in the sampled logs."}):(0,a.jsx)("div",{className:"max-h-[520px] overflow-auto rounded-lg border border-border-subtle",children:(e?.logs?.timeline||[]).slice().reverse().map((e,t)=>(0,a.jsxs)("div",{className:"border-b border-border-subtle bg-bg p-3 last:border-b-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-text-muted","data-i18n-skip":"true",children:e.time||"unknown"}),(0,a.jsx)(l.Ex,{size:"sm",variant:"mitm"===e.source?"primary":"default",children:e.source}),e.categories.map(e=>(0,a.jsx)(l.Ex,{size:"sm",variant:"EADDRNOTAVAIL"===e?"warning":"default",className:"uppercase","data-i18n-skip":"true",children:e},e))]}),(0,a.jsx)("p",{className:"mt-2 break-words font-mono text-xs text-text-muted","data-i18n-skip":"true",children:e.message})]},`${e.time}-${t}`))})})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=12657)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[2574,3862,1051,1321,5497,4072,8441,3794,7358],()=>_(_.s=74072)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),r=s(12115),o=s(35497),i=s(1620),l=s(31474),n=s(90620);let d=[{id:"openai",label:"OpenAI / Codex",targets:["api.openai.com","chatgpt.com"]},{id:"anthropic",label:"Anthropic",targets:["api.anthropic.com"]},{id:"google",label:"Google / Gemini",targets:["generativelanguage.googleapis.com","aiplatform.googleapis.com"]},{id:"antigravity",label:"Antigravity",targets:["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","daily-cloudcode-pa.sandbox.googleapis.com"]},{id:"copilot",label:"GitHub Copilot",targets:["api.individual.githubcopilot.com"]},{id:"openrouter",label:"OpenRouter",targets:["openrouter.ai","api.openrouter.ai"]},{id:"cursor",label:"Cursor",targets:["api2.cursor.sh"]},{id:"kiro",label:"Kiro / AWS",targets:["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"]}],c=new Set(d.flatMap(e=>e.targets));function m(e){return Array.from(new Set(e.map(e=>String(e||"").trim()).filter(Boolean)))}function x(e,t,s){let a=String(e||"").trim();if(!a||!t&&!s)return a;try{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(a),r=new URL(e?a:`http://${a}`);return r.username=t||"",r.password=s||"",r.toString()}catch{return a}}function u(e){try{return decodeURIComponent(e||"")}catch{return e||""}}function p(e){let t=String(e||"").trim();if(!t)return{proxyUrl:"",username:"",password:""};try{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),s=new URL(e?t:`http://${t}`),a=u(s.username),r=u(s.password);s.username="",s.password="";let o=e?s.toString():s.toString().replace(/^http:\/\//i,"");return"/"!==s.pathname||s.search||s.hash||(o=o.replace(/\/$/,"")),{proxyUrl:o,username:a,password:r}}catch{return{proxyUrl:t,username:"",password:""}}}function b(){let{theme:e,setTheme:t,isDark:s}=(0,i.D)(),[u,b]=(0,r.useState)({fallbackStrategy:"fill-first"}),[h,g]=(0,r.useState)(!0),[y,f]=(0,r.useState)({current:"",new:"",confirm:""}),[j,w]=(0,r.useState)({type:"",message:""}),[N,v]=(0,r.useState)(!1),[P,C]=(0,r.useState)(!1),[S,k]=(0,r.useState)({type:"",message:""}),[O,I]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[U,L]=(0,r.useState)(""),[T,R]=(0,r.useState)({type:"",message:""}),[A,D]=(0,r.useState)(!1),[M,$]=(0,r.useState)(!1),[E,F]=(0,r.useState)({type:"",message:""}),[q,J]=(0,r.useState)("/api/auth/oidc/callback"),[H,_]=(0,r.useState)(!1),z=(0,r.useRef)(null),[K,B]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:"",outboundProxyTargets:[],outboundProxyCustomTargets:"",outboundProxyUsername:"",outboundProxyPassword:"",outboundProxySavedUsername:"",outboundProxySavedPassword:""}),[Z,G]=(0,r.useState)({type:"",message:""}),[W,Q]=(0,r.useState)(!1),[V,Y]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{})},[]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{let t=p(e?.outboundProxyUrl);b(e),I({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),L(""),(e?.authMode==="oidc"||e?.authMode==="both")&&_(!0),B({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:t.proxyUrl,outboundNoProxy:e?.outboundNoProxy||"",outboundProxyTargets:Array.isArray(e?.outboundProxyTargets)?e.outboundProxyTargets:[],outboundProxyCustomTargets:Array.isArray(e?.outboundProxyTargets)?e.outboundProxyTargets.filter(e=>!c.has(e)).join(","):"",outboundProxyUsername:t.username,outboundProxyPassword:"",outboundProxySavedUsername:t.username,outboundProxySavedPassword:t.password}),g(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),g(!1)})},[]),(0,r.useEffect)(()=>{J(`${window.location.origin}/api/auth/oidc/callback`)},[]);let X=async e=>{if(e.preventDefault(),!0!==u.outboundProxyEnabled)return;Q(!0),G({type:"",message:""});let t=es(),s=K.outboundProxyPassword||(K.outboundProxyUsername===K.outboundProxySavedUsername?K.outboundProxySavedPassword:""),a=x(K.outboundProxyUrl,K.outboundProxyUsername,s);try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:a,outboundProxyTargets:t})}),s=await e.json();if(e.ok){let e=p(s?.outboundProxyUrl||a);b(e=>({...e,...s})),B(a=>({...a,outboundProxyUrl:e.proxyUrl,outboundProxyTargets:Array.isArray(s?.outboundProxyTargets)?s.outboundProxyTargets:t,outboundProxyUsername:e.username,outboundProxyPassword:"",outboundProxySavedUsername:e.username,outboundProxySavedPassword:e.password})),G({type:"success",message:"Proxy settings applied"})}else G({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){G({type:"error",message:"An error occurred"})}finally{Q(!1)}},ee=async()=>{if(!0!==u.outboundProxyEnabled)return;let e=K.outboundProxyPassword||(K.outboundProxyUsername===K.outboundProxySavedUsername?K.outboundProxySavedPassword:""),t=x(K.outboundProxyUrl,K.outboundProxyUsername,e);if(!t)return void G({type:"error",message:"Please enter a Proxy URL to test"});Y(!0),G({type:"",message:""});try{let e=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:t})}),s=await e.json();e.ok&&s?.ok?G({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):G({type:"error",message:s?.error||"Proxy test failed"})}catch(e){G({type:"error",message:"An error occurred"})}finally{Y(!1)}},et=async e=>{Q(!0),G({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(b(e=>({...e,...s})),B(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),G({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):G({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){G({type:"error",message:"An error occurred"})}finally{Q(!1)}},es=()=>m([...Array.isArray(K.outboundProxyTargets)?K.outboundProxyTargets:[],...m(String(K.outboundProxyCustomTargets||"").split(","))]),ea=async e=>{if(e.preventDefault(),y.new!==y.confirm)return void w({type:"error",message:"Passwords do not match"});v(!0),w({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:y.current,newPassword:y.new})}),t=await e.json();e.ok?(w({type:"success",message:"Password updated successfully"}),f({current:"",new:"",confirm:""})):w({type:"error",message:t.error||"Failed to update password"})}catch(e){w({type:"error",message:"An error occurred"})}finally{v(!1)}},er=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&b(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eo=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&b(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},ei=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&b(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},el=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&b(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},en=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&b(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ed=(e,t)=>{I(s=>({...s,[e]:t}))},ec=async(e=O.authMode||"password")=>{let t=O.oidcIssuerUrl.trim(),s=O.oidcClientId.trim(),a=O.oidcScopes.trim(),r=O.oidcLoginLabel.trim(),o=U.trim();if("password"!==e&&(!t||!s||!o)&&!u.oidcConfigured)return void R({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});D(!0),R({type:"",message:""}),F({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(b(e=>({...e,...n})),I({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),L(""),R({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):R({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){R({type:"error",message:"An error occurred"})}finally{D(!1)}},em=async()=>{let e=O.oidcIssuerUrl.trim(),t=O.oidcClientId.trim(),s=O.oidcScopes.trim(),a=U.trim();if(!e||!t)return void F({type:"error",message:"Issuer URL and client ID are required to test the connection."});$(!0),R({type:"",message:""}),F({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:O.authMode||u.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:O.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void F({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;F({type:"success",message:e})}else F({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){F({type:"error",message:"An error occurred"})}finally{$(!1)}},ex=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&b(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eu=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();b(t)}catch(e){console.error("Failed to reload settings:",e)}},ep=async()=>{C(!0),k({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`openrouterx-backup-${i}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),k({type:"success",message:"Database backup downloaded"})}catch(e){k({type:"error",message:e.message||"Failed to export database"})}finally{C(!1)}},eb=async e=>{let t=e.target.files?.[0];if(t){C(!0),k({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await eu(),k({type:"success",message:"Database imported successfully"})}catch(e){k({type:"error",message:e.message||"Invalid backup file"})}finally{z.current&&(z.current.value=""),C(!1)}}},eh=!0===u.enableObservability;return(0,a.jsx)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,l.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:u.databasePath||"~/.openrouterx/db.json"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:ep,loading:P,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>z.current?.click(),disabled:P,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:z,type:"file",accept:"application/json,.json",className:"hidden",onChange:eb})]}),S.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===S.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:S.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===u.requireLogin,onChange:()=>en(!u.requireLogin),disabled:h})]}),!0===u.requireLogin&&(0,a.jsxs)("form",{onSubmit:ea,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[u.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:y.current,onChange:e=>f({...y,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:y.new,onChange:e=>f({...y,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:y.confirm,onChange:e=>f({...y,confirm:e.target.value}),required:!0})]})]}),j.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===j.type?"text-red-500":"text-green-500"}`,children:j.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:N,className:"w-full sm:w-auto",children:u.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>_(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===u.authMode?"OIDC active":"both"===u.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:H?"expand_less":"expand_more"})]}),H&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=O.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ed("authMode",e.value),className:(0,l.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:h||A,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/9router/",value:O.oidcIssuerUrl,onChange:e=>ed("oidcIssuerUrl",e.target.value),disabled:h||A})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"9router-dashboard",value:O.oidcClientId,onChange:e=>ed("oidcClientId",e.target.value),disabled:h||A})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:U,onChange:e=>L(e.target.value),disabled:h||A}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:O.oidcScopes,onChange:e=>ed("oidcScopes",e.target.value),disabled:h||A})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:O.oidcLoginLabel,onChange:e=>ed("oidcLoginLabel",e.target.value),disabled:h||A})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:q})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:A,onClick:()=>ec(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:M,onClick:em,className:"w-full sm:w-auto",children:"Test connection"})]}),E.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===E.type?"text-red-500":"text-green-500"}`,children:E.message}),T.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===T.type?"text-red-500":"text-green-500"}`,children:T.message}),"oidc"===u.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===u.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===u.fallbackStrategy,onChange:()=>er("round-robin"===u.fallbackStrategy?"fill-first":"round-robin"),disabled:h})]}),"round-robin"===u.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:u.stickyRoundRobinLimit||3,onChange:e=>ei(e.target.value),disabled:h,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===u.comboStrategy,onChange:()=>eo("round-robin"===u.comboStrategy?"fallback":"round-robin"),disabled:h})]}),"round-robin"===u.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:u.comboStickyRoundRobinLimit||1,onChange:e=>el(e.target.value),disabled:h,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===u.fallbackStrategy?`Currently distributing requests across all available accounts with ${u.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===u.comboStrategy?` Combos rotate after ${u.comboStickyRoundRobinLimit||1} call${1===(u.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===u.outboundProxyEnabled,onChange:()=>et(!0!==u.outboundProxyEnabled),disabled:h||W})]}),!0===u.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:X,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"socks5://127.0.0.1:1080",value:K.outboundProxyUrl,onChange:e=>B(t=>({...t,outboundProxyUrl:e.target.value})),disabled:h||W}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Supports http, https, socks4, socks4a, socks5, and socks5h."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy Username"}),(0,a.jsx)(o.pd,{placeholder:"optional",value:K.outboundProxyUsername,onChange:e=>B(t=>({...t,outboundProxyUsername:e.target.value})),disabled:h||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:K.outboundProxySavedPassword?"saved (hidden)":"optional",value:K.outboundProxyPassword,onChange:e=>B(t=>({...t,outboundProxyPassword:e.target.value})),disabled:h||W})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Use Proxy For"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Default is direct. Checked targets use the proxy."})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2",children:d.map(e=>{let t=new Set(K.outboundProxyTargets||[]),s=e.targets.every(e=>t.has(e));return(0,a.jsxs)("label",{className:(0,l.cn)("flex items-center gap-2 rounded-lg border px-3 py-2 text-sm cursor-pointer transition-colors",s?"border-primary bg-primary/5 text-text-main":"border-border bg-surface text-text-muted hover:border-primary/50"),children:[(0,a.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{B(t=>{let s=new Set(t.outboundProxyTargets||[]),a=e.targets.every(e=>s.has(e));for(let t of e.targets)a?s.delete(t):s.add(t);return{...t,outboundProxyTargets:Array.from(s)}})},disabled:h||W,className:"h-4 w-4 accent-primary"}),(0,a.jsx)("span",{className:"truncate",children:e.label})]},e.id)})}),(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Custom Proxy Hosts"}),(0,a.jsx)(o.pd,{placeholder:"api.example.com,.example.org",value:K.outboundProxyCustomTargets,onChange:e=>B(t=>({...t,outboundProxyCustomTargets:e.target.value})),disabled:h||W})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:V,disabled:h||W,onClick:ee,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:W,className:"w-full sm:w-auto",children:"Apply"})]})]}),Z.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===Z.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:Z.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eh,onChange:ex,disabled:h})]})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[n.vQ.name," v",n.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]})})}},95747:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=95747)),_N_E=e.O()}]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{7570:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>$});var a=s(95155),i=s(12115),r=s(73321),l=s(98500),o=s.n(l),n=s(5772),d=s(35497),c=s(52679),p=s(28777),m=s(11059);let x=new Map;async function u(e){if(!e?.url||!e?.type)return[];let t=x.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 a=(await s.json()).data??[];return x.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var h=s(14051),f=s.n(h);function g({model:e,fullModel:t,displayModel:s,alias:i,copied:r,onCopy:l,testStatus:o,isCustom:n,isFree:d,onDeleteAlias:c,onTest:p,isTesting:m,onDisable:x}){let u="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:u?{color:u}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.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:s||t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),p&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:p,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,a.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:m?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:r===`model-${e.id}`?"check":"content_copy"})}),(0,a.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:r===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:c,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):x?(0,a.jsx)("button",{onClick:x,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function y({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:r,onTest:l,testStatus:o,isTesting:n}){let d="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.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"})]}),l&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:l,disabled:n,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,a.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:n?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:r,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function b({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:r,onCopy:l,onSetAlias:o,onDeleteAlias:n,connections:c,isAnthropic:p}){let[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[v,j]=(0,i.useState)(null),[N,w]=(0,i.useState)({}),k=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}`})}),a=await s.json();w(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=a=>{let i,r=`${e}/${a}`;if(Object.values(s).includes(r))return null;let l=(i=a.split("/"))[i.length-1];if(!s[l])return l;let o=`${t}-${l}`;return s[o]?null:o},$=async()=>{if(!m.trim()||u)return;let t=m.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await o(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},A=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let r=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=S(s);a&&(await o(s,a,e),r+=1)}0===r&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},T=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&$(),placeholder:p?"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,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:$,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(y,{modelId:e,fullModel:`${t}/${e}`,copied:r,onCopy:l,onDeleteAlias:()=>n(i),onTest:c.length>0?()=>k(e):void 0,testStatus:N[e],isTesting:v===e},s))})]})}function v({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:l,onMoveUp:o,onMoveDown:n,onToggleActive:c,onUpdateProxy:p,onEdit:m,onDelete:x}){let[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),y=(0,i.useRef)(null),b=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,w=N?b.get(N):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!N||k,S=w?`Pool: ${w.name}`:N?`Pool: ${N} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",$="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);$=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{$=t}}let A=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",T="default";w?.isActive===!0?T="success":(N||k)&&(T="error"),(0,i.useEffect)(()=>{if(!u)return;let e=e=>{y.current&&!y.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[u]);let O=async e=>{g(!0);try{await p("__none__"===e?null:e)}finally{g(!1),h(!1)}},P=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),I=s?P(e.email)?e.email:P(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name,[E,_]=(0,i.useState)(!1),R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{_(!!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=R?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[R]);let U="unavailable"!==e.testStatus||E?e.testStatus:"active";return(0,a.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,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:I}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===U||"success"===U?"success":"error"===U||"expired"===U||"unavailable"===U?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":U||"Unknown"}),C&&(0,a.jsx)(d.Ex,{variant:T,size:"sm",children:"Proxy"}),E&&!1!==e.isActive&&(0,a.jsx)(v,{until:R}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]})]}),C&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),$&&(0,a.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:$}),A&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:A,children:["no_proxy: ",A]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:y,children:[(0,a.jsxs)("button",{onClick:()=>h(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:f,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:f?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),u&&(0,a.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,a.jsx)("button",{onClick:()=>O("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>O(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,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,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}g.propTypes={model:f().shape({id:f().string.isRequired}).isRequired,fullModel:f().string.isRequired,displayModel:f().string,alias:f().string,copied:f().string,onCopy:f().func.isRequired,testStatus:f().oneOf(["ok","error"]),isCustom:f().bool,isFree:f().bool,onDeleteAlias:f().func,onTest:f().func,isTesting:f().bool,onDisable:f().func},f().string.isRequired,f().string.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func,f().oneOf(["ok","error"]),f().bool,f().string.isRequired,f().object.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func.isRequired,b.propTypes={providerStorageAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,modelAliases:f().object.isRequired,copied:f().string,onCopy:f().func.isRequired,onSetAlias:f().func.isRequired,onDeleteAlias:f().func.isRequired,connections:f().arrayOf(f().shape({id:f().string,isActive:f().bool})).isRequired,isAnthropic:f().bool},v.propTypes={until:f().string.isRequired},j.propTypes={connection:f().shape({id:f().string,name:f().string,email:f().string,displayName:f().string,modelLockUntil:f().string,testStatus:f().string,isActive:f().bool,lastError:f().string,priority:f().number,globalPriority:f().number}).isRequired,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string,proxyUrl:f().string,noProxy:f().string,isActive:f().bool})),isOAuth:f().bool.isRequired,isFirst:f().bool.isRequired,isLast:f().bool.isRequired,onMoveUp:f().func.isRequired,onMoveDown:f().func.isRequired,onToggleActive:f().func.isRequired,onUpdateProxy:f().func,onEdit:f().func.isRequired,onDelete:f().func.isRequired};let N=`Production|sk-...
|
|
2
2
|
Backup|sk-...
|
|
3
|
-
sk-...`;function w({isOpen:e,provider:t,providerName:s,isCompatible:r,isAnthropic:l,authType:o,authHint:n,website:c,proxyPools:p,onSave:m,onBulkDone:x,onClose:u}){let h="__none__",f="ollama-local"===t,g="cookie"===o,y=g?"Cookie Value":"API Key",b=g?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":"",v="azure"===t,j="cloudflare-ai"===t,[k,C]=(0,i.useState)({name:"",apiKey:"",priority:1,proxyPoolId:h,ollamaHostUrl:""}),[S,$]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[A,T]=(0,i.useState)({accountId:""}),[O,P]=(0,i.useState)(!1),[I,E]=(0,i.useState)(null),[_,R]=(0,i.useState)(!1),[U,D]=(0,i.useState)("single"),[z,q]=(0,i.useState)(""),[M,J]=(0,i.useState)(null),F=f?"Ollama Local":g?`${s||t} Cookie`:"Production Key";(0,i.useEffect)(()=>{e&&(C({name:r?F:"",apiKey:"",priority:1,proxyPoolId:h,ollamaHostUrl:""}),$({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),T({accountId:""}),P(!1),E(null),R(!1),D("single"),q(""),J(null))},[F,r,e]);let K=()=>f&&k.ollamaHostUrl.trim()?{baseUrl:k.ollamaHostUrl.trim()}:v?{azureEndpoint:S.azureEndpoint,apiVersion:S.apiVersion,deployment:S.deployment,organization:S.organization}:j?{accountId:A.accountId}:void 0,L=async()=>{P(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:k.apiKey,providerSpecificData:K()})}),s=await e.json();E(s.valid?"success":"failed")}catch{E("failed")}finally{P(!1)}},W=async()=>{if(!t||!f&&!k.apiKey)return;let e=k.name.trim()||F;R(!0);try{let s=!1;try{P(!0),E(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:k.apiKey,providerSpecificData:K()})});s=!!(await e.json()).valid,E(s?"success":"failed")}catch{E("failed")}finally{P(!1)}await m({name:e,apiKey:k.apiKey,priority:k.priority,proxyPoolId:k.proxyPoolId===h?null:k.proxyPoolId,testStatus:s?"active":"unknown",providerSpecificData:K()})}finally{R(!1)}},H=async()=>{let e=z.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;R(!0),J(null);let s=0,a=0;for(let i=0;i<e.length;i++){let r=e[i].split("|"),l=r.length>=2?r.slice(1).join("|").trim():r[0].trim(),o=r.length>=2?r[0].trim():"Key",n=`${o} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:l,name:n,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}R(!1),J({success:s,failed:a}),s>0&&x&&x()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${y}`,onClose:u,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===U?"primary":"ghost",onClick:()=>{D("single"),J(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===U?"primary":"ghost",onClick:()=>{D("bulk"),J(null)},children:"Bulk Add"})]}),"bulk"===U&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.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:N,value:z,onChange:e=>q(e.target.value)}),M&&(0,a.jsxs)("div",{className:`text-sm font-medium ${M.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",M.success," added",M.failed>0?`, ✗ ${M.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:H,fullWidth:!0,disabled:_||!z.trim(),children:_?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:u,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===U&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:k.name,onChange:e=>C({...k,name:e.target.value}),placeholder:F}),f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:k.ollamaHostUrl,onChange:e=>C({...k,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:L,disabled:O||_,variant:"secondary",children:O?"Checking...":"Check"})})]}),!f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:y,type:g?"text":"password",value:k.apiKey,onChange:e=>C({...k,apiKey:e.target.value}),placeholder:b,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:L,disabled:!k.apiKey||O||_,variant:"secondary",children:O?"Checking...":"Check"})})]}),g&&n&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[n,c&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",c.replace(/^https?:\/\//,"")]})]})]}),f&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),I&&(0,a.jsx)(d.Ex,{variant:"success"===I?"success":"error",children:"success"===I?"Valid":"Invalid"}),r&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:l?`Validation checks ${s||"Anthropic Compatible"} by verifying the API key.`:`Validation checks ${s||"OpenAI Compatible"} via /models on your base URL.`}),j&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:A.accountId,onChange:e=>T({...A,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),v&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:S.azureEndpoint,onChange:e=>$({...S,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:S.deployment,onChange:e=>$({...S,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:S.apiVersion,onChange:e=>$({...S,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:S.organization,onChange:e=>$({...S,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:k.priority,onChange:e=>C({...k,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:k.proxyPoolId,onChange:e=>C({...k,proxyPoolId:e.target.value}),options:[{value:h,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:W,fullWidth:!0,disabled:_||!f&&!k.apiKey||v&&(!S.azureEndpoint||!S.deployment||!S.organization)||j&&!A.accountId,children:_?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:u,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function k({isOpen:e,node:t,onSave:s,onClose:r,isAnthropic:l}){let[o,n]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&n({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(l?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,l]);let v=async()=>{if(o.name.trim()&&o.prefix.trim()&&o.baseUrl.trim()){p(!0);try{let e={name:o.name,prefix:o.prefix,baseUrl:o.baseUrl};l||(e.apiType=o.apiType),await s(e)}finally{p(!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:o.baseUrl,apiKey:m,type:l?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${l?"Anthropic":"OpenAI"} Compatible`,onClose:r,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:`${l?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:o.prefix,onChange:e=>n({...o,prefix:e.target.value}),placeholder:l?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!l&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:o.apiType,onChange:e=>n({...o,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:o.baseUrl,onChange:e=>n({...o,baseUrl:e.target.value}),placeholder:l?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${l?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!o.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,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,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!o.name.trim()||!o.prefix.trim()||!o.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function C({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:r,onClose:l}){var o;let n,[c,p]=(0,i.useState)(""),[m,x]=(0,i.useState)(null),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(p(""),x(null),h(""),g(!1))},[e]);let y=(o=c.trim(),n=`${t}/`,o.startsWith(n)?o.slice(n.length):o),b=async()=>{if(y){x("testing"),h("");try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${y}`})}),s=await e.json();x(s.ok?"ok":"error"),h(s.error||"")}catch(e){x("error"),h(e.message)}}},v=async()=>{if(y&&!f){g(!0);try{await r(y)}finally{g(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:l,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:c,onChange:e=>{p(e.target.value),x(null),h("")},onKeyDown:e=>{"Enter"===e.key&&b()},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,a.jsx)(d.$n,{type:"button",variant:"secondary",icon:"science",loading:"testing"===m,onClick:b,disabled:!y||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:y||"model-id"})]})]}),"ok"===m&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:u||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{type:"button",onClick:l,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{type:"button",onClick:v,fullWidth:!0,size:"sm",disabled:!y||f,children:f?"Adding...":"Add Model"})]})]})})}function S({isOpen:e,onClose:t,onSuccess:s}){let[r,l]=(0,i.useState)([]),[o,n]=(0,i.useState)(""),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(null),[u,h]=(0,i.useState)(null),f=()=>{l([]),n(""),x(null),h(null),t()},g=async()=>{p(!0),x(null),h(null);try{let e=await Promise.all(r.map(async e=>({filename:e.name,jsonText:await e.text()}))),t=o.trim()?[{filename:"pasted JSON",jsonText:o.trim()}]:[],a=[...e,...t];if(0===a.length)throw Error("Select JSON files or paste JSON first");let i=await fetch("/api/oauth/codex/import-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:a})}),l=await i.json();if(!i.ok)throw Error(l.error||"Failed to import accounts");x(l),l.imported?.length>0&&s?.()}catch(e){h(e.message||"Failed to import accounts")}finally{p(!1)}},y=m?.imported?.length||0,b=m?.skipped?.length||0;return(0,a.jsx)(d.aF,{isOpen:e,title:"Import Codex Accounts",onClose:f,size:"lg",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/50 p-3",children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium",children:"JSON files"}),(0,a.jsx)("input",{type:"file",accept:".json,application/json",multiple:!0,onChange:e=>l(Array.from(e.target.files||[])),className:"block w-full text-sm text-text-muted file:mr-3 file:rounded-md file:border-0 file:bg-primary file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-white hover:file:bg-primary/90"}),r.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(e=>(0,a.jsx)("span",{className:"rounded bg-primary/10 px-2 py-0.5 text-xs text-primary",children:e.name},`${e.name}-${e.size}`))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium",children:"Paste JSON"}),(0,a.jsx)("textarea",{value:o,onChange:e=>n(e.target.value),placeholder:'[{ "type": "codex", "access_token": "...", "refresh_token": "..." }]',className:"h-36 w-full resize-none rounded-md border border-black/10 bg-white px-3 py-2 font-mono text-xs text-text-main shadow-inner transition-all placeholder-text-muted/60 focus:border-primary/50 focus:outline-none focus:ring-1 focus:ring-primary/30 dark:border-white/10 dark:bg-white/5"})]}),(0,a.jsx)("div",{className:"rounded-lg border border-border bg-background/60 px-3 py-2 text-xs text-text-muted",children:"Auto-detects Codex Session JSON, CLI Proxy API Auth JSON, and Sub2API JSON."}),u&&(0,a.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-600",children:u}),m&&(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/40 p-3",children:[(0,a.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsxs)("span",{className:"font-medium text-green-600",children:[y," imported"]}),b>0&&(0,a.jsxs)("span",{className:"text-text-muted",children:[b," skipped"]})]}),m.imported?.length>0&&(0,a.jsx)("div",{className:"max-h-32 overflow-auto rounded border border-border/70",children:m.imported.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border/70 px-2 py-1.5 last:border-b-0",children:[(0,a.jsx)("span",{className:"min-w-0 truncate text-xs",children:e.email||e.displayName||e.name||e.id}),(0,a.jsx)("span",{className:"shrink-0 text-xs text-text-muted",children:e.sourceFormat})]},e.id))}),m.skipped?.length>0&&(0,a.jsx)("div",{className:"mt-2 max-h-28 overflow-auto rounded border border-border/70",children:m.skipped.map((e,t)=>(0,a.jsxs)("div",{className:"border-b border-border/70 px-2 py-1.5 text-xs last:border-b-0",children:[(0,a.jsx)("span",{className:"font-medium",children:e.filename}),(0,a.jsxs)("span",{className:"text-text-muted",children:[" \xb7 ",e.reason]})]},`${e.filename}-${t}`))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:g,loading:c,disabled:c||!r.length&&!o.trim(),fullWidth:!0,children:"Import"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Close"})]})]})})}function $(){let e,t=(0,r.useParams)(),s=(0,r.useRouter)(),l=t.id,[x,h]=(0,i.useState)([]),[f,y]=(0,i.useState)(!0),[v,N]=(0,i.useState)(null),[$,A]=(0,i.useState)([]),[T,O]=(0,i.useState)(!1),[P,I]=(0,i.useState)(!1),[E,_]=(0,i.useState)(!1),[R,U]=(0,i.useState)(!1),[D,z]=(0,i.useState)(null),[q,M]=(0,i.useState)(!1),[J,F]=(0,i.useState)(!1),[K,L]=(0,i.useState)(!1),[W,H]=(0,i.useState)(!1),[V,B]=(0,i.useState)(null),[G,Q]=(0,i.useState)({}),[Z,X]=(0,i.useState)(!1),[Y,ee]=(0,i.useState)({}),[et,es]=(0,i.useState)(""),[ea,ei]=(0,i.useState)(null),[er,el]=(0,i.useState)(!1),[eo,en]=(0,i.useState)([]),[ed,ec]=(0,i.useState)("__none__"),[ep,em]=(0,i.useState)(!1),[ex,eu]=(0,i.useState)(null),[eh,ef]=(0,i.useState)(""),[eg,ey]=(0,i.useState)("auto"),[eb,ev]=(0,i.useState)(!1),[ej,eN]=(0,i.useState)(!1),[ew,ek]=(0,i.useState)("super_admin"),[eC,eS]=(0,i.useState)([]),[e$,eA]=(0,i.useState)([]),[eT,eO]=(0,i.useState)([]),{copied:eP,copy:eI}=(0,m.C)(),eE=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l]||c.br[l],e_=!!c.zN[l]||!!c.IS[l],eR=!!c.IS[l]?.noAuth,eU=(0,p.KC)(l),eD=(0,c.wG)(l),ez=(0,c.mq)(l),eq=(0,c.gb)(l),eM=ez||eq,eJ=c.Q2[l]?.thinkingConfig||null,eF=eM?l:eD,eK=eM?v?.prefix||l:eD,eL="codex"===l,eW=(eJ?.options||[]).map(e=>({value:e,label:"auto"===e?"codex"===l?"Auto (Medium)":"Auto":"xhigh"===e?"XHigh":e.charAt(0).toUpperCase()+e.slice(1)})),eH=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(eF)}`,{cache:"no-store"}),t=await e.json();e.ok&&eO(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[eF]),eV=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:eF,ids:[e]})})).ok&&await eH()}catch(e){console.log("Error disabling model:",e)}},eB=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(eF)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await eH()}catch(e){console.log("Error enabling model:",e)}},eG=async e=>{if(e.length&&confirm(`Disable all ${e.length} model(s)?`))try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:eF,ids:e})})).ok&&await eH()}catch(e){console.log("Error disabling all models:",e)}},eQ=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(eF)}`,{method:"DELETE"})).ok&&await eH()}catch(e){console.log("Error enabling all models:",e)}},eZ=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&Q(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===l&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eA(e.models)}).catch(()=>{})},[l]);let eX=(0,i.useCallback)(async()=>{try{let[e,t,s,a,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"}),fetch("/api/auth/me",{cache:"no-store"})]),r=await e.json(),o=await t.json(),n=await s.json(),d=a.ok?await a.json():{},c=i.ok?await i.json():{};if(e.ok){let e=(r.connections||[]).filter(e=>e.provider===l);h(e)}s.ok&&A(n.proxyPools||[]);let p=(d.providerStrategies||{})[l]||{};eu(p.fallbackStrategy||null),ef(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1");let m=(d.providerThinking||{})[l]||{},x=c.providerThinkingScopeKey||c.userId||"super_admin",u="sub_user"===c.role?(c.providerThinking||{})[l]||{}:(d.userProviderThinking||{})[x]?.[l]||{};if(ey(m.mode||"auto"),ev(!0===m.fastMode),ek(x),eN(Object.prototype.hasOwnProperty.call(u,"fastMode")?!0===u.fastMode:!0===m.fastMode),t.ok){let e=(o.nodes||[]).find(e=>e.id===l)||null;if(!e&&eM)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===l)||null))break}N(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[l,eM]),eY=async e=>{try{let t=await fetch(`/api/provider-nodes/${l}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(N(s.node),await eX(),L(!1))}catch(e){console.log("Error updating provider node:",e)}},e0=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let r={...a};0===Object.keys(i).length?delete r[l]:r[l]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}},e1=async(e,t=eb)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a={...(s.ok?await s.json():{}).providerThinking||{}},i={};e&&"auto"!==e&&(i.mode=e),"codex"===l&&!0===t&&(i.fastMode=!0),0===Object.keys(i).length?delete a[l]:a[l]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},e2=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s=(t.ok?await t.json():{}).userProviderThinking||{},a=ew||"super_admin",i=s[a]||{},r=i[l]||{},o={...s,[a]:{...i,[l]:{...r,fastMode:e}}};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({userProviderThinking:o})})}catch(e){console.log("Error saving account fast mode:",e)}};(0,i.useEffect)(()=>{(async()=>{await Promise.all([eX(),eZ(),eH()])})()},[eX,eZ,eH]),(0,i.useEffect)(()=>{let e=(c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l])?.modelsFetcher;e&&u(e).then(eS)},[l]);let e5=async(e,t,s=eD)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await eZ();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},e3=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await eZ()}catch(e){console.log("Error deleting alias:",e)}},e4=async e=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},e6=()=>{eX(),O(!1)},e7=async()=>{if(!R){U(!0),z(null);try{let e=await fetch("/api/oauth/codex/refresh-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),t=await e.json();if(!e.ok&&!t?.refreshed?.length)throw Error(t.error||"Failed to refresh Codex tokens");z(t),await eX()}catch(e){z({error:e.message,refreshed:[],failed:[],skipped:[]})}finally{U(!1)}}},e8=async e=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:l,...e})})).ok&&(await eX(),M(!1))}catch(e){console.log("Error saving connection:",e)}},e9=async e=>{try{(await fetch(`/api/providers/${V.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eX(),F(!1))}catch(e){console.log("Error updating connection:",e)}},te=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tt=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],h(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 eX()}},ts=(0,i.useMemo)(()=>new Set(x.map(e=>e.id)),[x]),ta=(0,i.useMemo)(()=>eo.filter(e=>ts.has(e)),[eo,ts]),ti=x.filter(e=>ta.includes(e.id));x.length>0&&(ta.length,x.length);let tr=(()=>{if(0===ti.length)return"";let e=new Set(ti.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=$.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),tl=()=>{ep||H(!1)},to=async()=>{if(0===ta.length)return;let e="__none__"===ed?null:ed;em(!0);try{let t=[];for(let s of ta)try{let a=await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:e})});t.push(a.ok)}catch(e){console.log("Error applying bulk proxy pool for",s,e),t.push(!1)}let s=t.filter(e=>!e).length;s>0&&alert(`Updated with ${s} failed request(s).`),await eX(),en([]),ec("__none__"),H(!1)}catch(e){console.log("Error applying bulk proxy pool:",e)}finally{em(!1)}},tn=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/3 dark:divide-white/3",children:x.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(j,{connection:e,proxyPools:$,isOAuth:e_,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tt(t,t-1),onMoveDown:()=>tt(t,t+1),onToggleActive:t=>te(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(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:()=>{B(e),F(!0)},onDelete:()=>e4(e.id)})})},e.id))}),td=[{value:"__none__",label:"None"},...$.map(e=>({value:e.id,label:e.name}))],tc=0===ta.length?"Select one or more connections, then click Proxy Action.":tr,tp=ta.length>0&&!ep,tm=(0,a.jsx)(d.aF,{isOpen:W,onClose:tl,title:`Proxy Action (${ta.length} selected)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.l6,{label:"Proxy Pool",value:ed,onChange:e=>ec(e.target.value),options:td,placeholder:"None"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:tc}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Selecting None will unbind selected connections from proxy pool."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(d.$n,{onClick:to,fullWidth:!0,disabled:!tp,children:ep?"Applying...":"Apply"}),(0,a.jsx)(d.$n,{onClick:tl,variant:"ghost",fullWidth:!0,disabled:ep,children:"Cancel"})]})]})}),tx=async e=>{if(!ea){ei(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${eF}/${e}`})}),s=await t.json();ee(t=>({...t,[e]:s.ok?"ok":"error"})),es(s.ok?"":s.error||"Model not reachable")}catch{ee(t=>({...t,[e]:"error"})),es("Network error")}finally{ei(null)}}};return f?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):eE?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(o(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${eE.color}15`},children:Z?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:eE.color},children:eE.textIcon||eE.id.slice(0,2).toUpperCase()}):(0,a.jsx)(n.default,{src:ez&&eE.apiType?"responses"===eE.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":eq?"/providers/anthropic-m.png":`/providers/${eE.id}.png`,alt:eE.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>X(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:eE.name}),(eE.notice?.apiKeyUrl||eE.notice?.signupUrl||eE.website)&&(0,a.jsxs)("a",{href:eE.notice?.apiKeyUrl||eE.notice?.signupUrl||eE.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),eE.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),eE.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:eE.deprecationNotice})]}),eE.notice?.text&&!eE.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:eE.notice.text}),eE.notice.apiKeyUrl&&(0,a.jsx)("a",{href:eE.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 →"})]}),eM&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:eq?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[eq?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",eq?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>M(!0),disabled:x.length>0,className:"w-full sm:w-auto",children:"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>L(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(`Delete this ${eq?"Anthropic":"OpenAI"} Compatible node?`))try{(await fetch(`/api/provider-nodes/${l}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},className:"w-full sm:w-auto",children:"Delete"})]})]})}),eR?(0,a.jsx)(d.gw,{providerId:l}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:["codex"===l&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"Global Fast"}),(0,a.jsx)(d.lM,{checked:eb,onChange:e=>{ev(e),e1(eg,e)}})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"My Fast"}),(0,a.jsx)(d.lM,{checked:ej,onChange:e=>{eN(e),e2(e)}})]})]}),eJ&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("label",{htmlFor:"provider-default-reasoning",className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"Default Reasoning"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{id:"provider-default-reasoning",value:eg,onChange:e=>{var t;ey(t=e.target.value),e1(t)},disabled:f,className:"h-6 w-28 appearance-none rounded-full border border-border/60 bg-surface-2 pl-3 pr-7 text-xs font-medium text-text-main transition-colors focus:border-primary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:eW.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[16px] text-text-muted",children:"expand_more"})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ex,onChange:e=>{let t=e?"round-robin":null,s=e?eh||"1":eh;e&&!eh&&ef("1"),eu(t),e0(t,s)}}),"round-robin"===ex&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eh,onChange:e=>{var t;ef(t=e.target.value),e0("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===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e_?"lock":"key"})}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"})]}),!eM&&(0,a.jsxs)("div",{className:"flex gap-2",children:["iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>I(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>e_?O(!0):M(!0),children:"iflow"===l?"OAuth":"Add Connection"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>_(!0),children:"Batch Import"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"sync",variant:"secondary",onClick:e7,loading:R,children:"Refresh Tokens"})]})]}):(0,a.jsxs)(a.Fragment,{children:[tn,!eM&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>I(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>e_?O(!0):M(!0),className:"w-full sm:w-auto",children:"Add"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>_(!0),className:"w-full sm:w-auto",children:"Batch Import"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"sync",variant:"secondary",onClick:e7,loading:R,className:"w-full sm:w-auto",children:"Refresh Tokens"})]})]}),"codex"===l&&D&&(0,a.jsx)("div",{className:`mt-4 rounded-lg border px-3 py-2 text-sm ${D.error?"border-red-500/30 bg-red-500/10 text-red-600":"border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300"}`,children:D.error?D.error:`Token refresh complete: ${D.refreshed?.length||0} refreshed, ${D.failed?.length||0} failed, ${D.skipped?.length||0} skipped.`})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!eM&&(e=[...eU,...e$.filter(e=>!eU.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eT.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eT.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:eQ,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>eG(e),children:"Disable All"})]}))]}),!!et&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 wrap-break-word",children:et}),(()=>{let e,t,s;if(eM)return(0,a.jsx)(b,{providerStorageAlias:eF,providerDisplayAlias:eK,modelAliases:G,copied:eP,onCopy:eI,onSetAlias:e5,onDeleteAlias:e3,connections:x,isAnthropic:eq});let i=[...eU,...e$.filter(e=>!eU.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),r=new Set(eT),o=i.filter(e=>!r.has(e.id)),n=i.filter(e=>r.has(e.id)),d=Object.entries(G).filter(([e,t])=>{let s=`${eF}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return eE.passthroughModels?!eU.some(e=>e.id===a):!eU.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${eF}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(g,{model:{id:e.id},fullModel:`${eK}/${e.id}`,displayModel:eL?e.id:`${eK}/${e.id}`,alias:e.alias,copied:eP,onCopy:eI,onSetAlias:()=>{},onDeleteAlias:()=>e3(e.alias),testStatus:Y[e.id],onTest:x.length>0||eR?()=>tx(e.id):void 0,isTesting:ea===e.id,isCustom:!0,isFree:!1},e.id)),o.map(e=>{let t=`${eF}/${e.id}`,s=`${l}/${e.id}`,i=Object.entries(G).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(g,{model:e,fullModel:`${eK}/${e.id}`,displayModel:eL?e.id:`${eK}/${e.id}`,alias:i,copied:eP,onCopy:eI,onSetAlias:t=>e5(e.id,t,eF),onDeleteAlias:()=>e3(i),testStatus:Y[e.id],onTest:x.length>0||eR?()=>tx(e.id):void 0,isTesting:ea===e.id,isFree:e.isFree,onDisable:()=>eV(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>el(!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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eC.length>0&&(e=new Set(Object.values(G)),t=new Set(eU.map(e=>e.id)),0===(s=eC.filter(s=>!e.has(`${eF}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await e5(e.id,t,eF)},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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("button",{onClick:()=>eB(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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tm,"kiro"===l?(0,a.jsx)(d.Mh,{isOpen:T,providerInfo:eE,onSuccess:e6,onClose:()=>O(!1)}):"cursor"===l?(0,a.jsx)(d.G9,{isOpen:T,onSuccess:e6,onClose:()=>O(!1)}):"gitlab"===l?(0,a.jsx)(d.vj,{isOpen:T,providerInfo:eE,onSuccess:e6,onClose:()=>O(!1)}):(0,a.jsx)(d.LF,{isOpen:T,provider:l,providerInfo:eE,onSuccess:e6,onClose:()=>O(!1)}),"iflow"===l&&(0,a.jsx)(d.vE,{isOpen:P,onSuccess:()=>{eX(),I(!1)},onClose:()=>I(!1)}),"codex"===l&&(0,a.jsx)(S,{isOpen:E,onSuccess:eX,onClose:()=>_(!1)}),(0,a.jsx)(w,{isOpen:q,provider:l,providerName:eE.name,isCompatible:eM,isAnthropic:eq,authType:eE?.authType,authHint:eE?.authHint,website:eE?.website,proxyPools:$,onSave:e8,onClose:()=>M(!1)}),(0,a.jsx)(d.wI,{isOpen:J,connection:V,proxyPools:$,onSave:e9,onClose:()=>F(!1)}),eM&&(0,a.jsx)(k,{isOpen:K,node:v,onSave:eY,onClose:()=>L(!1),isAnthropic:eq}),!eM&&(0,a.jsx)(C,{isOpen:er,providerAlias:eF,providerDisplayAlias:eK,onSave:async e=>{let t=eE?.passthroughModels?e.split("/").pop():e;await e5(e,t,eF),el(!1)},onClose:()=>el(!1)})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(o(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}w.propTypes={isOpen:f().bool.isRequired,provider:f().string,providerName:f().string,isCompatible:f().bool,isAnthropic:f().bool,authType:f().string,authHint:f().string,website:f().string,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string})),onSave:f().func.isRequired,onBulkDone:f().func,onClose:f().func.isRequired},k.propTypes={isOpen:f().bool.isRequired,node:f().shape({id:f().string,name:f().string,prefix:f().string,apiType:f().string,baseUrl:f().string}),onSave:f().func.isRequired,onClose:f().func.isRequired,isAnthropic:f().bool},C.propTypes={isOpen:f().bool.isRequired,providerAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,onSave:f().func.isRequired,onClose:f().func.isRequired},S.propTypes={isOpen:f().bool.isRequired,onClose:f().func.isRequired,onSuccess:f().func}},53655:(e,t,s)=>{Promise.resolve().then(s.bind(s,7570))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=53655)),_N_E=e.O()}]);
|
|
3
|
+
sk-...`;function w({isOpen:e,provider:t,providerName:s,isCompatible:r,isAnthropic:l,authType:o,authHint:n,website:c,proxyPools:p,onSave:m,onBulkDone:x,onClose:u}){let h="__none__",f="ollama-local"===t,g="cookie"===o,y=g?"Cookie Value":"API Key",b=g?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":"",v="azure"===t,j="cloudflare-ai"===t,[k,C]=(0,i.useState)({name:"",apiKey:"",priority:1,proxyPoolId:h,ollamaHostUrl:""}),[S,$]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[A,T]=(0,i.useState)({accountId:""}),[O,P]=(0,i.useState)(!1),[I,E]=(0,i.useState)(null),[_,R]=(0,i.useState)(!1),[U,D]=(0,i.useState)("single"),[z,q]=(0,i.useState)(""),[M,J]=(0,i.useState)(null),F=f?"Ollama Local":g?`${s||t} Cookie`:"Production Key";(0,i.useEffect)(()=>{e&&(C({name:r?F:"",apiKey:"",priority:1,proxyPoolId:h,ollamaHostUrl:""}),$({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),T({accountId:""}),P(!1),E(null),R(!1),D("single"),q(""),J(null))},[F,r,e]);let K=()=>f&&k.ollamaHostUrl.trim()?{baseUrl:k.ollamaHostUrl.trim()}:v?{azureEndpoint:S.azureEndpoint,apiVersion:S.apiVersion,deployment:S.deployment,organization:S.organization}:j?{accountId:A.accountId}:void 0,L=async()=>{P(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:k.apiKey,providerSpecificData:K()})}),s=await e.json();E(s.valid?"success":"failed")}catch{E("failed")}finally{P(!1)}},W=async()=>{if(!t||!f&&!k.apiKey)return;let e=k.name.trim()||F;R(!0);try{let s=!1;try{P(!0),E(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:k.apiKey,providerSpecificData:K()})});s=!!(await e.json()).valid,E(s?"success":"failed")}catch{E("failed")}finally{P(!1)}await m({name:e,apiKey:k.apiKey,priority:k.priority,proxyPoolId:k.proxyPoolId===h?null:k.proxyPoolId,testStatus:s?"active":"unknown",providerSpecificData:K()})}finally{R(!1)}},H=async()=>{let e=z.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;R(!0),J(null);let s=0,a=0;for(let i=0;i<e.length;i++){let r=e[i].split("|"),l=r.length>=2?r.slice(1).join("|").trim():r[0].trim(),o=r.length>=2?r[0].trim():"Key",n=`${o} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:l,name:n,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}R(!1),J({success:s,failed:a}),s>0&&x&&x()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${y}`,onClose:u,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===U?"primary":"ghost",onClick:()=>{D("single"),J(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===U?"primary":"ghost",onClick:()=>{D("bulk"),J(null)},children:"Bulk Add"})]}),"bulk"===U&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.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:N,value:z,onChange:e=>q(e.target.value)}),M&&(0,a.jsxs)("div",{className:`text-sm font-medium ${M.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",M.success," added",M.failed>0?`, ✗ ${M.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:H,fullWidth:!0,disabled:_||!z.trim(),children:_?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:u,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===U&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:k.name,onChange:e=>C({...k,name:e.target.value}),placeholder:F}),f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:k.ollamaHostUrl,onChange:e=>C({...k,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:L,disabled:O||_,variant:"secondary",children:O?"Checking...":"Check"})})]}),!f&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:y,type:g?"text":"password",value:k.apiKey,onChange:e=>C({...k,apiKey:e.target.value}),placeholder:b,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:L,disabled:!k.apiKey||O||_,variant:"secondary",children:O?"Checking...":"Check"})})]}),g&&n&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[n,c&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",c.replace(/^https?:\/\//,"")]})]})]}),f&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),I&&(0,a.jsx)(d.Ex,{variant:"success"===I?"success":"error",children:"success"===I?"Valid":"Invalid"}),r&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:l?`Validation checks ${s||"Anthropic Compatible"} by verifying the API key.`:`Validation checks ${s||"OpenAI Compatible"} via /models on your base URL.`}),j&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:A.accountId,onChange:e=>T({...A,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),v&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:S.azureEndpoint,onChange:e=>$({...S,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:S.deployment,onChange:e=>$({...S,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:S.apiVersion,onChange:e=>$({...S,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:S.organization,onChange:e=>$({...S,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:k.priority,onChange:e=>C({...k,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:k.proxyPoolId,onChange:e=>C({...k,proxyPoolId:e.target.value}),options:[{value:h,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:W,fullWidth:!0,disabled:_||!f&&!k.apiKey||v&&(!S.azureEndpoint||!S.deployment||!S.organization)||j&&!A.accountId,children:_?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:u,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function k({isOpen:e,node:t,onSave:s,onClose:r,isAnthropic:l}){let[o,n]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&n({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(l?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,l]);let v=async()=>{if(o.name.trim()&&o.prefix.trim()&&o.baseUrl.trim()){p(!0);try{let e={name:o.name,prefix:o.prefix,baseUrl:o.baseUrl};l||(e.apiType=o.apiType),await s(e)}finally{p(!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:o.baseUrl,apiKey:m,type:l?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${l?"Anthropic":"OpenAI"} Compatible`,onClose:r,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:`${l?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:o.prefix,onChange:e=>n({...o,prefix:e.target.value}),placeholder:l?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!l&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:o.apiType,onChange:e=>n({...o,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:o.baseUrl,onChange:e=>n({...o,baseUrl:e.target.value}),placeholder:l?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${l?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!o.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,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,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!o.name.trim()||!o.prefix.trim()||!o.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function C({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:r,onClose:l}){var o;let n,[c,p]=(0,i.useState)(""),[m,x]=(0,i.useState)(null),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(p(""),x(null),h(""),g(!1))},[e]);let y=(o=c.trim(),n=`${t}/`,o.startsWith(n)?o.slice(n.length):o),b=async()=>{if(y){x("testing"),h("");try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${y}`})}),s=await e.json();x(s.ok?"ok":"error"),h(s.error||"")}catch(e){x("error"),h(e.message)}}},v=async()=>{if(y&&!f){g(!0);try{await r(y)}finally{g(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:l,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:c,onChange:e=>{p(e.target.value),x(null),h("")},onKeyDown:e=>{"Enter"===e.key&&b()},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,a.jsx)(d.$n,{type:"button",variant:"secondary",icon:"science",loading:"testing"===m,onClick:b,disabled:!y||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:y||"model-id"})]})]}),"ok"===m&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:u||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{type:"button",onClick:l,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{type:"button",onClick:v,fullWidth:!0,size:"sm",disabled:!y||f,children:f?"Adding...":"Add Model"})]})]})})}function S({isOpen:e,onClose:t,onSuccess:s}){let[r,l]=(0,i.useState)([]),[o,n]=(0,i.useState)(""),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(null),[u,h]=(0,i.useState)(null),f=()=>{l([]),n(""),x(null),h(null),t()},g=async()=>{p(!0),x(null),h(null);try{let e=await Promise.all(r.map(async e=>({filename:e.name,jsonText:await e.text()}))),t=o.trim()?[{filename:"pasted JSON",jsonText:o.trim()}]:[],a=[...e,...t];if(0===a.length)throw Error("Select JSON files or paste JSON first");let i=await fetch("/api/oauth/codex/import-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:a})}),l=await i.json();if(!i.ok)throw Error(l.error||"Failed to import accounts");x(l),l.imported?.length>0&&s?.()}catch(e){h(e.message||"Failed to import accounts")}finally{p(!1)}},y=m?.imported?.length||0,b=m?.skipped?.length||0;return(0,a.jsx)(d.aF,{isOpen:e,title:"Import Codex Accounts",onClose:f,size:"lg",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/50 p-3",children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium",children:"JSON files"}),(0,a.jsx)("input",{type:"file",accept:".json,application/json",multiple:!0,onChange:e=>l(Array.from(e.target.files||[])),className:"block w-full text-sm text-text-muted file:mr-3 file:rounded-md file:border-0 file:bg-primary file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-white hover:file:bg-primary/90"}),r.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(e=>(0,a.jsx)("span",{className:"rounded bg-primary/10 px-2 py-0.5 text-xs text-primary",children:e.name},`${e.name}-${e.size}`))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium",children:"Paste JSON"}),(0,a.jsx)("textarea",{value:o,onChange:e=>n(e.target.value),placeholder:'[{ "type": "codex", "access_token": "...", "refresh_token": "..." }]',className:"h-36 w-full resize-none rounded-md border border-black/10 bg-white px-3 py-2 font-mono text-xs text-text-main shadow-inner transition-all placeholder-text-muted/60 focus:border-primary/50 focus:outline-none focus:ring-1 focus:ring-primary/30 dark:border-white/10 dark:bg-white/5"})]}),(0,a.jsx)("div",{className:"rounded-lg border border-border bg-background/60 px-3 py-2 text-xs text-text-muted",children:"Auto-detects Codex Session JSON, CLI Proxy API Auth JSON, and Sub2API JSON."}),u&&(0,a.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-600",children:u}),m&&(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/40 p-3",children:[(0,a.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsxs)("span",{className:"font-medium text-green-600",children:[y," imported"]}),b>0&&(0,a.jsxs)("span",{className:"text-text-muted",children:[b," skipped"]})]}),m.imported?.length>0&&(0,a.jsx)("div",{className:"max-h-32 overflow-auto rounded border border-border/70",children:m.imported.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border/70 px-2 py-1.5 last:border-b-0",children:[(0,a.jsx)("span",{className:"min-w-0 truncate text-xs",children:e.email||e.displayName||e.name||e.id}),(0,a.jsx)("span",{className:"shrink-0 text-xs text-text-muted",children:e.sourceFormat})]},e.id))}),m.skipped?.length>0&&(0,a.jsx)("div",{className:"mt-2 max-h-28 overflow-auto rounded border border-border/70",children:m.skipped.map((e,t)=>(0,a.jsxs)("div",{className:"border-b border-border/70 px-2 py-1.5 text-xs last:border-b-0",children:[(0,a.jsx)("span",{className:"font-medium",children:e.filename}),(0,a.jsxs)("span",{className:"text-text-muted",children:[" \xb7 ",e.reason]})]},`${e.filename}-${t}`))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:g,loading:c,disabled:c||!r.length&&!o.trim(),fullWidth:!0,children:"Import"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Close"})]})]})})}function $(){let e,t=(0,r.useParams)(),s=(0,r.useRouter)(),l=t.id,[x,h]=(0,i.useState)([]),[f,y]=(0,i.useState)(!0),[v,N]=(0,i.useState)(null),[$,A]=(0,i.useState)([]),[T,O]=(0,i.useState)(!1),[P,I]=(0,i.useState)(!1),[E,_]=(0,i.useState)(!1),[R,U]=(0,i.useState)(!1),[D,z]=(0,i.useState)(null),[q,M]=(0,i.useState)(!1),[J,F]=(0,i.useState)(!1),[K,L]=(0,i.useState)(!1),[W,H]=(0,i.useState)(!1),[V,B]=(0,i.useState)(null),[G,Q]=(0,i.useState)({}),[Z,X]=(0,i.useState)(!1),[Y,ee]=(0,i.useState)({}),[et,es]=(0,i.useState)(""),[ea,ei]=(0,i.useState)(null),[er,el]=(0,i.useState)(!1),[eo,en]=(0,i.useState)([]),[ed,ec]=(0,i.useState)("__none__"),[ep,em]=(0,i.useState)(!1),[ex,eu]=(0,i.useState)(null),[eh,ef]=(0,i.useState)(""),[eg,ey]=(0,i.useState)("auto"),[eb,ev]=(0,i.useState)(!1),[ej,eN]=(0,i.useState)(!1),[ew,ek]=(0,i.useState)("super_admin"),[eC,eS]=(0,i.useState)([]),[e$,eA]=(0,i.useState)([]),[eT,eO]=(0,i.useState)([]),{copied:eP,copy:eI}=(0,m.C)(),eE=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l]||c.br[l],e_=!!c.zN[l]||!!c.IS[l],eR=!!c.IS[l]?.noAuth,eU=(0,p.KC)(l),eD=(0,c.wG)(l),ez=(0,c.mq)(l),eq=(0,c.gb)(l),eM=ez||eq,eJ=c.Q2[l]?.thinkingConfig||null,eF=eM?l:eD,eK=eM?v?.prefix||l:eD,eL="codex"===l,eW=(eJ?.options||[]).map(e=>({value:e,label:"auto"===e?"codex"===l?"Auto (Medium)":"Auto":"xhigh"===e?"XHigh":e.charAt(0).toUpperCase()+e.slice(1)})),eH=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(eF)}`,{cache:"no-store"}),t=await e.json();e.ok&&eO(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[eF]),eV=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:eF,ids:[e]})})).ok&&await eH()}catch(e){console.log("Error disabling model:",e)}},eB=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(eF)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await eH()}catch(e){console.log("Error enabling model:",e)}},eG=async e=>{if(e.length&&confirm(`Disable all ${e.length} model(s)?`))try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:eF,ids:e})})).ok&&await eH()}catch(e){console.log("Error disabling all models:",e)}},eQ=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(eF)}`,{method:"DELETE"})).ok&&await eH()}catch(e){console.log("Error enabling all models:",e)}},eZ=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&Q(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===l&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eA(e.models)}).catch(()=>{})},[l]);let eX=(0,i.useCallback)(async()=>{try{let[e,t,s,a,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"}),fetch("/api/auth/me",{cache:"no-store"})]),r=await e.json(),o=await t.json(),n=await s.json(),d=a.ok?await a.json():{},c=i.ok?await i.json():{};if(e.ok){let e=(r.connections||[]).filter(e=>e.provider===l);h(e)}s.ok&&A(n.proxyPools||[]);let p=(d.providerStrategies||{})[l]||{};eu(p.fallbackStrategy||null),ef(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1");let m=(d.providerThinking||{})[l]||{},x=c.providerThinkingScopeKey||c.userId||"super_admin",u="sub_user"===c.role?(c.providerThinking||{})[l]||{}:(d.userProviderThinking||{})[x]?.[l]||{};if(ey(m.mode||"auto"),ev(!0===m.fastMode),ek(x),eN(Object.prototype.hasOwnProperty.call(u,"fastMode")?!0===u.fastMode:!0===m.fastMode),t.ok){let e=(o.nodes||[]).find(e=>e.id===l)||null;if(!e&&eM)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===l)||null))break}N(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[l,eM]),eY=async e=>{try{let t=await fetch(`/api/provider-nodes/${l}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(N(s.node),await eX(),L(!1))}catch(e){console.log("Error updating provider node:",e)}},e0=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let r={...a};0===Object.keys(i).length?delete r[l]:r[l]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}},e1=async(e,t=eb)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a={...(s.ok?await s.json():{}).providerThinking||{}},i={};e&&"auto"!==e&&(i.mode=e),"codex"===l&&!0===t&&(i.fastMode=!0),0===Object.keys(i).length?delete a[l]:a[l]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},e2=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s=(t.ok?await t.json():{}).userProviderThinking||{},a=ew||"super_admin",i=s[a]||{},r=i[l]||{},o={...s,[a]:{...i,[l]:{...r,fastMode:e}}};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({userProviderThinking:o})})}catch(e){console.log("Error saving account fast mode:",e)}};(0,i.useEffect)(()=>{(async()=>{await Promise.all([eX(),eZ(),eH()])})()},[eX,eZ,eH]),(0,i.useEffect)(()=>{let e=(c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l])?.modelsFetcher;e&&u(e).then(eS)},[l]);let e5=async(e,t,s=eD)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await eZ();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},e3=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await eZ()}catch(e){console.log("Error deleting alias:",e)}},e4=async e=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},e6=()=>{eX(),O(!1)},e7=async()=>{if(!R){U(!0),z(null);try{let e=await fetch("/api/oauth/codex/refresh-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),t=await e.json();if(!e.ok&&!t?.refreshed?.length)throw Error(t.error||"Failed to refresh Codex tokens");z(t),await eX()}catch(e){z({error:e.message,refreshed:[],failed:[],skipped:[]})}finally{U(!1)}}},e8=async e=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:l,...e})})).ok&&(await eX(),M(!1))}catch(e){console.log("Error saving connection:",e)}},e9=async e=>{try{(await fetch(`/api/providers/${V.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eX(),F(!1))}catch(e){console.log("Error updating connection:",e)}},te=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tt=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],h(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 eX()}},ts=(0,i.useMemo)(()=>new Set(x.map(e=>e.id)),[x]),ta=(0,i.useMemo)(()=>eo.filter(e=>ts.has(e)),[eo,ts]),ti=x.filter(e=>ta.includes(e.id));x.length>0&&(ta.length,x.length);let tr=(()=>{if(0===ti.length)return"";let e=new Set(ti.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=$.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),tl=()=>{ep||H(!1)},to=async()=>{if(0===ta.length)return;let e="__none__"===ed?null:ed;em(!0);try{let t=[];for(let s of ta)try{let a=await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:e})});t.push(a.ok)}catch(e){console.log("Error applying bulk proxy pool for",s,e),t.push(!1)}let s=t.filter(e=>!e).length;s>0&&alert(`Updated with ${s} failed request(s).`),await eX(),en([]),ec("__none__"),H(!1)}catch(e){console.log("Error applying bulk proxy pool:",e)}finally{em(!1)}},tn=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/3 dark:divide-white/3",children:x.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(j,{connection:e,proxyPools:$,isOAuth:e_,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tt(t,t-1),onMoveDown:()=>tt(t,t+1),onToggleActive:t=>te(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(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:()=>{B(e),F(!0)},onDelete:()=>e4(e.id)})})},e.id))}),td=[{value:"__none__",label:"None"},...$.map(e=>({value:e.id,label:e.name}))],tc=0===ta.length?"Select one or more connections, then click Proxy Action.":tr,tp=ta.length>0&&!ep,tm=(0,a.jsx)(d.aF,{isOpen:W,onClose:tl,title:`Proxy Action (${ta.length} selected)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.l6,{label:"Proxy Pool",value:ed,onChange:e=>ec(e.target.value),options:td,placeholder:"None"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:tc}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Selecting None will unbind selected connections from proxy pool."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(d.$n,{onClick:to,fullWidth:!0,disabled:!tp,children:ep?"Applying...":"Apply"}),(0,a.jsx)(d.$n,{onClick:tl,variant:"ghost",fullWidth:!0,disabled:ep,children:"Cancel"})]})]})}),tx=async e=>{if(!ea){ei(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${eF}/${e}`})}),s=await t.json();ee(t=>({...t,[e]:s.ok?"ok":"error"})),es(s.ok?"":s.error||"Model not reachable")}catch{ee(t=>({...t,[e]:"error"})),es("Network error")}finally{ei(null)}}};return f?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):eE?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(o(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${eE.color}15`},children:Z?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:eE.color},children:eE.textIcon||eE.id.slice(0,2).toUpperCase()}):(0,a.jsx)(n.default,{src:ez&&eE.apiType?"responses"===eE.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":eq?"/providers/anthropic-m.png":`/providers/${eE.id}.png`,alt:eE.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>X(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:eE.name}),(eE.notice?.apiKeyUrl||eE.notice?.signupUrl||eE.website)&&(0,a.jsxs)("a",{href:eE.notice?.apiKeyUrl||eE.notice?.signupUrl||eE.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),eE.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),eE.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:eE.deprecationNotice})]}),eE.notice?.text&&!eE.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:eE.notice.text}),eE.notice.apiKeyUrl&&(0,a.jsx)("a",{href:eE.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 →"})]}),eM&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:eq?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[eq?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",eq?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>M(!0),disabled:x.length>0,className:"w-full sm:w-auto",children:"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>L(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(`Delete this ${eq?"Anthropic":"OpenAI"} Compatible node?`))try{(await fetch(`/api/provider-nodes/${l}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},className:"w-full sm:w-auto",children:"Delete"})]})]})}),eR?(0,a.jsx)(d.gw,{providerId:l}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:["codex"===l&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"Global Fast"}),(0,a.jsx)(d.lM,{checked:eb,onChange:e=>{ev(e),e1(eg,e)}})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"My Fast"}),(0,a.jsx)(d.lM,{checked:ej,onChange:e=>{eN(e),e2(e)}})]})]}),eJ&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("label",{htmlFor:"provider-default-reasoning",className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"Default Reasoning"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{id:"provider-default-reasoning",value:eg,onChange:e=>{var t;ey(t=e.target.value),e1(t)},disabled:f,className:"h-6 w-28 appearance-none rounded-full border border-border/60 bg-surface-2 pl-3 pr-7 text-xs font-medium text-text-main transition-colors focus:border-primary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:eW.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[16px] text-text-muted",children:"expand_more"})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ex,onChange:e=>{let t=e?"round-robin":null,s=e?eh||"1":eh;e&&!eh&&ef("1"),eu(t),e0(t,s)}}),"round-robin"===ex&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eh,onChange:e=>{var t;ef(t=e.target.value),e0("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===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e_?"lock":"key"})}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"})]}),!eM&&(0,a.jsxs)("div",{className:"flex gap-2",children:["iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>I(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>e_?O(!0):M(!0),children:"iflow"===l?"OAuth":"Add Connection"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>_(!0),children:"Batch Import"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"sync",variant:"secondary",onClick:e7,loading:R,children:"Refresh Tokens"})]})]}):(0,a.jsxs)(a.Fragment,{children:[tn,!eM&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>I(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>e_?O(!0):M(!0),className:"w-full sm:w-auto",children:"Add"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>_(!0),className:"w-full sm:w-auto",children:"Batch Import"}),"codex"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"sync",variant:"secondary",onClick:e7,loading:R,className:"w-full sm:w-auto",children:"Refresh Tokens"})]})]}),"codex"===l&&D&&(0,a.jsx)("div",{className:`mt-4 rounded-lg border px-3 py-2 text-sm ${D.error?"border-red-500/30 bg-red-500/10 text-red-600":"border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300"}`,children:D.error?D.error:`Token refresh complete: ${D.refreshed?.length||0} refreshed, ${D.failed?.length||0} failed, ${D.skipped?.length||0} skipped.`})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!eM&&(e=[...eU,...e$.filter(e=>!eU.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eT.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eT.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:eQ,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>eG(e),children:"Disable All"})]}))]}),!!et&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 wrap-break-word",children:et}),(()=>{let e,t,s;if(eM)return(0,a.jsx)(b,{providerStorageAlias:eF,providerDisplayAlias:eK,modelAliases:G,copied:eP,onCopy:eI,onSetAlias:e5,onDeleteAlias:e3,connections:x,isAnthropic:eq});let i=[...eU,...e$.filter(e=>!eU.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),r=new Set(eT),o=i.filter(e=>!r.has(e.id)),n=i.filter(e=>r.has(e.id)),d=Object.entries(G).filter(([e,t])=>{let s=`${eF}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return eE.passthroughModels?!eU.some(e=>e.id===a):!eU.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${eF}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(g,{model:{id:e.id},fullModel:`${eK}/${e.id}`,displayModel:eL?e.id:`${eK}/${e.id}`,alias:e.alias,copied:eP,onCopy:eI,onSetAlias:()=>{},onDeleteAlias:()=>e3(e.alias),testStatus:Y[e.id],onTest:x.length>0||eR?()=>tx(e.id):void 0,isTesting:ea===e.id,isCustom:!0,isFree:!1},e.id)),o.map(e=>{let t=`${eF}/${e.id}`,s=`${l}/${e.id}`,i=Object.entries(G).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(g,{model:e,fullModel:`${eK}/${e.id}`,displayModel:eL?e.id:`${eK}/${e.id}`,alias:i,copied:eP,onCopy:eI,onSetAlias:t=>e5(e.id,t,eF),onDeleteAlias:()=>e3(i),testStatus:Y[e.id],onTest:x.length>0||eR?()=>tx(e.id):void 0,isTesting:ea===e.id,isFree:e.isFree,onDisable:()=>eV(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>el(!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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eC.length>0&&(e=new Set(Object.values(G)),t=new Set(eU.map(e=>e.id)),0===(s=eC.filter(s=>!e.has(`${eF}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await e5(e.id,t,eF)},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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("button",{onClick:()=>eB(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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tm,"kiro"===l?(0,a.jsx)(d.Mh,{isOpen:T,providerInfo:eE,onSuccess:e6,onClose:()=>O(!1)}):"cursor"===l?(0,a.jsx)(d.G9,{isOpen:T,onSuccess:e6,onClose:()=>O(!1)}):"gitlab"===l?(0,a.jsx)(d.vj,{isOpen:T,providerInfo:eE,onSuccess:e6,onClose:()=>O(!1)}):(0,a.jsx)(d.LF,{isOpen:T,provider:l,providerInfo:eE,onSuccess:e6,onClose:()=>O(!1)}),"iflow"===l&&(0,a.jsx)(d.vE,{isOpen:P,onSuccess:()=>{eX(),I(!1)},onClose:()=>I(!1)}),"codex"===l&&(0,a.jsx)(S,{isOpen:E,onSuccess:eX,onClose:()=>_(!1)}),(0,a.jsx)(w,{isOpen:q,provider:l,providerName:eE.name,isCompatible:eM,isAnthropic:eq,authType:eE?.authType,authHint:eE?.authHint,website:eE?.website,proxyPools:$,onSave:e8,onClose:()=>M(!1)}),(0,a.jsx)(d.wI,{isOpen:J,connection:V,proxyPools:$,onSave:e9,onClose:()=>F(!1)}),eM&&(0,a.jsx)(k,{isOpen:K,node:v,onSave:eY,onClose:()=>L(!1),isAnthropic:eq}),!eM&&(0,a.jsx)(C,{isOpen:er,providerAlias:eF,providerDisplayAlias:eK,onSave:async e=>{let t=eE?.passthroughModels?e.split("/").pop():e;await e5(e,t,eF),el(!1)},onClose:()=>el(!1)})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(o(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}w.propTypes={isOpen:f().bool.isRequired,provider:f().string,providerName:f().string,isCompatible:f().bool,isAnthropic:f().bool,authType:f().string,authHint:f().string,website:f().string,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string})),onSave:f().func.isRequired,onBulkDone:f().func,onClose:f().func.isRequired},k.propTypes={isOpen:f().bool.isRequired,node:f().shape({id:f().string,name:f().string,prefix:f().string,apiType:f().string,baseUrl:f().string}),onSave:f().func.isRequired,onClose:f().func.isRequired,isAnthropic:f().bool},C.propTypes={isOpen:f().bool.isRequired,providerAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,onSave:f().func.isRequired,onClose:f().func.isRequired},S.propTypes={isOpen:f().bool.isRequired,onClose:f().func.isRequired,onSuccess:f().func}},29610:(e,t,s)=>{Promise.resolve().then(s.bind(s,7570))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=29610)),_N_E=e.O()}]);
|