@synthever/jrouter 1.0.2 → 1.0.3
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 +22 -22
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +1 -1
- package/app/.next-cli-build/react-loadable-manifest.json +4 -4
- 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 +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 +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 +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 +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 +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.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 +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +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 +22 -22
- package/app/.next-cli-build/server/chunks/2318.js +1 -1
- package/app/.next-cli-build/server/chunks/2631.js +1 -1
- package/app/.next-cli-build/server/chunks/2760.js +3 -3
- package/app/.next-cli-build/server/chunks/3192.js +4 -4
- package/app/.next-cli-build/server/chunks/3360.js +1 -1
- package/app/.next-cli-build/server/chunks/3449.js +1 -1
- package/app/.next-cli-build/server/chunks/4190.js +1 -1
- package/app/.next-cli-build/server/chunks/436.js +1 -1
- package/app/.next-cli-build/server/chunks/4406.js +1 -0
- 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/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6296.js +5 -5
- package/app/.next-cli-build/server/chunks/6708.js +1 -1
- package/app/.next-cli-build/server/chunks/7066.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/735.js +1 -1
- package/app/.next-cli-build/server/chunks/7525.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/{2524.js → 8451.js} +1 -1
- package/app/.next-cli-build/server/chunks/9032.js +1 -1
- package/app/.next-cli-build/server/chunks/9128.js +1 -1
- package/app/.next-cli-build/server/chunks/9489.js +1 -1
- package/app/.next-cli-build/server/chunks/9906.js +1 -0
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +4 -4
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/{124.2812449f50e38c6c.js → 124.129f13ee23ff9b23.js} +1 -1
- package/app/.next-cli-build/static/chunks/1321-f3534bbafebb96c9.js +1 -0
- package/app/.next-cli-build/static/chunks/{2435.7dca2c9630249a05.js → 2435.683f65cfb8f79701.js} +2 -2
- package/app/.next-cli-build/static/chunks/{5462.75bfd156f9bc4e3b.js → 5462.79bf24eb0584ddda.js} +2 -2
- package/app/.next-cli-build/static/chunks/6808-10f960f3fc924a76.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-0616e02f3ff06acd.js → page-0c2a1f2542917271.js} +12 -12
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-eb6a5a055eded9f8.js +27 -0
- package/app/.next-cli-build/static/chunks/webpack-6a79f0ded38135ba.js +1 -0
- package/app/.next-cli-build/static/css/{f0e9ffc68c4f886a.css → 3b896d96bcd3ef7a.css} +1 -1
- package/app/package.json +1 -1
- package/app/public/providers/beatapi.png +0 -0
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/238.js +0 -1
- package/app/.next-cli-build/server/chunks/4642.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-9eb7d54c5b900efb.js +0 -1
- package/app/.next-cli-build/static/chunks/6808-ed8012b059559430.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d2787f11613d3447.js +0 -27
- package/app/.next-cli-build/static/chunks/webpack-e582fe7763255be4.js +0 -1
- /package/app/.next-cli-build/static/{MDZXE-9g1sq006f6JNky9 → rJzsAZX3-_OjA05HFqaR_}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{MDZXE-9g1sq006f6JNky9 → rJzsAZX3-_OjA05HFqaR_}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6808],{5214:(e,s,t)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=t(17828)},6808:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>B});var a=t(95155),l=t(96439),r=t(12115),n=t(73321),i=t(88105),o=t(35497),d=t(66119),c=t(14051),u=t.n(c),m=t(79555),p=t.n(m),h=t(46560);let g=e=>new Intl.NumberFormat().format(e||0);function x({stats:e}){let s,t=[{label:"TOTAL REQUESTS",icon:"send",value:g(e.totalRequests),subtitle:"all requests"},{label:"INPUT TOKENS",icon:"arrow_upward",value:(0,h.Rk)(e.totalPromptTokens),full:g(e.totalPromptTokens),subtitle:"prompt volume"},{label:"CACHED TOKENS",icon:"memory",value:(0,h.Rk)(e.totalCachedTokens),full:g(e.totalCachedTokens),subtitle:"cache hits"},{label:"OUTPUT TOKENS",icon:"arrow_downward",value:(0,h.Rk)(e.totalCompletionTokens),full:g(e.totalCompletionTokens),subtitle:"completion volume"},{label:"EST. COST",icon:"attach_money",value:`~${(s=e.totalCost,`$${(s||0).toFixed(2)}`)}`,subtitle:"estimated billing"}];return(0,a.jsx)("div",{className:"grid-stats min-w-0",children:t.map(e=>(0,a.jsxs)("div",{className:`ui-card ${p().metric}`,children:[(0,a.jsxs)("div",{className:p().metricHead,children:[(0,a.jsx)("span",{className:"ui-eyebrow text-[10px] text-[var(--text-2)]",children:e.label}),(0,a.jsx)(l.default,{className:"shrink-0 text-[16px] text-[var(--text-2)]",children:e.icon})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:`${p().metricValue} u-tnum`,title:e.full||e.value,children:e.value}),(0,a.jsx)("div",{className:p().metricMeta,children:e.subtitle})]})]},e.label))})}x.propTypes={stats:u().shape({totalRequests:u().number,totalPromptTokens:u().number,totalCachedTokens:u().number,totalCompletionTokens:u().number,totalCost:u().number}).isRequired},t(56061);let b=e=>new Intl.NumberFormat().format(e||0),f=e=>`$${(e||0).toFixed(2)}`;function j(e){if(!e)return"Never";let s=Math.floor((Date.now()-new Date(e))/6e4);return s<1?"Just now":s<60?`${s}m ago`:s<1440?`${Math.floor(s/60)}h ago`:new Date(e).toLocaleDateString()}function y({field:e,currentSort:s,currentOrder:t}){return s!==e?(0,a.jsx)("span",{className:"ml-1 opacity-30","aria-hidden":"true",children:"↕"}):(0,a.jsx)("span",{className:"ml-1","aria-hidden":"true",children:"asc"===t?"↑":"↓"})}function _({item:e,viewMode:s,isSummary:t=!1}){return"tokens"===s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`${p().num} ${p().muted}`,children:t&&void 0===e.promptTokens?"—":b(e.promptTokens)}),(0,a.jsx)("td",{className:`${p().num} ${p().muted}`,children:e.cachedTokens?b(e.cachedTokens):"—"}),(0,a.jsx)("td",{className:`${p().num} ${p().muted}`,children:t&&void 0===e.completionTokens?"—":b(e.completionTokens)}),(0,a.jsx)("td",{className:`${p().num} ${p().total}`,children:b(e.totalTokens)})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`${p().num} ${p().muted}`,children:t&&void 0===e.inputCost?"—":f(e.inputCost)}),(0,a.jsx)("td",{className:`${p().num} ${p().muted}`,children:e.cachedCost?f(e.cachedCost):"—"}),(0,a.jsx)("td",{className:`${p().num} ${p().muted}`,children:t&&void 0===e.outputCost?"—":f(e.outputCost)}),(0,a.jsx)("td",{className:`${p().num} ${p().total}`,children:f(e.totalCost||e.cost)})]})}function v({title:e,columns:s,groupedData:t,tableType:n,sortBy:i,sortOrder:o,onToggleSort:d,viewMode:c,storageKey:u,renderDetailCells:m,renderSummaryCells:h,emptyMessage:g}){let[x,b]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{try{let e=localStorage.getItem(u);e&&b(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${u}:`,e)}},[u]),(0,r.useEffect)(()=>{try{localStorage.setItem(u,JSON.stringify([...x]))}catch(e){console.error(`Failed to save ${u}:`,e)}},[x,u]);let f=(0,r.useCallback)(e=>{b(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t})},[]),j=(0,r.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input"},{field:"cachedTokens",label:"Cached"},{field:"completionTokens",label:"Output"},{field:"totalTokens",label:"Total"}]:[{field:"promptTokens",label:"Input"},{field:"cachedCost",label:"Cached"},{field:"completionTokens",label:"Output"},{field:"cost",label:"Total"}],[c]),N=s.length+j.length;return(0,a.jsxs)("div",{className:"min-w-0",children:[e?(0,a.jsx)("div",{className:p().sectionHeader,children:(0,a.jsx)("h3",{className:"ui-eyebrow",children:e})}):null,(0,a.jsx)("div",{className:p().tableWrap,children:(0,a.jsxs)("table",{className:p().table,children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[s.map(e=>(0,a.jsxs)("th",{scope:"col","aria-sort":i===e.field?"asc"===o?"ascending":"descending":"none",className:`${p().sortable} ${"right"===e.align?p().num:""}`,onClick:()=>d(n,e.field),children:[e.label," ",(0,a.jsx)(y,{field:e.field,currentSort:i,currentOrder:o})]},e.field)),j.map(e=>(0,a.jsxs)("th",{scope:"col","aria-sort":i===e.field?"asc"===o?"ascending":"descending":"none",className:`${p().num} ${p().sortable}`,onClick:()=>d(n,e.field),children:[e.label," ",(0,a.jsx)(y,{field:e.field,currentSort:i,currentOrder:o})]},e.field))]})}),(0,a.jsxs)("tbody",{children:[t.map(e=>{let s=x.has(e.groupKey);return(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("tr",{className:"group-summary","aria-expanded":s,onClick:()=>f(e.groupKey),children:[(0,a.jsx)("td",{children:(0,a.jsxs)("div",{className:p().panelRow,children:[(0,a.jsx)(l.default,{className:`text-[16px] text-[var(--text-2)] transition-transform ${s?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:`${p().total} ${e.summary.pending>0?p().pending:""}`,children:e.groupKey})]})}),h(e),(0,a.jsx)(_,{item:e.summary,viewMode:c,isSummary:!0})]}),s&&e.items.map(e=>(0,a.jsxs)("tr",{className:"group-detail",children:[m(e),(0,a.jsx)(_,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)}),0===t.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:N,className:p().empty,children:g})})]})]})})]})}y.propTypes={field:u().string.isRequired,currentSort:u().string.isRequired,currentOrder:u().string.isRequired},_.propTypes={item:u().object.isRequired,viewMode:u().string.isRequired,isSummary:u().bool},v.propTypes={title:u().string,columns:u().arrayOf(u().shape({field:u().string.isRequired,label:u().string.isRequired,align:u().string})).isRequired,groupedData:u().array.isRequired,tableType:u().string.isRequired,sortBy:u().string.isRequired,sortOrder:u().string.isRequired,onToggleSort:u().func.isRequired,viewMode:u().string.isRequired,storageKey:u().string.isRequired,renderDetailCells:u().func.isRequired,renderSummaryCells:u().func.isRequired,emptyMessage:u().string.isRequired};var N=t(37206);function w(e){let s=i.Q2[e];return!s?.serviceKinds||s.serviceKinds.includes("llm")}let k=(0,N.default)(()=>Promise.all([t.e(2574),t.e(3862),t.e(3842),t.e(6357),t.e(3521)]).then(t.bind(t,63521)),{loadableGenerated:{webpack:()=>[63521]},ssr:!1}),S=(0,N.default)(()=>Promise.all([t.e(970),t.e(3842),t.e(5815),t.e(1649),t.e(7743)]).then(t.bind(t,10124)),{loadableGenerated:{webpack:()=>[10124]},ssr:!1}),T=(0,N.default)(()=>Promise.all([t.e(970),t.e(3842),t.e(5815),t.e(1415),t.e(4816)]).then(t.bind(t,82435)),{loadableGenerated:{webpack:()=>[82435]},ssr:!1}),M=(0,N.default)(()=>Promise.all([t.e(970),t.e(3842),t.e(5815),t.e(1415),t.e(3081)]).then(t.bind(t,65462)),{loadableGenerated:{webpack:()=>[65462]},ssr:!1});function $({timestamp:e}){let s,[,t]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=setInterval(()=>t(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,a.jsx)(a.Fragment,{children:(s=Math.floor((Date.now()-new Date(e))/1e3))<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:`${Math.floor(s/86400)}d ago`})}function C({requests:e=[]}){return(0,a.jsxs)("section",{className:`ui-card ${p().section} ${p().recentRequests}`,"aria-labelledby":"usage-recent-heading",children:[(0,a.jsx)("div",{className:p().sectionHeader,children:(0,a.jsx)("h2",{id:"usage-recent-heading",className:"ui-eyebrow",children:"Recent Requests"})}),e.length?(0,a.jsx)("div",{className:`${p().tableWrap} ${p().recentRequestsScroll} no-scrollbar`,role:"region","aria-label":"Recent requests list",tabIndex:0,children:(0,a.jsxs)("table",{className:`${p().table} ${p().recentRequestsTable}`,children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{scope:"col",children:"Model"}),(0,a.jsx)("th",{scope:"col",className:p().num,children:"In / Out"}),(0,a.jsx)("th",{scope:"col",className:p().num,children:"When"})]})}),(0,a.jsx)("tbody",{children:e.map((e,s)=>{let t=String(e.status||"ok").toLowerCase(),l=t.startsWith("error")||"failed"===t,r="estimated"===t,n=!l;return(0,a.jsxs)("tr",{title:!n||r?e.status:void 0,children:[(0,a.jsx)("td",{className:"font-mono",title:e.model,children:(0,a.jsxs)("div",{className:p().recentRequestModel,children:[(0,a.jsx)(d.A,{variant:n?"success":"error",className:"!px-0 shrink-0",children:(0,a.jsx)("span",{className:"sr-only",children:l?"Error":r?"Estimated usage":"Success"})}),(0,a.jsx)("span",{children:e.model}),r&&(0,a.jsx)("span",{className:`${p().muted} text-[10px] uppercase tracking-wide`,children:"est"})]})}),(0,a.jsxs)("td",{className:p().num,children:[(0,a.jsxs)("span",{className:p().muted,children:[b(e.promptTokens),"↑"]})," ",(0,a.jsxs)("span",{className:"text-[var(--pos)]",children:[b(e.completionTokens),"↓"]})]}),(0,a.jsx)("td",{className:`${p().num} ${p().subtle} whitespace-nowrap`,children:(0,a.jsx)($,{timestamp:e.timestamp})})]},s)})})]})}):(0,a.jsx)("div",{className:`${p().inset} flex-1`,children:"No requests yet"})]})}function R(e,s={},t,a){return Object.entries(e||{}).map(([e,t])=>{let a=(t.promptTokens||0)+(t.completionTokens||0),l=t.cost||0,r=t.cachedTokens||0,n=Math.max(0,(t.promptTokens||0)-r),i=a>0?(t.completionTokens||0)*(l/a):0;return{...t,key:e,totalTokens:a,totalCost:l,inputCost:a>0?l/a*n:0,cachedCost:a>0?l/a*r:0,outputCost:i,pending:s[e]||0}}).sort((e,s)=>{let l=e[t],r=s[t];return("string"==typeof l&&(l=l.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),l<r)?"asc"===a?-1:1:l>r?"asc"===a?1:-1:0})}function q(e,s){if(!Array.isArray(e))return[];let t={};return e.forEach(e=>{let a=function(e,s){switch(s){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.apiKeyMasked?`${e.keyName} (${e.apiKeyMasked})`:e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[s]||"Unknown"}}(e,s);t[a]||(t[a]={groupKey:a,summary:{requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,totalTokens:0,cost:0,inputCost:0,cachedCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let l=t[a].summary;l.requests+=e.requests||0,l.promptTokens+=e.promptTokens||0,l.completionTokens+=e.completionTokens||0,l.cachedTokens+=e.cachedTokens||0,l.totalTokens+=e.totalTokens||0,l.cost+=e.cost||0,l.inputCost+=e.inputCost||0,l.cachedCost+=e.cachedCost||0,l.outputCost+=e.outputCost||0,l.pending+=e.pending||0,e.lastUsed&&(!l.lastUsed||new Date(e.lastUsed)>new Date(l.lastUsed))&&(l.lastUsed=e.lastUsed),t[a].items.push(e)}),Object.values(t)}let P=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],O=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],A=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],E=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],U=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],D=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"},{value:"all",label:"All"}],K=[{value:"costs",label:"Costs"},{value:"tokens",label:"Tokens"}],I=p().num,L=`${p().num} ${p().muted}`,F=`${p().num} ${p().subtle} whitespace-nowrap`,H="align-middle";function B({period:e,setPeriod:s,hidePeriodSelector:t=!1}={}){let c=(0,n.useRouter)(),u=(0,n.useSearchParams)(),m=u.get("sortBy")||"rawModel",h=u.get("sortOrder")||"asc",[g,f]=(0,r.useState)(null),[y,_]=(0,r.useState)(!0),[N,$]=(0,r.useState)(!1),[z,J]=(0,r.useState)("model"),[V,W]=(0,r.useState)("costs"),[G,Q]=(0,r.useState)([]),[X,Y]=(0,r.useState)("today"),Z=(0,r.useRef)(!0),ee=(0,r.useRef)(!1),es=e??X;(0,r.useEffect)(()=>{Promise.all([fetch("/api/providers").then(e=>e.ok?e.json():null),fetch("/api/provider-nodes").then(e=>e.ok?e.json():null)]).then(([e,s])=>{let t={};for(let e of s?.nodes||[])t[e.id]=e.name;let a=new Set;Q([...(e?.connections||[]).filter(e=>!(!1===e.isActive||!w(e.provider)||i.Q2[e.provider]?.hidden||a.has(e.provider))&&(a.add(e.provider),!0)).map(e=>({...e,nodeName:t[e.provider]||null})),...Object.values(i.IS).filter(e=>e.noAuth&&!e.hidden&&!a.has(e.id)&&w(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,r.useEffect)(()=>{let e=!1,s=!1,t=async({silent:t=!1}={})=>{if(!e&&!s){s=!0,t||(Z.current?(Z.current=!1,_(!0)):$(!0));try{let s=await fetch(`/api/usage/stats?period=${es}`),t=s.ok?await s.json():null;!e&&t&&(ee.current=!0,f(e=>({...e,...t})))}catch{}finally{e||t||(_(!1),$(!1)),s=!1}}};t();let a=setInterval(()=>{document.hidden||t({silent:!0})},3e3);return()=>{e=!0,clearInterval(a)}},[es]),(0,r.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let s=JSON.parse(e.data);f(e=>e?{...e,activeRequests:s.activeRequests,recentRequests:s.recentRequests,errorProvider:s.errorProvider,pending:s.pending}:e),ee.current&&_(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>_(!1),()=>e.close()},[]);let et=(0,r.useCallback)((e,s)=>{let t=new URLSearchParams(u.toString());t.get("sortBy")===s?t.set("sortOrder","asc"===t.get("sortOrder")?"desc":"asc"):(t.set("sortBy",s),t.set("sortOrder","asc")),c.replace(`?${t.toString()}`,{scroll:!1})},[u,c]),ea=(0,r.useMemo)(()=>{if(!g)return null;switch(z){case"model":{let e=g.pending?.byModel||{};return{columns:P,groupedData:q(R(g.byModel,e,m,h),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:L,children:"—"}),(0,a.jsx)("td",{className:I,children:b(e.summary.requests)}),(0,a.jsx)("td",{className:F,children:j(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`font-medium ${e.pending>0?p().pending:""}`,children:e.rawModel}),(0,a.jsx)("td",{className:H,children:(0,a.jsx)(d.A,{dot:!1,children:e.provider})}),(0,a.jsx)("td",{className:I,children:b(e.requests)}),(0,a.jsx)("td",{className:F,children:j(e.lastUsed)})]})}}case"account":{let e={};return g?.pending?.byAccount&&Object.entries(g.byAccount||{}).forEach(([s,t])=>{let a=g.pending.byAccount[t.connectionId];if(a){let l=t.provider?`${t.rawModel} (${t.provider})`:t.rawModel;e[s]=a[l]||0}}),{columns:O,groupedData:q(R(g.byAccount,e,m,h),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:L,children:"—"}),(0,a.jsx)("td",{className:L,children:"—"}),(0,a.jsx)("td",{className:I,children:b(e.summary.requests)}),(0,a.jsx)("td",{className:F,children:j(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:`font-medium ${e.pending>0?p().pending:""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,a.jsx)("td",{className:`font-medium ${e.pending>0?p().pending:""}`,children:e.rawModel}),(0,a.jsx)("td",{className:H,children:(0,a.jsx)(d.A,{dot:!1,children:e.provider})}),(0,a.jsx)("td",{className:I,children:b(e.requests)}),(0,a.jsx)("td",{className:F,children:j(e.lastUsed)})]})}}case"apiKey":return{columns:A,groupedData:q(R(g.byApiKey,{},m,h),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:L,children:"—"}),(0,a.jsx)("td",{className:L,children:"—"}),(0,a.jsx)("td",{className:I,children:b(e.summary.requests)}),(0,a.jsx)("td",{className:F,children:j(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-xs",children:e.apiKeyMasked||e.keyName}),(0,a.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsx)(d.A,{dot:!1,children:e.provider})}),(0,a.jsx)("td",{className:"px-6 py-3 text-right",children:b(e.requests)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:j(e.lastUsed)})]})};default:return{columns:E,groupedData:q(R(g.byEndpoint,{},m,h),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:L,children:"—"}),(0,a.jsx)("td",{className:L,children:"—"}),(0,a.jsx)("td",{className:I,children:b(e.summary.requests)}),(0,a.jsx)("td",{className:F,children:j(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"font-mono",children:e.endpoint}),(0,a.jsx)("td",{children:e.rawModel}),(0,a.jsx)("td",{className:H,children:(0,a.jsx)(d.A,{dot:!1,children:e.provider})}),(0,a.jsx)("td",{className:I,children:b(e.requests)}),(0,a.jsx)("td",{className:F,children:j(e.lastUsed)})]})}}},[g,z,m,h]);return g||y?(0,a.jsxs)("div",{className:p().page,children:[(!t||N)&&(0,a.jsxs)("div",{className:`${p().controls} w-full sm:w-auto sm:self-end`,children:[!t&&(0,a.jsx)(o.Iz,{options:D,value:es,onChange:s??Y,size:"sm","aria-label":"Usage period",className:"max-w-full"}),N&&(0,a.jsx)(l.default,{className:"animate-spin text-[16px] text-[var(--text-3)]","aria-label":"Refreshing usage statistics",children:"progress_activity"})]}),y?(0,a.jsx)("div",{className:"grid-stats min-w-0",children:[0,1,2,3,4].map(e=>(0,a.jsxs)("div",{className:`ui-card ${p().metric}`,children:[(0,a.jsx)(o.EA,{className:"mb-3 h-3 w-24"}),(0,a.jsx)(o.EA,{className:"h-7 w-28"})]},e))}):(0,a.jsxs)("section",{"aria-labelledby":"usage-overview-heading",children:[(0,a.jsx)("h2",{id:"usage-overview-heading",className:"sr-only",children:"Overview metrics"}),(0,a.jsx)(x,{stats:g})]}),y?(0,a.jsxs)("div",{className:p().gridSplit,children:[(0,a.jsx)(o.EA,{className:"h-[320px] w-full rounded-[var(--r3)]"}),(0,a.jsx)(o.EA,{className:"h-[320px] w-full rounded-[var(--r3)]"})]}):(0,a.jsxs)("div",{className:p().gridSplit,children:[(0,a.jsx)(k,{providers:G,activeRequests:g.activeRequests||[],lastProvider:g.recentRequests?.[0]?.provider||"",errorProvider:g.errorProvider||""}),(0,a.jsx)(C,{requests:g.recentRequests||[]})]}),y?(0,a.jsx)(o.EA,{className:"h-[300px] w-full rounded-[var(--r3)]"}):(0,a.jsx)(S,{period:es}),!y&&(g.byProvider||g.byModel)&&(0,a.jsxs)("div",{className:p().gridHalves,children:[(0,a.jsx)(T,{byProvider:g.byProvider}),(0,a.jsx)(M,{byModel:g.byModel})]}),(0,a.jsxs)("section",{className:`ui-card ${p().section}`,"aria-labelledby":"usage-breakdown-heading",children:[(0,a.jsxs)("div",{className:p().sectionHeader,children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("h2",{id:"usage-breakdown-heading",className:"ui-eyebrow flex items-center gap-2",children:[(0,a.jsx)(l.default,{className:"text-[16px]",children:"table_rows"})," Breakdown"]}),(0,a.jsx)("p",{className:p().sectionDescription,children:"Grouped usage with expandable detail rows"})]}),(0,a.jsxs)("div",{className:`${p().controls} w-full sm:w-auto`,children:[(0,a.jsx)(o.l6,{options:U,value:z,onChange:e=>J(e.target.value),"aria-label":"Usage breakdown dimension",className:p().dimension,selectClassName:"py-1.5 text-xs"}),(0,a.jsx)(o.Iz,{options:K,value:V,onChange:W,size:"sm","aria-label":"Value mode"})]})]}),y?(0,a.jsx)(o.EA,{className:"h-48 w-full"}):ea&&(0,a.jsx)(v,{title:"",columns:ea.columns,groupedData:ea.groupedData,tableType:z,sortBy:m,sortOrder:h,onToggleSort:et,viewMode:V,storageKey:ea.storageKey,renderSummaryCells:ea.renderSummaryCells,renderDetailCells:ea.renderDetailCells,emptyMessage:ea.emptyMessage})]})]}):(0,a.jsx)("div",{className:p().page,children:(0,a.jsx)("section",{className:`ui-card ${p().section}`,children:(0,a.jsxs)("div",{className:p().inset,children:[(0,a.jsx)(l.default,{className:"text-[20px] text-[var(--danger)]",children:"error"}),(0,a.jsx)("p",{children:"Failed to load usage statistics."}),(0,a.jsx)("p",{className:p().insetHint,children:"The usage store could not be read. Reload to retry."})]})})})}},17828:(e,s,t)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,t(64054).createAsyncLocalStorage)()},21957:(e,s,t)=>{"use strict";function a({moduleIds:e}){return null}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return a}}),t(95155),t(47650),t(5214),t(2451),t(53887)},37206:(e,s,t)=>{"use strict";t.d(s,{default:()=>l.a});var a=t(75707),l=t.n(a)},41112:(e,s,t)=>{"use strict";function a({reason:e,children:s}){return s}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return a}}),t(1980)},46560:(e,s,t)=>{"use strict";t.d(s,{B4:()=>c,BD:()=>d,H6:()=>l,Rk:()=>o,YY:()=>r,ap:()=>i,dg:()=>n});let a=["var(--text)","var(--text-2)","color-mix(in srgb, var(--text) 80%, var(--surface))","color-mix(in srgb, var(--text) 60%, var(--surface))","color-mix(in srgb, var(--text) 45%, var(--surface))"],l=e=>a[e%a.length],r={stroke:"var(--text-2)",fontSize:11,fontFamily:"var(--font-mono)",tickLine:!1,axisLine:!1},n={stroke:"var(--line)",strokeDasharray:"3 3"},i=e=>{let s=Number(e)||0;return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:String(s)},o=e=>{let s=Math.floor(Number(e)||0);return s>=1e9?`${Math.floor(s/1e9)}B`:s>=1e6?`${Math.floor(s/1e6)}M`:s>=1e3?`${Math.floor(s/1e3)}K`:String(s)},d=e=>`$${(Number(e)||0).toFixed(4)}`,c=e=>Number(e||0).toLocaleString()},64054:(e,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var t={bindSnapshot:function(){return o},createAsyncLocalStorage:function(){return i},createSnapshot:function(){return d}};for(var a in t)Object.defineProperty(s,a,{enumerable:!0,get:t[a]});let l=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class r{disable(){throw l}getStore(){}run(){throw l}exit(){throw l}enterWith(){throw l}static bind(e){return e}}let n="u">typeof globalThis&&globalThis.AsyncLocalStorage;function i(){return n?new n:new r}function o(e){return n?n.bind(e):r.bind(e)}function d(){return n?n.snapshot():function(e,...s){return e(...s)}}},68635:(e,s,t)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return o}});let a=t(95155),l=t(12115),r=t(41112);function n(e){return{default:e&&"default"in e?e.default:e}}t(21957);let i={loader:()=>Promise.resolve(n(()=>null)),loading:null,ssr:!0},o=function(e){let s={...i,...e},t=(0,l.lazy)(()=>s.loader().then(n)),o=s.loading;function d(e){let n=o?(0,a.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!s.ssr||!!s.loading,d=i?l.Suspense:l.Fragment,c=s.ssr?(0,a.jsxs)(a.Fragment,{children:[null,(0,a.jsx)(t,{...e})]}):(0,a.jsx)(r.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(t,{...e})});return(0,a.jsx)(d,{...i?{fallback:n}:{},children:c})}return d.displayName="LoadableComponent",d}},75707:(e,s,t)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return l}});let a=t(73623)._(t(68635));function l(e,s){let t={};"function"==typeof e&&(t.loader=e);let l={...t,...s};return(0,a.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),e.exports=s.default)},79555:e=>{e.exports={page:"usage_page__TfrVH",header:"usage_header__Pj5rE",sectionHeader:"usage_sectionHeader__ikyc_",description:"usage_description___N7_0",sectionDescription:"usage_sectionDescription__hUHjE",controls:"usage_controls__BDy3z",section:"usage_section__Q1FLM",dimension:"usage_dimension__25vsJ",filterSelect:"usage_filterSelect__amqM_",gridMetrics:"usage_gridMetrics__9oDcY",gridSplit:"usage_gridSplit__wz4rx",gridHalves:"usage_gridHalves__WbK2e",metric:"usage_metric__yHVf7",metricHead:"usage_metricHead__kAXr7",metricValue:"usage_metricValue__sJtV9",metricMeta:"usage_metricMeta__1cxTN",tableWrap:"usage_tableWrap__E0Juz",recentRequests:"usage_recentRequests__X3JVv",recentRequestsScroll:"usage_recentRequestsScroll__7dSK0",recentRequestsTable:"usage_recentRequestsTable__V5LMJ",recentRequestModel:"usage_recentRequestModel__A34Vd",table:"usage_table__nOZE_",sortable:"usage_sortable__vJl89",num:"usage_num__YYpAv",center:"usage_center__cPoHb",muted:"usage_muted__qSgnm",subtle:"usage_subtle__PDxKR",pending:"usage_pending__9txNi",total:"usage_total__bDiWP",empty:"usage_empty__fk44z",inset:"usage_inset__ua4iZ",insetHint:"usage_insetHint__kaPZI",insetCode:"usage_insetCode__s_Qk2",panelRow:"usage_panelRow__1yMBm",chartArea:"usage_chartArea__4tcwm",topology:"usage_topology__szXKT",codeBlock:"usage_codeBlock__4xHCm",collapsible:"usage_collapsible__pvjBb",collapsibleToggle:"usage_collapsibleToggle__4SxaT",collapsibleLabel:"usage_collapsibleLabel__UHyD3",collapsibleChevron:"usage_collapsibleChevron__bo1wQ",collapsibleChevronOpen:"usage_collapsibleChevronOpen__XPBdW",collapsibleBody:"usage_collapsibleBody__6tLPZ",fieldLabel:"usage_fieldLabel__QyUjE",detailGrid:"usage_detailGrid__o6iZ8"}}}]);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{34929:(e,t,i)=>{Promise.resolve().then(i.bind(i,43947))},43947:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>en});var s=i(95155),a=i(96439),r=i(12115),l=i(73321),n=i(98500),o=i.n(n),d=i(5772),c=i(8247),p=i(35497),m=i(88105),u=i(28777),x=i(67899),h=i(62630);i(67468);var f=i(13097);let g=["none","low","medium","high"],y=["none","thinking"],v=["none","low","medium","high","xhigh","max"],b={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":v,"claude-budget":v,"gemini-level":["minimal","low","medium","high"],"gemini-budget":g,zai:y,qwen:g,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:y,hunyuan:g,step:g,nous:g},j=["none","minimal","low","medium","high","xhigh","max"],w=["none","low","medium","high","max"],k=[{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:j},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...j,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:j},{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 N(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let i=function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return t?{major:Number(t[1]),minor:void 0===t[2]?null:Number(t[2])}:null}(e);if(!i)return null;let{major:s,minor:a}=i;return s<4||4===s&&(null===a||a<=5||null!==a&&a>=1e3)?null:"output_config"}(t))return null;let i=(0,x.nl)(e,t);if(!i.reasoning)return null;let s=String(t||"").replace(/\([^()]+\)\s*$/,""),a="codex"===e?(0,f.SM)("cx").find(e=>e.id===s)?.thinkingLevels:null,r=k.find(i=>(!i.provider||i.provider===e)&&(0,h.gH)(i.pattern,t)),l=a||r?.levels||b[i.thinkingFormat]||g;return!1===i.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var C=i(11059),S=i(929),$=i(73006);let A=new Map;async function T(e){if(!e?.url||!e?.type)return[];let t=A.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),i=await fetch(`/api/providers/suggested-models?${t}`);if(!i.ok)return[];let s=(await i.json()).data??[];return A.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}function _({customModels:e=[],modelAliases:t={},providerAlias:i,builtInModels:s=[],type:a="llm",includeLegacyAliases:r=!0}){let l=new Set(s.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==i)continue;let e=t?.kind||t?.type||"llm";if(a&&e!==a||l.has(t.id))continue;let s=`${i}/${t.id}`;n.has(s)||(n.add(s),o.push({id:t.id,name:t.name||t.id,fullModel:s,source:"custom",type:e}))}if(!r)return o;let d=`${i}/`;for(let[e,i]of Object.entries(t||{})){if("string"!=typeof i||!i.startsWith(d))continue;let t=i.slice(d.length);!t||l.has(t)||n.has(i)||(n.add(i),o.push({id:t,alias:e,fullModel:i,source:"legacyAlias",type:a||"llm"}))}return o}var O=i(14051),P=i.n(O);function I({model:e,fullModel:t,alias:i,copied:r,onCopy:l,testStatus:n,isCustom:o,isFree:d,onDeleteAlias:c,onTest:m,isTesting:u,onDisable:x,caps:h,thinkingSuffix:f}){let g=f?`${t}(${f})`:t,y="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)(a.default,{className:"shrink-0 text-base mt-0.5 sm:mt-0",style:y?{color:y}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.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:g}),(0,s.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,s.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,s.jsx)(p.nh,{caps:h,colorOverride:"text-text-muted/70",size:12})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[m&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:m,disabled:u,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${u?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,s.jsx)(a.default,{className:"text-sm",style:u?{animation:"spin 1s linear infinite"}:void 0,children:u?"progress_activity":"science"})}),(0,s.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:u?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(g,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)(a.default,{className:"text-sm",children:r===`model-${e.id}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:r===`model-${e.id}`?"Copied!":"Copy"})]}),o?(0,s.jsx)("button",{onClick:c,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,s.jsx)(a.default,{className:"text-sm",children:"close"})}):x?(0,s.jsx)("button",{onClick:x,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,s.jsx)(a.default,{className:"text-sm",children:"close"})}):null]})]})})}I.propTypes={model:P().shape({id:P().string.isRequired}).isRequired,fullModel:P().string.isRequired,alias:P().string,copied:P().string,onCopy:P().func.isRequired,testStatus:P().oneOf(["ok","error"]),isCustom:P().bool,isFree:P().bool,onDeleteAlias:P().func,onTest:P().func,isTesting:P().bool,onDisable:P().func,caps:P().object,thinkingSuffix:P().string},P().string.isRequired,P().string.isRequired,P().string,P().func.isRequired,P().func.isRequired,P().func,P().oneOf(["ok","error"]),P().bool,P().string.isRequired,P().object.isRequired,P().arrayOf(P().object),P().string,P().func.isRequired,P().func.isRequired,P().func.isRequired,P().func.isRequired;var E=i(48187),D=i.n(E);function R({modelId:e,fullModel:t,copied:i,onCopy:r,onDeleteAlias:l,onTest:n,testStatus:o,isTesting:d}){let c="ok"===o?"var(--pos)":"error"===o?"var(--danger)":void 0;return(0,s.jsxs)("div",{className:D().modelRow,children:[(0,s.jsx)(a.default,{className:"text-base text-text-muted",style:c?{color:c}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"min-w-0 text-xs text-text-muted font-mono break-all",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>r(t,`model-${e}`),className:D().iconButton,"aria-label":`Copy ${t}`,title:`Copy ${t}`,children:(0,s.jsx)(a.default,{className:"text-sm",children:i===`model-${e}`?"check":"content_copy"})}),(0,s.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:i===`model-${e}`?"Copied!":"Copy"})]}),n&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:n,disabled:d,className:D().iconButton,"aria-label":`Test ${e}`,title:`Test ${e}`,children:(0,s.jsx)(a.default,{className:"text-sm",style:d?{animation:"spin 1s linear infinite"}:void 0,children:d?"progress_activity":"science"})}),(0,s.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:d?"Testing...":"Test"})]})]})]}),(0,s.jsx)("button",{onClick:l,className:`${D().iconButton} ${D().error}`,"aria-label":`Remove ${e}`,title:"Remove model",children:(0,s.jsx)(a.default,{className:"text-sm",children:"delete"})})]})}function z({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,customModels:a,copied:l,onCopy:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:c,connections:m,isAnthropic:u}){let[x,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1),[y,v]=(0,r.useState)(!1),[b,j]=(0,r.useState)(null),[w,k]=(0,r.useState)({}),N=async t=>{if(!b){j(t);try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await i.json();k(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{k(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=_({customModels:a,modelAliases:i,providerAlias:e,type:"llm"}),S=async()=>{if(!x.trim()||f)return;let e=x.trim();if(C.some(t=>t.id===e))return void alert("Model already exists for this provider.");g(!0);try{await d(e),h("")}catch(e){console.log("Error adding model:",e)}finally{g(!1)}},$=async()=>{if(y)return;let e=m.find(e=>!1!==e.isActive);if(e){v(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||"Failed to import models");let s=i.models||[];if(0===s.length)return void alert("No models returned from /models.");let a=0;for(let e of s){let t=e.id||e.name||e.model;t&&(C.some(e=>e.id===t)||(await d(t),a+=1))}0===a&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{v(!1)}}},A=m.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:D().description,children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsx)(p.pd,{className:"flex-[1_1_200px] min-w-0",label:"Model ID",id:"new-compatible-model-input",type:"text",value:x,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:u?"claude-3-opus-20240229":"gpt-4o"}),(0,s.jsx)(p.$n,{size:"sm",variant:"contrast",icon:"add",onClick:S,disabled:!x.trim()||f,children:f?"Adding...":"Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!A||y,children:y?"Importing...":"Import from /models"})]}),!A&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,s.jsx)("div",{className:"flex min-w-0 flex-col",children:C.map(({id:i,alias:a,source:r})=>(0,s.jsx)(R,{modelId:i,fullModel:`${t}/${i}`,copied:l,onCopy:n,onDeleteAlias:()=>"custom"===r?c(i):o(a),onTest:m.length>0?()=>N(i):void 0,testStatus:w[i],isTesting:b===i},`${r}-${e}/${i}`))})]})}z.propTypes={providerStorageAlias:P().string.isRequired,providerDisplayAlias:P().string.isRequired,modelAliases:P().object.isRequired,customModels:P().arrayOf(P().object),copied:P().string,onCopy:P().func.isRequired,onDeleteAlias:P().func.isRequired,onAddCustomModel:P().func.isRequired,onDeleteCustomModel:P().func.isRequired,connections:P().arrayOf(P().shape({id:P().string,isActive:P().bool})).isRequired,isAnthropic:P().bool};var M=i(47650),q=i(70217);function K({until:e}){let[t,i]=(0,r.useState)("");return((0,r.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void i("");let s=Math.floor(t/1e3);if(s<60)i(`${s}s`);else if(s<3600)i(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);i(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}K.propTypes={until:P().string.isRequired};var U=i(66119);function J({connection:e,proxyPools:t,isOAuth:i,isFirst:l,isLast:n,onMoveUp:o,onMoveDown:d,onToggleActive:c,onUpdateProxy:m,onEdit:u,onDelete:x,oneByOneStatus:h=null,autoPing:f=null}){let[g,y]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),j=(0,r.useRef)(null),w=(0,r.useRef)(null),[k,N]=(0,r.useState)(null),C=new Map((t||[]).map(e=>[e.id,e])),S=e.providerSpecificData?.proxyPoolId||null,$=S?C.get(S):null,A=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,T=!!S||A,_=$?`Pool: ${$.name}`:S?`Pool: ${S} (inactive/missing)`:A?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",O=(()=>{if(!f)return"";let e=[];return(f.reactiveOn&&e.push("On reset"),f.scheduleOn&&e.push(`Scheduled (${f.scheduleSummary||"active"})`),e.length>0)?`Auto-ping active: ${e.join(" + ")}. Click to configure.`:"codex"===f.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."})(),P="";if($?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=$?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let I=$?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E="default";$?.isActive===!0?E="success":(S||A)&&(E="error"),(0,r.useEffect)(()=>{if(!g)return;let e=e=>{j.current?.contains(e.target)||w.current?.contains(e.target)||y(!1)},t=()=>y(!1);return document.addEventListener("mousedown",e),window.addEventListener("resize",t),document.addEventListener("scroll",t,!0),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t),document.removeEventListener("scroll",t,!0)}},[g]);let R=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),y(!1)}},z=e.authType||(i?"oauth":"apikey"),L="oauth"===z,F="cookie"===z,B=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(L?"OAuth Account":F?"Cookie Account":"API Key"),H=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[W,G]=(0,r.useState)(!1),Z=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,r.useEffect)(()=>{let t=()=>{G(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let i=Z?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[Z]);let Q="unavailable"!==e.testStatus||W?e.testStatus:"active",V=()=>(0,q.g)(e.isActive,Q),X=()=>h?"success"===h.state?"success":"failed"===h.state?"error":"testing"===h.state?"primary":"default":"default",Y=()=>h?"queued"===h.state?"queued":"testing"===h.state?"testing":"success"===h.state?"success":"failed"===h.state?h.error?`failed: ${h.error}`:"failed":null:null;return(0,s.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.jsx)("button",{"aria-label":`Move ${B} up`,onClick:o,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-surface-2 text-text-muted hover:text-text-main"}`,children:(0,s.jsx)(a.default,{className:"text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{"aria-label":`Move ${B} down`,onClick:d,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-surface-2 text-text-muted hover:text-text-main"}`,children:(0,s.jsx)(a.default,{className:"text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)(a.default,{className:"shrink-0 text-base text-text-muted",children:F?"cookie":L?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:B}),H&&(0,s.jsx)("p",{className:"text-xs text-text-muted truncate",children:H}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(U.A,{variant:V(),className:"error"===V()?D().errorBadge:void 0,children:!1===e.isActive?"disabled":Q||"Unknown"}),(0,s.jsx)(U.A,{dot:!1,children:L?"OAuth":F?"Cookie":"API Key"}),T&&(0,s.jsx)(U.A,{variant:E,dot:!1,children:"Proxy"}),W&&!1!==e.isActive&&(0,s.jsx)(K,{until:Z}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:`max-w-full truncate text-xs sm:max-w-[300px] ${D().error}`,title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),Y()&&(0,s.jsx)(U.A,{variant:"primary"===X()?"default":X(),dot:!1,children:Y()})]}),T&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:_,children:_}),P&&(0,s.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:P}),I&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{ref:w,onClick:()=>{if(g)return void y(!1);let e=w.current?.getBoundingClientRect();if(!e)return void y(!0);let i=((t?.length||0)+1)*34+8,s=window.innerHeight-e.bottom,a=s<i&&e.top>s;N({position:"fixed",right:window.innerWidth-e.right,...a?{bottom:window.innerHeight-e.top+4,maxHeight:Math.max(e.top-8,120)}:{top:e.bottom+4,maxHeight:Math.max(s-8,120)}}),y(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-surface-2 ${T?"text-text-main":"text-text-muted hover:text-text-main"}`,disabled:v,children:[(0,s.jsx)(a.default,{className:"text-[18px]",children:v?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,M.createPortal)((0,s.jsxs)("div",{ref:j,style:k,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,s.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!S?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>R(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${S===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]}),document.body)]}),f&&(0,s.jsx)(p.m_,{text:O,children:(0,s.jsxs)("button",{onClick:f.onConfigure,className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-surface-2 ${f.isActive?"text-text-main":"text-text-muted hover:text-text-main"}`,children:[(0,s.jsx)(a.default,{className:"text-[18px]",children:"bolt"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,s.jsx)("button",{onClick:u,className:D().iconButton,"aria-label":`Edit ${B}`,title:`Edit ${B}`,children:(0,s.jsx)(a.default,{className:"text-[18px]",children:"edit"})}),(0,s.jsx)("button",{onClick:x,className:`${D().iconButton} ${D().error}`,"aria-label":`Delete ${B}`,title:`Delete ${B}`,children:(0,s.jsx)(a.default,{className:"text-[18px]",children:"delete"})})]}),(0,s.jsx)(p.lM,{size:"sm",checked:e.isActive??!0,"aria-label":`${!1===e.isActive?"Enable":"Disable"} ${B}`,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}function L(e,t,i={}){let{isCloudflareAi:s=!1}=i,a=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),r=[];for(let t of e){let e,i="string"==typeof t?t.trim():"";if(!i)continue;let l=function(e,t={}){let{isCloudflareAi:i=!1}=t,s=e.split("|");if(i&&s.length>=3){let e=s[0].trim();return{baseName:e||"Key",apiKey:s.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:s[s.length-1].trim()}}}return s.length>=2?{baseName:s[0].trim()||"Key",apiKey:s.slice(1).join("|").trim()}:{baseName:"Key",apiKey:s[0].trim()}}(i,{isCloudflareAi:s});if(!l||!l.apiKey)continue;let n=l.baseName,o=1;for(;e=`${n} ${o}`,a.has(e.toLowerCase());)o+=1;a.add(e.toLowerCase());let d={name:e,apiKey:l.apiKey,skipped:!1};l.providerSpecificData&&(d.providerSpecificData=l.providerSpecificData),r.push(d)}return r}J.propTypes={connection:P().shape({id:P().string,name:P().string,email:P().string,displayName:P().string,modelLockUntil:P().string,testStatus:P().string,isActive:P().bool,lastError:P().string,priority:P().number,globalPriority:P().number}).isRequired,proxyPools:P().arrayOf(P().shape({id:P().string,name:P().string,proxyUrl:P().string,noProxy:P().string,isActive:P().bool})),isOAuth:P().bool.isRequired,isFirst:P().bool.isRequired,isLast:P().bool.isRequired,onMoveUp:P().func.isRequired,onMoveDown:P().func.isRequired,onToggleActive:P().func.isRequired,onUpdateProxy:P().func,onEdit:P().func.isRequired,onDelete:P().func.isRequired,oneByOneStatus:P().shape({state:P().string,error:P().string}),autoPing:P().shape({isActive:P().bool,provider:P().string,reactiveOn:P().bool,scheduleOn:P().bool,scheduleSummary:P().string,onConfigure:P().func})};let F=`name1|sk-key1
|
|
2
|
-
name2|sk-key2
|
|
3
|
-
sk-key-only-auto-named`;function B({isOpen:e,provider:t,providerName:i,isCompatible:a,isAnthropic:l,authType:n,authHint:o,website:d,proxyPools:c,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",v="ollama-local"===t,b="cookie"===n,j="xai"===t&&!b,w=b?"Cookie Value":"qoder"===t||"qoder-cn"===t?"Personal Access Token (PAT)":"API Key",k="azure"===t,N="cloudflare-ai"===t,C=m.Q2?.[t]?.credentialForm==="aws",S=m.Q2?.[t]?.apiKeyOptionalWith||null,$=m.Q2?.[t]?.regions||null,A=m.Q2?.[t]?.defaultRegion||$?.[0]?.id||"",[T,_]=(0,r.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[O,P]=(0,r.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,E]=(0,r.useState)({accountId:""}),[R,z]=(0,r.useState)({profile:"",region:"",accessKeyId:"",sessionToken:""}),[M,q]=(0,r.useState)(A),[K,J]=(0,r.useState)(!1),[H,W]=(0,r.useState)(null),[G,Z]=(0,r.useState)(!1),Q=N?`name1|sk-key1|acc123456
|
|
4
|
-
name2|sk-key2|def789012
|
|
5
|
-
sk-key-only-auto-named`:"qoder"===t||"qoder-cn"===t?`name1|pt-xxxxx
|
|
6
|
-
name2|pt-yyyyy
|
|
7
|
-
pt-only-auto-named`:F,[V,X]=(0,r.useState)("single"),[Y,ee]=(0,r.useState)(""),[et,ei]=(0,r.useState)(null),[es,ea]=(0,r.useState)(""),[er,el]=(0,r.useState)(null),en=()=>{if(v&&T.ollamaHostUrl.trim())return{baseUrl:T.ollamaHostUrl.trim()};if(k)return{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization};if(N)return{accountId:I.accountId};if(C){let e={};return R.profile.trim()&&(e.profile=R.profile.trim()),R.region.trim()&&(e.region=R.region.trim()),R.accessKeyId.trim()&&(e.accessKeyId=R.accessKeyId.trim()),R.sessionToken.trim()&&(e.sessionToken=R.sessionToken.trim()),Object.keys(e).length?e:void 0}if($&&M)return{region:M}},eo=()=>{let e=en();return!!(S&&e?.[S])||(C?!!T.apiKey&&!!e?.accessKeyId:!!T.apiKey)},ed=async()=>{J(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:en()})}),i=await e.json();W(i.valid?"success":"failed")}catch{W("failed")}finally{J(!1)}},ec=async()=>{if(t&&(v||eo())&&(v||T.name)&&(!a||T.defaultModel.trim())){Z(!0);try{let e=!1;try{J(!0),W(null);let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:en()})});e=!!(await i.json()).valid,W(e?"success":"failed")}catch{W("failed")}finally{J(!1)}await h({name:T.name||(v?"Ollama Local":""),apiKey:T.apiKey,defaultModel:a?T.defaultModel.trim():void 0,priority:T.priority,proxyPoolId:T.proxyPoolId===y?null:T.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:en()})}finally{Z(!1)}}},ep=async()=>{let e=Y.split("\n");if(!e.length)return;let i=L(e,x,{isCloudflareAi:N});if(!i.length)return;Z(!0),ei(null);let s=0,a=0;for(let e of i)try{let i=!1;try{let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});i=!!(await s.json().catch(()=>({}))).valid}catch{i=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:i?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?s++:a++}catch{a++}Z(!1),ei({success:s,failed:a}),s>0&&f&&f()},em=async()=>{let e=function(e){let t,i=e=>({entries:[],provider:null,skipped:0,error:e});try{t=JSON.parse(e)}catch{return i("Invalid JSON.")}let s=Array.isArray(t)?t:t?.keys;if(!Array.isArray(s))return i('JSON must contain a "keys" array (or be an array of entries).');let a=[],r=0;for(let e of s){let t="string"==typeof e?.apiKey?e.apiKey.trim():"",i="string"==typeof e?.name?e.name.trim():"";if(!t||e?.isActive===!1){r+=1;continue}a.push({name:i,apiKey:t})}return!a.length&&r>0?i("No usable keys found (all entries empty or inactive)."):{entries:a,provider:"string"==typeof t?.provider?t.provider:null,skipped:r,error:null}}(es);if(e.error)return void el({error:e.error});if(!e.entries.length)return;Z(!0),el(null);let i=L(e.entries.map(e=>e.name?`${e.name}|${e.apiKey}`:e.apiKey),x,{isCloudflareAi:N}),s=0,a=0;for(let e of i)try{let i=!1;try{let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});i=!!(await s.json().catch(()=>({}))).valid}catch{i=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:i?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?s++:a++}catch{a++}Z(!1),el({success:s,failed:a,skipped:e.skipped}),s>0&&f&&f()};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Add ${i||t} ${w}`,onClose:g,className:D().dialog,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[!C&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{size:"sm",variant:"single"===V?"contrast":"ghost","aria-pressed":"single"===V,onClick:()=>{X("single"),ei(null),el(null)},children:"Single"}),(0,s.jsx)(p.$n,{size:"sm",variant:"bulk"===V?"contrast":"ghost","aria-pressed":"bulk"===V,onClick:()=>{X("bulk"),ei(null),el(null)},children:"Bulk Add"}),(0,s.jsx)(p.$n,{size:"sm",variant:"json"===V?"contrast":"ghost","aria-pressed":"json"===V,onClick:()=>{X("json"),ei(null),el(null)},children:"Import JSON"})]}),"json"===V&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Paste the JSON produced by another provider's ",(0,s.jsx)("strong",{children:"Extract Keys"})," button (","{",'"keys": [',"apiKey","]","}","). Inactive and empty entries are skipped; names are kept, missing names are auto-numbered."]}),(0,s.jsx)("textarea",{className:"w-full font-mono resize-y min-h-[160px]","aria-label":"Extracted keys JSON",placeholder:'{\n "provider": "commandcode",\n "keys": [{ "name": "Key 1", "apiKey": "user_..." }]\n}',value:es,onChange:e=>ea(e.target.value)}),er&&(0,s.jsx)("div",{className:`text-xs font-medium ${er.error||er.failed>0?"text-[var(--warn)]":D().success}`,role:"status",children:er.error?`✗ ${er.error}`:`✓ ${er.success} added${er.failed>0?`, ✗ ${er.failed} failed`:""}${er.skipped>0?`, ${er.skipped} skipped`:""}`}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:em,variant:"contrast",fullWidth:!0,disabled:G||!es.trim(),children:G?"Importing...":"Import Keys"}),(0,s.jsx)(p.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"bulk"===V&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:N?(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t||"qoder-cn"===t?(0,s.jsxs)(s.Fragment,{children:["One PAT per line. Format: ",(0,s.jsx)("code",{children:"name|pt-..."})," or just ",(0,s.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,s.jsx)("textarea",{className:"w-full font-mono resize-y min-h-[140px]","aria-label":"API keys to add in bulk",placeholder:Q,value:Y,onChange:e=>ee(e.target.value)}),et&&(0,s.jsxs)("div",{className:`text-xs font-medium ${et.failed>0?"text-[var(--warn)]":D().success}`,role:"status",children:["✓ ",et.success," added",et.failed>0?`, ✗ ${et.failed} failed`:""]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:ep,variant:"contrast",fullWidth:!0,disabled:G||!Y.trim(),children:G?"Adding...":"Add All Keys"}),(0,s.jsx)(p.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===V&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.pd,{label:"Name",value:T.name,onChange:e=>_({...T,name:e.target.value}),placeholder:v?"Ollama Local":"Production Key"}),v&&(0,s.jsxs)("div",{className:D().fieldGroup,children:[(0,s.jsx)(p.pd,{label:"Ollama Host URL",value:T.ollamaHostUrl,onChange:e=>_({...T,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:ed,disabled:K||G,variant:"secondary",children:K?"Checking...":"Check"})})]}),!v&&(0,s.jsxs)("div",{className:D().fieldGroup,children:[(0,s.jsx)(p.pd,{label:w,type:b?"text":"password",value:T.apiKey,onChange:e=>_({...T,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t||"qoder-cn"===t?"pt-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:ed,disabled:!eo()||K||G,variant:"secondary",children:K?"Checking...":"Check"})})]}),j&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&o&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),$&&(0,s.jsx)(p.l6,{label:"Region",value:M,onChange:e=>q(e.target.value),options:$.map(e=>({value:e.id,label:e.label}))}),a&&(0,s.jsx)(p.pd,{label:"Default Model",value:T.defaultModel,onChange:e=>_({...T,defaultModel:e.target.value}),placeholder:l?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),v&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),H&&(0,s.jsx)(U.A,{variant:"success"===H?"success":"error",className:"success"===H?void 0:D().errorBadge,children:"success"===H?"Valid":"Invalid"}),u&&(0,s.jsx)("p",{className:`text-xs break-words ${D().error}`,role:"alert",children:u}),a&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,s.jsxs)("div",{className:D().settingsGroup,children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(p.pd,{label:"Account ID",value:I.accountId,onChange:e=>E({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),C&&(0,s.jsxs)("div",{className:D().settingsGroup,children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"AWS Bedrock Credentials"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(p.pd,{label:"AWS Profile (SSO — recommended)",value:R.profile,onChange:e=>z({...R,profile:e.target.value}),placeholder:"my-sso-profile"}),(0,s.jsx)(p.pd,{label:"Region",value:R.region,onChange:e=>z({...R,region:e.target.value}),placeholder:"us-east-1"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,s.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,s.jsxs)("code",{children:["aws sso login --profile ",R.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,s.jsx)(p.pd,{label:"Access Key ID (only for static keys)",value:R.accessKeyId,onChange:e=>z({...R,accessKeyId:e.target.value}),placeholder:"AKIA..."}),(0,s.jsx)(p.pd,{label:"Session Token (only for temporary ASIA… keys)",type:"password",value:R.sessionToken,onChange:e=>z({...R,sessionToken:e.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,s.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),k&&(0,s.jsxs)("div",{className:D().settingsGroup,children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(p.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>P({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(p.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>P({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(p.pd,{label:"API Version",value:O.apiVersion,onChange:e=>P({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(p.pd,{label:"Organization",value:O.organization,onChange:e=>P({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(p.pd,{label:"Priority",type:"number",value:T.priority,onChange:e=>_({...T,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(p.l6,{label:"Proxy Pool",value:T.proxyPoolId,onChange:e=>_({...T,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(c||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(c||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:ec,variant:"contrast",fullWidth:!0,disabled:G||!v&&(!T.name||!eo())||a&&!T.defaultModel.trim()||k&&(!O.azureEndpoint||!O.deployment||!O.organization)||N&&!I.accountId,children:G?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function H({isOpen:e,node:t,onSave:i,onClose:a,isAnthropic:l}){let[n,o]=(0,r.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,c]=(0,r.useState)(!1),[m,u]=(0,r.useState)(""),[x,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1),[y,v]=(0,r.useState)(null);(0,r.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(l?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,l]);let b=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){c(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};l||(e.apiType=n.apiType),await i(e)}finally{c(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:l?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{g(!1)}};return t?(0,s.jsx)(p.aF,{isOpen:e,title:`Edit ${l?"Anthropic":"OpenAI"} Compatible`,onClose:a,className:D().dialog,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${l?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(p.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:l?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!l&&(0,s.jsx)(p.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,s.jsx)(p.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:l?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${l?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsxs)("div",{className:D().fieldGroup,children:[(0,s.jsx)(p.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>u(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(p.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,s.jsx)(p.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,s.jsx)(U.A,{variant:"success"===y?"success":"error",className:"success"===y?void 0:D().errorBadge,children:"success"===y?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:b,variant:"contrast",fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,s.jsx)(p.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}B.propTypes={isOpen:P().bool.isRequired,provider:P().string,providerName:P().string,isCompatible:P().bool,isAnthropic:P().bool,authType:P().string,authHint:P().string,website:P().string,proxyPools:P().arrayOf(P().shape({id:P().string,name:P().string})),error:P().string,existingNames:P().arrayOf(P().string),onSave:P().func.isRequired,onBulkDone:P().func,onClose:P().func.isRequired},H.propTypes={isOpen:P().bool.isRequired,node:P().shape({id:P().string,name:P().string,prefix:P().string,apiType:P().string,baseUrl:P().string}),onSave:P().func.isRequired,onClose:P().func.isRequired,isAnthropic:P().bool};let W=()=>Object.fromEntries(Object.keys(u.bs).map(e=>[e,!1]));function G({isOpen:e,providerAlias:t,providerDisplayAlias:i,onSave:l,onClose:n}){let[o,d]=(0,r.useState)(""),[c,m]=(0,r.useState)(W),[x,h]=(0,r.useState)(null),[f,g]=(0,r.useState)(""),[y,v]=(0,r.useState)(!1),[b,j]=(0,r.useState)("");(0,r.useEffect)(()=>{e&&(d(""),m(W()),j(""),h(null),g(""))},[e]);let w=e=>{let i=`${t}/`;return e.startsWith(i)?e.slice(i.length):e},k=async()=>{let e=w(o.trim());if(e){h("testing"),g("");try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await i.json();h(s.ok?"ok":"error"),g(s.error||"")}catch(e){h("error"),g(e.message)}}},N=async()=>{let e=w(o.trim());if(e&&!y){v(!0);try{await l(e,c,c.stt?b:null)}finally{v(!1)}}};return(0,s.jsx)(p.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:o,onChange:e=>{d(e.target.value),h(null),g("")},onKeyDown:e=>{"Enter"===e.key&&k()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(p.$n,{variant:"secondary",icon:"science",loading:"testing"===x,onClick:k,disabled:!o.trim()||"testing"===x,children:"testing"===x?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:w(o.trim())||"model-id"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(u.bs).map(([e,t])=>(0,s.jsx)(p.lM,{checked:!!c[e],onChange:t=>m(i=>({...i,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(p.lM,{checked:!!c.stt,onChange:e=>{m(t=>({...t,stt:e})),e||j("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),c.stt&&(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)(p.l6,{label:"Transport",value:b,onChange:e=>j(e.target.value),placeholder:"Provider default (REST)",options:u.vp.map(e=>({value:e,label:u.qw[e].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"ok"===x&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)(a.default,{className:"text-base",children:"check_circle"}),"Model is reachable"]}),"error"===x&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)(a.default,{className:"text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:f||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(p.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(p.$n,{onClick:N,fullWidth:!0,size:"sm",disabled:!o.trim()||y,children:y?"Adding...":"Add Model"})]})]})})}G.propTypes={isOpen:P().bool.isRequired,providerAlias:P().string.isRequired,providerDisplayAlias:P().string.isRequired,onSave:P().func.isRequired,onClose:P().func.isRequired};let Z=`[
|
|
8
|
-
{
|
|
9
|
-
"accessToken": "eyJhbGc...",
|
|
10
|
-
"refreshToken": "rt_...",
|
|
11
|
-
"idToken": "eyJhbGc...",
|
|
12
|
-
"email": "user@example.com"
|
|
13
|
-
}
|
|
14
|
-
]`;function Q({isOpen:e,onClose:t,onSuccess:i}){let[a,l]=(0,r.useState)(""),[n,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)(null),x=()=>{n||(l(""),c(""),u(null),t())},h=async()=>{var e;let t;c(""),u(null);let s=a.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){c(`${(0,$.Tl)("Invalid JSON")}: ${e.message}`);return}let r=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!r||0===r.length)return void c((0,$.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:r})}),t=await e.json();if(!e.ok)return void c(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof i&&i()}catch(e){c(e.message||(0,$.Tl)("Request failed"))}finally{o(!1)}},f=m?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(p.aF,{isOpen:e,title:(0,$.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,$.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:Z,value:a,onChange:e=>l(e.target.value),disabled:n}),d&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,$.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,$.Tl)("failed")}`:""]}),f.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:h,fullWidth:!0,disabled:n||!a.trim(),children:n?(0,$.Tl)("Importing..."):(0,$.Tl)("Import All")}),(0,s.jsx)(p.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,$.Tl)("Close")})]})]})})}Q.propTypes={isOpen:P().bool.isRequired,onClose:P().func.isRequired,onSuccess:P().func};let V=`[
|
|
15
|
-
{
|
|
16
|
-
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
17
|
-
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
18
|
-
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
19
|
-
"email": "account1@example.com"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
23
|
-
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
24
|
-
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
25
|
-
"email": "account2@example.com"
|
|
26
|
-
}
|
|
27
|
-
]`;function X(e){let t,i=e.trim();if(!i)return[];try{t=JSON.parse(i)}catch(e){try{let e=i;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function Y({isOpen:e,onClose:t,onSuccess:i}){let[l,n]=(0,r.useState)(""),[o,d]=(0,r.useState)(!1),[c,m]=(0,r.useState)(""),[u,x]=(0,r.useState)(null),[h,f]=(0,r.useState)(!1),[g,y]=(0,r.useState)(null),v=(0,r.useRef)(null),b=()=>{o||(n(""),m(""),x(null),y(null),f(!1),t())},j=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,$.Tl)("Please select valid .json files"));try{let e=[];for(let i of t){let t=await i.text(),s=X(t);Array.isArray(s)?e.push(...s):s&&e.push(s)}if(0===e.length)return void m((0,$.Tl)("No accounts found in selected files"));n(JSON.stringify(e,null,2)),y({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,$.Tl)("Error reading files")}: ${e.message}`)}},w=async()=>{let e;m(""),x(null);try{e=X(l)}catch(e){m(`${(0,$.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,$.Tl)("No accounts found in input"));d(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),s=await t.json();if(!t.ok)return void m(s?.error||`Request failed: ${t.status}`);x(s),s.success>0&&"function"==typeof i&&i()}catch(e){m(e.message||(0,$.Tl)("Request failed"))}finally{d(!1)}},k=u?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(p.aF,{isOpen:e,title:(0,$.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,$.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,s.jsx)("input",{ref:v,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{j(e.target.files),e.target&&(e.target.value="")}}),(0,s.jsx)(p.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>v.current?.click(),disabled:o,children:(0,$.Tl)("Upload JSON Files")})]}),(0,s.jsxs)("div",{onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:e=>{e.preventDefault(),f(!1)},onDrop:e=>{e.preventDefault(),f(!1),e.dataTransfer?.files?.length>0&&j(e.dataTransfer.files)},className:`relative rounded border transition-colors ${h?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,s.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:V,value:l,onChange:e=>{n(e.target.value),y(null)},disabled:o}),h&&(0,s.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,s.jsx)(a.default,{className:"text-3xl text-primary mb-1",children:"upload_file"}),(0,s.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,$.Tl)("Drop .json files here")})]})]}),g&&(0,s.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,s.jsx)(a.default,{className:"text-sm",children:"check_circle"}),(0,s.jsxs)("span",{children:[(0,$.Tl)("Loaded")," ",g.accountsCount," ",(0,$.Tl)("account(s) from")," ",g.filesCount," ",(0,$.Tl)("file(s)")]})]}),c&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),u&&u.failed>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",u.failed," ",(0,$.Tl)("failed")]}),k.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:k.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{onClick:w,fullWidth:!0,disabled:o||!l.trim(),children:o?(0,$.Tl)("Importing..."):(0,$.Tl)("Import All")}),(0,s.jsx)(p.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:o,children:(0,$.Tl)("Close")})]})]})})}var ee=i(65921);let et=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],ei=/^[A-Za-z0-9-]+$/;function es({providerId:e}){let t=(0,ee.i)(),[i,l]=(0,r.useState)(!1),[n,o]=(0,r.useState)([{name:"",value:""}]),[d,c]=(0,r.useState)({}),[m,u]=(0,r.useState)(!1),[x,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let t=!1;return fetch(`/api/providers/${e}/overrides`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(t||!e)return;let i=e.builtinHeaders||{},s=Object.entries({...i,...e.headers||{}}).map(([e,t])=>({name:e,value:t}));c(i),o(s.length?s:[{name:"",value:""}]),u(Object.keys(e.headers||{}).length>0)}).catch(()=>{}),()=>{t=!0}},[e]);let f=(e,t,i)=>{o(s=>s.map((s,a)=>a===e?{...s,[t]:i}:s))},g=(0,r.useCallback)(async()=>{let i={};for(let e of n.filter(e=>e.name.trim())){let s=e.name.trim();if(!ei.test(s))return void t.error(`Invalid header name: ${s}`);if(et.includes(s.toLowerCase()))return void t.error(`Header ${s} cannot be overridden`);if(s in i)return void t.error(`Duplicate header name: ${s}`);e.value!==d[s]&&(i[s]=e.value)}h(!0);try{let s=await fetch(`/api/providers/${e}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:i})});if(!s.ok){let e=await s.json().catch(()=>({}));t.error(e.error||"Failed to save");return}u(Object.keys(i).length>0),t.success("Custom headers saved")}finally{h(!1)}},[n,d,e,t]);return 0!==Object.keys(d).length||m?(0,s.jsxs)(p.Zp,{className:`ui-card ${D().panel}`,children:[(0,s.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),"aria-expanded":i,className:"flex w-full items-center justify-between text-left",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"ui-eyebrow",children:[(0,s.jsx)(a.default,{className:"text-[16px]",children:"tune"}),"Custom Headers"]}),m&&(0,s.jsx)(U.A,{variant:"success",children:"Active"})]}),(0,s.jsx)(a.default,{className:"text-[16px] text-text-muted",children:i?"expand_less":"expand_more"})]}),i&&(0,s.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,s.jsx)("div",{className:"flex flex-col gap-2",children:n.map((e,t)=>{let i=e.name.trim()in d&&e.value!==d[e.name.trim()];return(0,s.jsxs)("div",{className:D().customHeaderRow,children:[(0,s.jsx)(p.pd,{"aria-label":`Header ${t+1} name`,value:e.name,onChange:e=>f(t,"name",e.target.value),placeholder:"Header-Name",spellCheck:!1,className:"min-w-0"}),(0,s.jsx)(p.pd,{"aria-label":`Header ${t+1} value`,value:e.value,onChange:e=>f(t,"value",e.target.value),placeholder:"Value",spellCheck:!1,title:i?"Overridden":e.name.trim()in d?"Registry default":"",className:"min-w-0",inputClassName:i?"border-[var(--warn)]":void 0}),(0,s.jsx)("button",{type:"button",title:"Remove header","aria-label":`Remove header ${t+1}`,onClick:()=>o(e=>e.length>1?e.filter((e,i)=>i!==t):[{name:"",value:""}]),className:`${D().iconButton} ${D().error}`,children:(0,s.jsx)(a.default,{className:"text-[16px]",children:"delete"})})]},t)})}),(0,s.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,s.jsx)(p.$n,{size:"sm",variant:"ghost",icon:"add",onClick:()=>o(e=>[...e,{name:"",value:""}]),children:"Add header"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",disabled:x,onClick:()=>{o(Object.entries(d).map(([e,t])=>({name:e,value:t})))},children:"Reset"}),(0,s.jsx)(p.$n,{size:"sm",variant:"contrast",disabled:x,onClick:g,children:x?"Saving...":"Save"})]})]})]})]}):null}es.propTypes={providerId:P().string.isRequired};var ea=i(97132),er=i(93195);let el={claude:"claudeAutoPing",codex:"codexAutoPing"};function en(){let e,t,i,n,x,h=(0,l.useParams)(),f=(0,l.useRouter)(),g=h.id,{getCaps:y}=(0,S.y)(),[v,b]=(0,r.useState)([]),[j,w]=(0,r.useState)(!0),[k,A]=(0,r.useState)(null),[O,P]=(0,r.useState)([]),[E,R]=(0,r.useState)(!1),[M,q]=(0,r.useState)(!1),[K,U]=(0,r.useState)(!1),[L,F]=(0,r.useState)(!1),[W,Z]=(0,r.useState)(""),[V,X]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(!1),[ei,en]=(0,r.useState)(!1),[eo,ed]=(0,r.useState)(!1),[ec,ep]=(0,r.useState)(!1),[em,eu]=(0,r.useState)(null),[ex,eh]=(0,r.useState)({}),[ef,eg]=(0,r.useState)([]),[ey,ev]=(0,r.useState)(!1),[eb,ej]=(0,r.useState)({}),[ew,ek]=(0,r.useState)(""),[eN,eC]=(0,r.useState)(()=>new Set),[eS,e$]=(0,r.useState)(!1),[eA,eT]=(0,r.useState)([]),[e_,eO]=(0,r.useState)("__none__"),[eP,eI]=(0,r.useState)(!1),[eE,eD]=(0,r.useState)(null),[eR,ez]=(0,r.useState)(""),[eM,eq]=(0,r.useState)("auto"),[eK,eU]=(0,r.useState)({enabled:!1,connections:{},schedules:{}}),[eJ,eL]=(0,r.useState)(null),[eF,eB]=(0,r.useState)([]),[eH,eW]=(0,r.useState)([]),[eG,eZ]=(0,r.useState)(null),[eQ,eV]=(0,r.useState)([]),[eX,eY]=(0,r.useState)([]),[e0,e1]=(0,r.useState)(null),[e2,e5]=(0,r.useState)(!1),[e3,e4]=(0,r.useState)(!1),[e6,e9]=(0,r.useState)(!1),[e7,e8]=(0,r.useState)(null),[te,tt]=(0,r.useState)({}),[ti,ts]=(0,r.useState)(null),ta=(0,r.useRef)(!1),[tr,tl]=(0,r.useState)(!1),[tn,to]=(0,r.useState)(!1),{copied:td,copy:tc}=(0,C.C)(),tp="ag_risk_confirmed",tm=()=>{R(!0)},tu=()=>{"antigravity"===g&&"true"!==window.localStorage.getItem(tp)?e5(!0):"xiaomi-mimo"===g?q(!0):ty?tm():(Z(""),F(!0))},tx=()=>{Z(""),F(!0)},th=()=>{ty?tu():tx()},tf=k?{id:k.id,name:k.name||("anthropic-compatible"===k.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===k.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===k.type?"AC":"OC",apiType:k.apiType,baseUrl:k.baseUrl,type:k.type}:m.zN[g]||m.fg[g]||m.IS[g]||m.nJ[g]||m.br[g],tg=tf?.authModes||[],ty=!!m.zN[g]||!!m.IS[g]||tg.includes("oauth"),tv=!!m.fg[g]||tg.includes("apikey"),tb=!!m.IS[g]?.noAuth,tj=(0,u.KC)(g),tw=("cursor"===g||"zed"===g)&&eH.length>0?eH:tj,tk=(0,m.wG)(g),tN=(0,m.mq)(g),tC=(0,m.gb)(g),tS=tN||tC,t$=!tS&&ty&&tv,tA="xai"===g?"Grok Build OAuth":"grok-cli"===g?"Grok CLI Device Login":"kimi"===g?"Kimi Coding OAuth":"OAuth",tT="xai"===g?"xAI API Key":"kimi"===g?"Kimi API Key":"qoder"===g||"qoder-cn"===g?"PAT":"API Key",t_=e=>{if(!eM||"auto"===eM)return null;let t=N(g,e);return t&&t.includes(eM)?eM:null},tO=tS?g:tk,tP=(()=>{let e=new Set,t=new Set,i=i=>{if(!i||t.has(i))return;t.add(i);let s=N(g,i);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tw)i(e.id);for(let e of eQ)i(e.id);for(let e of ef)e.providerAlias===tO&&"llm"===(e.kind||e.type||"llm")&&i(e.id);return e.size?["auto",...e]:null})(),tI=tS?k?.prefix||g:tk,tE=(0,r.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tO)}`,{cache:"no-store"}),t=await e.json();e.ok&&eY(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tO]),tD=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tO,ids:[e]})})).ok&&await tE()}catch(e){console.log("Error disabling model:",e)}},tR=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tO)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tE()}catch(e){console.log("Error enabling model:",e)}},tz=async e=>{e.length&&e1({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{e1(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tO,ids:e})})).ok&&await tE()}catch(e){console.log("Error disabling all models:",e)}}})},tM=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tO)}`,{method:"DELETE"})).ok&&await tE()}catch(e){console.log("Error enabling all models:",e)}},tq=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&eh(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tK=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eg(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,r.useEffect)(()=>{"kilocode"===g&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eV(e.models)}).catch(()=>{})},[g]);let tU=(0,r.useCallback)(async()=>{try{let[e,t,i,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),a=await e.json(),r=await t.json(),l=await i.json(),n=s.ok?await s.json():{};if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===g);b(e)}i.ok&&P(l.proxyPools||[]);let o=(n.providerStrategies||{})[g]||{};eD(o.fallbackStrategy||null),ez(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[g]||{};eq(d.mode||"auto");let c=el[g],p=c&&n[c]||{};if(eU({enabled:!0===p.enabled,connections:p.connections||{},schedules:p.schedules||{}}),t.ok){let e=(r.nodes||[]).find(e=>e.id===g)||null;if(!e&&tS)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===g)||null))break}A(e)}}catch(e){console.log("Error fetching connections:",e)}finally{w(!1)}},[g,tS]),tJ=async e=>{try{let t=await fetch(`/api/provider-nodes/${g}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await t.json();t.ok&&(A(i.node),await tU(),ed(!1))}catch(e){console.log("Error updating provider node:",e)}},tL=async(e,t)=>{try{let i=await fetch("/api/settings",{cache:"no-store"}),s=(i.ok?await i.json():{}).providerStrategies||{},a={};e&&(a.fallbackStrategy=e),"round-robin"===e&&""!==t&&(a.stickyRoundRobinLimit=Number(t)||3);let r={...s};0===Object.keys(a).length?delete r[g]:r[g]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}},tF=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),i={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?i[g]={mode:e}:delete i[g],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:i})})}catch(e){console.log("Error saving thinking config:",e)}},tB=async e=>{let t=el[g];if(t){eU(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,r.useEffect)(()=>{tU(),tq(),tK(),tE()},[tU,tq,tK,tE]),(0,r.useEffect)(()=>{if("cursor"!==g&&"zed"!==g)return void eW([]);let e=v.find(e=>!1!==e.isActive);if(!e?.id){eW([]),"zed"===g&&eZ(null);return}let t=!1;return"zed"===g&&eZ(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:i})=>{if(!t){if(e&&Array.isArray(i?.models)&&i.models.length>0){eW(i.models),"zed"===g&&i?.warning&&eZ(i.warning);return}"zed"===g&&(eW([]),eZ(i?.warning||i?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==g||(eW([]),eZ("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[g,v]),(0,r.useEffect)(()=>{let e=(m.zN[g]||m.fg[g]||m.IS[g]||m.nJ[g])?.modelsFetcher;e&&T(e).then(eB)},[g]);let tH=async(e,t,i=tk)=>{let s=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tq();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tW=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tq()}catch(e){console.log("Error deleting alias:",e)}},tG=async(e,t="llm",i=tO,s,a)=>{try{let r=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:i,id:e,type:t,...s?{caps:s}:{},...a?{transport:a}:{}})});if(r.ok)await tK(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await r.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tZ=async(e,t="llm",i=tO)=>{try{let s=new URLSearchParams({providerAlias:i,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await tK(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tQ=async()=>{if(tr)return;let e=v.find(e=>!1!==e.isActive);if(!e)return void alert((0,$.Tl)("Please add an active Qoder connection first"));tl(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||(0,$.Tl)("Failed to fetch models"));let s=i.models||[];if(0===s.length)return void alert((0,$.Tl)("No models returned"));let a=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let i=t.replace(/^(qoder-cn|qoder)\//,"");ef.some(e=>e.providerAlias===tO&&e.id===i&&"llm"===(e.kind||e.type||"llm"))||Object.values(ex).includes(`${tO}/${i}`)||(await tG(i,"llm",tO),a+=1)}0===a?alert((0,$.Tl)("All models already exist, no new models added")):alert((0,$.Tl)("Successfully added")+` ${a} `+(0,$.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,$.Tl)("Error fetching models")+": "+e.message)}finally{tl(!1)}},tV=async()=>{if(tn)return;let e=v.find(e=>!1!==e.isActive);if(!e)return void alert((0,$.Tl)("Please add an active Cline connection first"));to(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void alert(i.error||(0,$.Tl)("Failed to fetch models"));let s=i.models||[];if(0===s.length)return void alert((0,$.Tl)("No models returned"));let a=0;for(let e of s){let t=e.id||e.name;t&&(ef.some(e=>e.providerAlias===tO&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(ex).includes(`${tO}/${t}`)||(await tG(t,"llm",tO),a+=1))}0===a?alert((0,$.Tl)("All models already exist, no new models added")):alert((0,$.Tl)("Successfully added")+` ${a} `+(0,$.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,$.Tl)("Error fetching models")+": "+e.message)}finally{to(!1)}},tX=async()=>{if(e3||0===v.length)return;let e=Object.fromEntries(v.map(e=>[e.id,{state:"queued",error:null}]));ta.current=!1,e4(!0),e9(!1),e8(null),tt(e),ts({total:v.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,i=0;try{for(let e=0;e<v.length;e+=1){if(ta.current){ts({total:v.length,completed:e,passed:t,failed:i,stopped:!0});break}let s=v[e];e8(s.id),tt(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),a=await e.json(),r=!!a.valid;r?t+=1:i+=1,tt(e=>({...e,[s.id]:{state:r?"success":"failed",error:r?null:a.error||null}}))}catch(e){i+=1,tt(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}ts({total:v.length,completed:e+1,passed:t,failed:i,stopped:!1}),e<v.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{e8(null),e4(!1),e9(!1),ta.current=!1}},tY=async e=>{e1({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{e1(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&b(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},t0=()=>{tU(),R(!1)},t1=async e=>{Z("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:g,...e})}),i=null;try{i=await t.json()}catch{i=null}if(t.ok){await tU(),F(!1);return}Z(i?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Z("Failed to save connection")}},t2=async e=>{try{(await fetch(`/api/providers/${em.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tU(),en(!1))}catch(e){console.log("Error updating connection:",e)}},t5=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&b(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},t3=async(e,t)=>{let i=[...v];[i[e],i[t]]=[i[t],i[e]],b(i);try{await Promise.all([fetch(`/api/providers/${i[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${i[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tU()}},t4=v.filter(e=>eA.includes(e.id)),t6=v.length>0&&eA.length===v.length;(0,r.useEffect)(()=>{eT(e=>e.filter(e=>v.some(t=>t.id===e)))},[v]),(()=>{if(0===t4.length)return;let e=new Set(t4.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let i=O.find(e=>e.id===t);return i?.name}})();let t9=()=>{eP||ep(!1)},t7=async e=>{eI(!0);try{let t=0;for(let{connectionId:i,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",i,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tU(),ep(!1)}finally{eI(!1)}},t8=e=>t7(v.map(t=>({connectionId:t.id,proxyPoolId:e}))),[ie,it]=(0,r.useState)(!1),ii=async()=>{if(!ie){it(!0);try{let e=await fetch(`/api/providers/${encodeURIComponent(g)}/connections/keys`),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to export connection keys");let i=new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=`keys-${g}.json`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(s)}catch(e){useNotificationStore.getState().error(e.message)}finally{it(!1)}}},is=(0,s.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:v.map((e,t)=>{let i;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(i=e.id,eA.includes(i)),onChange:()=>{var t;return t=e.id,void eT(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(J,{connection:e,proxyPools:O,isOAuth:ty,isFirst:0===t,isLast:t===v.length-1,onMoveUp:()=>t3(t,t-1),onMoveDown:()=>t3(t,t+1),onToggleActive:t=>t5(e.id,t),autoPing:el[g]&&"oauth"===e.authType?{isActive:!0===eK.connections[e.id]||eK.schedules?.[e.id]?.enabled===!0,reactiveOn:!0===eK.connections[e.id],provider:g,scheduleOn:eK.schedules?.[e.id]?.enabled===!0,scheduleSummary:(0,er.JW)(eK.schedules?.[e.id]).join(" / "),onConfigure:()=>eL(e)}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&b(i=>i.map(i=>i.id===e.id?{...i,providerSpecificData:{...i.providerSpecificData,proxyPoolId:t||null}}:i))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{eu(e),en(!0)},onDelete:()=>tY(e.id),oneByOneStatus:te[e.id]||null})})]},e.id)})}),ia=O.filter(e=>!0===e.isActive),ir=(0,s.jsx)(p.aF,{isOpen:ec,onClose:t9,title:`Apply Proxy (${v.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=O.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t7(v.map((t,i)=>({connectionId:t.id,proxyPoolId:e[i%e.length].id})))},disabled:eP||0===ia.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,s.jsx)(a.default,{className:"text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>t8(null),disabled:eP,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,s.jsx)(a.default,{className:"text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),O.map(e=>(0,s.jsxs)("button",{onClick:()=>t8(e.id),disabled:eP||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)(a.default,{className:"text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eP&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(p.$n,{onClick:t9,variant:"ghost",fullWidth:!0,disabled:eP,children:"Cancel"})]})}),il=async e=>{if(!eN.has(e)){eC(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tO}/${e}`})}),i=await t.json();ej(t=>({...t,[e]:i.ok?"ok":"error"})),ek(i.ok?"":i.error||"Model not reachable")}catch{ej(t=>({...t,[e]:"error"})),ek("Network error")}finally{eC(t=>{let i=new Set(t);return i.delete(e),i})}}};if(j)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(p.Qv,{}),(0,s.jsx)(p.Qv,{})]});if(!tf)return(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(o(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let io=()=>tN&&tf.apiType?"responses"===tf.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tC?"/providers/anthropic-m.png":(0,c.HY)(tf.id);return(0,s.jsxs)("div",{className:`dashboard-surface ${D().page}`,children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(o(),{href:"/dashboard/providers",className:D().detailLink,children:[(0,s.jsx)(a.default,{className:"text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tf.color}15`},children:ey||!io()?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:tf.color},children:tf.textIcon||tf.id.slice(0,2).toUpperCase()}):(0,s.jsx)(d.default,{src:io(),alt:tf.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,c.Kw)(tf.id),ev(!0)},loading:"lazy",decoding:"async"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:D().detailTitle,children:tf.name}),(tf.notice?.apiKeyUrl||tf.notice?.signupUrl||tf.website)&&(0,s.jsxs)("a",{href:tf.notice?.apiKeyUrl||tf.notice?.signupUrl||tf.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,s.jsx)(a.default,{className:"text-sm",children:"open_in_new"}),tf.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:D().description,children:[v.length," connection",1===v.length?"":"s"]})]})]})]}),tf.deprecated&&(0,s.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,s.jsx)(a.default,{className:"text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tf.deprecationNotice})]}),tf.notice?.text&&!tf.deprecated&&(0,s.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,s.jsx)(a.default,{className:"text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:tf.notice.text}),tf.notice.apiKeyUrl&&(0,s.jsx)("a",{href:tf.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 →"})]}),tS&&k&&(0,s.jsx)(p.Zp,{className:`ui-card ${D().panel}`,children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h2",{className:"ui-eyebrow",children:[(0,s.jsx)(a.default,{className:"text-[16px]",children:"api"}),tC?"Anthropic Compatible Details":"OpenAI Compatible Details"]}),(0,s.jsxs)("p",{className:`break-all mt-2 ${D().description}`,children:[tC?"Messages API":"responses"===k.apiType?"Responses API":"Chat Completions"," \xb7 ",(k.baseUrl||"").replace(/\/$/,""),"/",tC?"messages":"responses"===k.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(p.$n,{size:"sm",variant:"contrast",icon:"add",onClick:()=>{Z(""),F(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ed(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(p.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:async()=>{e1({title:"Delete Compatible Node",message:`Delete this ${tC?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{e1(null);try{(await fetch(`/api/provider-nodes/${g}`,{method:"DELETE"})).ok&&f.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:`w-full sm:w-auto ${D().error}`,children:"Delete"})]})]})}),tb?(0,s.jsx)(p.gw,{providerId:g}):(0,s.jsxs)(p.Zp,{className:`ui-card ${D().panel}`,children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"ui-eyebrow",children:[(0,s.jsx)(a.default,{className:"text-[16px]",children:"vpn_key"}),"Connections"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[v.some(e=>"apikey"===(e.authType||"apikey"))&&(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"download",onClick:ii,disabled:ie,children:ie?"Extracting...":"Extract Keys"}),v.length>0&&O.length>0&&(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ep(!0),children:"Apply Proxy"}),v.length>0&&(0,s.jsxs)(s.Fragment,{children:[eA.length>0&&(0,s.jsxs)(p.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eA.length;0!==e&&e1({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{e1(null);let e=0,t=[...eA];for(let i of t)try{(await fetch(`/api/providers/${i}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}b(e=>e.filter(e=>!t.includes(e.id))),eT([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eA.length,")"]}),(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tX,disabled:e3,children:e3?"Testing Connection One-by-One...":"Test Connection One-by-One"}),e3&&(0,s.jsx)(p.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{e3&&(ta.current=!0,e9(!0))},disabled:e6,children:e6?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(p.lM,{checked:"round-robin"===eE,onChange:e=>{let t=e?"round-robin":null,i=e?eR||"1":eR;e&&!eR&&ez("1"),eD(t),tL(t,i)}}),"round-robin"===eE&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:eR,onChange:e=>{var t;ez(t=e.target.value),tL("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===v.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 text-text-muted shrink-0",children:(0,s.jsx)(a.default,{className:"text-[18px]",children:ty?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),t$&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tA," or ",tT,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:t$?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tu,children:tA}),(0,s.jsx)(p.$n,{size:"sm",variant:"contrast",icon:"key",onClick:tx,children:tT})]}):(0,s.jsxs)(s.Fragment,{children:[!tS&&"iflow"===g&&(0,s.jsx)(p.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>U(!0),children:"Cookie"}),"codex"===g&&(0,s.jsx)(p.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),children:(0,$.Tl)("Bulk Add")}),"grok-cli"===g&&(0,s.jsx)(p.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>et(!0),children:(0,$.Tl)("Bulk Add")}),(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:th,children:tS?"Add API Key":"iflow"===g?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[ti&&(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",ti.total]}),(0,s.jsxs)("span",{children:["Completed: ",ti.completed]}),(0,s.jsxs)("span",{children:["Passed: ",ti.passed]}),(0,s.jsxs)("span",{children:["Failed: ",ti.failed]}),ti.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),e3&&e7&&(0,s.jsxs)("span",{children:["Running: ",v.find(e=>e.id===e7)?.name||e7]})]})}),v.length>0&&(0,s.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,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:t6,onChange:()=>{t6?eT([]):eT(v.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),is,!tS&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===g&&(0,s.jsx)(p.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>U(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===g&&(0,s.jsx)(p.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>X(!0),title:(0,$.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),"grok-cli"===g&&(0,s.jsx)(p.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>et(!0),title:(0,$.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,$.Tl)("Bulk Add")}),t$?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tu,className:"w-full sm:w-auto",children:tA}),(0,s.jsx)(p.$n,{size:"sm",icon:"key",onClick:tx,className:"w-full sm:w-auto",children:tT})]}):(0,s.jsx)(p.$n,{size:"sm",icon:"add",onClick:th,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsx)(es,{providerId:g}),(0,s.jsxs)(p.Zp,{className:`ui-card ${D().panel}`,children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("h2",{className:"ui-eyebrow",children:[(0,s.jsx)(a.default,{className:"text-[16px]",children:"smart_toy"}),"Available Models"]}),tP&&(0,s.jsx)("select",{value:eM,onChange:e=>{var t;eq(t=e.target.value),tF(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tP.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tS&&(e=[...tw,...eQ.filter(e=>!tw.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eX.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eX.length>0&&(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tM,children:"Active All"}),e.length>0&&(0,s.jsx)(p.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tz(e),children:"Disable All"})]}))]}),!!ew&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:ew}),/RegionError|hosted in China|regionNotAllowed/i.test(ew)&&(i=(t="string"==typeof ew?ew:JSON.stringify(ew)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),n=t.match(/wrk_[0-9A-Za-z]+/),x=i?i[0].endsWith("/go")?i[0]:`${i[0]}/go`:n?`https://opencode.ai/workspace/${n[0]}/go`:"https://opencode.ai",(0,s.jsx)("div",{className:"mt-1.5",children:(0,s.jsxs)("a",{href:x,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,s.jsx)("span",{children:"Allow China-hosted models"}),(0,s.jsx)(a.default,{className:"text-[13px]",children:"open_in_new"})]})}))]}),"zed"===g&&!!eG&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:eG}),(()=>{let e,t,i;if(tS)return(0,s.jsx)(z,{providerStorageAlias:tO,providerDisplayAlias:tI,modelAliases:ex,customModels:ef,copied:td,onCopy:tc,onSetAlias:tH,onDeleteAlias:tW,onAddCustomModel:e=>tG(e,"llm",tO),onDeleteCustomModel:e=>tZ(e,"llm",tO),connections:v,isAnthropic:tC});let r=[...tw,...eQ.filter(e=>!tw.some(t=>t.id===e.id))].filter(e=>{let t=(0,u.CP)(e);return!t||"llm"===t}),l=new Set(eX),n=r.filter(e=>!l.has(e.id)),o=r.filter(e=>l.has(e.id)),d=_({customModels:ef,modelAliases:ex,providerAlias:tO,builtInModels:tw,type:"llm"});return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(I,{model:{id:e.id,name:e.name},fullModel:`${tI}/${e.id}`,alias:e.alias,copied:td,onCopy:tc,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tZ(e.id,"llm",tO):tW(e.alias)},testStatus:eb[e.id],onTest:v.length>0||tb?()=>il(e.id):void 0,isTesting:eN.has(e.id),isCustom:!0,isFree:!1,caps:y(`${g}/${e.id}`),thinkingSuffix:t_(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${tO}/${e.id}`,i=`${g}/${e.id}`,a=Object.entries(ex).find(([,e])=>e===t||e===i)?.[0];return(0,s.jsx)(I,{model:e,fullModel:`${tI}/${e.id}`,alias:a,copied:td,onCopy:tc,onSetAlias:t=>tH(e.id,t,tO),onDeleteAlias:()=>tW(a),testStatus:eb[e.id],onTest:v.length>0||tb?()=>il(e.id):void 0,isTesting:eN.has(e.id),isFree:e.isFree,onDisable:()=>tD(e.id),caps:y(`${g}/${e.id}`),thinkingSuffix:t_(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>e$(!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,s.jsx)(a.default,{className:"text-sm",children:"add"}),"Add Model"]}),("qoder"===g||"qoder-cn"===g)&&v.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:tQ,disabled:tr,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,s.jsx)(a.default,{className:"text-sm",style:tr?{animation:"spin 1s linear infinite"}:void 0,children:tr?"progress_activity":"download"}),tr?(0,$.Tl)("Fetching..."):(0,$.Tl)("Fetch Qoder Models")]}),("cline"===g||"clinepass"===g)&&v.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:tV,disabled:tn,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,s.jsx)(a.default,{className:"text-sm",style:tn?{animation:"spin 1s linear infinite"}:void 0,children:tn?"progress_activity":"download"}),tn?(0,$.Tl)("Fetching..."):(0,$.Tl)("Import from /models")]}),eF.length>0&&(e=new Set([...Object.values(ex),...d.map(e=>e.fullModel)]),t=new Set(tw.map(e=>e.id)),0===(i=eF.filter(i=>!e.has(`${tO}/${i.id}`)&&!t.has(i.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await tG(e.id,"llm",tO)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)(a.default,{className:"text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,s.jsxs)("button",{onClick:()=>tR(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)(a.default,{className:"text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),ir,"kiro"===g?(0,s.jsx)(p.Mh,{isOpen:E,providerInfo:tf,onSuccess:t0,onClose:()=>R(!1)}):"cursor"===g?(0,s.jsx)(p.G9,{isOpen:E,onSuccess:t0,onClose:()=>R(!1)}):"zed"===g?(0,s.jsx)(p.TE,{isOpen:E,providerInfo:tf,onSuccess:t0,onClose:()=>R(!1)}):"gitlab"===g?(0,s.jsx)(p.vj,{isOpen:E,providerInfo:tf,onSuccess:t0,onClose:()=>R(!1)}):(0,s.jsx)(p.LF,{isOpen:E,provider:g,providerInfo:tf,onSuccess:t0,onClose:()=>R(!1)}),(0,s.jsx)(p.LH,{isOpen:M,onSuccess:t0,onClose:()=>q(!1)}),"iflow"===g&&(0,s.jsx)(p.vE,{isOpen:K,onSuccess:()=>{tU(),U(!1)},onClose:()=>U(!1)}),(0,s.jsx)(B,{isOpen:L,provider:g,providerName:tf.name,isCompatible:tS,isAnthropic:tC,authType:tf?.authType,authHint:tf?.authHint,website:tf?.website,proxyPools:O,error:W,existingNames:v.map(e=>e.name).filter(Boolean),onSave:t1,onBulkDone:tU,onClose:()=>{Z(""),F(!1)}}),(0,s.jsx)(p.wI,{isOpen:ei,connection:em,proxyPools:O,onSave:t2,onClose:()=>en(!1)}),tS&&(0,s.jsx)(H,{isOpen:eo,node:k,onSave:tJ,onClose:()=>ed(!1),isAnthropic:tC}),!tS&&(0,s.jsx)(G,{isOpen:eS,providerAlias:tO,providerDisplayAlias:tI,onSave:async(e,t,i)=>{await tG(e,t?.stt?"stt":"llm",tO,t,i),e$(!1)},onClose:()=>e$(!1)}),"codex"===g&&(0,s.jsx)(Q,{isOpen:V,onClose:()=>X(!1),onSuccess:tU}),"grok-cli"===g&&(0,s.jsx)(Y,{isOpen:ee,onClose:()=>et(!1),onSuccess:tU}),eJ&&(0,s.jsx)(ea.A,{isOpen:!!eJ,onClose:()=>eL(null),connection:eJ,reactive:!0===eK.connections[eJ.id],schedule:eK.schedules?.[eJ.id]||null,onSave:e=>((e,{reactive:t,schedule:i})=>{tB({...eK,connections:{...eK.connections,[e]:t},schedules:{...eK.schedules,[e]:i}})})(eJ.id,e)}),(0,s.jsx)(p.uo,{isOpen:e2,onClose:()=>e5(!1),onConfirm:()=>{(window.localStorage.setItem(tp,"true"),e5(!1),ty)?tm():tx()},title:"Risk Notice",message:tf?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(p.uo,{isOpen:!!e0,onClose:()=>e1(null),onConfirm:e0?.onConfirm,title:e0?.title||"Confirm",message:e0?.message,variant:"danger"})]})}},48187:e=>{e.exports={page:"providers_page__lNQhJ DashboardControls_formScope__ID02o",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 DashboardControls_iconButton__v_EJw",errorBadge:"providers_errorBadge__39MFD",dialog:"providers_dialog__P87TZ DashboardControls_dialog__YyPS4",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"}},70217:(e,t,i)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}i.d(t,{g:()=>s})},93195:(e,t,i)=>{"use strict";function s(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}i.d(t,{JW:()=>o,Vm:()=>s,fB:()=>r,gy:()=>a,nz:()=>l});let a={anchor:"09:30",timezone:s(),windowHours:5,slotsPerDay:3};function r(e){let t=/^(\d{1,2}):(\d{2})$/.exec(String(e||"").trim());if(!t)return null;let i=Number(t[1]),s=Number(t[2]);return i>23||s>59?null:{hour:i,minute:s}}function l(e){return Math.max(1,Math.floor(24/e))}function n(e,t,i,s){let a="number"==typeof e?e:Number(e);return Number.isFinite(a)?Math.min(s,Math.max(i,a)):t}function o(e){let t=function(e){if(!e||!0!==e.enabled)return null;let t=r(e.anchor)||r(a.anchor),i=`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}`,s=!function(e){if(!e||"string"!=typeof e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(e.timezone)?a.timezone:e.timezone,o=n(e.windowHours,a.windowHours,.5,24),d=Math.round(n(e.slotsPerDay,a.slotsPerDay,1,l(o)));return{enabled:!0,anchor:i,timezone:s,windowHours:o,slotsPerDay:d}}(e);if(!t)return[];let{hour:i,minute:s}=r(t.anchor),o=60*i+s;return Array.from({length:t.slotsPerDay},(e,i)=>{let s=Math.round(o+i*t.windowHours*60)%1440;return`${String(Math.floor(s/60)).padStart(2,"0")}:${String(s%60).padStart(2,"0")}`})}},97132:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var s=i(95155),a=i(12115),r=i(14051),l=i.n(r),n=i(35497),o=i(31474),d=i(93195);let c=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function p({isOpen:e,onClose:t,onSave:i,connection:r,reactive:l=!1,schedule:m=null}){let[u,x]=(0,a.useState)(()=>({mode:m?.enabled===!0?"schedule":!0===l?"reset":"off",anchor:m?.anchor||d.gy.anchor,timezone:(0,d.Vm)(),windowHours:String(m?.windowHours??d.gy.windowHours),slotsPerDay:String(m?.slotsPerDay??d.gy.slotsPerDay)})),h=Number(u.windowHours),f=Number(u.slotsPerDay),g=!!(0,d.fB)(u.anchor),y=Number.isFinite(h)&&h>=.5&&h<=24,v=y?(0,d.nz)(h):24,b=Number.isInteger(f)&&f>=1&&f<=v,j=g&&y&&b,w="schedule"!==u.mode||j,k=j?(0,d.JW)({enabled:!0,...u,windowHours:h,slotsPerDay:f}):[],N=k.length&&y?(()=>{let{hour:e,minute:t}=(0,d.fB)(u.anchor),i=Math.round(60*e+t+f*h*60)%1440;return`${String(Math.floor(i/60)).padStart(2,"0")}:${String(i%60).padStart(2,"0")}`})():"",C=e=>x(t=>({...t,...e}));return(0,s.jsx)(n.aF,{isOpen:e,onClose:t,title:"Auto-ping settings",size:"lg",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.$n,{variant:"secondary",onClick:t,children:"Cancel"}),(0,s.jsx)(n.$n,{onClick:()=>{w&&(i({reactive:"reset"===u.mode,schedule:"schedule"===u.mode?{enabled:!0,anchor:u.anchor,timezone:u.timezone,windowHours:h,slotsPerDay:f}:{enabled:!1}}),t())},disabled:!w,children:"Save"})]}),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",r?.name?` for ${r.name}`:""," — pick one mode."]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:c.map(e=>{let t=u.mode===e.value;return(0,s.jsxs)("button",{type:"button",onClick:()=>C({mode:e.value}),className:(0,o.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",t?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:e.icon}),(0,s.jsx)("span",{children:e.label})]},e.value)})}),"reset"===u.mode&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===u.mode&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,s.jsx)(n.pd,{label:"Anchor time",type:"time",value:u.anchor,onChange:e=>C({anchor:e.target.value}),error:g?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,s.jsx)(n.pd,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:u.windowHours,onChange:e=>C({windowHours:e.target.value}),error:y?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,s.jsx)(n.pd,{label:"Pings per day",type:"number",min:"1",max:String(v),step:"1",value:u.slotsPerDay,onChange:e=>C({slotsPerDay:e.target.value}),error:b?"":`1 – ${v}`,hint:b?`Max ${v}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),k.length>0&&(0,s.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,s.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",u.timezone,")"]}),(0,s.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:k.join(" → ")}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",k[0]," – ",N,", then pauses until ",k[0]," next day."]})]})]})]})})}p.propTypes={isOpen:l().bool.isRequired,onClose:l().func.isRequired,onSave:l().func.isRequired,connection:l().object,reactive:l().bool,schedule:l().object}}},e=>{e.O(0,[3493,8679,1852,2904,6506,8500,3847,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=34929)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,r,o,a,n,i,c,d,l={},s={};function f(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}},o=!0;try{l[e].call(r.exports,r,r.exports,f),o=!1}finally{o&&delete s[e]}return r.exports}f.m=l,e=[],f.O=(t,r,o,a)=>{if(r){a=a||0;for(var n=e.length;n>0&&e[n-1][2]>a;n--)e[n]=e[n-1];e[n]=[r,o,a];return}for(var i=1/0,n=0;n<e.length;n++){for(var[r,o,a]=e[n],c=!0,d=0;d<r.length;d++)(!1&a||i>=a)&&Object.keys(f.O).every(e=>f.O[e](r[d]))?r.splice(d--,1):(c=!1,a<i&&(i=a));if(c){e.splice(n--,1);var l=o();void 0!==l&&(t=l)}}return t},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var a=Object.create(null);f.r(a);var n={};t=t||[null,r({}),r([]),r(r)];for(var i=2&o&&e;"object"==typeof i&&!~t.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(t=>n[t]=()=>e[t]);return n.default=()=>e,f.d(a,n),a},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((t,r)=>(f.f[r](e,t),t),[])),f.u=e=>6808===e?"static/chunks/6808-ed8012b059559430.js":3842===e?"static/chunks/3842-da1878db3339b090.js":5815===e?"static/chunks/5815-de6408f8865f88f8.js":1649===e?"static/chunks/1649-772a31b7f3a65900.js":"static/chunks/"+(({1831:"bd904a5c",3862:"1a258343",6603:"f5ef5e1c",9367:"b536a0f1"})[e]||e)+"."+({124:"2812449f50e38c6c",1415:"afcb10ca309bfdcc",1831:"90c130a0395f68cc",2435:"7dca2c9630249a05",3081:"82e1c33daaaf7b14",3521:"4d7f9c5dbc1dbf08",3862:"290297ea7c7f28c0",3916:"76b951b1b948b78b",4816:"24c9689ec18a4857",5462:"75bfd156f9bc4e3b",6357:"59e23f8c59426c8f",6603:"6154c40175735447",7743:"adc151b8013bc35b",8202:"1ffc6ce531e066ce",9233:"1939b75215f8cdcf",9367:"38a847592118e1c9"})[e]+".js",f.miniCssF=e=>"static/css/"+({970:"76dfb82832e9da52",2574:"e07f2bf4fa519943"})[e]+".css",f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},f.l=(e,t,r,a)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var n,i,c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var l=c[d];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")=="_N_E:"+r){n=l;break}}n||(i=!0,(n=document.createElement("script")).charset="utf-8",n.timeout=120,f.nc&&n.setAttribute("nonce",f.nc),n.setAttribute("data-webpack","_N_E:"+r),n.src=f.tu(e)),o[e]=[t];var s=(t,r)=>{n.onerror=n.onload=null,clearTimeout(u);var a=o[e];if(delete o[e],n.parentNode&&n.parentNode.removeChild(n),a&&a.forEach(e=>e(r)),t)return t(r)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=s.bind(null,n.onerror),n.onload=s.bind(null,n.onload),i&&document.head.appendChild(n)},f.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.tt=()=>(void 0===a&&(a={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(a=trustedTypes.createPolicy("nextjs#bundler",a))),a),f.tu=e=>f.tt().createScriptURL(e),f.p="/_next/",n={8068:0},f.f.miniCss=(e,t)=>{if(n[e])t.push(n[e]);else 0!==n[e]&&({970:1,2574:1})[e]&&t.push(n[e]=new Promise((t,r)=>{var o=f.miniCssF(e),a=f.p+o;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var a=r[o],n=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(n===e||n===t))return a}for(var i=document.getElementsByTagName("style"),o=0;o<i.length;o++){var a=i[o],n=a.getAttribute("data-href");if(n===e||n===t)return a}})(o,a))return t();((e,t,r,o)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.onerror=a.onload=n=>{if(a.onerror=a.onload=null,"load"===n.type)r();else{var i=n&&("load"===n.type?"missing":n.type),c=n&&n.target&&n.target.href||t,d=Error("Loading CSS chunk "+e+" failed.\n("+c+")");d.code="CSS_CHUNK_LOAD_FAILED",d.type=i,d.request=c,a.parentNode.removeChild(a),o(d)}},a.href=t;if("function"==typeof _N_E_STYLE_LOAD){var n=a.href,i=a.onload,c=a.onerror;_N_E_STYLE_LOAD(0===n.indexOf(window.location.origin)?new URL(n).pathname:n).then(function(){i&&i.call(a,{type:"load"})},function(){c&&c.call(a,{})})}else document.head.appendChild(a)})(e,a,t,r)}).then(()=>{n[e]=0},t=>{throw delete n[e],t}))},i={8068:0,8271:0,3334:0,3493:0,8679:0,970:0,4391:0,4660:0,2175:0,636:0,7754:0,1852:0},f.f.j=(e,t)=>{var r=f.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(8(068|271|679)|(257|333|775)4|1852|2175|3493|4391|4660|636|970)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var a=f.p+f.u(e),n=Error();f.l(a,t=>{if(f.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;n.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",n.name="ChunkLoadError",n.type=o,n.request=a,r[1](n)}},"chunk-"+e,e)}},f.O.j=e=>0===i[e],c=(e,t)=>{var r,o,[a,n,c]=t,d=0;if(a.some(e=>0!==i[e])){for(r in n)f.o(n,r)&&(f.m[r]=n[r]);if(c)var l=c(f)}for(e&&e(t);d<a.length;d++)o=a[d],f.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return f.O(l)},(d=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),d.push=c.bind(null,d.push.bind(d))})();
|
|
File without changes
|
/package/app/.next-cli-build/static/{MDZXE-9g1sq006f6JNky9 → rJzsAZX3-_OjA05HFqaR_}/_ssgManifest.js
RENAMED
|
File without changes
|