@synthever/jrouter 1.0.3 → 1.0.4
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-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +21 -21
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +19 -19
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/secret/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/secret/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/check/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/check-all/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/check-all/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/config/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/config/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/history/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/model/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/model/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/models/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/run-scheduled/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/run-scheduled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/model-health/summary/route.js +2 -2
- package/app/.next-cli-build/server/app/api/model-health/summary/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/limits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/limits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/connections/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/connections/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/health.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/health.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/health.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +21 -21
- package/app/.next-cli-build/server/chunks/2760.js +1 -17
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/436.js +1 -1
- package/app/.next-cli-build/server/chunks/455.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/4764.js +1 -1
- package/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/app/.next-cli-build/server/chunks/4864.js +1 -1
- package/app/.next-cli-build/server/chunks/5298.js +17 -0
- package/app/.next-cli-build/server/chunks/5563.js +1 -1
- package/app/.next-cli-build/server/chunks/5665.js +27 -0
- package/app/.next-cli-build/server/chunks/6296.js +4 -4
- package/app/.next-cli-build/server/chunks/735.js +1 -1
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/8126.js +1 -1
- package/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +9 -9
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/{1321-f3534bbafebb96c9.js → 1321-e5a456e7ba2447da.js} +1 -1
- package/app/.next-cli-build/static/chunks/{5497-973a06c94a94aff7.js → 5497-f836574435383a9a.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-0c2a1f2542917271.js → page-87ca193c32e4c066.js} +9 -9
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-0a9dfeb5c4e2b097.js +27 -0
- package/app/.next-cli-build/static/css/{3b896d96bcd3ef7a.css → 56aa6e7907cd49f9.css} +1 -1
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/3192.js +0 -27
- package/app/.next-cli-build/server/chunks/379.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-eb6a5a055eded9f8.js +0 -27
- /package/app/.next-cli-build/static/{rJzsAZX3-_OjA05HFqaR_ → HtObZTtODFj1Lp9h6IeqY}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{rJzsAZX3-_OjA05HFqaR_ → HtObZTtODFj1Lp9h6IeqY}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},6262:(a,b,c)=>{var d=c(30083);a.exports={page:"providers_page__lNQhJ "+d.formScope,toolbar:"providers_toolbar__2pR_g",header:"providers_header__s_NP2",description:"providers_description__zL7w6",filter:"providers_filter__uXyjM",actions:"providers_actions__tZbB3",rowActions:"providers_rowActions__jo8WW",select:"providers_select__qT5m6",panel:"providers_panel__HhfEl",list:"providers_list__Xl0Bx",providerRow:"providers_providerRow__7w53x",modelRow:"providers_modelRow__BaZk7",providerLink:"providers_providerLink__p1_5n",providerIcon:"providers_providerIcon__4Smce",identity:"providers_identity__gc5tm",providerName:"providers_providerName__Q5P80",metadata:"providers_metadata__lljWr",providerAddress:"providers_providerAddress__S_6uZ",status:"providers_status__0o78C",iconButton:"providers_iconButton__wueX2 "+d.iconButton,errorBadge:"providers_errorBadge__39MFD",dialog:"providers_dialog__P87TZ "+d.dialog,success:"providers_success__dL3RB",error:"providers_error__yBcA8",empty:"providers_empty__cy1cY",emptyTitle:"providers_emptyTitle___2E_x",showMore:"providers_showMore__hmFpK",testRow:"providers_testRow__FX937",fieldGroup:"providers_fieldGroup__e_9HL",settingsGroup:"providers_settingsGroup__BKD1U",customHeaderRow:"providers_customHeaderRow__GyQ3r",detailTitle:"providers_detailTitle__uBT1b",detailLink:"providers_detailLink__0O8z2"}},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29423:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},30083:a=>{a.exports={dialog:"DashboardControls_dialog__YyPS4",formScope:"DashboardControls_formScope__ID02o",fields:"DashboardControls_fields__IY485",iconButton:"DashboardControls_iconButton__v_EJw",modelPicker:"DashboardControls_modelPicker__BheYV DashboardControls_dialog__YyPS4"}},31185:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"/root/workspace/JRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/root/workspace/JRouter/src/app/(dashboard)/layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/root/workspace/JRouter/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},31421:a=>{"use strict";a.exports=require("node:child_process")},31886:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>af});var d=c(48249),e=c(21707),f=c(67484),g=c(19099),h=c(2116),i=c.n(h),j=c(81220),k=c(29225),l=c(50412),m=c(92592),n=c(91431),o=c(70552),p=c(18982);c(87592);var q=c(60757);let r=["none","low","medium","high"],s=["none","thinking"],t=["none","low","medium","high","xhigh","max"],u={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":t,"claude-budget":t,"gemini-level":["minimal","low","medium","high"],"gemini-budget":r,zai:s,qwen:r,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],river:["none","low","medium","high","xhigh","max"],minimax:s,hunyuan:r,step:r,nous:r},v=["none","minimal","low","medium","high","xhigh","max"],w=["none","low","medium","high","max"],x=[{pattern:"*gemini-4*",levels:["low","medium","high"]},{pattern:"*claude*4.6*",levels:w},{pattern:"*claude*4-6*",levels:w},{provider:"codex",pattern:"*gpt-6*",levels:v},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:v},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function y(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return b?{major:Number(b[1]),minor:void 0===b[2]?null:Number(b[2])}:null}(a);if(!c)return null;let{major:d,minor:e}=c;return d<4||4===d&&(null===e||e<=5||null!==e&&e>=1e3)?null:"output_config"}(b))return null;let c=(0,o.nl)(a,b);if(!c.reasoning)return null;let d=String(b||"").replace(/\([^()]+\)\s*$/,""),e="codex"===a?(0,q.SM)("cx").find(a=>a.id===d)?.thinkingLevels:null,f=x.find(c=>(!c.provider||c.provider===a)&&(0,p.gH)(c.pattern,b)),g=e||f?.levels||u[c.thinkingFormat]||r;return!1===c.thinkingCanDisable&&(g=g.filter(a=>"none"!==a)),g}var z=c(50377),A=c(29476),B=c(99258);function C({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}var D=c(49885),E=c.n(D);function F({model:a,fullModel:b,alias:c,copied:f,onCopy:g,testStatus:h,isCustom:i,isFree:j,onDeleteAlias:k,onTest:m,isTesting:n,onDisable:o,caps:p,thinkingSuffix:q}){let r=q?`${b}(${q})`:b,s="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)(e.default,{className:"shrink-0 text-base mt-0.5 sm:mt-0",style:s?{color:s}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"w-fit max-w-full break-all rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px] sm:truncate",children:r}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(l.nh,{caps:p,colorOverride:"text-text-muted/70",size:12})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[m&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:m,disabled:n,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${n?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)(e.default,{className:"text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:n?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>g(r,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)(e.default,{className:"text-sm",children:f===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:f===`model-${a.id}`?"Copied!":"Copy"})]}),i?(0,d.jsx)("button",{onClick:k,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,d.jsx)(e.default,{className:"text-sm",children:"close"})}):o?(0,d.jsx)("button",{onClick:o,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,d.jsx)(e.default,{className:"text-sm",children:"close"})}):null]})]})})}F.propTypes={model:E().shape({id:E().string.isRequired}).isRequired,fullModel:E().string.isRequired,alias:E().string,copied:E().string,onCopy:E().func.isRequired,testStatus:E().oneOf(["ok","error"]),isCustom:E().bool,isFree:E().bool,onDeleteAlias:E().func,onTest:E().func,isTesting:E().bool,onDisable:E().func,caps:E().object,thinkingSuffix:E().string},E().string.isRequired,E().string.isRequired,E().string,E().func.isRequired,E().func.isRequired,E().func,E().oneOf(["ok","error"]),E().bool,E().string.isRequired,E().object.isRequired,E().arrayOf(E().object),E().string,E().func.isRequired,E().func.isRequired,E().func.isRequired,E().func.isRequired;var G=c(6262),H=c.n(G);function I({modelId:a,fullModel:b,copied:c,onCopy:f,onDeleteAlias:g,onTest:h,testStatus:i,isTesting:j}){let k="ok"===i?"var(--pos)":"error"===i?"var(--danger)":void 0;return(0,d.jsxs)("div",{className:H().modelRow,children:[(0,d.jsx)(e.default,{className:"text-base text-text-muted",style:k?{color:k}:void 0,children:"ok"===i?"check_circle":"error"===i?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"min-w-0 text-xs text-text-muted font-mono break-all",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a}`),className:H().iconButton,"aria-label":`Copy ${b}`,title:`Copy ${b}`,children:(0,d.jsx)(e.default,{className:"text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),h&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:h,disabled:j,className:H().iconButton,"aria-label":`Test ${a}`,title:`Test ${a}`,children:(0,d.jsx)(e.default,{className:"text-sm",style:j?{animation:"spin 1s linear infinite"}:void 0,children:j?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:j?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:g,className:`${H().iconButton} ${H().error}`,"aria-label":`Remove ${a}`,title:"Remove model",children:(0,d.jsx)(e.default,{className:"text-sm",children:"delete"})})]})}function J({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:e,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:j,onDeleteCustomModel:k,connections:m,isAnthropic:n}){let[o,p]=(0,f.useState)(""),[q,r]=(0,f.useState)(!1),[s,t]=(0,f.useState)(!1),[u,v]=(0,f.useState)(null),[w,x]=(0,f.useState)({}),y=async b=>{if(!u){v(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();x(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{x(a=>({...a,[b]:"error"}))}finally{v(null)}}},z=C({customModels:e,modelAliases:c,providerAlias:a,type:"llm"}),A=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await j(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},B=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(z.some(a=>a.id===b)||(await j(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{t(!1)}}},D=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:H().description,children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsx)(l.pd,{className:"flex-[1_1_200px] min-w-0",label:"Model ID",id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&A(),placeholder:n?"claude-3-opus-20240229":"gpt-4o"}),(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",icon:"add",onClick:A,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"download",onClick:B,disabled:!D||s,children:s?"Importing...":"Import from /models"})]}),!D&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z.length>0&&(0,d.jsx)("div",{className:"flex min-w-0 flex-col",children:z.map(({id:c,alias:e,source:f})=>(0,d.jsx)(I,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?k(c):i(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`))})]})}J.propTypes={providerStorageAlias:E().string.isRequired,providerDisplayAlias:E().string.isRequired,modelAliases:E().object.isRequired,customModels:E().arrayOf(E().object),copied:E().string,onCopy:E().func.isRequired,onDeleteAlias:E().func.isRequired,onAddCustomModel:E().func.isRequired,onDeleteCustomModel:E().func.isRequired,connections:E().arrayOf(E().shape({id:E().string,isActive:E().bool})).isRequired,isAnthropic:E().bool};var K=c(74429),L=c(74875);function M({until:a}){let[b,c]=(0,f.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}M.propTypes={until:E().string.isRequired};var N=c(98153);function O({connection:a,proxyPools:b,isOAuth:c,isFirst:g,isLast:h,onMoveUp:i,onMoveDown:j,onToggleActive:k,onUpdateProxy:m,onEdit:n,onDelete:o,oneByOneStatus:p=null,autoPing:q=null}){let[r,s]=(0,f.useState)(!1),[t,u]=(0,f.useState)(!1),v=(0,f.useRef)(null),w=(0,f.useRef)(null),[x,y]=(0,f.useState)(null),z=new Map((b||[]).map(a=>[a.id,a])),A=a.providerSpecificData?.proxyPoolId||null,B=A?z.get(A):null,C=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,D=!!A||C,E=B?`Pool: ${B.name}`:A?`Pool: ${A} (inactive/missing)`:C?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",F=(()=>{if(!q)return"";let a=[];return(q.reactiveOn&&a.push("On reset"),q.scheduleOn&&a.push(`Scheduled (${q.scheduleSummary||"active"})`),a.length>0)?`Auto-ping active: ${a.join(" + ")}. Click to configure.`:"codex"===q.provider?"Auto-starts the next 5h Codex window after reset or on schedule. Click to configure.":"Auto-starts a new window on quota reset or fixed schedule. Click to configure."})(),G="";if(B?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=B?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);G=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{G=b}}let I=B?.noProxy||a.providerSpecificData?.connectionNoProxy||"",J="default";B?.isActive===!0?J="success":(A||C)&&(J="error");let P=async a=>{u(!0);try{await m("__none__"===a?null:a)}finally{u(!1),s(!1)}},Q=a.authType||(c?"oauth":"apikey"),R="oauth"===Q,S="cookie"===Q,T=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(R?"OAuth Account":S?"Cookie Account":"API Key"),U=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[V,W]=(0,f.useState)(!1),X=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,Y="unavailable"!==a.testStatus||V?a.testStatus:"active",Z=()=>(0,L.g)(a.isActive,Y),$=()=>p?"success"===p.state?"success":"failed"===p.state?"error":"testing"===p.state?"primary":"default":"default",_=()=>p?"queued"===p.state?"queued":"testing"===p.state?"testing":"success"===p.state?"success":"failed"===p.state?p.error?`failed: ${p.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{"aria-label":`Move ${T} up`,onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-surface-2 text-text-muted hover:text-text-main"}`,children:(0,d.jsx)(e.default,{className:"text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{"aria-label":`Move ${T} down`,onClick:j,disabled:h,className:`p-0.5 rounded ${h?"text-text-muted/30 cursor-not-allowed":"hover:bg-surface-2 text-text-muted hover:text-text-main"}`,children:(0,d.jsx)(e.default,{className:"text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)(e.default,{className:"shrink-0 text-base text-text-muted",children:S?"cookie":R?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:T}),U&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:U}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(N.A,{variant:Z(),className:"error"===Z()?H().errorBadge:void 0,children:!1===a.isActive?"disabled":Y||"Unknown"}),(0,d.jsx)(N.A,{dot:!1,children:R?"OAuth":S?"Cookie":"API Key"}),D&&(0,d.jsx)(N.A,{variant:J,dot:!1,children:"Proxy"}),V&&!1!==a.isActive&&(0,d.jsx)(M,{until:X}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:`max-w-full truncate text-xs sm:max-w-[300px] ${H().error}`,title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),_()&&(0,d.jsx)(N.A,{variant:"primary"===$()?"default":$(),dot:!1,children:_()})]}),D&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:E,children:E}),G&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:G}),I&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{ref:w,onClick:()=>{if(r)return void s(!1);let a=w.current?.getBoundingClientRect();if(!a)return void s(!0);let c=((b?.length||0)+1)*34+8,d=window.innerHeight-a.bottom,e=d<c&&a.top>d;y({position:"fixed",right:window.innerWidth-a.right,...e?{bottom:window.innerHeight-a.top+4,maxHeight:Math.max(a.top-8,120)}:{top:a.bottom+4,maxHeight:Math.max(d-8,120)}}),s(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-surface-2 ${D?"text-text-main":"text-text-muted hover:text-text-main"}`,disabled:t,children:[(0,d.jsx)(e.default,{className:"text-[18px]",children:t?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),r&&(0,K.createPortal)((0,d.jsxs)("div",{ref:v,style:x,className:"z-50 max-w-[78vw] min-w-[160px] overflow-y-auto rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,d.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!A?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>P(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${A===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]}),document.body)]}),q&&(0,d.jsx)(l.m_,{text:F,children:(0,d.jsxs)("button",{onClick:q.onConfigure,className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-surface-2 ${q.isActive?"text-text-main":"text-text-muted hover:text-text-main"}`,children:[(0,d.jsx)(e.default,{className:"text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsx)("button",{onClick:n,className:H().iconButton,"aria-label":`Edit ${T}`,title:`Edit ${T}`,children:(0,d.jsx)(e.default,{className:"text-[18px]",children:"edit"})}),(0,d.jsx)("button",{onClick:o,className:`${H().iconButton} ${H().error}`,"aria-label":`Delete ${T}`,title:`Delete ${T}`,children:(0,d.jsx)(e.default,{className:"text-[18px]",children:"delete"})})]}),(0,d.jsx)(l.lM,{size:"sm",checked:a.isActive??!0,"aria-label":`${!1===a.isActive?"Enable":"Disable"} ${T}`,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}function P(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}O.propTypes={connection:E().shape({id:E().string,name:E().string,email:E().string,displayName:E().string,modelLockUntil:E().string,testStatus:E().string,isActive:E().bool,lastError:E().string,priority:E().number,globalPriority:E().number}).isRequired,proxyPools:E().arrayOf(E().shape({id:E().string,name:E().string,proxyUrl:E().string,noProxy:E().string,isActive:E().bool})),isOAuth:E().bool.isRequired,isFirst:E().bool.isRequired,isLast:E().bool.isRequired,onMoveUp:E().func.isRequired,onMoveDown:E().func.isRequired,onToggleActive:E().func.isRequired,onUpdateProxy:E().func,onEdit:E().func.isRequired,onDelete:E().func.isRequired,oneByOneStatus:E().shape({state:E().string,error:E().string}),autoPing:E().shape({isActive:E().bool,provider:E().string,reactiveOn:E().bool,scheduleOn:E().bool,scheduleSummary:E().string,onConfigure:E().func})};let Q=`name1|sk-key1
|
|
1
|
+
(()=>{var a={};a.id=2134,a.ids=[2134],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},6262:(a,b,c)=>{var d=c(30083);a.exports={page:"providers_page__lNQhJ "+d.formScope,toolbar:"providers_toolbar__2pR_g",header:"providers_header__s_NP2",description:"providers_description__zL7w6",filter:"providers_filter__uXyjM",actions:"providers_actions__tZbB3",rowActions:"providers_rowActions__jo8WW",select:"providers_select__qT5m6",panel:"providers_panel__HhfEl",list:"providers_list__Xl0Bx",providerRow:"providers_providerRow__7w53x",modelRow:"providers_modelRow__BaZk7",providerLink:"providers_providerLink__p1_5n",providerIcon:"providers_providerIcon__4Smce",identity:"providers_identity__gc5tm",providerName:"providers_providerName__Q5P80",metadata:"providers_metadata__lljWr",providerAddress:"providers_providerAddress__S_6uZ",status:"providers_status__0o78C",iconButton:"providers_iconButton__wueX2 "+d.iconButton,errorBadge:"providers_errorBadge__39MFD",dialog:"providers_dialog__P87TZ "+d.dialog,success:"providers_success__dL3RB",error:"providers_error__yBcA8",empty:"providers_empty__cy1cY",emptyTitle:"providers_emptyTitle___2E_x",showMore:"providers_showMore__hmFpK",testRow:"providers_testRow__FX937",fieldGroup:"providers_fieldGroup__e_9HL",settingsGroup:"providers_settingsGroup__BKD1U",customHeaderRow:"providers_customHeaderRow__GyQ3r",detailTitle:"providers_detailTitle__uBT1b",detailLink:"providers_detailLink__0O8z2"}},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29423:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},30083:a=>{a.exports={dialog:"DashboardControls_dialog__YyPS4",formScope:"DashboardControls_formScope__ID02o",fields:"DashboardControls_fields__IY485",iconButton:"DashboardControls_iconButton__v_EJw",modelPicker:"DashboardControls_modelPicker__BheYV DashboardControls_dialog__YyPS4"}},31185:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"/root/workspace/JRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/root/workspace/JRouter/src/app/(dashboard)/layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/root/workspace/JRouter/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},31421:a=>{"use strict";a.exports=require("node:child_process")},31886:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>af});var d=c(48249),e=c(21707),f=c(67484),g=c(19099),h=c(2116),i=c.n(h),j=c(81220),k=c(29225),l=c(50412),m=c(92592),n=c(91431),o=c(70552),p=c(18982);c(87592);var q=c(60757);let r=["none","low","medium","high"],s=["none","thinking"],t=["none","low","medium","high","xhigh","max"],u={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":t,"claude-budget":t,"gemini-level":["minimal","low","medium","high"],"gemini-budget":r,zai:s,qwen:r,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],river:["none","low","medium","high","xhigh","max"],minimax:s,hunyuan:r,step:r,nous:r},v=["none","minimal","low","medium","high","xhigh","max"],w=["none","low","medium","high","max"],x=[{pattern:"*gemini-4*",levels:["low","medium","high"]},{pattern:"*claude*4.6*",levels:w},{pattern:"*claude*4-6*",levels:w},{provider:"codex",pattern:"*gpt-6*",levels:v},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:v},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function y(a,b){if("kiro"===a&&null===function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=function(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return b?{major:Number(b[1]),minor:void 0===b[2]?null:Number(b[2])}:null}(a);if(!c)return null;let{major:d,minor:e}=c;return d<4||4===d&&(null===e||e<=5||null!==e&&e>=1e3)?null:"output_config"}(b))return null;let c=(0,o.nl)(a,b);if(!c.reasoning)return null;let d=String(b||"").replace(/\([^()]+\)\s*$/,""),e="codex"===a?(0,q.SM)("cx").find(a=>a.id===d)?.thinkingLevels:null,f=x.find(c=>(!c.provider||c.provider===a)&&(0,p.gH)(c.pattern,b)),g=e||f?.levels||u[c.thinkingFormat]||r;return!1===c.thinkingCanDisable&&(g=g.filter(a=>"none"!==a)),g}var z=c(50377),A=c(29476),B=c(99258);function C({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}var D=c(49885),E=c.n(D);function F({model:a,fullModel:b,alias:c,copied:f,onCopy:g,testStatus:h,isCustom:i,isFree:j,onDeleteAlias:k,onTest:m,isTesting:n,onDisable:o,caps:p,thinkingSuffix:q}){let r=q?`${b}(${q})`:b,s="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)(e.default,{className:"shrink-0 text-base mt-0.5 sm:mt-0",style:s?{color:s}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"w-fit max-w-full break-all rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px] sm:truncate",children:r}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(l.nh,{caps:p,colorOverride:"text-text-muted/70",size:12})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[m&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:m,disabled:n,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${n?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)(e.default,{className:"text-sm",style:n?{animation:"spin 1s linear infinite"}:void 0,children:n?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:n?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>g(r,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)(e.default,{className:"text-sm",children:f===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:f===`model-${a.id}`?"Copied!":"Copy"})]}),i?(0,d.jsx)("button",{onClick:k,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,d.jsx)(e.default,{className:"text-sm",children:"close"})}):o?(0,d.jsx)("button",{onClick:o,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,d.jsx)(e.default,{className:"text-sm",children:"close"})}):null]})]})})}F.propTypes={model:E().shape({id:E().string.isRequired}).isRequired,fullModel:E().string.isRequired,alias:E().string,copied:E().string,onCopy:E().func.isRequired,testStatus:E().oneOf(["ok","error"]),isCustom:E().bool,isFree:E().bool,onDeleteAlias:E().func,onTest:E().func,isTesting:E().bool,onDisable:E().func,caps:E().object,thinkingSuffix:E().string},E().string.isRequired,E().string.isRequired,E().string,E().func.isRequired,E().func.isRequired,E().func,E().oneOf(["ok","error"]),E().bool,E().string.isRequired,E().object.isRequired,E().arrayOf(E().object),E().string,E().func.isRequired,E().func.isRequired,E().func.isRequired,E().func.isRequired;var G=c(6262),H=c.n(G);function I({modelId:a,fullModel:b,copied:c,onCopy:f,onDeleteAlias:g,onTest:h,testStatus:i,isTesting:j}){let k="ok"===i?"var(--pos)":"error"===i?"var(--danger)":void 0;return(0,d.jsxs)("div",{className:H().modelRow,children:[(0,d.jsx)(e.default,{className:"text-base text-text-muted",style:k?{color:k}:void 0,children:"ok"===i?"check_circle":"error"===i?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"min-w-0 text-xs text-text-muted font-mono break-all",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a}`),className:H().iconButton,"aria-label":`Copy ${b}`,title:`Copy ${b}`,children:(0,d.jsx)(e.default,{className:"text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),h&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:h,disabled:j,className:H().iconButton,"aria-label":`Test ${a}`,title:`Test ${a}`,children:(0,d.jsx)(e.default,{className:"text-sm",style:j?{animation:"spin 1s linear infinite"}:void 0,children:j?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:j?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:g,className:`${H().iconButton} ${H().error}`,"aria-label":`Remove ${a}`,title:"Remove model",children:(0,d.jsx)(e.default,{className:"text-sm",children:"delete"})})]})}function J({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:e,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:j,onDeleteCustomModel:k,connections:m,isAnthropic:n}){let[o,p]=(0,f.useState)(""),[q,r]=(0,f.useState)(!1),[s,t]=(0,f.useState)(!1),[u,v]=(0,f.useState)(null),[w,x]=(0,f.useState)({}),y=async b=>{if(!u){v(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();x(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{x(a=>({...a,[b]:"error"}))}finally{v(null)}}},z=C({customModels:e,modelAliases:c,providerAlias:a,type:"llm"}),A=async()=>{if(!o.trim()||q)return;let a=o.trim();if(z.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await j(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},B=async()=>{if(s)return;let a=m.find(a=>!1!==a.isActive);if(a){t(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(z.some(a=>a.id===b)||(await j(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{t(!1)}}},D=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:H().description,children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsx)(l.pd,{className:"flex-[1_1_200px] min-w-0",label:"Model ID",id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&A(),placeholder:n?"claude-3-opus-20240229":"gpt-4o"}),(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",icon:"add",onClick:A,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"download",onClick:B,disabled:!D||s,children:s?"Importing...":"Import from /models"})]}),!D&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),z.length>0&&(0,d.jsx)("div",{className:"flex min-w-0 flex-col",children:z.map(({id:c,alias:e,source:f})=>(0,d.jsx)(I,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?k(c):i(e),onTest:m.length>0?()=>y(c):void 0,testStatus:w[c],isTesting:u===c},`${f}-${a}/${c}`))})]})}J.propTypes={providerStorageAlias:E().string.isRequired,providerDisplayAlias:E().string.isRequired,modelAliases:E().object.isRequired,customModels:E().arrayOf(E().object),copied:E().string,onCopy:E().func.isRequired,onDeleteAlias:E().func.isRequired,onAddCustomModel:E().func.isRequired,onDeleteCustomModel:E().func.isRequired,connections:E().arrayOf(E().shape({id:E().string,isActive:E().bool})).isRequired,isAnthropic:E().bool};var K=c(74429),L=c(74875);function M({until:a}){let[b,c]=(0,f.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}M.propTypes={until:E().string.isRequired};var N=c(98153);function O({connection:a,proxyPools:b,isOAuth:c,isFirst:g,isLast:h,onMoveUp:i,onMoveDown:j,onToggleActive:k,onUpdateProxy:m,onEdit:n,onDelete:o,oneByOneStatus:p=null,autoPing:q=null}){let[r,s]=(0,f.useState)(!1),[t,u]=(0,f.useState)(!1),v=(0,f.useRef)(null),w=(0,f.useRef)(null),[x,y]=(0,f.useState)(null),z=new Map((b||[]).map(a=>[a.id,a])),A=a.providerSpecificData?.proxyPoolId||null,B=A?z.get(A):null,C=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,D=!!A||C,E=B?`Pool: ${B.name}`:A?`Pool: ${A} (inactive/missing)`:C?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",F=(()=>{if(!q)return"";let a=[];return(q.reactiveOn&&a.push("On reset"),q.scheduleOn&&a.push(`Scheduled (${q.scheduleSummary||"active"})`),a.length>0)?`Auto-ping active: ${a.join(" + ")}. Click to configure.`:"codex"===q.provider?"Auto-starts the next 5h Codex window after reset or on schedule. Click to configure.":"Auto-starts a new window on quota reset or fixed schedule. Click to configure."})(),G="";if(B?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=B?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);G=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{G=b}}let I=B?.noProxy||a.providerSpecificData?.connectionNoProxy||"",J="default";B?.isActive===!0?J="success":(A||C)&&(J="error");let P=async a=>{u(!0);try{await m("__none__"===a?null:a)}finally{u(!1),s(!1)}},Q=a.authType||(c?"oauth":"apikey"),R="oauth"===Q,S="cookie"===Q,T=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(R?"OAuth Account":S?"Cookie Account":"API Key"),U=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[V,W]=(0,f.useState)(!1),X=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,Y="unavailable"!==a.testStatus||V?a.testStatus:"active",Z=()=>(0,L.g)(a.isActive,Y),$=()=>p?"success"===p.state?"success":"failed"===p.state?"error":"testing"===p.state?"primary":"default":"default",_=()=>p?"queued"===p.state?"queued":"testing"===p.state?"testing":"success"===p.state?"success":"failed"===p.state?p.error?`failed: ${p.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{"aria-label":`Move ${T} up`,onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-surface-2 text-text-muted hover:text-text-main"}`,children:(0,d.jsx)(e.default,{className:"text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{"aria-label":`Move ${T} down`,onClick:j,disabled:h,className:`p-0.5 rounded ${h?"text-text-muted/30 cursor-not-allowed":"hover:bg-surface-2 text-text-muted hover:text-text-main"}`,children:(0,d.jsx)(e.default,{className:"text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)(e.default,{className:"shrink-0 text-base text-text-muted",children:S?"cookie":R?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:T}),U&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:U}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(N.A,{variant:Z(),className:"error"===Z()?H().errorBadge:void 0,children:!1===a.isActive?"disabled":Y||"Unknown"}),a.demotedAt&&!1!==a.isActive&&(0,d.jsx)("span",{title:`Failed recently — serving at the back of the rotation until its next success (since ${new Date(a.demotedAt).toLocaleTimeString()})`,className:"px-1.5 py-0.5 rounded-[var(--r1)] bg-transparent border border-[var(--line)] text-[10px] font-mono text-[var(--text-2)]",children:"⬇ demoted"}),(0,d.jsx)(N.A,{dot:!1,children:R?"OAuth":S?"Cookie":"API Key"}),D&&(0,d.jsx)(N.A,{variant:J,dot:!1,children:"Proxy"}),V&&!1!==a.isActive&&(0,d.jsx)(M,{until:X}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:`max-w-full truncate text-xs sm:max-w-[300px] ${H().error}`,title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),_()&&(0,d.jsx)(N.A,{variant:"primary"===$()?"default":$(),dot:!1,children:_()})]}),D&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:E,children:E}),G&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:G}),I&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{ref:w,onClick:()=>{if(r)return void s(!1);let a=w.current?.getBoundingClientRect();if(!a)return void s(!0);let c=((b?.length||0)+1)*34+8,d=window.innerHeight-a.bottom,e=d<c&&a.top>d;y({position:"fixed",right:window.innerWidth-a.right,...e?{bottom:window.innerHeight-a.top+4,maxHeight:Math.max(a.top-8,120)}:{top:a.bottom+4,maxHeight:Math.max(d-8,120)}}),s(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-surface-2 ${D?"text-text-main":"text-text-muted hover:text-text-main"}`,disabled:t,children:[(0,d.jsx)(e.default,{className:"text-[18px]",children:t?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),r&&(0,K.createPortal)((0,d.jsxs)("div",{ref:v,style:x,className:"z-50 max-w-[78vw] min-w-[160px] overflow-y-auto rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,d.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!A?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>P(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${A===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]}),document.body)]}),q&&(0,d.jsx)(l.m_,{text:F,children:(0,d.jsxs)("button",{onClick:q.onConfigure,className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-surface-2 ${q.isActive?"text-text-main":"text-text-muted hover:text-text-main"}`,children:[(0,d.jsx)(e.default,{className:"text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsx)("button",{onClick:n,className:H().iconButton,"aria-label":`Edit ${T}`,title:`Edit ${T}`,children:(0,d.jsx)(e.default,{className:"text-[18px]",children:"edit"})}),(0,d.jsx)("button",{onClick:o,className:`${H().iconButton} ${H().error}`,"aria-label":`Delete ${T}`,title:`Delete ${T}`,children:(0,d.jsx)(e.default,{className:"text-[18px]",children:"delete"})})]}),(0,d.jsx)(l.lM,{size:"sm",checked:a.isActive??!0,"aria-label":`${!1===a.isActive?"Enable":"Disable"} ${T}`,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}function P(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}O.propTypes={connection:E().shape({id:E().string,name:E().string,email:E().string,displayName:E().string,modelLockUntil:E().string,testStatus:E().string,isActive:E().bool,lastError:E().string,priority:E().number,globalPriority:E().number}).isRequired,proxyPools:E().arrayOf(E().shape({id:E().string,name:E().string,proxyUrl:E().string,noProxy:E().string,isActive:E().bool})),isOAuth:E().bool.isRequired,isFirst:E().bool.isRequired,isLast:E().bool.isRequired,onMoveUp:E().func.isRequired,onMoveDown:E().func.isRequired,onToggleActive:E().func.isRequired,onUpdateProxy:E().func,onEdit:E().func.isRequired,onDelete:E().func.isRequired,oneByOneStatus:E().shape({state:E().string,error:E().string}),autoPing:E().shape({isActive:E().bool,provider:E().string,reactiveOn:E().bool,scheduleOn:E().bool,scheduleSummary:E().string,onConfigure:E().func})};let Q=`name1|sk-key1
|
|
2
2
|
name2|sk-key2
|
|
3
3
|
sk-key-only-auto-named`;function R({isOpen:a,provider:b,providerName:c,isCompatible:e,isAnthropic:g,authType:h,authHint:i,website:j,proxyPools:k,error:n,existingNames:o,onSave:p,onBulkDone:q,onClose:r}){let s="__none__",t="ollama-local"===b,u="cookie"===h,v="xai"===b&&!u,w=u?"Cookie Value":"qoder"===b||"qoder-cn"===b?"Personal Access Token (PAT)":"API Key",x="azure"===b,y="cloudflare-ai"===b,z=m.Q2?.[b]?.credentialForm==="aws",A=m.Q2?.[b]?.apiKeyOptionalWith||null,B=m.Q2?.[b]?.regions||null,C=m.Q2?.[b]?.defaultRegion||B?.[0]?.id||"",[D,E]=(0,f.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:s,ollamaHostUrl:""}),[F,G]=(0,f.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,J]=(0,f.useState)({accountId:""}),[K,L]=(0,f.useState)({profile:"",region:"",accessKeyId:"",sessionToken:""}),[M,O]=(0,f.useState)(C),[S,T]=(0,f.useState)(!1),[U,V]=(0,f.useState)(null),[W,X]=(0,f.useState)(!1),Y=y?`name1|sk-key1|acc123456
|
|
4
4
|
name2|sk-key2|def789012
|
|
@@ -24,4 +24,4 @@ pt-only-auto-named`:Q,[Z,$]=(0,f.useState)("single"),[_,aa]=(0,f.useState)(""),[
|
|
|
24
24
|
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
25
25
|
"email": "account2@example.com"
|
|
26
26
|
}
|
|
27
|
-
]`;function Y(a){let b,c=a.trim();if(!c)return[];try{b=JSON.parse(c)}catch(a){try{let a=c;a.startsWith("[")||((a=a.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(a=a.slice(0,-1)),a=`[${a}]`),b=JSON.parse(a)}catch{throw a}}if(Array.isArray(b))return b;if(b&&"object"==typeof b)return Array.isArray(b.accounts)?b.accounts:[b];throw Error("Input must be a JSON object or array of objects")}function Z({isOpen:a,onClose:b,onSuccess:c}){let[g,h]=(0,f.useState)(""),[i,j]=(0,f.useState)(!1),[k,m]=(0,f.useState)(""),[n,o]=(0,f.useState)(null),[p,q]=(0,f.useState)(!1),[r,s]=(0,f.useState)(null),t=(0,f.useRef)(null),u=()=>{i||(h(""),m(""),o(null),s(null),q(!1),b())},v=async a=>{if(!a||0===a.length)return;m("");let b=Array.from(a).filter(a=>a.name.endsWith(".json")||"application/json"===a.type||""===a.type);if(0===b.length)return void m((0,B.Tl)("Please select valid .json files"));try{let a=[];for(let c of b){let b=await c.text(),d=Y(b);Array.isArray(d)?a.push(...d):d&&a.push(d)}if(0===a.length)return void m((0,B.Tl)("No accounts found in selected files"));h(JSON.stringify(a,null,2)),s({filesCount:b.length,accountsCount:a.length})}catch(a){m(`${(0,B.Tl)("Error reading files")}: ${a.message}`)}},w=async()=>{let a;m(""),o(null);try{a=Y(g)}catch(a){m(`${(0,B.Tl)("Invalid JSON")}: ${a.message}`);return}if(!a||0===a.length)return void m((0,B.Tl)("No accounts found in input"));j(!0);try{let b=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),d=await b.json();if(!b.ok)return void m(d?.error||`Request failed: ${b.status}`);o(d),d.success>0&&"function"==typeof c&&c()}catch(a){m(a.message||(0,B.Tl)("Request failed"))}finally{j(!1)}},x=n?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(l.aF,{isOpen:a,title:(0,B.Tl)("Bulk Add Grok CLI Accounts"),onClose:u,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,B.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,d.jsx)("input",{ref:t,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:a=>{v(a.target.files),a.target&&(a.target.value="")}}),(0,d.jsx)(l.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>t.current?.click(),disabled:i,children:(0,B.Tl)("Upload JSON Files")})]}),(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),q(!0)},onDragLeave:a=>{a.preventDefault(),q(!1)},onDrop:a=>{a.preventDefault(),q(!1),a.dataTransfer?.files?.length>0&&v(a.dataTransfer.files)},className:`relative rounded border transition-colors ${p?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,d.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:X,value:g,onChange:a=>{h(a.target.value),s(null)},disabled:i}),p&&(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,d.jsx)(e.default,{className:"text-3xl text-primary mb-1",children:"upload_file"}),(0,d.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,B.Tl)("Drop .json files here")})]})]}),r&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,d.jsx)(e.default,{className:"text-sm",children:"check_circle"}),(0,d.jsxs)("span",{children:[(0,B.Tl)("Loaded")," ",r.accountsCount," ",(0,B.Tl)("account(s) from")," ",r.filesCount," ",(0,B.Tl)("file(s)")]})]}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),n&&n.failed>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",n.failed," ",(0,B.Tl)("failed")]}),x.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:x.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(l.$n,{onClick:w,fullWidth:!0,disabled:i||!g.trim(),children:i?(0,B.Tl)("Importing..."):(0,B.Tl)("Import All")}),(0,d.jsx)(l.$n,{onClick:u,variant:"ghost",fullWidth:!0,disabled:i,children:(0,B.Tl)("Close")})]})]})})}var $=c(41371);let _=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],aa=/^[A-Za-z0-9-]+$/;function ab({providerId:a}){let b=(0,$.i)(),[c,g]=(0,f.useState)(!1),[h,i]=(0,f.useState)([{name:"",value:""}]),[j,k]=(0,f.useState)({}),[m,n]=(0,f.useState)(!1),[o,p]=(0,f.useState)(!1),q=(a,b,c)=>{i(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},r=(0,f.useCallback)(async()=>{let c={};for(let a of h.filter(a=>a.name.trim())){let d=a.name.trim();if(!aa.test(d))return void b.error(`Invalid header name: ${d}`);if(_.includes(d.toLowerCase()))return void b.error(`Header ${d} cannot be overridden`);if(d in c)return void b.error(`Duplicate header name: ${d}`);a.value!==j[d]&&(c[d]=a.value)}p(!0);try{let d=await fetch(`/api/providers/${a}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:c})});if(!d.ok){let a=await d.json().catch(()=>({}));b.error(a.error||"Failed to save");return}n(Object.keys(c).length>0),b.success("Custom headers saved")}finally{p(!1)}},[h,j,a,b]);return 0!==Object.keys(j).length||m?(0,d.jsxs)(l.Zp,{className:`ui-card ${H().panel}`,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>g(a=>!a),"aria-expanded":c,className:"flex w-full items-center justify-between text-left",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"tune"}),"Custom Headers"]}),m&&(0,d.jsx)(N.A,{variant:"success",children:"Active"})]}),(0,d.jsx)(e.default,{className:"text-[16px] text-text-muted",children:c?"expand_less":"expand_more"})]}),c&&(0,d.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:h.map((a,b)=>{let c=a.name.trim()in j&&a.value!==j[a.name.trim()];return(0,d.jsxs)("div",{className:H().customHeaderRow,children:[(0,d.jsx)(l.pd,{"aria-label":`Header ${b+1} name`,value:a.name,onChange:a=>q(b,"name",a.target.value),placeholder:"Header-Name",spellCheck:!1,className:"min-w-0"}),(0,d.jsx)(l.pd,{"aria-label":`Header ${b+1} value`,value:a.value,onChange:a=>q(b,"value",a.target.value),placeholder:"Value",spellCheck:!1,title:c?"Overridden":a.name.trim()in j?"Registry default":"",className:"min-w-0",inputClassName:c?"border-[var(--warn)]":void 0}),(0,d.jsx)("button",{type:"button",title:"Remove header","aria-label":`Remove header ${b+1}`,onClick:()=>i(a=>a.length>1?a.filter((a,c)=>c!==b):[{name:"",value:""}]),className:`${H().iconButton} ${H().error}`,children:(0,d.jsx)(e.default,{className:"text-[16px]",children:"delete"})})]},b)})}),(0,d.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,d.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"add",onClick:()=>i(a=>[...a,{name:"",value:""}]),children:"Add header"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:o,onClick:()=>{i(Object.entries(j).map(([a,b])=>({name:a,value:b})))},children:"Reset"}),(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",disabled:o,onClick:r,children:o?"Saving...":"Save"})]})]})]})]}):null}ab.propTypes={providerId:E().string.isRequired};var ac=c(56020),ad=c(54589);let ae={claude:"claudeAutoPing",codex:"codexAutoPing"};function af(){let a,b,c,h,o,p=(0,g.useParams)(),q=(0,g.useRouter)(),r=p.id,{getCaps:s}=(0,A.y)(),[t,u]=(0,f.useState)([]),[v,w]=(0,f.useState)(!0),[x,D]=(0,f.useState)(null),[E,G]=(0,f.useState)([]),[I,K]=(0,f.useState)(!1),[L,M]=(0,f.useState)(!1),[N,P]=(0,f.useState)(!1),[Q,T]=(0,f.useState)(!1),[V,X]=(0,f.useState)(""),[Y,$]=(0,f.useState)(!1),[_,aa]=(0,f.useState)(!1),[af,ag]=(0,f.useState)(!1),[ah,ai]=(0,f.useState)(!1),[aj,ak]=(0,f.useState)(!1),[al,am]=(0,f.useState)(null),[an,ao]=(0,f.useState)({}),[ap,aq]=(0,f.useState)([]),[ar,as]=(0,f.useState)(!1),[at,au]=(0,f.useState)({}),[av,aw]=(0,f.useState)(""),[ax,ay]=(0,f.useState)(()=>new Set),[az,aA]=(0,f.useState)(!1),[aB,aC]=(0,f.useState)([]),[aD,aE]=(0,f.useState)("__none__"),[aF,aG]=(0,f.useState)(!1),[aH,aI]=(0,f.useState)(null),[aJ,aK]=(0,f.useState)(""),[aL,aM]=(0,f.useState)(null),[aN,aO]=(0,f.useState)("auto"),[aP,aQ]=(0,f.useState)({enabled:!1,connections:{},schedules:{}}),[aR,aS]=(0,f.useState)(null),[aT,aU]=(0,f.useState)([]),[aV,aW]=(0,f.useState)([]),[aX,aY]=(0,f.useState)(null),[aZ,a$]=(0,f.useState)([]),[a_,a0]=(0,f.useState)([]),[a1,a2]=(0,f.useState)(null),[a3,a4]=(0,f.useState)(!1),[a5,a6]=(0,f.useState)(!1),[a7,a8]=(0,f.useState)(!1),[a9,ba]=(0,f.useState)(null),[bb,bc]=(0,f.useState)({}),[bd,be]=(0,f.useState)(null),bf=(0,f.useRef)(!1),[bg,bh]=(0,f.useState)(!1),[bi,bj]=(0,f.useState)(!1),{copied:bk,copy:bl}=(0,z.C)(),bm=()=>{K(!0)},bn=()=>{"xiaomi-mimo"===r?M(!0):bs?bm():(X(""),T(!0))},bo=()=>{X(""),T(!0)},bp=()=>{bs?bn():bo()},bq=x?{id:x.id,name:x.name||("anthropic-compatible"===x.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===x.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===x.type?"AC":"OC",apiType:x.apiType,baseUrl:x.baseUrl,type:x.type}:m.zN[r]||m.fg[r]||m.IS[r]||m.nJ[r]||m.br[r],br=bq?.authModes||[],bs=!!m.zN[r]||!!m.IS[r]||br.includes("oauth"),bt=!!m.fg[r]||br.includes("apikey"),bu=!!m.IS[r]?.noAuth,bv=(0,n.KC)(r),bw=("cursor"===r||"zed"===r)&&aV.length>0?aV:bv,bx=(0,m.wG)(r),by=(0,m.mq)(r),bz=(0,m.gb)(r),bA=by||bz,bB=!bA&&bs&&bt,bC="xai"===r?"Grok Build OAuth":"grok-cli"===r?"Grok CLI Device Login":"kimi"===r?"Kimi Coding OAuth":"OAuth",bD="xai"===r?"xAI API Key":"kimi"===r?"Kimi API Key":"qoder"===r||"qoder-cn"===r?"PAT":"API Key",bE=a=>{if(!aN||"auto"===aN)return null;let b=y(r,a);return b&&b.includes(aN)?aN:null},bF=bA?r:bx,bG=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=y(r,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bw)c(a.id);for(let a of aZ)c(a.id);for(let a of ap)a.providerAlias===bF&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),bH=bA?x?.prefix||r:bx,bI=(0,f.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bF)}`,{cache:"no-store"}),b=await a.json();a.ok&&a0(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bF]),bJ=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bF,ids:[a]})})).ok&&await bI()}catch(a){console.log("Error disabling model:",a)}},bK=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bF)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bI()}catch(a){console.log("Error enabling model:",a)}},bL=async a=>{a.length&&a2({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{a2(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bF,ids:a})})).ok&&await bI()}catch(a){console.log("Error disabling all models:",a)}}})},bM=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bF)}`,{method:"DELETE"})).ok&&await bI()}catch(a){console.log("Error enabling all models:",a)}},bN=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ao(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bO=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&aq(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bP=(0,f.useCallback)(async()=>{try{let[a,b,c,d]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===r);u(a)}c.ok&&G(g.proxyPools||[]);let i=(h.providerStrategies||{})[r]||{};aI(i.fallbackStrategy||null),aK(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1"),aM(!1!==i.demoteOnError&&null);let j=(h.providerThinking||{})[r]||{};aO(j.mode||"auto");let k=ae[r],l=k&&h[k]||{};if(aQ({enabled:!0===l.enabled,connections:l.connections||{},schedules:l.schedules||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===r)||null;if(!a&&bA)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===r)||null))break}D(a)}}catch(a){console.log("Error fetching connections:",a)}finally{w(!1)}},[r,bA]),bQ=async a=>{try{let b=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(D(c.node),await bP(),ai(!1))}catch(a){console.log("Error updating provider node:",a)}},bR=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[r]:f[r]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bS=async a=>{aM(!!a&&null);try{let b=await fetch("/api/settings",{cache:"no-store"}),c=(b.ok?await b.json():{}).providerStrategies||{},d={...c[r]||{}};a?delete d.demoteOnError:d.demoteOnError=!1;let e={...c};0===Object.keys(d).length?delete e[r]:e[r]=d,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:e})})}catch(a){console.log("Error saving demoteOnError toggle:",a)}},bT=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[r]={mode:a}:delete c[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bU=async a=>{let b=ae[r];if(b){aQ(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bV=async(a,b,c=bx)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bN();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bW=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bN()}catch(a){console.log("Error deleting alias:",a)}},bX=async(a,b="llm",c=bF,d,e)=>{try{let f=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b,...d?{caps:d}:{},...e?{transport:e}:{}})});if(f.ok)await bO();else{let a=await f.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bY=async(a,b="llm",c=bF)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bO()}catch(a){console.log("Error deleting custom model:",a)}},bZ=async()=>{if(bg)return;let a=t.find(a=>!1!==a.isActive);if(!a)return void alert((0,B.Tl)("Please add an active Qoder connection first"));bh(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,B.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,B.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^(qoder-cn|qoder)\//,"");ap.some(a=>a.providerAlias===bF&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(an).includes(`${bF}/${c}`)||(await bX(c,"llm",bF),e+=1)}0===e?alert((0,B.Tl)("All models already exist, no new models added")):alert((0,B.Tl)("Successfully added")+` ${e} `+(0,B.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,B.Tl)("Error fetching models")+": "+a.message)}finally{bh(!1)}},b$=async()=>{if(bi)return;let a=t.find(a=>!1!==a.isActive);if(!a)return void alert((0,B.Tl)("Please add an active Cline connection first"));bj(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,B.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,B.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;b&&(ap.some(a=>a.providerAlias===bF&&a.id===b&&"llm"===(a.kind||a.type||"llm"))||Object.values(an).includes(`${bF}/${b}`)||(await bX(b,"llm",bF),e+=1))}0===e?alert((0,B.Tl)("All models already exist, no new models added")):alert((0,B.Tl)("Successfully added")+` ${e} `+(0,B.Tl)("models"))}catch(a){console.log("Error importing Cline models:",a),alert((0,B.Tl)("Error fetching models")+": "+a.message)}finally{bj(!1)}},b_=async()=>{if(a5||0===t.length)return;let a=Object.fromEntries(t.map(a=>[a.id,{state:"queued",error:null}]));bf.current=!1,a6(!0),a8(!1),ba(null),bc(a),be({total:t.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<t.length;a+=1){if(bf.current){be({total:t.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=t[a];ba(d.id),bc(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,bc(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,bc(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}be({total:t.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<t.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{ba(null),a6(!1),a8(!1),bf.current=!1}},b0=async a=>{a2({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{a2(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&u(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},b1=()=>{bP(),K(!1)},b2=async a=>{X("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bP(),T(!1);return}X(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),X("Failed to save connection")}},b3=async a=>{try{(await fetch(`/api/providers/${al.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bP(),ag(!1))}catch(a){console.log("Error updating connection:",a)}},b4=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&u(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},b5=async(a,b)=>{let c=[...t];[c[a],c[b]]=[c[b],c[a]],u(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bP()}},b6=t.filter(a=>aB.includes(a.id)),b7=t.length>0&&aB.length===t.length;(()=>{if(0===b6.length)return;let a=new Set(b6.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=E.find(a=>a.id===b);return c?.name}})();let b8=()=>{aF||ak(!1)},b9=async a=>{aG(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await bP(),ak(!1)}finally{aG(!1)}},ca=a=>b9(t.map(b=>({connectionId:b.id,proxyPoolId:a}))),[cb,cc]=(0,f.useState)(!1),cd=async()=>{if(!cb){cc(!0);try{let a=await fetch(`/api/providers/${encodeURIComponent(r)}/connections/keys`),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to export connection keys");let c=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),d=URL.createObjectURL(c),e=document.createElement("a");e.href=d,e.download=`keys-${r}.json`,document.body.appendChild(e),e.click(),e.remove(),URL.revokeObjectURL(d)}catch(a){useNotificationStore.getState().error(a.message)}finally{cc(!1)}}},ce=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:t.map((a,b)=>{let c;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,aB.includes(c)),onChange:()=>{var b;return b=a.id,void aC(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(O,{connection:a,proxyPools:E,isOAuth:bs,isFirst:0===b,isLast:b===t.length-1,onMoveUp:()=>b5(b,b-1),onMoveDown:()=>b5(b,b+1),onToggleActive:b=>b4(a.id,b),autoPing:ae[r]&&"oauth"===a.authType?{isActive:!0===aP.connections[a.id]||aP.schedules?.[a.id]?.enabled===!0,reactiveOn:!0===aP.connections[a.id],provider:r,scheduleOn:aP.schedules?.[a.id]?.enabled===!0,scheduleSummary:(0,ad.JW)(aP.schedules?.[a.id]).join(" / "),onConfigure:()=>aS(a)}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&u(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{am(a),ag(!0)},onDelete:()=>b0(a.id),oneByOneStatus:bb[a.id]||null})})]},a.id)})}),cf=E.filter(a=>!0===a.isActive),cg=(0,d.jsx)(l.aF,{isOpen:aj,onClose:b8,title:`Apply Proxy (${t.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=E.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):b9(t.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:aF||0===cf.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>ca(null),disabled:aF,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),E.map(a=>(0,d.jsxs)("button",{onClick:()=>ca(a.id),disabled:aF||!0!==a.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-[18px]",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),aF&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(l.$n,{onClick:b8,variant:"ghost",fullWidth:!0,disabled:aF,children:"Cancel"})]})}),ch=async a=>{if(!ax.has(a)){ay(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bF}/${a}`})}),c=await b.json();au(b=>({...b,[a]:c.ok?"ok":"error"})),aw(c.ok?"":c.error||"Model not reachable")}catch{au(b=>({...b,[a]:"error"})),aw("Network error")}finally{ay(b=>{let c=new Set(b);return c.delete(a),c})}}};if(v)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(l.Qv,{}),(0,d.jsx)(l.Qv,{})]});if(!bq)return(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(i(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let ci=()=>by&&bq.apiType?"responses"===bq.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bz?"/providers/anthropic-m.png":(0,k.HY)(bq.id);return(0,d.jsxs)("div",{className:`dashboard-surface ${H().page}`,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(i(),{href:"/dashboard/providers",className:H().detailLink,children:[(0,d.jsx)(e.default,{className:"text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bq.color}15`},children:ar||!ci()?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bq.color},children:bq.textIcon||bq.id.slice(0,2).toUpperCase()}):(0,d.jsx)(j.default,{src:ci(),alt:bq.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,k.Kw)(bq.id),as(!0)},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:H().detailTitle,children:bq.name}),(bq.notice?.apiKeyUrl||bq.notice?.signupUrl||bq.website)&&(0,d.jsxs)("a",{href:bq.notice?.apiKeyUrl||bq.notice?.signupUrl||bq.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-text-muted hover:text-text-main hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)(e.default,{className:"text-sm",children:"open_in_new"}),bq.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:H().description,children:[t.length," connection",1===t.length?"":"s"]})]})]})]}),bq.deprecated&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,d.jsx)(e.default,{className:"text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bq.deprecationNotice})]}),bq.notice?.text&&!bq.deprecated&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)(e.default,{className:"text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bq.notice.text}),bq.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bq.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),bA&&x&&(0,d.jsx)(l.Zp,{className:`ui-card ${H().panel}`,children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h2",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"api"}),bz?"Anthropic Compatible Details":"OpenAI Compatible Details"]}),(0,d.jsxs)("p",{className:`break-all mt-2 ${H().description}`,children:[bz?"Messages API":"responses"===x.apiType?"Responses API":"Chat Completions"," \xb7 ",(x.baseUrl||"").replace(/\/$/,""),"/",bz?"messages":"responses"===x.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",icon:"add",onClick:()=>{X(""),T(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ai(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:async()=>{a2({title:"Delete Compatible Node",message:`Delete this ${bz?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{a2(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&q.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:`w-full sm:w-auto ${H().error}`,children:"Delete"})]})]})}),bu?(0,d.jsx)(l.gw,{providerId:r}):(0,d.jsxs)(l.Zp,{className:`ui-card ${H().panel}`,children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("h2",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"vpn_key"}),"Connections"]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[t.some(a=>"apikey"===(a.authType||"apikey"))&&(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"download",onClick:cd,disabled:cb,children:cb?"Extracting...":"Extract Keys"}),t.length>0&&E.length>0&&(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ak(!0),children:"Apply Proxy"}),t.length>0&&(0,d.jsxs)(d.Fragment,{children:[aB.length>0&&(0,d.jsxs)(l.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=aB.length;0!==a&&a2({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{a2(null);let a=0,b=[...aB];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}u(a=>a.filter(a=>!b.includes(a.id))),aC([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",aB.length,")"]}),(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:b_,disabled:a5,children:a5?"Testing Connection One-by-One...":"Test Connection One-by-One"}),a5&&(0,d.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{a5&&(bf.current=!0,a8(!0))},disabled:a7,children:a7?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(l.lM,{checked:"round-robin"===aH,onChange:a=>{let b=a?"round-robin":null,c=a?aJ||"1":aJ;a&&!aJ&&aK("1"),aI(b),bR(b,c)}}),"round-robin"===aH&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Pool:"}),(0,d.jsx)("input",{type:"number",min:1,value:aJ,onChange:a=>{var b;aK(b=a.target.value),bR("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Auto-demote on error"}),(0,d.jsx)(l.lM,{checked:null===aL||aL,onChange:bS})]})]})]}),0===t.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 text-text-muted shrink-0",children:(0,d.jsx)(e.default,{className:"text-[18px]",children:bs?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bB&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bC," or ",bD,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bB?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bn,children:bC}),(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",icon:"key",onClick:bo,children:bD})]}):(0,d.jsxs)(d.Fragment,{children:[!bA&&"iflow"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),"codex"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>$(!0),children:(0,B.Tl)("Bulk Add")}),"grok-cli"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aa(!0),children:(0,B.Tl)("Bulk Add")}),(0,d.jsx)(l.$n,{size:"sm",icon:"add",onClick:bp,children:bA?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[bd&&(0,d.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",bd.total]}),(0,d.jsxs)("span",{children:["Completed: ",bd.completed]}),(0,d.jsxs)("span",{children:["Passed: ",bd.passed]}),(0,d.jsxs)("span",{children:["Failed: ",bd.failed]}),bd.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),a5&&a9&&(0,d.jsxs)("span",{children:["Running: ",t.find(a=>a.id===a9)?.name||a9]})]})}),t.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:b7,onChange:()=>{b7?aC([]):aC(t.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),ce,!bA&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>$(!0),title:(0,B.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,B.Tl)("Bulk Add")}),"grok-cli"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aa(!0),title:(0,B.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,B.Tl)("Bulk Add")}),bB?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bn,className:"w-full sm:w-auto",children:bC}),(0,d.jsx)(l.$n,{size:"sm",icon:"key",onClick:bo,className:"w-full sm:w-auto",children:bD})]}):(0,d.jsx)(l.$n,{size:"sm",icon:"add",onClick:bp,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsx)(ab,{providerId:r}),(0,d.jsxs)(l.Zp,{className:`ui-card ${H().panel}`,children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsxs)("h2",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"smart_toy"}),"Available Models"]}),bG&&(0,d.jsx)("select",{value:aN,onChange:a=>{var b;aO(b=a.target.value),bT(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bG.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bA&&(a=[...bw,...aZ.filter(a=>!bw.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!a_.includes(a)),(0,d.jsxs)("div",{className:"flex gap-2",children:[a_.length>0&&(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bM,children:"Active All"}),a.length>0&&(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bL(a),children:"Disable All"})]}))]}),!!av&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:av}),/RegionError|hosted in China|regionNotAllowed/i.test(av)&&(c=(b="string"==typeof av?av:JSON.stringify(av)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),h=b.match(/wrk_[0-9A-Za-z]+/),o=c?c[0].endsWith("/go")?c[0]:`${c[0]}/go`:h?`https://opencode.ai/workspace/${h[0]}/go`:"https://opencode.ai",(0,d.jsx)("div",{className:"mt-1.5",children:(0,d.jsxs)("a",{href:o,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,d.jsx)("span",{children:"Allow China-hosted models"}),(0,d.jsx)(e.default,{className:"text-[13px]",children:"open_in_new"})]})}))]}),"zed"===r&&!!aX&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:aX}),(()=>{let a,b,c;if(bA)return(0,d.jsx)(J,{providerStorageAlias:bF,providerDisplayAlias:bH,modelAliases:an,customModels:ap,copied:bk,onCopy:bl,onSetAlias:bV,onDeleteAlias:bW,onAddCustomModel:a=>bX(a,"llm",bF),onDeleteCustomModel:a=>bY(a,"llm",bF),connections:t,isAnthropic:bz});let f=[...bw,...aZ.filter(a=>!bw.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}),g=new Set(a_),h=f.filter(a=>!g.has(a.id)),i=f.filter(a=>g.has(a.id)),j=C({customModels:ap,modelAliases:an,providerAlias:bF,builtInModels:bw,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[j.map(a=>(0,d.jsx)(F,{model:{id:a.id,name:a.name},fullModel:`${bH}/${a.id}`,alias:a.alias,copied:bk,onCopy:bl,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bY(a.id,"llm",bF):bW(a.alias)},testStatus:at[a.id],onTest:t.length>0||bu?()=>ch(a.id):void 0,isTesting:ax.has(a.id),isCustom:!0,isFree:!1,caps:s(`${r}/${a.id}`),thinkingSuffix:bE(a.id)},`${a.source}-${a.fullModel}`)),h.map(a=>{let b=`${bF}/${a.id}`,c=`${r}/${a.id}`,e=Object.entries(an).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(F,{model:a,fullModel:`${bH}/${a.id}`,alias:e,copied:bk,onCopy:bl,onSetAlias:b=>bV(a.id,b,bF),onDeleteAlias:()=>bW(e),testStatus:at[a.id],onTest:t.length>0||bu?()=>ch(a.id):void 0,isTesting:ax.has(a.id),isFree:a.isFree,onDisable:()=>bJ(a.id),caps:s(`${r}/${a.id}`),thinkingSuffix:bE(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>aA(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,d.jsx)(e.default,{className:"text-sm",children:"add"}),"Add Model"]}),("qoder"===r||"qoder-cn"===r)&&t.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bZ,disabled:bg,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)(e.default,{className:"text-sm",style:bg?{animation:"spin 1s linear infinite"}:void 0,children:bg?"progress_activity":"download"}),bg?(0,B.Tl)("Fetching..."):(0,B.Tl)("Fetch Qoder Models")]}),("cline"===r||"clinepass"===r)&&t.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:b$,disabled:bi,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)(e.default,{className:"text-sm",style:bi?{animation:"spin 1s linear infinite"}:void 0,children:bi?"progress_activity":"download"}),bi?(0,B.Tl)("Fetching..."):(0,B.Tl)("Import from /models")]}),aT.length>0&&(a=new Set([...Object.values(an),...j.map(a=>a.fullModel)]),b=new Set(bw.map(a=>a.id)),0===(c=aT.filter(c=>!a.has(`${bF}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bX(a.id,"llm",bF)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)(e.default,{className:"text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),i.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",i.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(a=>(0,d.jsxs)("button",{onClick:()=>bK(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)(e.default,{className:"text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),cg,"kiro"===r?(0,d.jsx)(l.Mh,{isOpen:I,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}):"cursor"===r?(0,d.jsx)(l.G9,{isOpen:I,onSuccess:b1,onClose:()=>K(!1)}):"zed"===r?(0,d.jsx)(l.TE,{isOpen:I,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}):"gitlab"===r?(0,d.jsx)(l.vj,{isOpen:I,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}):(0,d.jsx)(l.LF,{isOpen:I,provider:r,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}),(0,d.jsx)(l.LH,{isOpen:L,onSuccess:b1,onClose:()=>M(!1)}),"iflow"===r&&(0,d.jsx)(l.vE,{isOpen:N,onSuccess:()=>{bP(),P(!1)},onClose:()=>P(!1)}),(0,d.jsx)(R,{isOpen:Q,provider:r,providerName:bq.name,isCompatible:bA,isAnthropic:bz,authType:bq?.authType,authHint:bq?.authHint,website:bq?.website,proxyPools:E,error:V,existingNames:t.map(a=>a.name).filter(Boolean),onSave:b2,onBulkDone:bP,onClose:()=>{X(""),T(!1)}}),(0,d.jsx)(l.wI,{isOpen:af,connection:al,proxyPools:E,onSave:b3,onClose:()=>ag(!1)}),bA&&(0,d.jsx)(S,{isOpen:ah,node:x,onSave:bQ,onClose:()=>ai(!1),isAnthropic:bz}),!bA&&(0,d.jsx)(U,{isOpen:az,providerAlias:bF,providerDisplayAlias:bH,onSave:async(a,b,c)=>{await bX(a,b?.stt?"stt":"llm",bF,b,c),aA(!1)},onClose:()=>aA(!1)}),"codex"===r&&(0,d.jsx)(W,{isOpen:Y,onClose:()=>$(!1),onSuccess:bP}),"grok-cli"===r&&(0,d.jsx)(Z,{isOpen:_,onClose:()=>aa(!1),onSuccess:bP}),aR&&(0,d.jsx)(ac.A,{isOpen:!!aR,onClose:()=>aS(null),connection:aR,reactive:!0===aP.connections[aR.id],schedule:aP.schedules?.[aR.id]||null,onSave:a=>((a,{reactive:b,schedule:c})=>{bU({...aP,connections:{...aP.connections,[a]:b},schedules:{...aP.schedules,[a]:c}})})(aR.id,a)}),(0,d.jsx)(l.uo,{isOpen:a3,onClose:()=>a4(!1),onConfirm:()=>{(a4(!1),bs)?bm():bo()},title:"Risk Notice",message:bq?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(l.uo,{isOpen:!!a1,onClose:()=>a2(null),onConfirm:a1?.onConfirm,title:a1?.title||"Confirm",message:a1?.message,variant:"danger"})]})}},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},54589:(a,b,c)=>{"use strict";function d(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}c.d(b,{JW:()=>i,Vm:()=>d,fB:()=>f,gy:()=>e,nz:()=>g});let e={anchor:"09:30",timezone:d(),windowHours:5,slotsPerDay:3};function f(a){let b=/^(\d{1,2}):(\d{2})$/.exec(String(a||"").trim());if(!b)return null;let c=Number(b[1]),d=Number(b[2]);return c>23||d>59?null:{hour:c,minute:d}}function g(a){return Math.max(1,Math.floor(24/a))}function h(a,b,c,d){let e="number"==typeof a?a:Number(a);return Number.isFinite(e)?Math.min(d,Math.max(c,e)):b}function i(a){let b=function(a){if(!a||!0!==a.enabled)return null;let b=f(a.anchor)||f(e.anchor),c=`${String(b.hour).padStart(2,"0")}:${String(b.minute).padStart(2,"0")}`,d=!function(a){if(!a||"string"!=typeof a)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:a}),!0}catch{return!1}}(a.timezone)?e.timezone:a.timezone,i=h(a.windowHours,e.windowHours,.5,24),j=Math.round(h(a.slotsPerDay,e.slotsPerDay,1,g(i)));return{enabled:!0,anchor:c,timezone:d,windowHours:i,slotsPerDay:j}}(a);if(!b)return[];let{hour:c,minute:d}=f(b.anchor),i=60*c+d;return Array.from({length:b.slotsPerDay},(a,c)=>{let d=Math.round(i+c*b.windowHours*60)%1440;return`${String(Math.floor(d/60)).padStart(2,"0")}:${String(d%60).padStart(2,"0")}`})}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},56020:(a,b,c)=>{"use strict";c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(71404),j=c(54589);let k=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function l({isOpen:a,onClose:b,onSave:c,connection:f,reactive:g=!1,schedule:m=null}){let[n,o]=(0,e.useState)(()=>({mode:m?.enabled===!0?"schedule":!0===g?"reset":"off",anchor:m?.anchor||j.gy.anchor,timezone:(0,j.Vm)(),windowHours:String(m?.windowHours??j.gy.windowHours),slotsPerDay:String(m?.slotsPerDay??j.gy.slotsPerDay)})),p=Number(n.windowHours),q=Number(n.slotsPerDay),r=!!(0,j.fB)(n.anchor),s=Number.isFinite(p)&&p>=.5&&p<=24,t=s?(0,j.nz)(p):24,u=Number.isInteger(q)&&q>=1&&q<=t,v=r&&s&&u,w="schedule"!==n.mode||v,x=v?(0,j.JW)({enabled:!0,...n,windowHours:p,slotsPerDay:q}):[],y=x.length&&s?(()=>{let{hour:a,minute:b}=(0,j.fB)(n.anchor),c=Math.round(60*a+b+q*p*60)%1440;return`${String(Math.floor(c/60)).padStart(2,"0")}:${String(c%60).padStart(2,"0")}`})():"",z=a=>o(b=>({...b,...a}));return(0,d.jsx)(h.aF,{isOpen:a,onClose:b,title:"Auto-ping settings",size:"lg",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.$n,{variant:"secondary",onClick:b,children:"Cancel"}),(0,d.jsx)(h.$n,{onClick:()=>{w&&(c({reactive:"reset"===n.mode,schedule:"schedule"===n.mode?{enabled:!0,anchor:n.anchor,timezone:n.timezone,windowHours:p,slotsPerDay:q}:{enabled:!1}}),b())},disabled:!w,children:"Save"})]}),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",f?.name?` for ${f.name}`:""," — pick one mode."]}),(0,d.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:k.map(a=>{let b=n.mode===a.value;return(0,d.jsxs)("button",{type:"button",onClick:()=>z({mode:a.value}),className:(0,i.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",b?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:a.icon}),(0,d.jsx)("span",{children:a.label})]},a.value)})}),"reset"===n.mode&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===n.mode&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,d.jsx)(h.pd,{label:"Anchor time",type:"time",value:n.anchor,onChange:a=>z({anchor:a.target.value}),error:r?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,d.jsx)(h.pd,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:n.windowHours,onChange:a=>z({windowHours:a.target.value}),error:s?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,d.jsx)(h.pd,{label:"Pings per day",type:"number",min:"1",max:String(t),step:"1",value:n.slotsPerDay,onChange:a=>z({slotsPerDay:a.target.value}),error:u?"":`1 – ${t}`,hint:u?`Max ${t}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),x.length>0&&(0,d.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,d.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",n.timezone,")"]}),(0,d.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:x.join(" → ")}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",x[0]," – ",y,", then pauses until ",x[0]," next day."]})]})]})]})})}l.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onSave:g().func.isRequired,connection:g().object,reactive:g().bool,schedule:g().object}},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},89255:(a,b,c)=>{Promise.resolve().then(c.bind(c,31886))},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/root/workspace/JRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/root/workspace/JRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1260,2430,1273,9415,379,1220,4406,3192,6070,4864,6457,4123,455,6777,412,6698],()=>b(b.s=31185));module.exports=c})();
|
|
27
|
+
]`;function Y(a){let b,c=a.trim();if(!c)return[];try{b=JSON.parse(c)}catch(a){try{let a=c;a.startsWith("[")||((a=a.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(a=a.slice(0,-1)),a=`[${a}]`),b=JSON.parse(a)}catch{throw a}}if(Array.isArray(b))return b;if(b&&"object"==typeof b)return Array.isArray(b.accounts)?b.accounts:[b];throw Error("Input must be a JSON object or array of objects")}function Z({isOpen:a,onClose:b,onSuccess:c}){let[g,h]=(0,f.useState)(""),[i,j]=(0,f.useState)(!1),[k,m]=(0,f.useState)(""),[n,o]=(0,f.useState)(null),[p,q]=(0,f.useState)(!1),[r,s]=(0,f.useState)(null),t=(0,f.useRef)(null),u=()=>{i||(h(""),m(""),o(null),s(null),q(!1),b())},v=async a=>{if(!a||0===a.length)return;m("");let b=Array.from(a).filter(a=>a.name.endsWith(".json")||"application/json"===a.type||""===a.type);if(0===b.length)return void m((0,B.Tl)("Please select valid .json files"));try{let a=[];for(let c of b){let b=await c.text(),d=Y(b);Array.isArray(d)?a.push(...d):d&&a.push(d)}if(0===a.length)return void m((0,B.Tl)("No accounts found in selected files"));h(JSON.stringify(a,null,2)),s({filesCount:b.length,accountsCount:a.length})}catch(a){m(`${(0,B.Tl)("Error reading files")}: ${a.message}`)}},w=async()=>{let a;m(""),o(null);try{a=Y(g)}catch(a){m(`${(0,B.Tl)("Invalid JSON")}: ${a.message}`);return}if(!a||0===a.length)return void m((0,B.Tl)("No accounts found in input"));j(!0);try{let b=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),d=await b.json();if(!b.ok)return void m(d?.error||`Request failed: ${b.status}`);o(d),d.success>0&&"function"==typeof c&&c()}catch(a){m(a.message||(0,B.Tl)("Request failed"))}finally{j(!1)}},x=n?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(l.aF,{isOpen:a,title:(0,B.Tl)("Bulk Add Grok CLI Accounts"),onClose:u,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,B.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,d.jsx)("input",{ref:t,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:a=>{v(a.target.files),a.target&&(a.target.value="")}}),(0,d.jsx)(l.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>t.current?.click(),disabled:i,children:(0,B.Tl)("Upload JSON Files")})]}),(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),q(!0)},onDragLeave:a=>{a.preventDefault(),q(!1)},onDrop:a=>{a.preventDefault(),q(!1),a.dataTransfer?.files?.length>0&&v(a.dataTransfer.files)},className:`relative rounded border transition-colors ${p?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,d.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:X,value:g,onChange:a=>{h(a.target.value),s(null)},disabled:i}),p&&(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,d.jsx)(e.default,{className:"text-3xl text-primary mb-1",children:"upload_file"}),(0,d.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,B.Tl)("Drop .json files here")})]})]}),r&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,d.jsx)(e.default,{className:"text-sm",children:"check_circle"}),(0,d.jsxs)("span",{children:[(0,B.Tl)("Loaded")," ",r.accountsCount," ",(0,B.Tl)("account(s) from")," ",r.filesCount," ",(0,B.Tl)("file(s)")]})]}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),n&&n.failed>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",n.failed," ",(0,B.Tl)("failed")]}),x.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:x.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(l.$n,{onClick:w,fullWidth:!0,disabled:i||!g.trim(),children:i?(0,B.Tl)("Importing..."):(0,B.Tl)("Import All")}),(0,d.jsx)(l.$n,{onClick:u,variant:"ghost",fullWidth:!0,disabled:i,children:(0,B.Tl)("Close")})]})]})})}var $=c(41371);let _=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],aa=/^[A-Za-z0-9-]+$/;function ab({providerId:a}){let b=(0,$.i)(),[c,g]=(0,f.useState)(!1),[h,i]=(0,f.useState)([{name:"",value:""}]),[j,k]=(0,f.useState)({}),[m,n]=(0,f.useState)(!1),[o,p]=(0,f.useState)(!1),q=(a,b,c)=>{i(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},r=(0,f.useCallback)(async()=>{let c={};for(let a of h.filter(a=>a.name.trim())){let d=a.name.trim();if(!aa.test(d))return void b.error(`Invalid header name: ${d}`);if(_.includes(d.toLowerCase()))return void b.error(`Header ${d} cannot be overridden`);if(d in c)return void b.error(`Duplicate header name: ${d}`);a.value!==j[d]&&(c[d]=a.value)}p(!0);try{let d=await fetch(`/api/providers/${a}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:c})});if(!d.ok){let a=await d.json().catch(()=>({}));b.error(a.error||"Failed to save");return}n(Object.keys(c).length>0),b.success("Custom headers saved")}finally{p(!1)}},[h,j,a,b]);return 0!==Object.keys(j).length||m?(0,d.jsxs)(l.Zp,{className:`ui-card ${H().panel}`,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>g(a=>!a),"aria-expanded":c,className:"flex w-full items-center justify-between text-left",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"tune"}),"Custom Headers"]}),m&&(0,d.jsx)(N.A,{variant:"success",children:"Active"})]}),(0,d.jsx)(e.default,{className:"text-[16px] text-text-muted",children:c?"expand_less":"expand_more"})]}),c&&(0,d.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:h.map((a,b)=>{let c=a.name.trim()in j&&a.value!==j[a.name.trim()];return(0,d.jsxs)("div",{className:H().customHeaderRow,children:[(0,d.jsx)(l.pd,{"aria-label":`Header ${b+1} name`,value:a.name,onChange:a=>q(b,"name",a.target.value),placeholder:"Header-Name",spellCheck:!1,className:"min-w-0"}),(0,d.jsx)(l.pd,{"aria-label":`Header ${b+1} value`,value:a.value,onChange:a=>q(b,"value",a.target.value),placeholder:"Value",spellCheck:!1,title:c?"Overridden":a.name.trim()in j?"Registry default":"",className:"min-w-0",inputClassName:c?"border-[var(--warn)]":void 0}),(0,d.jsx)("button",{type:"button",title:"Remove header","aria-label":`Remove header ${b+1}`,onClick:()=>i(a=>a.length>1?a.filter((a,c)=>c!==b):[{name:"",value:""}]),className:`${H().iconButton} ${H().error}`,children:(0,d.jsx)(e.default,{className:"text-[16px]",children:"delete"})})]},b)})}),(0,d.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,d.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"add",onClick:()=>i(a=>[...a,{name:"",value:""}]),children:"Add header"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:o,onClick:()=>{i(Object.entries(j).map(([a,b])=>({name:a,value:b})))},children:"Reset"}),(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",disabled:o,onClick:r,children:o?"Saving...":"Save"})]})]})]})]}):null}ab.propTypes={providerId:E().string.isRequired};var ac=c(56020),ad=c(54589);let ae={claude:"claudeAutoPing",codex:"codexAutoPing"};function af(){let a,b,c,h,o,p=(0,g.useParams)(),q=(0,g.useRouter)(),r=p.id,{getCaps:s}=(0,A.y)(),[t,u]=(0,f.useState)([]),[v,w]=(0,f.useState)(!0),[x,D]=(0,f.useState)(null),[E,G]=(0,f.useState)([]),[I,K]=(0,f.useState)(!1),[L,M]=(0,f.useState)(!1),[N,P]=(0,f.useState)(!1),[Q,T]=(0,f.useState)(!1),[V,X]=(0,f.useState)(""),[Y,$]=(0,f.useState)(!1),[_,aa]=(0,f.useState)(!1),[af,ag]=(0,f.useState)(!1),[ah,ai]=(0,f.useState)(!1),[aj,ak]=(0,f.useState)(!1),[al,am]=(0,f.useState)(null),[an,ao]=(0,f.useState)({}),[ap,aq]=(0,f.useState)([]),[ar,as]=(0,f.useState)(!1),[at,au]=(0,f.useState)({}),[av,aw]=(0,f.useState)(""),[ax,ay]=(0,f.useState)(()=>new Set),[az,aA]=(0,f.useState)(!1),[aB,aC]=(0,f.useState)([]),[aD,aE]=(0,f.useState)("__none__"),[aF,aG]=(0,f.useState)(!1),[aH,aI]=(0,f.useState)(null),[aJ,aK]=(0,f.useState)(""),[aL,aM]=(0,f.useState)(null),[aN,aO]=(0,f.useState)("auto"),[aP,aQ]=(0,f.useState)({enabled:!1,connections:{},schedules:{}}),[aR,aS]=(0,f.useState)(null),[aT,aU]=(0,f.useState)([]),[aV,aW]=(0,f.useState)([]),[aX,aY]=(0,f.useState)(null),[aZ,a$]=(0,f.useState)([]),[a_,a0]=(0,f.useState)([]),[a1,a2]=(0,f.useState)(null),[a3,a4]=(0,f.useState)(!1),[a5,a6]=(0,f.useState)(!1),[a7,a8]=(0,f.useState)(!1),[a9,ba]=(0,f.useState)(null),[bb,bc]=(0,f.useState)({}),[bd,be]=(0,f.useState)(null),bf=(0,f.useRef)(!1),[bg,bh]=(0,f.useState)(!1),[bi,bj]=(0,f.useState)(!1),{copied:bk,copy:bl}=(0,z.C)(),bm=()=>{K(!0)},bn=()=>{"xiaomi-mimo"===r?M(!0):bs?bm():(X(""),T(!0))},bo=()=>{X(""),T(!0)},bp=()=>{bs?bn():bo()},bq=x?{id:x.id,name:x.name||("anthropic-compatible"===x.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===x.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===x.type?"AC":"OC",apiType:x.apiType,baseUrl:x.baseUrl,type:x.type}:m.zN[r]||m.fg[r]||m.IS[r]||m.nJ[r]||m.br[r],br=bq?.authModes||[],bs=!!m.zN[r]||!!m.IS[r]||br.includes("oauth"),bt=!!m.fg[r]||br.includes("apikey"),bu=!!m.IS[r]?.noAuth,bv=(0,n.KC)(r),bw=("cursor"===r||"zed"===r)&&aV.length>0?aV:bv,bx=(0,m.wG)(r),by=(0,m.mq)(r),bz=(0,m.gb)(r),bA=by||bz,bB=!bA&&bs&&bt,bC="xai"===r?"Grok Build OAuth":"grok-cli"===r?"Grok CLI Device Login":"kimi"===r?"Kimi Coding OAuth":"OAuth",bD="xai"===r?"xAI API Key":"kimi"===r?"Kimi API Key":"qoder"===r||"qoder-cn"===r?"PAT":"API Key",bE=a=>{if(!aN||"auto"===aN)return null;let b=y(r,a);return b&&b.includes(aN)?aN:null},bF=bA?r:bx,bG=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=y(r,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of bw)c(a.id);for(let a of aZ)c(a.id);for(let a of ap)a.providerAlias===bF&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),bH=bA?x?.prefix||r:bx,bI=(0,f.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bF)}`,{cache:"no-store"}),b=await a.json();a.ok&&a0(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bF]),bJ=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bF,ids:[a]})})).ok&&await bI()}catch(a){console.log("Error disabling model:",a)}},bK=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bF)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bI()}catch(a){console.log("Error enabling model:",a)}},bL=async a=>{a.length&&a2({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{a2(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bF,ids:a})})).ok&&await bI()}catch(a){console.log("Error disabling all models:",a)}}})},bM=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bF)}`,{method:"DELETE"})).ok&&await bI()}catch(a){console.log("Error enabling all models:",a)}},bN=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ao(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bO=(0,f.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&aq(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bP=(0,f.useCallback)(async()=>{try{let[a,b,c,d]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===r);u(a)}c.ok&&G(g.proxyPools||[]);let i=(h.providerStrategies||{})[r]||{};aI(i.fallbackStrategy||null),aK(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1"),aM(!1!==i.demoteOnError&&null);let j=(h.providerThinking||{})[r]||{};aO(j.mode||"auto");let k=ae[r],l=k&&h[k]||{};if(aQ({enabled:!0===l.enabled,connections:l.connections||{},schedules:l.schedules||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===r)||null;if(!a&&bA)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===r)||null))break}D(a)}}catch(a){console.log("Error fetching connections:",a)}finally{w(!1)}},[r,bA]),bQ=async a=>{try{let b=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(D(c.node),await bP(),ai(!1))}catch(a){console.log("Error updating provider node:",a)}},bR=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[r]:f[r]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bS=async a=>{aM(!!a&&null);try{let b=await fetch("/api/settings",{cache:"no-store"}),c=(b.ok?await b.json():{}).providerStrategies||{},d={...c[r]||{}};a?delete d.demoteOnError:d.demoteOnError=!1;let e={...c};0===Object.keys(d).length?delete e[r]:e[r]=d,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:e})})}catch(a){console.log("Error saving demoteOnError toggle:",a)}},bT=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[r]={mode:a}:delete c[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bU=async a=>{let b=ae[r];if(b){aQ(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bV=async(a,b,c=bx)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bN();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bW=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bN()}catch(a){console.log("Error deleting alias:",a)}},bX=async(a,b="llm",c=bF,d,e)=>{try{let f=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b,...d?{caps:d}:{},...e?{transport:e}:{}})});if(f.ok)await bO();else{let a=await f.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bY=async(a,b="llm",c=bF)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bO()}catch(a){console.log("Error deleting custom model:",a)}},bZ=async()=>{if(bg)return;let a=t.find(a=>!1!==a.isActive);if(!a)return void alert((0,B.Tl)("Please add an active Qoder connection first"));bh(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,B.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,B.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;if(!b)continue;let c=b.replace(/^(qoder-cn|qoder)\//,"");ap.some(a=>a.providerAlias===bF&&a.id===c&&"llm"===(a.kind||a.type||"llm"))||Object.values(an).includes(`${bF}/${c}`)||(await bX(c,"llm",bF),e+=1)}0===e?alert((0,B.Tl)("All models already exist, no new models added")):alert((0,B.Tl)("Successfully added")+` ${e} `+(0,B.Tl)("models"))}catch(a){console.log("Error importing Qoder models:",a),alert((0,B.Tl)("Error fetching models")+": "+a.message)}finally{bh(!1)}},b$=async()=>{if(bi)return;let a=t.find(a=>!1!==a.isActive);if(!a)return void alert((0,B.Tl)("Please add an active Cline connection first"));bj(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||(0,B.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert((0,B.Tl)("No models returned"));let e=0;for(let a of d){let b=a.id||a.name;b&&(ap.some(a=>a.providerAlias===bF&&a.id===b&&"llm"===(a.kind||a.type||"llm"))||Object.values(an).includes(`${bF}/${b}`)||(await bX(b,"llm",bF),e+=1))}0===e?alert((0,B.Tl)("All models already exist, no new models added")):alert((0,B.Tl)("Successfully added")+` ${e} `+(0,B.Tl)("models"))}catch(a){console.log("Error importing Cline models:",a),alert((0,B.Tl)("Error fetching models")+": "+a.message)}finally{bj(!1)}},b_=async()=>{if(a5||0===t.length)return;let a=Object.fromEntries(t.map(a=>[a.id,{state:"queued",error:null}]));bf.current=!1,a6(!0),a8(!1),ba(null),bc(a),be({total:t.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<t.length;a+=1){if(bf.current){be({total:t.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=t[a];ba(d.id),bc(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,bc(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,bc(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}be({total:t.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<t.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{ba(null),a6(!1),a8(!1),bf.current=!1}},b0=async a=>{a2({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{a2(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&u(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},b1=()=>{bP(),K(!1)},b2=async a=>{X("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bP(),T(!1);return}X(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),X("Failed to save connection")}},b3=async a=>{try{(await fetch(`/api/providers/${al.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bP(),ag(!1))}catch(a){console.log("Error updating connection:",a)}},b4=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&u(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},b5=async(a,b)=>{let c=[...t];[c[a],c[b]]=[c[b],c[a]],u(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bP()}},b6=t.filter(a=>aB.includes(a.id)),b7=t.length>0&&aB.length===t.length;(()=>{if(0===b6.length)return;let a=new Set(b6.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return;let c=E.find(a=>a.id===b);return c?.name}})();let b8=()=>{aF||ak(!1)},b9=async a=>{aG(!0);try{let b=0;for(let{connectionId:c,proxyPoolId:d}of a)try{(await fetch(`/api/providers/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:d})})).ok||(b+=1)}catch(a){console.log("Error applying proxy for",c,a),b+=1}b>0&&alert(`Updated with ${b} failed request(s).`),await bP(),ak(!1)}finally{aG(!1)}},ca=a=>b9(t.map(b=>({connectionId:b.id,proxyPoolId:a}))),[cb,cc]=(0,f.useState)(!1),cd=async()=>{if(!cb){cc(!0);try{let a=await fetch(`/api/providers/${encodeURIComponent(r)}/connections/keys`),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to export connection keys");let c=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),d=URL.createObjectURL(c),e=document.createElement("a");e.href=d,e.download=`keys-${r}.json`,document.body.appendChild(e),e.click(),e.remove(),URL.revokeObjectURL(d)}catch(a){useNotificationStore.getState().error(a.message)}finally{cc(!1)}}},ce=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:t.map((a,b)=>{let c;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,aB.includes(c)),onChange:()=>{var b;return b=a.id,void aC(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(O,{connection:a,proxyPools:E,isOAuth:bs,isFirst:0===b,isLast:b===t.length-1,onMoveUp:()=>b5(b,b-1),onMoveDown:()=>b5(b,b+1),onToggleActive:b=>b4(a.id,b),autoPing:ae[r]&&"oauth"===a.authType?{isActive:!0===aP.connections[a.id]||aP.schedules?.[a.id]?.enabled===!0,reactiveOn:!0===aP.connections[a.id],provider:r,scheduleOn:aP.schedules?.[a.id]?.enabled===!0,scheduleSummary:(0,ad.JW)(aP.schedules?.[a.id]).join(" / "),onConfigure:()=>aS(a)}:null,onUpdateProxy:async b=>{try{(await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&u(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{am(a),ag(!0)},onDelete:()=>b0(a.id),oneByOneStatus:bb[a.id]||null})})]},a.id)})}),cf=E.filter(a=>!0===a.isActive),cg=(0,d.jsx)(l.aF,{isOpen:aj,onClose:b8,title:`Apply Proxy (${t.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("button",{onClick:()=>{let a=E.filter(a=>!0===a.isActive);return 0===a.length?void alert("No active proxy pools available."):b9(t.map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:aF||0===cf.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-[18px]",children:"sync_alt"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,d.jsxs)("button",{onClick:()=>ca(null),disabled:aF,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-[18px]",children:"link_off"}),(0,d.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),E.map(a=>(0,d.jsxs)("button",{onClick:()=>ca(a.id),disabled:aF||!0!==a.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-[18px]",children:"lan"}),(0,d.jsx)("span",{className:"truncate text-sm text-text-main",children:a.name}),!0!==a.isActive&&(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},a.id))]}),aF&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,d.jsx)(l.$n,{onClick:b8,variant:"ghost",fullWidth:!0,disabled:aF,children:"Cancel"})]})}),ch=async a=>{if(!ax.has(a)){ay(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bF}/${a}`})}),c=await b.json();au(b=>({...b,[a]:c.ok?"ok":"error"})),aw(c.ok?"":c.error||"Model not reachable")}catch{au(b=>({...b,[a]:"error"})),aw("Network error")}finally{ay(b=>{let c=new Set(b);return c.delete(a),c})}}};if(v)return(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(l.Qv,{}),(0,d.jsx)(l.Qv,{})]});if(!bq)return(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(i(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let ci=()=>by&&bq.apiType?"responses"===bq.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bz?"/providers/anthropic-m.png":(0,k.HY)(bq.id);return(0,d.jsxs)("div",{className:`dashboard-surface ${H().page}`,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(i(),{href:"/dashboard/providers",className:H().detailLink,children:[(0,d.jsx)(e.default,{className:"text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bq.color}15`},children:ar||!ci()?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bq.color},children:bq.textIcon||bq.id.slice(0,2).toUpperCase()}):(0,d.jsx)(j.default,{src:ci(),alt:bq.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,k.Kw)(bq.id),as(!0)},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:H().detailTitle,children:bq.name}),(bq.notice?.apiKeyUrl||bq.notice?.signupUrl||bq.website)&&(0,d.jsxs)("a",{href:bq.notice?.apiKeyUrl||bq.notice?.signupUrl||bq.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-text-muted hover:text-text-main hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)(e.default,{className:"text-sm",children:"open_in_new"}),bq.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:H().description,children:[t.length," connection",1===t.length?"":"s"]})]})]})]}),bq.deprecated&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,d.jsx)(e.default,{className:"text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bq.deprecationNotice})]}),bq.notice?.text&&!bq.deprecated&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)(e.default,{className:"text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bq.notice.text}),bq.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bq.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),bA&&x&&(0,d.jsx)(l.Zp,{className:`ui-card ${H().panel}`,children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h2",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"api"}),bz?"Anthropic Compatible Details":"OpenAI Compatible Details"]}),(0,d.jsxs)("p",{className:`break-all mt-2 ${H().description}`,children:[bz?"Messages API":"responses"===x.apiType?"Responses API":"Chat Completions"," \xb7 ",(x.baseUrl||"").replace(/\/$/,""),"/",bz?"messages":"responses"===x.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",icon:"add",onClick:()=>{X(""),T(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ai(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(l.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:async()=>{a2({title:"Delete Compatible Node",message:`Delete this ${bz?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{a2(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&q.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:`w-full sm:w-auto ${H().error}`,children:"Delete"})]})]})}),bu?(0,d.jsx)(l.gw,{providerId:r}):(0,d.jsxs)(l.Zp,{className:`ui-card ${H().panel}`,children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("h2",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"vpn_key"}),"Connections"]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[t.some(a=>"apikey"===(a.authType||"apikey"))&&(0,d.jsx)("button",{type:"button",onClick:cd,disabled:cb,title:cb?"Extracting keys…":"Extract keys","aria-label":cb?"Extracting keys":"Extract keys",className:"inline-flex size-7 items-center justify-center rounded-[var(--r1)] text-[var(--text-3)] transition-colors hover:text-[var(--text)] focus-visible:text-[var(--text)] disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer",children:(0,d.jsx)(e.default,{className:"text-[16px]",children:cb?"hourglass_top":"download"})}),t.length>0&&E.length>0&&(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ak(!0),children:"Apply Proxy"}),t.length>0&&(0,d.jsxs)(d.Fragment,{children:[aB.length>0&&(0,d.jsxs)(l.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=aB.length;0!==a&&a2({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{a2(null);let a=0,b=[...aB];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}u(a=>a.filter(a=>!b.includes(a.id))),aC([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",aB.length,")"]}),(0,d.jsx)("button",{type:"button",onClick:b_,disabled:a5,title:a5?"Testing connections one-by-one…":"Test connections one-by-one","aria-label":a5?"Testing connections one by one":"Test connections one by one",className:"inline-flex size-7 items-center justify-center rounded-[var(--r1)] text-[var(--text-3)] transition-colors hover:text-[var(--text)] focus-visible:text-[var(--text)] disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer",children:(0,d.jsx)(e.default,{className:"text-[16px]",children:a5?"hourglass_top":"sync"})}),a5&&(0,d.jsx)("button",{type:"button",onClick:()=>{a5&&(bf.current=!0,a8(!0))},disabled:a7,title:a7?"Stopping…":"Stop testing","aria-label":a7?"Stopping":"Stop testing",className:"inline-flex size-7 items-center justify-center rounded-[var(--r1)] text-[var(--text-3)] transition-colors hover:text-[var(--text)] disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer",children:(0,d.jsx)(e.default,{className:"text-[16px]",children:"stop"})})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(l.lM,{checked:"round-robin"===aH,onChange:a=>{let b=a?"round-robin":null,c=a?aJ||"1":aJ;a&&!aJ&&aK("1"),aI(b),bR(b,c)}}),"round-robin"===aH&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Pool:"}),(0,d.jsx)("input",{type:"number",min:1,value:aJ,onChange:a=>{var b;aK(b=a.target.value),bR("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Auto-demote on error"}),(0,d.jsx)(l.lM,{checked:null===aL||aL,onChange:bS})]})]})]}),0===t.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 text-text-muted shrink-0",children:(0,d.jsx)(e.default,{className:"text-[18px]",children:bs?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bB&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bC," or ",bD,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bB?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bn,children:bC}),(0,d.jsx)(l.$n,{size:"sm",variant:"contrast",icon:"key",onClick:bo,children:bD})]}):(0,d.jsxs)(d.Fragment,{children:[!bA&&"iflow"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),"codex"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>$(!0),children:(0,B.Tl)("Bulk Add")}),"grok-cli"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aa(!0),children:(0,B.Tl)("Bulk Add")}),(0,d.jsx)(l.$n,{size:"sm",icon:"add",onClick:bp,children:bA?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[bd&&(0,d.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",bd.total]}),(0,d.jsxs)("span",{children:["Completed: ",bd.completed]}),(0,d.jsxs)("span",{children:["Passed: ",bd.passed]}),(0,d.jsxs)("span",{children:["Failed: ",bd.failed]}),bd.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),a5&&a9&&(0,d.jsxs)("span",{children:["Running: ",t.find(a=>a.id===a9)?.name||a9]})]})}),t.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:b7,onChange:()=>{b7?aC([]):aC(t.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),ce,!bA&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>$(!0),title:(0,B.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,B.Tl)("Bulk Add")}),"grok-cli"===r&&(0,d.jsx)(l.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>aa(!0),title:(0,B.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,B.Tl)("Bulk Add")}),bB?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bn,className:"w-full sm:w-auto",children:bC}),(0,d.jsx)(l.$n,{size:"sm",icon:"key",onClick:bo,className:"w-full sm:w-auto",children:bD})]}):(0,d.jsx)(l.$n,{size:"sm",icon:"add",onClick:bp,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsx)(ab,{providerId:r}),(0,d.jsxs)(l.Zp,{className:`ui-card ${H().panel}`,children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsxs)("h2",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"smart_toy"}),"Available Models"]}),bG&&(0,d.jsx)("select",{value:aN,onChange:a=>{var b;aO(b=a.target.value),bT(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bG.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bA&&(a=[...bw,...aZ.filter(a=>!bw.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!a_.includes(a)),(0,d.jsxs)("div",{className:"flex gap-2",children:[a_.length>0&&(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bM,children:"Active All"}),a.length>0&&(0,d.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bL(a),children:"Disable All"})]}))]}),!!av&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:av}),/RegionError|hosted in China|regionNotAllowed/i.test(av)&&(c=(b="string"==typeof av?av:JSON.stringify(av)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),h=b.match(/wrk_[0-9A-Za-z]+/),o=c?c[0].endsWith("/go")?c[0]:`${c[0]}/go`:h?`https://opencode.ai/workspace/${h[0]}/go`:"https://opencode.ai",(0,d.jsx)("div",{className:"mt-1.5",children:(0,d.jsxs)("a",{href:o,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,d.jsx)("span",{children:"Allow China-hosted models"}),(0,d.jsx)(e.default,{className:"text-[13px]",children:"open_in_new"})]})}))]}),"zed"===r&&!!aX&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:aX}),(()=>{let a,b,c;if(bA)return(0,d.jsx)(J,{providerStorageAlias:bF,providerDisplayAlias:bH,modelAliases:an,customModels:ap,copied:bk,onCopy:bl,onSetAlias:bV,onDeleteAlias:bW,onAddCustomModel:a=>bX(a,"llm",bF),onDeleteCustomModel:a=>bY(a,"llm",bF),connections:t,isAnthropic:bz});let f=[...bw,...aZ.filter(a=>!bw.some(b=>b.id===a.id))].filter(a=>{let b=(0,n.CP)(a);return!b||"llm"===b}),g=new Set(a_),h=f.filter(a=>!g.has(a.id)),i=f.filter(a=>g.has(a.id)),j=C({customModels:ap,modelAliases:an,providerAlias:bF,builtInModels:bw,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[j.map(a=>(0,d.jsx)(F,{model:{id:a.id,name:a.name},fullModel:`${bH}/${a.id}`,alias:a.alias,copied:bk,onCopy:bl,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bY(a.id,"llm",bF):bW(a.alias)},testStatus:at[a.id],onTest:t.length>0||bu?()=>ch(a.id):void 0,isTesting:ax.has(a.id),isCustom:!0,isFree:!1,caps:s(`${r}/${a.id}`),thinkingSuffix:bE(a.id)},`${a.source}-${a.fullModel}`)),h.map(a=>{let b=`${bF}/${a.id}`,c=`${r}/${a.id}`,e=Object.entries(an).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(F,{model:a,fullModel:`${bH}/${a.id}`,alias:e,copied:bk,onCopy:bl,onSetAlias:b=>bV(a.id,b,bF),onDeleteAlias:()=>bW(e),testStatus:at[a.id],onTest:t.length>0||bu?()=>ch(a.id):void 0,isTesting:ax.has(a.id),isFree:a.isFree,onDisable:()=>bJ(a.id),caps:s(`${r}/${a.id}`),thinkingSuffix:bE(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>aA(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,d.jsx)(e.default,{className:"text-sm",children:"add"}),"Add Model"]}),("qoder"===r||"qoder-cn"===r)&&t.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:bZ,disabled:bg,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)(e.default,{className:"text-sm",style:bg?{animation:"spin 1s linear infinite"}:void 0,children:bg?"progress_activity":"download"}),bg?(0,B.Tl)("Fetching..."):(0,B.Tl)("Fetch Qoder Models")]}),("cline"===r||"clinepass"===r)&&t.some(a=>!1!==a.isActive)&&(0,d.jsxs)("button",{onClick:b$,disabled:bi,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)(e.default,{className:"text-sm",style:bi?{animation:"spin 1s linear infinite"}:void 0,children:bi?"progress_activity":"download"}),bi?(0,B.Tl)("Fetching..."):(0,B.Tl)("Import from /models")]}),aT.length>0&&(a=new Set([...Object.values(an),...j.map(a=>a.fullModel)]),b=new Set(bw.map(a=>a.id)),0===(c=aT.filter(c=>!a.has(`${bF}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bX(a.id,"llm",bF)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)(e.default,{className:"text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),i.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",i.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(a=>(0,d.jsxs)("button",{onClick:()=>bK(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)(e.default,{className:"text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),cg,"kiro"===r?(0,d.jsx)(l.Mh,{isOpen:I,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}):"cursor"===r?(0,d.jsx)(l.G9,{isOpen:I,onSuccess:b1,onClose:()=>K(!1)}):"zed"===r?(0,d.jsx)(l.TE,{isOpen:I,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}):"gitlab"===r?(0,d.jsx)(l.vj,{isOpen:I,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}):(0,d.jsx)(l.LF,{isOpen:I,provider:r,providerInfo:bq,onSuccess:b1,onClose:()=>K(!1)}),(0,d.jsx)(l.LH,{isOpen:L,onSuccess:b1,onClose:()=>M(!1)}),"iflow"===r&&(0,d.jsx)(l.vE,{isOpen:N,onSuccess:()=>{bP(),P(!1)},onClose:()=>P(!1)}),(0,d.jsx)(R,{isOpen:Q,provider:r,providerName:bq.name,isCompatible:bA,isAnthropic:bz,authType:bq?.authType,authHint:bq?.authHint,website:bq?.website,proxyPools:E,error:V,existingNames:t.map(a=>a.name).filter(Boolean),onSave:b2,onBulkDone:bP,onClose:()=>{X(""),T(!1)}}),(0,d.jsx)(l.wI,{isOpen:af,connection:al,proxyPools:E,onSave:b3,onClose:()=>ag(!1)}),bA&&(0,d.jsx)(S,{isOpen:ah,node:x,onSave:bQ,onClose:()=>ai(!1),isAnthropic:bz}),!bA&&(0,d.jsx)(U,{isOpen:az,providerAlias:bF,providerDisplayAlias:bH,onSave:async(a,b,c)=>{await bX(a,b?.stt?"stt":"llm",bF,b,c),aA(!1)},onClose:()=>aA(!1)}),"codex"===r&&(0,d.jsx)(W,{isOpen:Y,onClose:()=>$(!1),onSuccess:bP}),"grok-cli"===r&&(0,d.jsx)(Z,{isOpen:_,onClose:()=>aa(!1),onSuccess:bP}),aR&&(0,d.jsx)(ac.A,{isOpen:!!aR,onClose:()=>aS(null),connection:aR,reactive:!0===aP.connections[aR.id],schedule:aP.schedules?.[aR.id]||null,onSave:a=>((a,{reactive:b,schedule:c})=>{bU({...aP,connections:{...aP.connections,[a]:b},schedules:{...aP.schedules,[a]:c}})})(aR.id,a)}),(0,d.jsx)(l.uo,{isOpen:a3,onClose:()=>a4(!1),onConfirm:()=>{(a4(!1),bs)?bm():bo()},title:"Risk Notice",message:bq?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(l.uo,{isOpen:!!a1,onClose:()=>a2(null),onConfirm:a1?.onConfirm,title:a1?.title||"Confirm",message:a1?.message,variant:"danger"})]})}},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},54589:(a,b,c)=>{"use strict";function d(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}c.d(b,{JW:()=>i,Vm:()=>d,fB:()=>f,gy:()=>e,nz:()=>g});let e={anchor:"09:30",timezone:d(),windowHours:5,slotsPerDay:3};function f(a){let b=/^(\d{1,2}):(\d{2})$/.exec(String(a||"").trim());if(!b)return null;let c=Number(b[1]),d=Number(b[2]);return c>23||d>59?null:{hour:c,minute:d}}function g(a){return Math.max(1,Math.floor(24/a))}function h(a,b,c,d){let e="number"==typeof a?a:Number(a);return Number.isFinite(e)?Math.min(d,Math.max(c,e)):b}function i(a){let b=function(a){if(!a||!0!==a.enabled)return null;let b=f(a.anchor)||f(e.anchor),c=`${String(b.hour).padStart(2,"0")}:${String(b.minute).padStart(2,"0")}`,d=!function(a){if(!a||"string"!=typeof a)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:a}),!0}catch{return!1}}(a.timezone)?e.timezone:a.timezone,i=h(a.windowHours,e.windowHours,.5,24),j=Math.round(h(a.slotsPerDay,e.slotsPerDay,1,g(i)));return{enabled:!0,anchor:c,timezone:d,windowHours:i,slotsPerDay:j}}(a);if(!b)return[];let{hour:c,minute:d}=f(b.anchor),i=60*c+d;return Array.from({length:b.slotsPerDay},(a,c)=>{let d=Math.round(i+c*b.windowHours*60)%1440;return`${String(Math.floor(d/60)).padStart(2,"0")}:${String(d%60).padStart(2,"0")}`})}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},56020:(a,b,c)=>{"use strict";c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(71404),j=c(54589);let k=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function l({isOpen:a,onClose:b,onSave:c,connection:f,reactive:g=!1,schedule:m=null}){let[n,o]=(0,e.useState)(()=>({mode:m?.enabled===!0?"schedule":!0===g?"reset":"off",anchor:m?.anchor||j.gy.anchor,timezone:(0,j.Vm)(),windowHours:String(m?.windowHours??j.gy.windowHours),slotsPerDay:String(m?.slotsPerDay??j.gy.slotsPerDay)})),p=Number(n.windowHours),q=Number(n.slotsPerDay),r=!!(0,j.fB)(n.anchor),s=Number.isFinite(p)&&p>=.5&&p<=24,t=s?(0,j.nz)(p):24,u=Number.isInteger(q)&&q>=1&&q<=t,v=r&&s&&u,w="schedule"!==n.mode||v,x=v?(0,j.JW)({enabled:!0,...n,windowHours:p,slotsPerDay:q}):[],y=x.length&&s?(()=>{let{hour:a,minute:b}=(0,j.fB)(n.anchor),c=Math.round(60*a+b+q*p*60)%1440;return`${String(Math.floor(c/60)).padStart(2,"0")}:${String(c%60).padStart(2,"0")}`})():"",z=a=>o(b=>({...b,...a}));return(0,d.jsx)(h.aF,{isOpen:a,onClose:b,title:"Auto-ping settings",size:"lg",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.$n,{variant:"secondary",onClick:b,children:"Cancel"}),(0,d.jsx)(h.$n,{onClick:()=>{w&&(c({reactive:"reset"===n.mode,schedule:"schedule"===n.mode?{enabled:!0,anchor:n.anchor,timezone:n.timezone,windowHours:p,slotsPerDay:q}:{enabled:!1}}),b())},disabled:!w,children:"Save"})]}),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",f?.name?` for ${f.name}`:""," — pick one mode."]}),(0,d.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:k.map(a=>{let b=n.mode===a.value;return(0,d.jsxs)("button",{type:"button",onClick:()=>z({mode:a.value}),className:(0,i.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",b?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:a.icon}),(0,d.jsx)("span",{children:a.label})]},a.value)})}),"reset"===n.mode&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===n.mode&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,d.jsx)(h.pd,{label:"Anchor time",type:"time",value:n.anchor,onChange:a=>z({anchor:a.target.value}),error:r?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,d.jsx)(h.pd,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:n.windowHours,onChange:a=>z({windowHours:a.target.value}),error:s?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,d.jsx)(h.pd,{label:"Pings per day",type:"number",min:"1",max:String(t),step:"1",value:n.slotsPerDay,onChange:a=>z({slotsPerDay:a.target.value}),error:u?"":`1 – ${t}`,hint:u?`Max ${t}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),x.length>0&&(0,d.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,d.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",n.timezone,")"]}),(0,d.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:x.join(" → ")}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",x[0]," – ",y,", then pauses until ",x[0]," next day."]})]})]})]})})}l.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onSave:g().func.isRequired,connection:g().object,reactive:g().bool,schedule:g().object}},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},89255:(a,b,c)=>{Promise.resolve().then(c.bind(c,31886))},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/root/workspace/JRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/root/workspace/JRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1260,2430,1273,9415,2760,1220,4406,5665,6070,4864,6457,4123,455,6777,412,6698],()=>b(b.s=31185));module.exports=c})();
|