9router 0.2.84 → 0.2.87
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/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +33 -30
- package/app/.next/build-manifest.json +6 -6
- package/app/.next/react-loadable-manifest.json +2 -2
- package/app/.next/routes-manifest.json +18 -0
- 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 +1 -1
- 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/endpoint/page.js +1 -1
- 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/page.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/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/_global-error/page.js +2 -2
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +7 -7
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +3 -3
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +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 +10 -10
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +10 -10
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- 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 +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- 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/route.js +3 -3
- 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/claude-settings/route_client-reference-manifest.js +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/droid-settings/route_client-reference-manifest.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/cloud/auth/route_client-reference-manifest.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_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.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_client-reference-manifest.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/route.js +1 -1
- package/app/.next/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- 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 +1 -1
- 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/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_client-reference-manifest.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_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_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.js.nft.json +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/client/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.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -0
- package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -0
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -0
- 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/settings/require-login/route_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.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_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/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/chart/route.js +1 -0
- package/app/.next/server/app/api/usage/chart/route.js.nft.json +1 -0
- package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -0
- 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/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/stream/route.js +3 -0
- package/app/.next/server/app/api/usage/stream/route.js.nft.json +1 -0
- package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +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/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +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.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.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.js.nft.json +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/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js.nft.json +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/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +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_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.js.nft.json +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.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +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 +12 -12
- package/app/.next/server/app/callback.segments/_full.segment.rsc +12 -12
- package/app/.next/server/app/callback.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/callback.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +13 -12
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +13 -12
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +14 -13
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +14 -13
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +13 -12
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +13 -12
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +14 -13
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +14 -13
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +14 -13
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +14 -13
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +14 -13
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +14 -13
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard/settings/pricing/page.js +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 +12 -12
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +12 -12
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +4 -4
- 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 +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/translator.html +1 -1
- package/app/.next/server/app/dashboard/translator.rsc +14 -13
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +14 -13
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +14 -13
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +14 -13
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/dashboard.html +1 -1
- package/app/.next/server/app/dashboard.rsc +13 -12
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -4
- package/app/.next/server/app/dashboard.segments/_full.segment.rsc +13 -12
- package/app/.next/server/app/dashboard.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +10 -10
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/index.segments/_full.segment.rsc +10 -10
- package/app/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page.js +2 -2
- 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 +12 -12
- package/app/.next/server/app/landing.segments/_full.segment.rsc +12 -12
- package/app/.next/server/app/landing.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/landing.segment.rsc +3 -3
- package/app/.next/server/app/login/page.js +1 -1
- 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 +13 -12
- package/app/.next/server/app/login.segments/_full.segment.rsc +13 -12
- package/app/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_tree.segment.rsc +3 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +5 -4
- package/app/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +33 -30
- package/app/.next/server/chunks/1164.js +1 -1
- package/app/.next/server/chunks/1638.js +1 -0
- package/app/.next/server/chunks/2243.js +1 -0
- package/app/.next/server/chunks/3110.js +3 -3
- package/app/.next/server/chunks/3919.js +1 -1
- package/app/.next/server/chunks/3990.js +2 -2
- package/app/.next/server/chunks/412.js +2 -2
- package/app/.next/server/chunks/4822.js +1 -1
- package/app/.next/server/chunks/5330.js +2 -2
- package/app/.next/server/chunks/6943.js +1 -0
- package/app/.next/server/chunks/7341.js +1 -1
- package/app/.next/server/chunks/7471.js +4 -4
- package/app/.next/server/chunks/7647.js +1 -1
- package/app/.next/server/chunks/8647.js +1 -0
- package/app/.next/server/chunks/8954.js +1 -1
- package/app/.next/server/chunks/9489.js +4 -4
- package/app/.next/server/chunks/9718.js +1 -1
- package/app/.next/server/chunks/9862.js +3 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/static/chunks/1393-5b60aa357f848139.js +3 -0
- package/app/.next/static/chunks/1672-4ed8fbaefe011b6e.js +1 -0
- package/app/.next/static/chunks/3794-c67589461d449d62.js +2 -0
- package/app/.next/static/chunks/4bd1b696-e5d7c65570c947b7.js +1 -0
- package/app/.next/static/chunks/5497-825dd88e0a663cfe.js +7 -0
- package/app/.next/static/chunks/600-3e3d52de0d15664e.js +3 -0
- package/app/.next/static/chunks/8202.c5f295182187a1e0.js +1 -0
- package/app/.next/static/chunks/8729-4d9f5ebc26ea7fb5.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8a7d7ab7f43677a0.js → page-d5e2be111394971e.js} +3 -3
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-053910552f8141ec.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-970e1ec0511819ea.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-16377aded5ab54f4.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-6daa1079e32e8e4d.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-ccad74632e355e04.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-133c3e673c6fd026.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-dbe1b90d188f366c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-ae0ac756433907e6.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-694743ad2b6f145b.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/layout-66d69a4ba6e79bd5.js +1 -0
- package/app/.next/static/chunks/app/_global-error/page-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/_not-found/page-3396db0e61e07183.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/sync/cloud/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/sync/initialize/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/usage/chart/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/usage/providers/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-details/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/usage/stream/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/app/callback/page-358b85864d879fcc.js +1 -0
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-ffe0e1792e93168b.js +1 -0
- package/app/.next/static/chunks/app/landing/page-9988533823669cfc.js +1 -0
- package/app/.next/static/chunks/app/layout-a9ae8d014d5d7102.js +1 -0
- package/app/.next/static/chunks/app/login/page-62fed427ad312406.js +1 -0
- package/app/.next/static/chunks/app/page-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/c6123951-59125299ca0d7b46.js +1 -0
- package/app/.next/static/chunks/framework-9f63a52f5ba18ac8.js +1 -0
- package/app/.next/static/chunks/main-aab9e1b069a77e0f.js +5 -0
- package/app/.next/static/chunks/main-app-8803a230dfc5c361.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-f740e7b53cfd899a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d1d78f0818dfa7f5.js +1 -0
- package/app/.next/static/chunks/webpack-25c43999146c934e.js +1 -0
- package/app/.next/static/css/599369d853c61df7.css +31 -0
- package/app/.next/static/css/6a76c1062906da03.css +3 -0
- package/app/.next/static/jWN0ATVbXrki9UzHFr5nv/_buildManifest.js +1 -0
- 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/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/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/selectlist.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 +1 -1
- package/app/node_modules/react/cjs/react.production.js +1 -1
- package/app/node_modules/react/package.json +1 -1
- package/app/node_modules/semver/classes/comparator.js +143 -0
- package/app/node_modules/semver/classes/range.js +557 -0
- package/app/node_modules/semver/classes/semver.js +333 -0
- package/app/node_modules/semver/functions/cmp.js +54 -0
- package/app/node_modules/semver/functions/coerce.js +62 -0
- package/app/node_modules/semver/functions/compare.js +7 -0
- package/app/node_modules/semver/functions/eq.js +5 -0
- package/app/node_modules/semver/functions/gt.js +5 -0
- package/app/node_modules/semver/functions/gte.js +5 -0
- package/app/node_modules/semver/functions/lt.js +5 -0
- package/app/node_modules/semver/functions/lte.js +5 -0
- package/app/node_modules/semver/functions/neq.js +5 -0
- package/app/node_modules/semver/functions/parse.js +18 -0
- package/app/node_modules/semver/functions/satisfies.js +12 -0
- package/app/node_modules/semver/internal/constants.js +37 -0
- package/app/node_modules/semver/internal/debug.js +11 -0
- package/app/node_modules/semver/internal/identifiers.js +29 -0
- package/app/node_modules/semver/internal/lrucache.js +42 -0
- package/app/node_modules/semver/internal/parse-options.js +17 -0
- package/app/node_modules/semver/internal/re.js +223 -0
- package/app/node_modules/semver/package.json +78 -0
- package/app/package.json +3 -1
- package/app/public/providers/cerebras.png +0 -0
- package/app/public/providers/cohere.png +0 -0
- package/app/public/providers/deepseek.png +0 -0
- package/app/public/providers/fireworks.png +0 -0
- package/app/public/providers/groq.png +0 -0
- package/app/public/providers/kilocode.png +0 -0
- package/app/public/providers/kimi-coding.png +0 -0
- package/app/public/providers/mistral.png +0 -0
- package/app/public/providers/nebius.png +0 -0
- package/app/public/providers/nvidia.png +0 -0
- package/app/public/providers/perplexity.png +0 -0
- package/app/public/providers/siliconflow.png +0 -0
- package/app/public/providers/together.png +0 -0
- package/app/public/providers/xai.png +0 -0
- package/app/src/mitm/server.js +2 -1
- package/package.json +1 -1
- package/src/cli/api/client.js +37 -0
- package/src/cli/menus/cliTools.js +367 -215
- package/src/cli/tray/tray.js +2 -1
- package/src/cli/utils/input.js +3 -2
- package/app/.next/server/chunks/2760.js +0 -1
- package/app/.next/server/chunks/4070.js +0 -1
- package/app/.next/server/chunks/8152.js +0 -1
- package/app/.next/static/DI96okdJjzby3HGY7q07Y/_buildManifest.js +0 -1
- package/app/.next/static/chunks/1393-789dc00cee220ab3.js +0 -1
- package/app/.next/static/chunks/3624-e096f4cf594e2fc8.js +0 -1
- package/app/.next/static/chunks/3794-cd98b5cd5fb65b19.js +0 -2
- package/app/.next/static/chunks/4bd1b696-bf5e0dbacfa5baef.js +0 -1
- package/app/.next/static/chunks/5497-22ff80798e3ea482.js +0 -7
- package/app/.next/static/chunks/600-698f3e9fe5d9a2a4.js +0 -3
- package/app/.next/static/chunks/8202.0e16c9f0f8b261d7.js +0 -1
- package/app/.next/static/chunks/8729-d4b43eec95806a5e.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-b4abe8655df8ae72.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-ebe23b0367ddebdc.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-4940a5acf1d029cb.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-7b546958559f0a9d.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d48c3e28182c53fd.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-3b4a2a6a9a5ddf7a.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-a4e03be7aaaae436.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-fee9f03a1672e768.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-b1db6324fdab22de.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/layout-2951a18467171aa4.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/_not-found/page-9dced9c9fb6bff0f.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/sync/cloud/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/sync/initialize/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/usage/providers/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-details/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/app/callback/page-5f180e9e33c49571.js +0 -1
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-6389a6072b45738e.js +0 -1
- package/app/.next/static/chunks/app/landing/page-5601676546256c5c.js +0 -1
- package/app/.next/static/chunks/app/layout-b4f212dd6665a31c.js +0 -1
- package/app/.next/static/chunks/app/login/page-7001e1e8d9ffa21b.js +0 -1
- package/app/.next/static/chunks/app/page-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/framework-98ded4341da66877.js +0 -1
- package/app/.next/static/chunks/main-9693513a0cc92813.js +0 -5
- package/app/.next/static/chunks/main-app-8bfa111f852aed9b.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-8942985441049b52.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1c55a45c707c87a7.js +0 -1
- package/app/.next/static/chunks/webpack-79a9aedf42a631d8.js +0 -1
- package/app/.next/static/css/749abce1b69e6225.css +0 -3
- /package/app/.next/static/{DI96okdJjzby3HGY7q07Y → jWN0ATVbXrki9UzHFr5nv}/_ssgManifest.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{22016:(e,t,s)=>{Promise.resolve().then(s.bind(s,39378))},39378:(e,t,s)=>{"use strict";s.d(t,{default:()=>f});var l=s(95155),r=s(12115),a=s(35497);let i={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-5-20251101"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-5-20250929"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresCloud:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"CLINE AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to CLINE Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
|
|
2
2
|
"apiBase": "{{baseUrl}}",
|
|
3
3
|
"title": "{{model}}",
|
|
4
4
|
"model": "{{model}}",
|
|
5
5
|
"provider": "openai",
|
|
6
6
|
"apiKey": "{{apiKey}}"
|
|
7
|
-
}`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-5-thinking","claude-sonnet-4-5-thinking","claude-sonnet-4-5","gemini-3-pro-high"],defaultModels:[{id:"claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking",alias:"claude-opus-4-5-thinking"},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking",alias:"claude-sonnet-4-5-thinking"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4-5"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High",alias:"gemini-3-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"}]}};var i=s(8777),o=s(5772);let d="https://9router.com";function c({tool:e,isExpanded:t,onToggle:s,activeProviders:n,modelMappings:i,onModelMappingChange:c,baseUrl:x,hasActiveProviders:m,apiKeys:p,cloudEnabled:u}){let h,g,y,[f,b]=(0,a.useState)(null),[j,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(!1),[S,_]=(0,a.useState)(null),[A,E]=(0,a.useState)(!1),[O,I]=(0,a.useState)(!1),[P,M]=(0,a.useState)(null),[R,T]=(0,a.useState)(""),[$,K]=(0,a.useState)({}),[L,U]=(0,a.useState)(!1),[F,z]=(0,a.useState)(""),D=(0,a.useRef)(!1),H=(()=>{if(!f?.installed)return null;let e=f.settings?.env?.ANTHROPIC_BASE_URL;if(!e)return"not_configured";let t=e.includes("localhost")||e.includes("127.0.0.1"),s=u&&d&&e.startsWith(d);return t||s?"configured":"other"})();(0,a.useEffect)(()=>{p?.length>0&&!R&&T(p[0].key)},[p,R]),(0,a.useEffect)(()=>{t&&!f&&(q(),B())},[t,f]);let B=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&K(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(f?.installed&&!D.current){D.current=!0;let t=f.settings?.env||{};e.defaultModels.forEach(e=>{if(e.envKey){let s=t[e.envKey]||e.defaultValue||"";s&&c(e.alias,s)}});let s=t.ANTHROPIC_AUTH_TOKEN;s&&p?.some(e=>e.key===s)&&T(s)}},[f,p,e.defaultModels,c]);let q=async()=>{v(!0);try{let e=await fetch("/api/cli-tools/claude-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{v(!1)}},W=()=>{let e=F||x;return e.endsWith("/v1")?e:`${e}/v1`},J=async()=>{w(!0),_(null);try{let t={ANTHROPIC_BASE_URL:W()},s=R?.trim()||(p?.length>0?p[0].key:null)||(u?null:"sk_9router");s&&(t.ANTHROPIC_AUTH_TOKEN=s),e.defaultModels.forEach(e=>{let s=i[e.alias];s&&e.envKey&&(t[e.envKey]=s)});let l=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:t})}),a=await l.json();l.ok?(_({type:"success",text:"Settings applied successfully!"}),b(e=>({...e,hasBackup:!0,settings:{...e?.settings,env:t}}))):_({type:"error",text:a.error||"Failed to apply settings"})}catch(e){_({type:"error",text:e.message})}finally{w(!1)}},G=async()=>{C(!0),_(null);try{let t=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),s=await t.json();t.ok?(_({type:"success",text:"Settings reset successfully!"}),e.defaultModels.forEach(e=>c(e.alias,e.defaultValue||"")),T("")):_({type:"error",text:s.error||"Failed to reset settings"})}catch(e){_({type:"error",text:e.message})}finally{C(!1)}};return(0,l.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/claude.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===H&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===H&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===H&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Claude CLI..."})]}),!j&&f&&!f.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Claude CLI to use this feature."})]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>E(!A),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:A?"expand_less":"help"}),A?"Hide":"How to Install"]})]}),A&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!j&&f?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[f?.settings?.env?.ANTHROPIC_BASE_URL&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:f.settings.env.ANTHROPIC_BASE_URL})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:(h=F||x).endsWith("/v1")?h:`${h}/v1`,onChange:e=>z(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),F&&F!==x&&(0,l.jsx)("button",{onClick:()=>z(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),p.length>0?(0,l.jsx)("select",{value:R,onChange:e=>T(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:p.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:u?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:i[e.alias]||"",onChange:t=>c(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>{M(e.alias),I(!0)},disabled:!m,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),i[e.alias]&&(0,l.jsx)("button",{onClick:()=>c(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias))]}),S&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===S.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===S.type?"check_circle":"error"}),(0,l.jsx)("span",{children:S.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:J,disabled:!m,loading:N,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:G,disabled:!f?.has9Router,loading:k,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>U(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:O,onClose:()=>I(!1),onSelect:e=>{P&&c(P,e.value)},selectedModel:P?i[P]:null,activeProviders:n,modelAliases:$,title:`Select model for ${P}`}),(0,l.jsx)(r.uR,{isOpen:L,onClose:()=>U(!1),title:"Claude CLI - Manual Configuration",configs:(g=R&&R.trim()?R:u?"<API_KEY_FROM_DASHBOARD>":"sk_9router",y={ANTHROPIC_BASE_URL:W(),ANTHROPIC_AUTH_TOKEN:g},e.defaultModels.forEach(e=>{let t=i[e.alias];t&&e.envKey&&(y[e.envKey]=t)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:y},null,2)}])})]})}function x({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:i,activeProviders:d,cloudEnabled:c}){let x,m,p,[u,h]=(0,a.useState)(null),[g,y]=(0,a.useState)(!1),[f,b]=(0,a.useState)(!1),[j,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)(null),[k,C]=(0,a.useState)(!1),[S,_]=(0,a.useState)(""),[A,E]=(0,a.useState)(""),[O,I]=(0,a.useState)(!1),[P,M]=(0,a.useState)({}),[R,T]=(0,a.useState)(!1),[$,K]=(0,a.useState)("");(0,a.useEffect)(()=>{i?.length>0&&!S&&_(i[0].key)},[i,S]),(0,a.useEffect)(()=>{t&&!u&&(z(),L())},[t,u]);let L=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&M(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(u?.config){let e=u.config.match(/^model\s*=\s*"([^"]+)"/m);e&&E(e[1])}},[u]);let U=u?.installed?u.config?u.config.includes(n)||u.config.includes("localhost")||u.config.includes("127.0.0.1")?"configured":"other":"not_configured":null,F=()=>{let e=$||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},z=async()=>{y(!0);try{let e=await fetch("/api/cli-tools/codex-settings"),t=await e.json();h(t)}catch(e){h({installed:!1,error:e.message})}finally{y(!1)}},D=async()=>{b(!0),w(null);try{let e=S&&S.trim()||c?S:"sk_9router",t=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:F(),apiKey:e,model:A})}),s=await t.json();t.ok?(w({type:"success",text:"Settings applied successfully!"}),z()):w({type:"error",text:s.error||"Failed to apply settings"})}catch(e){w({type:"error",text:e.message})}finally{b(!1)}},H=async()=>{v(!0),w(null);try{let e=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),t=await e.json();e.ok?(w({type:"success",text:"Settings reset successfully!"}),E(""),z()):w({type:"error",text:t.error||"Failed to reset settings"})}catch(e){w({type:"error",text:e.message})}finally{v(!1)}};return(0,l.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/codex.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===U&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===U&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===U&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[g&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Codex CLI..."})]}),!g&&u&&!u.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Codex CLI to use auto-apply feature."})]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>C(!k),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:k?"expand_less":"help"}),k?"Hide":"How to Install"]})]}),k&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,l.jsx)("div",{className:"pt-2 border-t border-border",children:(0,l.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," with ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!g&&u?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[u?.config&&((m=(x=u.config.match(/base_url\s*=\s*"([^"]+)"/))?x[1]:null)?(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:m})]}):null),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:$||`${n}/v1`,onChange:e=>K(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),$&&$!==`${n}/v1`&&(0,l.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),i.length>0?(0,l.jsx)("select",{value:S,onChange:e=>_(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:i.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:c?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:A,onChange:e=>E(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>I(!0),disabled:!d?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),A&&(0,l.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),N&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===N.type?"check_circle":"error"}),(0,l.jsx)("span",{children:N.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:D,disabled:!S||!A,loading:f,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:H,disabled:!u.has9Router,loading:j,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>T(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:O,onClose:()=>I(!1),onSelect:e=>{E(e.value),I(!1)},selectedModel:A,activeProviders:d,modelAliases:P,title:"Select Model for Codex"}),(0,l.jsx)(r.uR,{isOpen:R,onClose:()=>T(!1),title:"Codex CLI - Manual Configuration",configs:(p=S&&S.trim()?S:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.codex/config.toml",content:`# 9Router Configuration for Codex CLI
|
|
7
|
+
}`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6-thinking","gemini-3-pro-high"],defaultModels:[{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"gemini-3-1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3-1-pro-high"},{id:"gemini-3-1-pro-low",name:"Gemini 3.1 Pro Low",alias:"gemini-3-1-pro-low"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High",alias:"gemini-3-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"}]}};var n=s(28777),o=s(5772);let d="https://9router.com";function c({tool:e,isExpanded:t,onToggle:s,activeProviders:i,modelMappings:n,onModelMappingChange:c,baseUrl:x,hasActiveProviders:m,apiKeys:p,cloudEnabled:u}){let h,g,y,[f,b]=(0,r.useState)(null),[j,v]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[k,C]=(0,r.useState)(!1),[S,_]=(0,r.useState)(null),[A,E]=(0,r.useState)(!1),[O,I]=(0,r.useState)(!1),[P,M]=(0,r.useState)(null),[R,T]=(0,r.useState)(""),[$,K]=(0,r.useState)({}),[L,U]=(0,r.useState)(!1),[F,z]=(0,r.useState)(""),D=(0,r.useRef)(!1),H=(()=>{if(!f?.installed)return null;let e=f.settings?.env?.ANTHROPIC_BASE_URL;if(!e)return"not_configured";let t=e.includes("localhost")||e.includes("127.0.0.1"),s=u&&d&&e.startsWith(d);return t||s?"configured":"other"})();(0,r.useEffect)(()=>{p?.length>0&&!R&&T(p[0].key)},[p,R]),(0,r.useEffect)(()=>{t&&!f&&(q(),B())},[t,f]);let B=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&K(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,r.useEffect)(()=>{if(f?.installed&&!D.current){D.current=!0;let t=f.settings?.env||{};e.defaultModels.forEach(e=>{if(e.envKey){let s=t[e.envKey]||e.defaultValue||"";s&&c(e.alias,s)}});let s=t.ANTHROPIC_AUTH_TOKEN;s&&p?.some(e=>e.key===s)&&T(s)}},[f,p,e.defaultModels,c]);let q=async()=>{v(!0);try{let e=await fetch("/api/cli-tools/claude-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{v(!1)}},W=()=>{let e=F||x;return e.endsWith("/v1")?e:`${e}/v1`},G=async()=>{w(!0),_(null);try{let t={ANTHROPIC_BASE_URL:W()},s=R?.trim()||(p?.length>0?p[0].key:null)||(u?null:"sk_9router");s&&(t.ANTHROPIC_AUTH_TOKEN=s),e.defaultModels.forEach(e=>{let s=n[e.alias];s&&e.envKey&&(t[e.envKey]=s)});let l=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:t})}),r=await l.json();l.ok?(_({type:"success",text:"Settings applied successfully!"}),b(e=>({...e,hasBackup:!0,settings:{...e?.settings,env:t}}))):_({type:"error",text:r.error||"Failed to apply settings"})}catch(e){_({type:"error",text:e.message})}finally{w(!1)}},J=async()=>{C(!0),_(null);try{let t=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),s=await t.json();t.ok?(_({type:"success",text:"Settings reset successfully!"}),e.defaultModels.forEach(e=>c(e.alias,e.defaultValue||"")),T("")):_({type:"error",text:s.error||"Failed to reset settings"})}catch(e){_({type:"error",text:e.message})}finally{C(!1)}};return(0,l.jsxs)(a.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/claude.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===H&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===H&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===H&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Claude CLI..."})]}),!j&&f&&!f.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Claude CLI to use this feature."})]}),(0,l.jsxs)(a.$n,{variant:"outline",size:"sm",onClick:()=>E(!A),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:A?"expand_less":"help"}),A?"Hide":"How to Install"]})]}),A&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!j&&f?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[f?.settings?.env?.ANTHROPIC_BASE_URL&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:f.settings.env.ANTHROPIC_BASE_URL})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:(h=F||x).endsWith("/v1")?h:`${h}/v1`,onChange:e=>z(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),F&&F!==x&&(0,l.jsx)("button",{onClick:()=>z(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),p.length>0?(0,l.jsx)("select",{value:R,onChange:e=>T(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:p.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:u?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:n[e.alias]||"",onChange:t=>c(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>{M(e.alias),I(!0)},disabled:!m,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),n[e.alias]&&(0,l.jsx)("button",{onClick:()=>c(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias))]}),S&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===S.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===S.type?"check_circle":"error"}),(0,l.jsx)("span",{children:S.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(a.$n,{variant:"primary",size:"sm",onClick:G,disabled:!m,loading:N,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(a.$n,{variant:"outline",size:"sm",onClick:J,disabled:!f?.has9Router,loading:k,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(a.$n,{variant:"ghost",size:"sm",onClick:()=>U(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(a.rq,{isOpen:O,onClose:()=>I(!1),onSelect:e=>{P&&c(P,e.value)},selectedModel:P?n[P]:null,activeProviders:i,modelAliases:$,title:`Select model for ${P}`}),(0,l.jsx)(a.uR,{isOpen:L,onClose:()=>U(!1),title:"Claude CLI - Manual Configuration",configs:(g=R&&R.trim()?R:u?"<API_KEY_FROM_DASHBOARD>":"sk_9router",y={ANTHROPIC_BASE_URL:W(),ANTHROPIC_AUTH_TOKEN:g},e.defaultModels.forEach(e=>{let t=n[e.alias];t&&e.envKey&&(y[e.envKey]=t)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:y},null,2)}])})]})}function x({tool:e,isExpanded:t,onToggle:s,baseUrl:i,apiKeys:n,activeProviders:d,cloudEnabled:c}){let x,m,p,[u,h]=(0,r.useState)(null),[g,y]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[k,C]=(0,r.useState)(!1),[S,_]=(0,r.useState)(""),[A,E]=(0,r.useState)(""),[O,I]=(0,r.useState)(!1),[P,M]=(0,r.useState)({}),[R,T]=(0,r.useState)(!1),[$,K]=(0,r.useState)("");(0,r.useEffect)(()=>{n?.length>0&&!S&&_(n[0].key)},[n,S]),(0,r.useEffect)(()=>{t&&!u&&(z(),L())},[t,u]);let L=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&M(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,r.useEffect)(()=>{if(u?.config){let e=u.config.match(/^model\s*=\s*"([^"]+)"/m);e&&E(e[1])}},[u]);let U=u?.installed?u.config?u.config.includes(i)||u.config.includes("localhost")||u.config.includes("127.0.0.1")?"configured":"other":"not_configured":null,F=()=>{let e=$||`${i}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},z=async()=>{y(!0);try{let e=await fetch("/api/cli-tools/codex-settings"),t=await e.json();h(t)}catch(e){h({installed:!1,error:e.message})}finally{y(!1)}},D=async()=>{b(!0),w(null);try{let e=S&&S.trim()||c?S:"sk_9router",t=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:F(),apiKey:e,model:A})}),s=await t.json();t.ok?(w({type:"success",text:"Settings applied successfully!"}),z()):w({type:"error",text:s.error||"Failed to apply settings"})}catch(e){w({type:"error",text:e.message})}finally{b(!1)}},H=async()=>{v(!0),w(null);try{let e=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),t=await e.json();e.ok?(w({type:"success",text:"Settings reset successfully!"}),E(""),z()):w({type:"error",text:t.error||"Failed to reset settings"})}catch(e){w({type:"error",text:e.message})}finally{v(!1)}};return(0,l.jsxs)(a.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/codex.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===U&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===U&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===U&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[g&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Codex CLI..."})]}),!g&&u&&!u.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Codex CLI to use auto-apply feature."})]}),(0,l.jsxs)(a.$n,{variant:"outline",size:"sm",onClick:()=>C(!k),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:k?"expand_less":"help"}),k?"Hide":"How to Install"]})]}),k&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,l.jsx)("div",{className:"pt-2 border-t border-border",children:(0,l.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," with ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!g&&u?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[u?.config&&((m=(x=u.config.match(/base_url\s*=\s*"([^"]+)"/))?x[1]:null)?(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:m})]}):null),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:$||`${i}/v1`,onChange:e=>K(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),$&&$!==`${i}/v1`&&(0,l.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),n.length>0?(0,l.jsx)("select",{value:S,onChange:e=>_(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:n.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:c?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:A,onChange:e=>E(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>I(!0),disabled:!d?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),A&&(0,l.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),N&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===N.type?"check_circle":"error"}),(0,l.jsx)("span",{children:N.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(a.$n,{variant:"primary",size:"sm",onClick:D,disabled:!S||!A,loading:f,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(a.$n,{variant:"outline",size:"sm",onClick:H,disabled:!u.has9Router,loading:j,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(a.$n,{variant:"ghost",size:"sm",onClick:()=>T(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(a.rq,{isOpen:O,onClose:()=>I(!1),onSelect:e=>{E(e.value),I(!1)},selectedModel:A,activeProviders:d,modelAliases:P,title:"Select Model for Codex"}),(0,l.jsx)(a.uR,{isOpen:R,onClose:()=>T(!1),title:"Codex CLI - Manual Configuration",configs:(p=S&&S.trim()?S:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.codex/config.toml",content:`# 9Router Configuration for Codex CLI
|
|
8
8
|
model = "${A}"
|
|
9
9
|
model_provider = "9router"
|
|
10
10
|
|
|
@@ -12,4 +12,4 @@ model_provider = "9router"
|
|
|
12
12
|
name = "9Router"
|
|
13
13
|
base_url = "${F()}"
|
|
14
14
|
wire_api = "responses"
|
|
15
|
-
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:p},null,2)}])})]})}let m="https://9router.com";function p({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:d,activeProviders:c,cloudEnabled:x}){let p,u,h,g,[y,f]=(0,a.useState)(null),[b,j]=(0,a.useState)(!1),[v,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1),[C,S]=(0,a.useState)(null),[_,A]=(0,a.useState)(""),[E,O]=(0,a.useState)(""),[I,P]=(0,a.useState)(!1),[M,R]=(0,a.useState)({}),[T,$]=(0,a.useState)(!1),[K,L]=(0,a.useState)(""),U=(0,a.useRef)(!1),F=(()=>{if(!y?.installed)return null;let e=y.settings?.customModels?.find(e=>"custom:9Router-0"===e.id);if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=x&&m&&e.baseUrl?.startsWith(m);return t||s?"configured":"other"})();(0,a.useEffect)(()=>{d?.length>0&&!_&&A(d[0].key)},[d,_]),(0,a.useEffect)(()=>{t&&!y&&(D(),z())},[t,y]);let z=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&R(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(y?.installed&&!U.current){U.current=!0;let e=y.settings?.customModels?.find(e=>"custom:9Router-0"===e.id);e&&(e.model&&O(e.model),e.apiKey&&d?.some(t=>t.key===e.apiKey)&&A(e.apiKey))}},[y,d]);let D=async()=>{j(!0);try{let e=await fetch("/api/cli-tools/droid-settings"),t=await e.json();f(t)}catch(e){f({installed:!1,error:e.message})}finally{j(!1)}},H=()=>{let e=K||n;return e.endsWith("/v1")?e:`${e}/v1`},B=async()=>{N(!0),S(null);try{let e=_?.trim()||(d?.length>0?d[0].key:null)||(x?null:"sk_9router"),t=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:H(),apiKey:e,model:E})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),D()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{N(!1)}},q=async()=>{k(!0),S(null);try{let e=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),O(""),A(""),D()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{k(!1)}};return(0,l.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/droid.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===F&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===F&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===F&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[b&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!b&&y&&!y.installed&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Factory Droid CLI to use this feature."})]})]}),!b&&y?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.settings?.customModels?.find(e=>"custom:9Router-0"===e.id)?.baseUrl&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:y.settings.customModels.find(e=>"custom:9Router-0"===e.id).baseUrl})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:(p=K||n).endsWith("/v1")?p:`${p}/v1`,onChange:e=>L(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),K&&K!==n&&(0,l.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),d.length>0?(0,l.jsx)("select",{value:_,onChange:e=>A(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:E,onChange:e=>O(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>P(!0),disabled:!i,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${i?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),E&&(0,l.jsx)("button",{onClick:()=>O(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,l.jsx)("span",{children:C.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:B,disabled:!E,loading:v,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:q,disabled:!y?.has9Router,loading:w,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>$(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:I,onClose:()=>P(!1),onSelect:e=>{O(e.value),P(!1)},selectedModel:E,activeProviders:c,modelAliases:M,title:"Select Model for Factory Droid"}),(0,l.jsx)(r.uR,{isOpen:T,onClose:()=>$(!1),title:"Factory Droid - Manual Configuration",configs:(u=_&&_.trim()?_:x?"<API_KEY_FROM_DASHBOARD>":"sk_9router",h={customModels:[{model:E||"provider/model-id",id:"custom:9Router-0",index:0,baseUrl:H(),apiKey:u,displayName:E||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},g="u">typeof navigator&&navigator.platform,[{filename:g?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(h,null,2)}])})]})}function u({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:d,activeProviders:c,cloudEnabled:x}){let m,p,[u,h]=(0,a.useState)(null),[g,y]=(0,a.useState)(!1),[f,b]=(0,a.useState)(!1),[j,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)(null),[k,C]=(0,a.useState)(""),[S,_]=(0,a.useState)(""),[A,E]=(0,a.useState)(!1),[O,I]=(0,a.useState)({}),[P,M]=(0,a.useState)(!1),[R,T]=(0,a.useState)(""),$=(0,a.useRef)(!1),K=(()=>{if(!u?.installed)return null;let e=u.settings?.models?.providers?.["9router"];return e?e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1")||e.baseUrl?.includes("0.0.0.0")?"configured":"other":"not_configured"})();(0,a.useEffect)(()=>{d?.length>0&&!k&&C(d[0].key)},[d,k]),(0,a.useEffect)(()=>{t&&!u&&(U(),L())},[t,u]);let L=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&I(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(u?.installed&&!$.current){$.current=!0;let e=u.settings?.models?.providers?.["9router"];if(e){let t=u.settings?.agents?.defaults?.model?.primary;t&&_(t.replace("9router/","")),e.apiKey&&d?.some(t=>t.key===e.apiKey)&&C(e.apiKey)}}},[u,d]);let U=async()=>{y(!0);try{let e=await fetch("/api/cli-tools/openclaw-settings"),t=await e.json();h(t)}catch(e){h({installed:!1,error:e.message})}finally{y(!1)}},F=()=>window.location.origin.replace("://localhost","://127.0.0.1"),z=()=>{let e=R||F();return e.endsWith("/v1")?e:`${e}/v1`},D=async()=>{b(!0),w(null);try{let e=k?.trim()||(d?.length>0?d[0].key:null)||(x?null:"sk_9router"),t=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:z(),apiKey:e,model:S})}),s=await t.json();t.ok?(w({type:"success",text:"Settings applied successfully!"}),U()):w({type:"error",text:s.error||"Failed to apply settings"})}catch(e){w({type:"error",text:e.message})}finally{b(!1)}},H=async()=>{v(!0),w(null);try{let e=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),t=await e.json();e.ok?(w({type:"success",text:"Settings reset successfully!"}),_(""),C(""),U()):w({type:"error",text:t.error||"Failed to reset settings"})}catch(e){w({type:"error",text:e.message})}finally{v(!1)}};return(0,l.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/openclaw.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===K&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===K&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===K&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[g&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!g&&u&&!u.installed&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Open Claw CLI to use this feature."})]})]}),!g&&u?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[u?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:u.settings.models.providers["9router"].baseUrl})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:(m=R||F()).endsWith("/v1")?m:`${m}/v1`,onChange:e=>T(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),R&&R!==n&&(0,l.jsx)("button",{onClick:()=>T(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),d.length>0?(0,l.jsx)("select",{value:k,onChange:e=>C(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:S,onChange:e=>_(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>E(!0),disabled:!i,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${i?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),S&&(0,l.jsx)("button",{onClick:()=>_(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),N&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===N.type?"check_circle":"error"}),(0,l.jsx)("span",{children:N.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:D,disabled:!S,loading:f,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:H,disabled:!u?.has9Router,loading:j,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>M(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:A,onClose:()=>E(!1),onSelect:e=>{_(e.value),E(!1)},selectedModel:S,activeProviders:c,modelAliases:O,title:"Select Model for Open Claw"}),(0,l.jsx)(r.uR,{isOpen:P,onClose:()=>M(!1),title:"Open Claw - Manual Configuration",configs:(p=k&&k.trim()?k:x?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${S||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:z(),apiKey:p,api:"openai-completions",models:[{id:S||"provider/model-id",name:(S||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}function h({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:i,apiKeys:d,activeProviders:c=[],cloudEnabled:x=!1}){let[m,p]=(0,a.useState)(null),[u,h]=(0,a.useState)(!1),[g,y]=(0,a.useState)(""),[f,b]=(0,a.useState)(()=>d?.length>0?d[0].key:""),j=e=>{let t=f&&f.trim()?f:x?"your-api-key":"sk_9router",s=i||"http://localhost:20128",l=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,l).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,g||"provider/model-id")},v=async(e,t)=>{await navigator.clipboard.writeText(j(e)),p(t),setTimeout(()=>p(null),2e3)},N=c.length>0,w=()=>!t.requiresCloud||!!x;return(0,l.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,l.jsx)(o.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):t.icon?(0,l.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,l.jsx)(o.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,l.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[t.notes&&0!==t.notes.length?(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&x)return null;let s="warning"===e.type,a="cloudCheck"===e.type&&!x,r="bg-blue-500/10 border-blue-500/30",n="text-blue-600 dark:text-blue-400",i="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",n="text-yellow-600 dark:text-yellow-400",i="text-yellow-500",o="warning"):a&&(r="bg-red-500/10 border-red-500/30",n="text-red-600 dark:text-red-400",i="text-red-500",o="error"),(0,l.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,l.jsx)("span",{className:`material-symbols-outlined text-lg ${i}`,children:o}),(0,l.jsx)("p",{className:`text-sm ${n}`,children:e.text})]},t)})}):null,w()&&t.guideSteps.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[(0,l.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,l.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,l.jsx)("div",{className:"mt-2 flex items-center gap-2",children:d&&d.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("select",{value:f,onChange:e=>b(e.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,l.jsx)("button",{onClick:()=>v(f,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===m?"check":"content_copy"})})]}):(0,l.jsx)("span",{className:"text-sm text-text-muted",children:x?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===e.type&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("input",{type:"text",value:g,onChange:e=>y(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>h(!0),disabled:!N,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${N?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>v(g,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===m?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>y(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:j(e.value)}),e.copyable&&(0,l.jsx)("button",{onClick:()=>v(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:m===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),w()&&t.codeBlock&&(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,l.jsxs)("button",{onClick:()=>v(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy"]})]}),(0,l.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,l.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:j(t.codeBlock.code)})})]})]}):(0,l.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,l.jsx)(r.rq,{isOpen:u,onClose:()=>h(!1),onSelect:e=>{y(e.value)},selectedModel:g,activeProviders:c,title:"Select Model"})]})}function g({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:i,activeProviders:d,hasActiveProviders:c,cloudEnabled:x}){let[m,p]=(0,a.useState)(null),[u,h]=(0,a.useState)(!1),[g,y]=(0,a.useState)(!1),[f,b]=(0,a.useState)(""),[j,v]=(0,a.useState)(""),[N,w]=(0,a.useState)(null),[k,C]=(0,a.useState)({}),[S,_]=(0,a.useState)(!1),[A,E]=(0,a.useState)(null);(0,a.useEffect)(()=>{i?.length>0&&!j&&v(i[0].key)},[i,j]),(0,a.useEffect)(()=>{t&&!m&&(I(),O())},[t,m]);let O=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias?tool=antigravity");if(e.ok){let t=(await e.json()).aliases||{};Object.keys(t).length>0&&C(t)}}catch(e){console.log("Error loading saved mappings:",e)}},I=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();p(t)}}catch(e){console.log("Error fetching status:",e),p({running:!1})}},P="u">typeof navigator&&navigator.userAgent?.includes("Windows"),M=async e=>{h(!0),w(null);try{let t=j?.trim()||(i?.length>0?i[0].key:null)||(x?null:"sk_9router"),s=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t,sudoPassword:e})}),l=await s.json();s.ok?(w({type:"success",text:"MITM started"}),y(!1),b(""),I()):w({type:"error",text:l.error||"Failed to start"})}catch(e){w({type:"error",text:e.message})}finally{h(!1)}},R=async e=>{h(!0),w(null);try{let t=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:e})}),s=await t.json();t.ok?(w({type:"success",text:"MITM stopped"}),y(!1),b(""),I()):w({type:"error",text:s.error||"Failed to stop"})}catch(e){w({type:"error",text:e.message})}finally{h(!1)}},T=()=>{f.trim()?m?.running?R(f):M(f):w({type:"error",text:"Sudo password is required"})},$=(e,t)=>{C(s=>({...s,[e]:t}))},K=async()=>{h(!0),w(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:k})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to save mappings")}w({type:"success",text:"Mappings saved!"})}catch(e){w({type:"error",text:e.message})}finally{h(!1)}},L=m?.running;return(0,l.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/antigravity.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),L?(0,l.jsx)(r.Ex,{variant:"success",size:"sm",children:"Active"}):(0,l.jsx)(r.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",children:L?(0,l.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?R(""):(y(!0),w(null))},disabled:u,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,l.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?M(""):(y(!0),w(null))},disabled:u||!c,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),N?.type==="error"&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,l.jsx)("span",{children:N.text})]}),L&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),i.length>0?(0,l.jsx)("select",{value:j,onChange:e=>v(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:i.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:k[e.alias]||"",onChange:t=>$(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>{E(e.alias),_(!0)},disabled:!c,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${c?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),k[e.alias]&&(0,l.jsx)("button",{onClick:()=>$(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias)),(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:K,disabled:u||0===Object.keys(k).length,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!L&&(0,l.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,l.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through 9Router."]}),(0,l.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,l.jsxs)("span",{children:["2. Redirects ",(0,l.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," → localhost"]}),(0,l.jsx)("span",{children:"3. Maps Antigravity models to any provider via 9Router"})]})]})]}),(0,l.jsx)(r.aF,{isOpen:g,onClose:()=>{y(!1),b(""),w(null)},title:"Sudo Password Required",size:"sm",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,l.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:f,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"!==e.key||u||T()}}),N&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===N.type?"check_circle":"error"}),(0,l.jsx)("span",{children:N.text})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,l.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{y(!1),b(""),w(null)},disabled:u,children:"Cancel"}),(0,l.jsx)(r.$n,{variant:"primary",size:"sm",onClick:T,loading:u,children:"Confirm"})]})]})}),(0,l.jsx)(r.rq,{isOpen:S,onClose:()=>_(!1),onSelect:e=>{A&&C(t=>({...t,[A]:e.value}))},selectedModel:A?k[A]:null,activeProviders:d,title:`Select model for ${A}`})]})}let y="https://9router.com";function f({machineId:e}){let t,s,o,[d,m]=(0,a.useState)([]),[f,b]=(0,a.useState)(!0),[j,v]=(0,a.useState)(null),[N,w]=(0,a.useState)({}),[k,C]=(0,a.useState)(!1),[S,_]=(0,a.useState)([]);(0,a.useEffect)(()=>{O(),A(),E()},[]);let A=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();C(t.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},E=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();_(t.keys||[])}}catch(e){console.log("Error fetching API keys:",e)}},O=async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&m(t.connections||[])}catch(e){console.log("Error fetching connections:",e)}finally{b(!1)}},I=()=>d.filter(e=>!1!==e.isActive),P=(0,a.useCallback)((e,t,s)=>{w(l=>l[e]?.[t]===s?l:{...l,[e]:{...l[e],[t]:s}})},[]);if(f)return(0,l.jsx)("div",{className:"flex flex-col gap-6",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(r.Qv,{}),(0,l.jsx)(r.Qv,{}),(0,l.jsx)(r.Qv,{})]})});let M=(t=I(),s=[],o=new Set,t.forEach(e=>{let t=i.Xg[e.provider]||e.provider;(0,i.KC)(e.provider).forEach(l=>{let a=`${t}/${l.id}`;o.has(a)||(o.add(a),s.push({value:a,label:`${t}/${l.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:l.id}))})}),s).length>0;return(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[!M&&(0,l.jsx)(r.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,l.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(n).map(([e,t])=>((e,t)=>{let s={tool:t,isExpanded:j===e,onToggle:()=>v(j===e?null:e),baseUrl:k&&y?y:window.location.origin,apiKeys:S};switch(e){case"claude":return(0,l.jsx)(c,{...s,activeProviders:I(),modelMappings:N[e]||{},onModelMappingChange:(t,s)=>P(e,t,s),hasActiveProviders:M,cloudEnabled:k},e);case"codex":return(0,l.jsx)(x,{...s,activeProviders:I(),cloudEnabled:k},e);case"droid":return(0,l.jsx)(p,{...s,activeProviders:I(),hasActiveProviders:M,cloudEnabled:k},e);case"openclaw":return(0,l.jsx)(u,{...s,activeProviders:I(),hasActiveProviders:M,cloudEnabled:k},e);case"antigravity":return(0,l.jsx)(g,{...s,activeProviders:I(),hasActiveProviders:M,cloudEnabled:k},e);default:return(0,l.jsx)(h,{toolId:e,...s,activeProviders:I(),cloudEnabled:k},e)}})(e,t))})]})}}},e=>{e.O(0,[600,3624,8729,5497,8441,3794,7358],()=>e(e.s=2016)),_N_E=e.O()}]);
|
|
15
|
+
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:p},null,2)}])})]})}let m="https://9router.com";function p({tool:e,isExpanded:t,onToggle:s,baseUrl:i,hasActiveProviders:n,apiKeys:d,activeProviders:c,cloudEnabled:x}){let p,u,h,g,[y,f]=(0,r.useState)(null),[b,j]=(0,r.useState)(!1),[v,N]=(0,r.useState)(!1),[w,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(null),[_,A]=(0,r.useState)(""),[E,O]=(0,r.useState)(""),[I,P]=(0,r.useState)(!1),[M,R]=(0,r.useState)({}),[T,$]=(0,r.useState)(!1),[K,L]=(0,r.useState)(""),U=(0,r.useRef)(!1),F=(()=>{if(!y?.installed)return null;let e=y.settings?.customModels?.find(e=>"custom:9Router-0"===e.id);if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=x&&m&&e.baseUrl?.startsWith(m);return t||s?"configured":"other"})();(0,r.useEffect)(()=>{d?.length>0&&!_&&A(d[0].key)},[d,_]),(0,r.useEffect)(()=>{t&&!y&&(D(),z())},[t,y]);let z=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&R(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,r.useEffect)(()=>{if(y?.installed&&!U.current){U.current=!0;let e=y.settings?.customModels?.find(e=>"custom:9Router-0"===e.id);e&&(e.model&&O(e.model),e.apiKey&&d?.some(t=>t.key===e.apiKey)&&A(e.apiKey))}},[y,d]);let D=async()=>{j(!0);try{let e=await fetch("/api/cli-tools/droid-settings"),t=await e.json();f(t)}catch(e){f({installed:!1,error:e.message})}finally{j(!1)}},H=()=>{let e=K||i;return e.endsWith("/v1")?e:`${e}/v1`},B=async()=>{N(!0),S(null);try{let e=_?.trim()||(d?.length>0?d[0].key:null)||(x?null:"sk_9router"),t=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:H(),apiKey:e,model:E})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),D()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{N(!1)}},q=async()=>{k(!0),S(null);try{let e=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),O(""),A(""),D()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{k(!1)}};return(0,l.jsxs)(a.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/droid.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===F&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===F&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===F&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[b&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!b&&y&&!y.installed&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Factory Droid CLI to use this feature."})]})]}),!b&&y?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.settings?.customModels?.find(e=>"custom:9Router-0"===e.id)?.baseUrl&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:y.settings.customModels.find(e=>"custom:9Router-0"===e.id).baseUrl})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:(p=K||i).endsWith("/v1")?p:`${p}/v1`,onChange:e=>L(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),K&&K!==i&&(0,l.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),d.length>0?(0,l.jsx)("select",{value:_,onChange:e=>A(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:E,onChange:e=>O(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>P(!0),disabled:!n,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),E&&(0,l.jsx)("button",{onClick:()=>O(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,l.jsx)("span",{children:C.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(a.$n,{variant:"primary",size:"sm",onClick:B,disabled:!E,loading:v,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(a.$n,{variant:"outline",size:"sm",onClick:q,disabled:!y?.has9Router,loading:w,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(a.$n,{variant:"ghost",size:"sm",onClick:()=>$(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(a.rq,{isOpen:I,onClose:()=>P(!1),onSelect:e=>{O(e.value),P(!1)},selectedModel:E,activeProviders:c,modelAliases:M,title:"Select Model for Factory Droid"}),(0,l.jsx)(a.uR,{isOpen:T,onClose:()=>$(!1),title:"Factory Droid - Manual Configuration",configs:(u=_&&_.trim()?_:x?"<API_KEY_FROM_DASHBOARD>":"sk_9router",h={customModels:[{model:E||"provider/model-id",id:"custom:9Router-0",index:0,baseUrl:H(),apiKey:u,displayName:E||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},g="u">typeof navigator&&navigator.platform,[{filename:g?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(h,null,2)}])})]})}function u({tool:e,isExpanded:t,onToggle:s,baseUrl:i,hasActiveProviders:n,apiKeys:d,activeProviders:c,cloudEnabled:x}){let m,p,[u,h]=(0,r.useState)(null),[g,y]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[k,C]=(0,r.useState)(""),[S,_]=(0,r.useState)(""),[A,E]=(0,r.useState)(!1),[O,I]=(0,r.useState)({}),[P,M]=(0,r.useState)(!1),[R,T]=(0,r.useState)(""),$=(0,r.useRef)(!1),K=(()=>{if(!u?.installed)return null;let e=u.settings?.models?.providers?.["9router"];return e?e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1")||e.baseUrl?.includes("0.0.0.0")?"configured":"other":"not_configured"})();(0,r.useEffect)(()=>{d?.length>0&&!k&&C(d[0].key)},[d,k]),(0,r.useEffect)(()=>{t&&!u&&(U(),L())},[t,u]);let L=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&I(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,r.useEffect)(()=>{if(u?.installed&&!$.current){$.current=!0;let e=u.settings?.models?.providers?.["9router"];if(e){let t=u.settings?.agents?.defaults?.model?.primary;t&&_(t.replace("9router/","")),e.apiKey&&d?.some(t=>t.key===e.apiKey)&&C(e.apiKey)}}},[u,d]);let U=async()=>{y(!0);try{let e=await fetch("/api/cli-tools/openclaw-settings"),t=await e.json();h(t)}catch(e){h({installed:!1,error:e.message})}finally{y(!1)}},F=()=>window.location.origin.replace("://localhost","://127.0.0.1"),z=()=>{let e=R||F();return e.endsWith("/v1")?e:`${e}/v1`},D=async()=>{b(!0),w(null);try{let e=k?.trim()||(d?.length>0?d[0].key:null)||(x?null:"sk_9router"),t=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:z(),apiKey:e,model:S})}),s=await t.json();t.ok?(w({type:"success",text:"Settings applied successfully!"}),U()):w({type:"error",text:s.error||"Failed to apply settings"})}catch(e){w({type:"error",text:e.message})}finally{b(!1)}},H=async()=>{v(!0),w(null);try{let e=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),t=await e.json();e.ok?(w({type:"success",text:"Settings reset successfully!"}),_(""),C(""),U()):w({type:"error",text:t.error||"Failed to reset settings"})}catch(e){w({type:"error",text:e.message})}finally{v(!1)}};return(0,l.jsxs)(a.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/openclaw.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===K&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===K&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===K&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[g&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!g&&u&&!u.installed&&(0,l.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not installed"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Open Claw CLI to use this feature."})]})]}),!g&&u?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[u?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:u.settings.models.providers["9router"].baseUrl})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:(m=R||F()).endsWith("/v1")?m:`${m}/v1`,onChange:e=>T(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),R&&R!==i&&(0,l.jsx)("button",{onClick:()=>T(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),d.length>0?(0,l.jsx)("select",{value:k,onChange:e=>C(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:S,onChange:e=>_(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>E(!0),disabled:!n,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),S&&(0,l.jsx)("button",{onClick:()=>_(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),N&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===N.type?"check_circle":"error"}),(0,l.jsx)("span",{children:N.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(a.$n,{variant:"primary",size:"sm",onClick:D,disabled:!S,loading:f,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(a.$n,{variant:"outline",size:"sm",onClick:H,disabled:!u?.has9Router,loading:j,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(a.$n,{variant:"ghost",size:"sm",onClick:()=>M(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(a.rq,{isOpen:A,onClose:()=>E(!1),onSelect:e=>{_(e.value),E(!1)},selectedModel:S,activeProviders:c,modelAliases:O,title:"Select Model for Open Claw"}),(0,l.jsx)(a.uR,{isOpen:P,onClose:()=>M(!1),title:"Open Claw - Manual Configuration",configs:(p=k&&k.trim()?k:x?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${S||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:z(),apiKey:p,api:"openai-completions",models:[{id:S||"provider/model-id",name:(S||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}function h({toolId:e,tool:t,isExpanded:s,onToggle:i,baseUrl:n,apiKeys:d,activeProviders:c=[],cloudEnabled:x=!1}){let[m,p]=(0,r.useState)(null),[u,h]=(0,r.useState)(!1),[g,y]=(0,r.useState)(""),[f,b]=(0,r.useState)(()=>d?.length>0?d[0].key:""),j=e=>{let t=f&&f.trim()?f:x?"your-api-key":"sk_9router",s=n||"http://localhost:20128",l=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,l).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,g||"provider/model-id")},v=async(e,t)=>{await navigator.clipboard.writeText(j(e)),p(t),setTimeout(()=>p(null),2e3)},N=c.length>0,w=()=>!t.requiresCloud||!!x;return(0,l.jsxs)(a.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:i,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,l.jsx)(o.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):t.icon?(0,l.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,l.jsx)(o.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,l.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[t.notes&&0!==t.notes.length?(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&x)return null;let s="warning"===e.type,r="cloudCheck"===e.type&&!x,a="bg-blue-500/10 border-blue-500/30",i="text-blue-600 dark:text-blue-400",n="text-blue-500",o="info";return s?(a="bg-yellow-500/10 border-yellow-500/30",i="text-yellow-600 dark:text-yellow-400",n="text-yellow-500",o="warning"):r&&(a="bg-red-500/10 border-red-500/30",i="text-red-600 dark:text-red-400",n="text-red-500",o="error"),(0,l.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${a}`,children:[(0,l.jsx)("span",{className:`material-symbols-outlined text-lg ${n}`,children:o}),(0,l.jsx)("p",{className:`text-sm ${i}`,children:e.text})]},t)})}):null,w()&&t.guideSteps.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[(0,l.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,l.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,l.jsx)("div",{className:"mt-2 flex items-center gap-2",children:d&&d.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("select",{value:f,onChange:e=>b(e.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,l.jsx)("button",{onClick:()=>v(f,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===m?"check":"content_copy"})})]}):(0,l.jsx)("span",{className:"text-sm text-text-muted",children:x?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===e.type&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("input",{type:"text",value:g,onChange:e=>y(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>h(!0),disabled:!N,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${N?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>v(g,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===m?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>y(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:j(e.value)}),e.copyable&&(0,l.jsx)("button",{onClick:()=>v(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:m===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),w()&&t.codeBlock&&(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,l.jsxs)("button",{onClick:()=>v(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy"]})]}),(0,l.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,l.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:j(t.codeBlock.code)})})]})]}):(0,l.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,l.jsx)(a.rq,{isOpen:u,onClose:()=>h(!1),onSelect:e=>{y(e.value)},selectedModel:g,activeProviders:c,title:"Select Model"})]})}function g({tool:e,isExpanded:t,onToggle:s,baseUrl:i,apiKeys:n,activeProviders:d,hasActiveProviders:c,cloudEnabled:x}){let[m,p]=(0,r.useState)(null),[u,h]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,b]=(0,r.useState)(""),[j,v]=(0,r.useState)(""),[N,w]=(0,r.useState)(null),[k,C]=(0,r.useState)({}),[S,_]=(0,r.useState)(!1),[A,E]=(0,r.useState)(null);(0,r.useEffect)(()=>{n?.length>0&&!j&&v(n[0].key)},[n,j]),(0,r.useEffect)(()=>{t&&!m&&(I(),O())},[t,m]);let O=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias?tool=antigravity");if(e.ok){let t=(await e.json()).aliases||{};Object.keys(t).length>0&&C(t)}}catch(e){console.log("Error loading saved mappings:",e)}},I=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();p(t)}}catch(e){console.log("Error fetching status:",e),p({running:!1})}},P="u">typeof navigator&&navigator.userAgent?.includes("Windows"),M=async e=>{h(!0),w(null);try{let t=j?.trim()||(n?.length>0?n[0].key:null)||(x?null:"sk_9router"),s=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t,sudoPassword:e})}),l=await s.json();s.ok?(w({type:"success",text:"MITM started"}),y(!1),b(""),I()):w({type:"error",text:l.error||"Failed to start"})}catch(e){w({type:"error",text:e.message})}finally{h(!1)}},R=async e=>{h(!0),w(null);try{let t=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:e})}),s=await t.json();t.ok?(w({type:"success",text:"MITM stopped"}),y(!1),b(""),I()):w({type:"error",text:s.error||"Failed to stop"})}catch(e){w({type:"error",text:e.message})}finally{h(!1)}},T=()=>{f.trim()?m?.running?R(f):M(f):w({type:"error",text:"Sudo password is required"})},$=(e,t)=>{C(s=>({...s,[e]:t}))},K=async()=>{h(!0),w(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:k})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to save mappings")}w({type:"success",text:"Mappings saved!"})}catch(e){w({type:"error",text:e.message})}finally{h(!1)}},L=m?.running;return(0,l.jsxs)(a.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(o.default,{src:"/providers/antigravity.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),L?(0,l.jsx)(a.Ex,{variant:"success",size:"sm",children:"Active"}):(0,l.jsx)(a.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",children:L?(0,l.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?R(""):(y(!0),w(null))},disabled:u,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,l.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?M(""):(y(!0),w(null))},disabled:u||!c,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),N?.type==="error"&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,l.jsx)("span",{children:N.text})]}),L&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),n.length>0?(0,l.jsx)("select",{value:j,onChange:e=>v(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:n.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:k[e.alias]||"",onChange:t=>$(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>{E(e.alias),_(!0)},disabled:!c,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${c?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),k[e.alias]&&(0,l.jsx)("button",{onClick:()=>$(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias)),(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsxs)(a.$n,{variant:"primary",size:"sm",onClick:K,disabled:u||0===Object.keys(k).length,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!L&&(0,l.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,l.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through 9Router."]}),(0,l.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,l.jsxs)("span",{children:["2. Redirects ",(0,l.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," → localhost"]}),(0,l.jsx)("span",{children:"3. Maps Antigravity models to any provider via 9Router"})]})]})]}),(0,l.jsx)(a.aF,{isOpen:g,onClose:()=>{y(!1),b(""),w(null)},title:"Sudo Password Required",size:"sm",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,l.jsx)(a.pd,{type:"password",placeholder:"Enter sudo password",value:f,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"!==e.key||u||T()}}),N&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===N.type?"check_circle":"error"}),(0,l.jsx)("span",{children:N.text})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,l.jsx)(a.$n,{variant:"ghost",size:"sm",onClick:()=>{y(!1),b(""),w(null)},disabled:u,children:"Cancel"}),(0,l.jsx)(a.$n,{variant:"primary",size:"sm",onClick:T,loading:u,children:"Confirm"})]})]})}),(0,l.jsx)(a.rq,{isOpen:S,onClose:()=>_(!1),onSelect:e=>{A&&C(t=>({...t,[A]:e.value}))},selectedModel:A?k[A]:null,activeProviders:d,title:`Select model for ${A}`})]})}let y="https://9router.com";function f({machineId:e}){let t,s,o,[d,m]=(0,r.useState)([]),[f,b]=(0,r.useState)(!0),[j,v]=(0,r.useState)(null),[N,w]=(0,r.useState)({}),[k,C]=(0,r.useState)(!1),[S,_]=(0,r.useState)([]);(0,r.useEffect)(()=>{O(),A(),E()},[]);let A=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();C(t.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},E=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();_(t.keys||[])}}catch(e){console.log("Error fetching API keys:",e)}},O=async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&m(t.connections||[])}catch(e){console.log("Error fetching connections:",e)}finally{b(!1)}},I=()=>d.filter(e=>!1!==e.isActive),P=(0,r.useCallback)((e,t,s)=>{w(l=>l[e]?.[t]===s?l:{...l,[e]:{...l[e],[t]:s}})},[]);if(f)return(0,l.jsx)("div",{className:"flex flex-col gap-6",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(a.Qv,{}),(0,l.jsx)(a.Qv,{}),(0,l.jsx)(a.Qv,{})]})});let M=(t=I(),s=[],o=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;(0,n.KC)(e.provider).forEach(l=>{let r=`${t}/${l.id}`;o.has(r)||(o.add(r),s.push({value:r,label:`${t}/${l.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:l.id}))})}),s).length>0;return(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[!M&&(0,l.jsx)(a.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,l.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(i).map(([e,t])=>((e,t)=>{let s={tool:t,isExpanded:j===e,onToggle:()=>v(j===e?null:e),baseUrl:k&&y?y:window.location.origin,apiKeys:S};switch(e){case"claude":return(0,l.jsx)(c,{...s,activeProviders:I(),modelMappings:N[e]||{},onModelMappingChange:(t,s)=>P(e,t,s),hasActiveProviders:M,cloudEnabled:k},e);case"codex":return(0,l.jsx)(x,{...s,activeProviders:I(),cloudEnabled:k},e);case"droid":return(0,l.jsx)(p,{...s,activeProviders:I(),hasActiveProviders:M,cloudEnabled:k},e);case"openclaw":return(0,l.jsx)(u,{...s,activeProviders:I(),hasActiveProviders:M,cloudEnabled:k},e);case"antigravity":return(0,l.jsx)(g,{...s,activeProviders:I(),hasActiveProviders:M,cloudEnabled:k},e);default:return(0,l.jsx)(h,{toolId:e,...s,activeProviders:I(),cloudEnabled:k},e)}})(e,t))})]})}}},e=>{e.O(0,[5370,4335,600,1672,8729,5497,8441,3794,7358],()=>e(e.s=22016)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{47295:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(95155),l=s(12115),r=s(35497),o=s(11059);s(52679);let i=/^[a-zA-Z0-9_-]+$/;function n(){let[e,t]=(0,l.useState)([]),[s,i]=(0,l.useState)(!0),[n,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[p,u]=(0,l.useState)([]),{copied:b,copy:f}=(0,o.C)();(0,l.useEffect)(()=>{j()},[]);let j=async()=>{try{let[e,s]=await Promise.all([fetch("/api/combos"),fetch("/api/providers")]),a=await e.json(),l=await s.json();if(e.ok&&t(a.combos||[]),s.ok){let e=(l.connections||[]).filter(e=>"active"===e.testStatus||"success"===e.testStatus);u(e)}}catch(e){console.log("Error fetching data:",e)}finally{i(!1)}},v=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await j(),m(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},g=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await j(),h(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},y=async s=>{if(confirm("Delete this combo?"))try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}};return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Create model combos with fallback support"})]}),(0,a.jsx)(r.$n,{icon:"add",onClick:()=>m(!0),children:"Create Combo"})]}),0===e.length?(0,a.jsx)(r.Zp,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(r.$n,{icon:"add",onClick:()=>m(!0),children:"Create Combo"})]})}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,a.jsx)(d,{combo:e,copied:b,onCopy:f,onEdit:()=>h(e),onDelete:()=>y(e.id)},e.id))}),(0,a.jsx)(c,{isOpen:n,onClose:()=>m(!1),onSave:v,activeProviders:p},"create"),(0,a.jsx)(c,{isOpen:!!x,combo:x,onClose:()=>h(null),onSave:e=>g(x.id,e),activeProviders:p},x?.id||"new")]})}function d({combo:e,copied:t,onCopy:s,onEdit:l,onDelete:o}){return(0,a.jsx)(r.Zp,{padding:"sm",className:"group",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"text-sm font-medium font-mono truncate",children:e.name}),(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),s(e.name,`combo-${e.id}`)},className:"p-0.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors opacity-0 group-hover:opacity-100",title:"Copy combo name",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:t===`combo-${e.id}`?"check":"content_copy"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,t)=>(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded text-text-muted",children:e},t)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[(0,a.jsx)("button",{onClick:l,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:"Edit",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})}),(0,a.jsx)("button",{onClick:o,className:"p-1.5 hover:bg-red-500/10 rounded text-red-500 transition-colors",title:"Delete",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]})})}function c({isOpen:e,combo:t,onClose:s,onSave:o,activeProviders:n}){let[d,c]=(0,l.useState)(t?.name||""),[m,x]=(0,l.useState)(t?.models||[]),[h,p]=(0,l.useState)(!1),[u,b]=(0,l.useState)(!1),[f,j]=(0,l.useState)(""),[v,g]=(0,l.useState)({}),[y,N]=(0,l.useState)([]),k=async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/provider-nodes")]);if(!e.ok||!t.ok)throw Error(`Failed to fetch data: aliases=${e.status}, nodes=${t.status}`);let[s,a]=await Promise.all([e.json(),t.json()]);g(s.aliases||{}),N(a.nodes||[])}catch(e){console.error("Error fetching modal data:",e)}};(0,l.useEffect)(()=>{e&&k()},[e]);let w=e=>e.trim()?i.test(e)?(j(""),!0):(j("Only letters, numbers, - and _ allowed"),!1):(j("Name is required"),!1),C=(0,l.useCallback)(e=>{let t=e.split("/");if(2!==t.length)return e;let[s,a]=t,l=y.find(e=>e.id===s);return l?`${l.name}/${a}`:e},[y]),S=async()=>{w(d)&&(b(!0),await o({name:d.trim(),models:m}),b(!1))},E=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.aF,{isOpen:e,onClose:s,title:E?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(r.pd,{label:"Combo Name",value:d,onChange:e=>{let t=e.target.value;c(t),t?w(t):j("")},placeholder:"my-combo",error:f}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, - and _ allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===m.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)("div",{className:"flex flex-col gap-1 max-h-[200px] overflow-y-auto",children:m.map((e,t)=>(0,a.jsxs)("div",{className:"group flex items-center gap-1.5 px-2 py-1 rounded-md bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),(0,a.jsx)("div",{className:"flex-1 min-w-0 px-1.5 py-0.5 text-xs text-text-main truncate",children:C(e)}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>(e=>{if(0===e)return;let t=[...m];[t[e-1],t[e]]=[t[e],t[e-1]],x(t)})(t),disabled:0===t,className:`p-0.5 rounded ${0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>(e=>{if(e===m.length-1)return;let t=[...m];[t[e],t[e+1]]=[t[e+1],t[e]],x(t)})(t),disabled:t===m.length-1,className:`p-0.5 rounded ${t===m.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:()=>{x(m.filter((e,s)=>s!==t))},className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},t))}),(0,a.jsxs)("button",{onClick:()=>p(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(r.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(r.$n,{onClick:S,fullWidth:!0,size:"sm",disabled:!d.trim()||!!f||u,children:u?"Saving...":E?"Save":"Create"})]})]})}),(0,a.jsx)(r.rq,{isOpen:h,onClose:()=>p(!1),onSelect:e=>{m.includes(e.value)||x([...m,e.value])},activeProviders:n,modelAliases:v,title:"Add Model to Combo"})]})}},73822:(e,t,s)=>{Promise.resolve().then(s.bind(s,47295))}},e=>{e.O(0,[5370,4335,600,1672,8729,5497,8441,3794,7358],()=>e(e.s=73822)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[5370,4335,600,1672,8729,5497,1393,8441,3794,7358],()=>_(_.s=51393)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[5370,4335,600,1672,8729,5497,1393,8441,3794,7358],()=>_(_.s=51393)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var a=t(95155),r=t(12115),i=t(35497),l=t(1620),n=t(31474),d=t(90620);function c(){let{theme:e,setTheme:s,isDark:t}=(0,l.D)(),[c,o]=(0,r.useState)({fallbackStrategy:"fill-first"}),[m,x]=(0,r.useState)(!0),[h,p]=(0,r.useState)({current:"",new:"",confirm:""}),[u,b]=(0,r.useState)({type:"",message:""}),[j,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{o(e),x(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),x(!1)})},[]);let g=async e=>{if(e.preventDefault(),h.new!==h.confirm)return void b({type:"error",message:"Passwords do not match"});f(!0),b({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:h.current,newPassword:h.new})}),s=await e.json();e.ok?(b({type:"success",message:"Password updated successfully"}),p({current:"",new:"",confirm:""})):b({type:"error",message:s.error||"Failed to update password"})}catch(e){b({type:"error",message:"An error occurred"})}finally{f(!1)}},y=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&o(s=>({...s,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},N=async e=>{let s=parseInt(e);if(!isNaN(s)&&!(s<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:s})})).ok&&o(e=>({...e,stickyRoundRobinLimit:s}))}catch(e){console.error("Failed to update sticky limit:",e)}},v=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&o(s=>({...s,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},w=async(e,s)=>{let t=parseInt(s);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:t})})).ok&&o(s=>({...s,[e]:t}))}catch(s){console.error(`Failed to update ${e}:`,s)}},k=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({observabilityEnabled:e})})).ok&&o(s=>({...s,observabilityEnabled:e}))}catch(e){console.error("Failed to update observabilityEnabled:",e)}},C=!1!==c.observabilityEnabled;return(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["All data is stored locally in the ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"~/.9router/db.json"})," file."]})})]}),(0,a.jsxs)(i.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",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require login"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===c.requireLogin,onChange:()=>v(!c.requireLogin),disabled:m})]}),!0===c.requireLogin&&(0,a.jsxs)("form",{onSubmit:g,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[c.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:h.current,onChange:e=>p({...h,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:h.new,onChange:e=>p({...h,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:h.confirm,onChange:e=>p({...h,confirm:e.target.value}),required:!0})]})]}),u.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===u.type?"text-red-500":"text-green-500"}`,children:u.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:j,children:c.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.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",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"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-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===c.fallbackStrategy,onChange:()=>y("round-robin"===c.fallbackStrategy?"fill-first":"round-robin"),disabled:m})]}),"round-robin"===c.fallbackStrategy&&(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:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:c.stickyRoundRobinLimit||3,onChange:e=>N(e.target.value),disabled:m,className:"w-20 text-center"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:"round-robin"===c.fallbackStrategy?`Currently distributing requests across all available accounts with ${c.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First)."})]})]}),(0,a.jsxs)(i.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",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"palette"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Appearance"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Dark Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Switch between light and dark themes"})]}),(0,a.jsx)(i.lM,{checked:t,onChange:()=>s(t?"light":"dark")})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5",children:["light","dark","system"].map(t=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(t),className:(0,n.cn)("flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-all",e===t?"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-[20px]",children:"light"===t?"light_mode":"dark"===t?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize",children:t})]},t))})})]})]}),(0,a.jsxs)(i.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-green-500/10 text-green-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"database"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Data"})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:(0,a.jsx)("div",{className:"flex items-center justify-between p-4 rounded-lg bg-bg border border-border",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Database Location"}),(0,a.jsx)("p",{className:"text-sm text-text-muted font-mono",children:"~/.9router/db.json"})]})})})]}),(0,a.jsxs)(i.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",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Turn request detail recording on/off globally"})]}),(0,a.jsx)(i.lM,{checked:C,onChange:k,disabled:m})]}),(0,a.jsxs)("div",{className:(0,n.cn)("flex flex-col gap-4",!C&&"opacity-60"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Max Records"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum request detail records to keep (older records are auto-deleted)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"100",max:"10000",step:"100",value:c.observabilityMaxRecords||1e3,onChange:e=>w("observabilityMaxRecords",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Batch Size"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Number of items to accumulate before writing to database (higher = better performance)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"5",max:"100",step:"5",value:c.observabilityBatchSize||20,onChange:e=>w("observabilityBatchSize",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Flush Interval (ms)"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum time to wait before flushing buffer (prevents data loss during low traffic)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1000",max:"30000",step:"1000",value:c.observabilityFlushIntervalMs||5e3,onChange:e=>w("observabilityFlushIntervalMs",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Max JSON Size (KB)"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum size for each JSON field (request/response) before truncation"})]}),(0,a.jsx)(i.pd,{type:"number",min:"100",max:"10240",step:"100",value:c.observabilityMaxJsonSize||1024,onChange:e=>w("observabilityMaxJsonSize",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["Current: Keeps ",c.observabilityMaxRecords||1e3," records, batches every ",c.observabilityBatchSize||20," requests, max ",c.observabilityMaxJsonSize||1024,"KB per field"]})]})]})]}),(0,a.jsxs)("div",{className:"text-center text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[d.vQ.name," v",d.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]})})}},76086:(e,s,t)=>{Promise.resolve().then(t.bind(t,64561))}},e=>{e.O(0,[5370,4335,600,1672,8729,5497,8441,3794,7358],()=>e(e.s=76086)),_N_E=e.O()}]);
|
package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-ccad74632e355e04.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{52397:(e,t,i)=>{Promise.resolve().then(i.bind(i,97162))},97162:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});var s=i(95155),a=i(12115),l=i(14051),r=i.n(l),n=i(73321),o=i(98500),d=i.n(o),c=i(5772),p=i(35497),m=i(52679),u=i(28777),x=i(11059);function h(){let e=(0,n.useParams)(),t=(0,n.useRouter)(),i=e.id,[l,r]=(0,a.useState)([]),[o,h]=(0,a.useState)(!0),[v,b]=(0,a.useState)(null),[A,k]=(0,a.useState)(!1);(0,a.useEffect)(()=>{try{let e=localStorage.getItem("oauth_pending_auth");if(e){let t=JSON.parse(e);t.provider===i&&Date.now()-t.timestamp<3e5&&k(!0)}}catch{}},[i]);let[S,$]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[E,R]=(0,a.useState)(!1),[I,q]=(0,a.useState)(null),[P,U]=(0,a.useState)({}),[K,D]=(0,a.useState)(!1),{copied:M,copy:_}=(0,x.C)(),L=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}:m.zN[i]||m.fg[i]||m.IS[i],F=!!m.zN[i]||!!m.IS[i],J=(0,u.KC)(i),z=(0,m.wG)(i),W=(0,m.mq)(i),V=(0,m.gb)(i),B=W||V,Z=B?i:z,G=B?v?.prefix||i:z,Q=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&U(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),H=(0,a.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"})]),s=await e.json(),a=await t.json();if(e.ok){let e=(s.connections||[]).filter(e=>e.provider===i);r(e)}if(t.ok){let e=(a.nodes||[]).find(e=>e.id===i)||null;if(!e&&B)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===i)||null))break}b(e)}}catch(e){console.log("Error fetching connections:",e)}finally{h(!1)}},[i,B]),X=async e=>{try{let t=await fetch(`/api/provider-nodes/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(b(s.node),await H(),R(!1))}catch(e){console.log("Error updating provider node:",e)}};(0,a.useEffect)(()=>{H(),Q()},[H,Q]);let Y=async(e,t,i=z)=>{let s=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await Q();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},ee=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await Q()}catch(e){console.log("Error deleting alias:",e)}},et=async e=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(l.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},ei=()=>{H(),k(!1)},es=async e=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:i,...e})})).ok&&(await H(),$(!1))}catch(e){console.log("Error saving connection:",e)}},ea=async e=>{try{(await fetch(`/api/providers/${I.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await H(),O(!1))}catch(e){console.log("Error updating connection:",e)}},el=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},er=async(e,t)=>{if(e&&t)try{let i=t.priority,s=e.priority;i===s&&(i=l.indexOf(e)>l.indexOf(t)?t.priority-.5:t.priority+.5),await Promise.all([fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:i})}),fetch(`/api/providers/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:s})})]),await H()}catch(e){console.log("Error swapping priority:",e)}};return o?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(p.Qv,{}),(0,s.jsx)(p.Qv,{})]}):L?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"rounded-lg flex items-center justify-center",style:{backgroundColor:`${L.color}15`},children:K?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:L.color},children:L.textIcon||L.id.slice(0,2).toUpperCase()}):(0,s.jsx)(c.default,{src:W&&L.apiType?"responses"===L.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":V?"/providers/anthropic-m.png":`/providers/${L.id}.png`,alt:L.name,width:48,height:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",sizes:"48px",onError:()=>D(!0)})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:L.name}),(0,s.jsxs)("p",{className:"text-text-muted",children:[l.length," connection",1===l.length?"":"s"]})]})]})]}),B&&v&&(0,s.jsxs)(p.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:V?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:[V?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",V?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:()=>$(!0),disabled:l.length>0,children:"Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>R(!0),children:"Edit"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(`Delete this ${V?"Anthropic":"OpenAI"} Compatible node?`))try{(await fetch(`/api/provider-nodes/${i}`,{method:"DELETE"})).ok&&t.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},children:"Delete"})]})]}),l.length>0&&(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Only one connection is allowed per compatible node. Add another node if you need more connections."})]}),(0,s.jsxs)(p.Zp,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),!B&&(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:()=>F?k(!0):$(!0),children:"Add"})]}),0===l.length?(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:F?"lock":"key"})}),(0,s.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No connections yet"}),(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Add your first connection to get started"}),!B&&(0,s.jsx)(p.$n,{icon:"add",onClick:()=>F?k(!0):$(!0),children:"Add Connection"})]}):(0,s.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:l.sort((e,t)=>(e.priority||0)-(t.priority||0)).map((e,t)=>(0,s.jsx)(j,{connection:e,isOAuth:F,isFirst:0===t,isLast:t===l.length-1,onMoveUp:()=>er(e,l[t-1]),onMoveDown:()=>er(e,l[t+1]),onToggleActive:t=>el(e.id,t),onEdit:()=>{q(e),O(!0)},onDelete:()=>et(e.id)},e.id))})]}),(0,s.jsxs)(p.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:L.passthroughModels?"Model Aliases":"Available Models"}),B?(0,s.jsx)(g,{providerStorageAlias:Z,providerDisplayAlias:G,modelAliases:P,copied:M,onCopy:_,onSetAlias:Y,onDeleteAlias:ee,connections:l,isAnthropic:V}):L.passthroughModels?(0,s.jsx)(y,{providerAlias:z,modelAliases:P,copied:M,onCopy:_,onSetAlias:Y,onDeleteAlias:ee}):0===J.length?(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No models configured"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-3",children:J.map(e=>{let t=`${Z}/${e.id}`,a=`${i}/${e.id}`,l=Object.entries(P).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(f,{model:e,fullModel:`${G}/${e.id}`,alias:l,copied:M,onCopy:_,onSetAlias:t=>Y(e.id,t,Z),onDeleteAlias:()=>ee(l)},e.id)})})]}),"kiro"===i?(0,s.jsx)(p.Mh,{isOpen:A,providerInfo:L,onSuccess:ei,onClose:()=>k(!1)}):"cursor"===i?(0,s.jsx)(p.G9,{isOpen:A,onSuccess:ei,onClose:()=>k(!1)}):(0,s.jsx)(p.LF,{isOpen:A,provider:i,providerInfo:L,onSuccess:ei,onClose:()=>k(!1)}),(0,s.jsx)(N,{isOpen:S,provider:i,providerName:L.name,isCompatible:B,isAnthropic:V,onSave:es,onClose:()=>$(!1)}),(0,s.jsx)(C,{isOpen:T,connection:I,onSave:ea,onClose:()=>O(!1)}),B&&(0,s.jsx)(w,{isOpen:E,node:v,onSave:X,onClose:()=>R(!1),isAnthropic:V})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(d(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}function f({model:e,fullModel:t,alias:i,copied:a,onCopy:l}){return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:"smart_toy"}),(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:"Copy model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})})]})}function y({providerAlias:e,modelAliases:t,copied:i,onCopy:l,onSetAlias:r,onDeleteAlias:n}){let[o,d]=(0,a.useState)(""),[c,m]=(0,a.useState)(!1),u=Object.entries(t).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,i])=>({modelId:i.replace(`${e}/`,""),fullModel:i,alias:t})),x=async()=>{let e;if(!o.trim()||c)return;let i=o.trim(),s=(e=i.split("/"))[e.length-1];if(t[s])return void alert(`Alias "${s}" already exists. Please use a different model or edit existing alias.`);m(!0);try{await r(i,s),d("")}catch(e){console.log("Error adding model:",e)}finally{m(!1)}};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"OpenRouter supports any model. Add models and create aliases for quick access."}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{htmlFor:"new-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID (from OpenRouter)"}),(0,s.jsx)("input",{id:"new-model-input",type:"text",value:o,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&x(),placeholder:"anthropic/claude-3-opus",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:x,disabled:!o.trim()||c,children:c?"Adding...":"Add"})]}),u.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:u.map(({modelId:e,fullModel:t,alias:a})=>(0,s.jsx)(v,{modelId:e,fullModel:t,copied:i,onCopy:l,onDeleteAlias:()=>n(a)},t))})]})}function v({modelId:e,fullModel:t,copied:i,onCopy:a,onDeleteAlias:l}){return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:"Copy model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})})]})]}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function g({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:d,isAnthropic:c}){let[m,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1),[f,y]=(0,a.useState)(!1),g=Object.entries(i).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,i])=>({modelId:i.replace(`${e}/`,""),fullModel:i,alias:t})),b=e=>{let s,a=(s=e.split("/"))[s.length-1];if(!i[a])return a;let l=`${t}-${a}`;return i[l]?null:l},j=async()=>{if(!m.trim()||x)return;let t=m.trim(),i=b(t);if(!i)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,i,e),u("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},N=async()=>{if(f)return;let t=d.find(e=>!1!==e.isActive);if(t){y(!0);try{let i=await fetch(`/api/providers/${t.id}/models`),s=await i.json();if(!i.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let l=0;for(let t of a){let i=t.id||t.name||t.model;if(!i)continue;let s=b(i);s&&(await n(i,s,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{y(!1)}}},C=d.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",c?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&j(),placeholder:c?"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,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:j,disabled:!m.trim()||x,children:x?"Adding...":"Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"download",onClick:N,disabled:!C||f,children:f?"Importing...":"Import from /models"})]}),!C&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),g.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:g.map(({modelId:e,fullModel:i,alias:a})=>(0,s.jsx)(v,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(a)},i))})]})}function b({until:e}){let[t,i]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void i("");let s=Math.floor(t/1e3);if(s<60)i(`${s}s`);else if(s<3600)i(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);i(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j({connection:e,isOAuth:t,isFirst:i,isLast:l,onMoveUp:r,onMoveDown:n,onToggleActive:o,onEdit:d,onDelete:c}){let m=t?e.name||e.email||e.displayName||"OAuth Account":e.name,[u,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let t=()=>{x(e.rateLimitedUntil&&new Date(e.rateLimitedUntil).getTime()>Date.now())};t();let i=e.rateLimitedUntil?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[e.rateLimitedUntil]);let h="unavailable"!==e.testStatus||u?e.testStatus:"active";return(0,s.jsxs)("div",{className:`group flex items-center justify-between p-3 rounded-lg hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("button",{onClick:r,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:t?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:m}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)(p.Ex,{variant:!1===e.isActive?"default":"active"===h||"success"===h?"success":"error"===h||"expired"===h||"unavailable"===h?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":h||"Unknown"}),u&&!1!==e.isActive&&(0,s.jsx)(b,{until:e.rateLimitedUntil}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(p.lM,{size:"sm",checked:e.isActive??!0,onChange:o,title:e.isActive??!0?"Disable connection":"Enable connection"}),(0,s.jsxs)("div",{className:"flex gap-1 ml-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,s.jsx)("button",{onClick:d,className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,s.jsx)("button",{onClick:c,className:"p-2 hover:bg-red-500/10 rounded text-red-500",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]})]})}function N({isOpen:e,provider:t,providerName:i,isCompatible:l,isAnthropic:r,onSave:n,onClose:o}){let[d,c]=(0,a.useState)({name:"",apiKey:"",priority:1}),[m,u]=(0,a.useState)(!1),[x,h]=(0,a.useState)(null),[f,y]=(0,a.useState)(!1),v=async()=>{u(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:d.apiKey})}),i=await e.json();h(i.valid?"success":"failed")}catch{h("failed")}finally{u(!1)}},g=async()=>{if(t&&d.apiKey){y(!0);try{let e=!1;try{u(!0),h(null);let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:d.apiKey})});e=!!(await i.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{u(!1)}await n({name:d.name,apiKey:d.apiKey,priority:d.priority,testStatus:e?"active":"unknown"})}finally{y(!1)}}};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Add ${i||t} API Key`,onClose:o,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:"Production Key"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key",type:"password",value:d.apiKey,onChange:e=>c({...d,apiKey:e.target.value}),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:v,disabled:!d.apiKey||m||f,variant:"secondary",children:m?"Checking...":"Check"})})]}),x&&(0,s.jsx)(p.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),l&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:r?`Validation checks ${i||"Anthropic Compatible"} by verifying the API key.`:`Validation checks ${i||"OpenAI Compatible"} via /models on your base URL.`}),(0,s.jsx)(p.pd,{label:"Priority",type:"number",value:d.priority,onChange:e=>c({...d,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:g,fullWidth:!0,disabled:!d.name||!d.apiKey||f,children:f?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function C({isOpen:e,connection:t,onSave:i,onClose:l}){let[r,n]=(0,a.useState)({name:"",priority:1,apiKey:""}),[o,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),[x,h]=(0,a.useState)(!1),[f,y]=(0,a.useState)(null),[v,g]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&(n({name:t.name||"",priority:t.priority||1,apiKey:""}),u(null),y(null))},[t]);let b=async()=>{if(t?.provider){d(!0),u(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),i=await e.json();u(i.valid?"success":"failed")}catch{u("failed")}finally{d(!1)}}},j=async()=>{if(t?.provider&&r.apiKey){h(!0),y(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:r.apiKey})}),i=await e.json();y(i.valid?"success":"failed")}catch{y("failed")}finally{h(!1)}}},N=async()=>{g(!0);try{let e={name:r.name,priority:r.priority};if(!C&&r.apiKey){e.apiKey=r.apiKey;let i="success"===f;if(!i)try{h(!0),y(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:r.apiKey})});i=!!(await e.json()).valid,y(i?"success":"failed")}catch{y("failed")}finally{h(!1)}i&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}await i(e)}finally{g(!1)}};if(!t)return null;let C="oauth"===t.authType,w=(0,m.mq)(t.provider)||(0,m.gb)(t.provider);return(0,s.jsx)(p.aF,{isOpen:e,title:"Edit Connection",onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:r.name,onChange:e=>n({...r,name:e.target.value}),placeholder:C?"Account name":"Production Key"}),C&&t.email&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,s.jsx)("p",{className:"font-medium",children:t.email})]}),(0,s.jsx)(p.pd,{label:"Priority",type:"number",value:r.priority,onChange:e=>n({...r,priority:Number.parseInt(e.target.value)||1})}),!C&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key",type:"password",value:r.apiKey,onChange:e=>n({...r,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:j,disabled:!r.apiKey||x||v,variant:"secondary",children:x?"Checking...":"Check"})})]}),f&&(0,s.jsx)(p.Ex,{variant:"success"===f?"success":"error",children:"success"===f?"Valid":"Invalid"})]}),!w&&(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(p.$n,{onClick:b,variant:"secondary",disabled:o,children:o?"Testing...":"Test Connection"}),c&&(0,s.jsx)(p.Ex,{variant:"success"===c?"success":"error",children:"success"===c?"Valid":"Failed"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:N,fullWidth:!0,disabled:v,children:v?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({isOpen:e,node:t,onSave:i,onClose:l,isAnthropic:r}){let[n,o]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1),[f,y]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){c(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await i(e)}finally{c(!1)}}},g=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible"})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{h(!1)}};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(p.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(p.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,s.jsx)(p.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>u(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:g,disabled:!m||x||!n.baseUrl.trim(),variant:"secondary",children:x?"Checking...":"Check"})})]}),f&&(0,s.jsx)(p.Ex,{variant:"success"===f?"success":"error",children:"success"===f?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}f.propTypes={model:r().shape({id:r().string.isRequired}).isRequired,fullModel:r().string.isRequired,alias:r().string,copied:r().string,onCopy:r().func.isRequired},y.propTypes={providerAlias:r().string.isRequired,modelAliases:r().object.isRequired,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func.isRequired,onDeleteAlias:r().func.isRequired},v.propTypes={modelId:r().string.isRequired,fullModel:r().string.isRequired,copied:r().string,onCopy:r().func.isRequired,onDeleteAlias:r().func.isRequired},g.propTypes={providerStorageAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,modelAliases:r().object.isRequired,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func.isRequired,onDeleteAlias:r().func.isRequired,connections:r().arrayOf(r().shape({id:r().string,isActive:r().bool})).isRequired,isAnthropic:r().bool},b.propTypes={until:r().string.isRequired},j.propTypes={connection:r().shape({id:r().string,name:r().string,email:r().string,displayName:r().string,rateLimitedUntil:r().string,testStatus:r().string,isActive:r().bool,lastError:r().string,priority:r().number,globalPriority:r().number}).isRequired,isOAuth:r().bool.isRequired,isFirst:r().bool.isRequired,isLast:r().bool.isRequired,onMoveUp:r().func.isRequired,onMoveDown:r().func.isRequired,onToggleActive:r().func.isRequired,onEdit:r().func.isRequired,onDelete:r().func.isRequired},N.propTypes={isOpen:r().bool.isRequired,provider:r().string,providerName:r().string,isCompatible:r().bool,isAnthropic:r().bool,onSave:r().func.isRequired,onClose:r().func.isRequired},C.propTypes={isOpen:r().bool.isRequired,connection:r().shape({id:r().string,name:r().string,email:r().string,priority:r().number,authType:r().string,provider:r().string}),onSave:r().func.isRequired,onClose:r().func.isRequired},w.propTypes={isOpen:r().bool.isRequired,node:r().shape({id:r().string,name:r().string,prefix:r().string,apiType:r().string,baseUrl:r().string}),onSave:r().func.isRequired,onClose:r().func.isRequired,isAnthropic:r().bool}}},e=>{e.O(0,[5370,4335,600,1672,8729,5497,8441,3794,7358],()=>e(e.s=52397)),_N_E=e.O()}]);
|
package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-133c3e673c6fd026.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{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.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},65390:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[5370,4335,600,1672,8729,5497,8441,3794,7358],()=>e(e.s=65390)),_N_E=e.O()}]);
|