@rsalmn/extremerouter 0.6.4 → 0.6.6

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.
Files changed (885) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +8 -6
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +27 -3
  5. package/app/.next-cli-build/routes-manifest.json +12 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -0
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -0
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -0
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  62. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  64. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  65. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  66. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  67. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  68. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  69. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  70. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  71. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  72. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  74. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  75. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  76. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  78. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  81. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  82. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  84. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  86. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  88. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  90. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  96. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  98. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  102. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  103. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  105. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  108. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  109. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  111. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  113. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  114. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  115. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  126. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +3 -3
  138. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  214. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  216. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  220. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
  231. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  234. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  253. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -0
  265. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -0
  266. package/app/.next-cli-build/server/app/api/usage/meta/route_client-reference-manifest.js +1 -0
  267. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  276. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  289. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  317. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  318. package/app/.next-cli-build/server/app/callback.html +1 -1
  319. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  320. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  321. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  322. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  323. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  324. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  325. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  326. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  328. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  329. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  330. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  331. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  332. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  333. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
  335. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  336. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  337. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  338. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  339. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  340. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  341. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  342. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  343. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
  345. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  346. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  347. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  348. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  349. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  350. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  351. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  352. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  353. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  354. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
  355. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  356. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  358. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  359. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  361. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  362. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  363. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  364. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
  365. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  366. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  368. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  369. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  371. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  373. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  374. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
  376. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  377. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  379. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  380. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  383. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  384. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
  386. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  387. package/app/.next-cli-build/server/app/dashboard/overview.html +1 -0
  388. package/app/.next-cli-build/server/app/dashboard/overview.meta +17 -0
  389. package/app/.next-cli-build/server/app/dashboard/overview.rsc +22 -0
  390. package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview/__PAGE__.segment.rsc +6 -0
  391. package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview.segment.rsc +5 -0
  392. package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  393. package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
  394. package/app/.next-cli-build/server/app/dashboard/overview.segments/_full.segment.rsc +22 -0
  395. package/app/.next-cli-build/server/app/dashboard/overview.segments/_head.segment.rsc +6 -0
  396. package/app/.next-cli-build/server/app/dashboard/overview.segments/_index.segment.rsc +9 -0
  397. package/app/.next-cli-build/server/app/dashboard/overview.segments/_tree.segment.rsc +3 -0
  398. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  400. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  401. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  404. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  405. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
  407. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  408. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  410. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  416. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
  418. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  419. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  421. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  426. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
  428. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  431. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  436. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
  438. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  441. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  442. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  445. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  446. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
  448. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  450. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  453. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  454. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  456. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  468. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
  470. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  473. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  478. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
  480. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  488. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
  490. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  493. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  497. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  498. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  499. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
  500. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  502. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  503. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
  509. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  511. package/app/.next-cli-build/server/app/index.html +1 -1
  512. package/app/.next-cli-build/server/app/index.rsc +5 -5
  513. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  515. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  517. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  519. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  520. package/app/.next-cli-build/server/app/landing.html +1 -1
  521. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  522. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  523. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  525. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/login/page.js +2 -2
  529. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  530. package/app/.next-cli-build/server/app/login.html +1 -1
  531. package/app/.next-cli-build/server/app/login.rsc +6 -6
  532. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  533. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  535. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  539. package/app/.next-cli-build/server/app/page.js +2 -2
  540. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app-paths-manifest.json +8 -6
  542. package/app/.next-cli-build/server/chunks/1220.js +2 -2
  543. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  544. package/app/.next-cli-build/server/chunks/318.js +9 -9
  545. package/app/.next-cli-build/server/chunks/412.js +1 -1
  546. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  547. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  548. package/app/.next-cli-build/server/chunks/4884.js +2 -2
  549. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  550. package/app/.next-cli-build/server/chunks/615.js +1 -1
  551. package/app/.next-cli-build/server/chunks/6316.js +1 -1
  552. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  553. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  554. package/app/.next-cli-build/server/chunks/8895.js +3 -3
  555. package/app/.next-cli-build/server/chunks/9630.js +1 -1
  556. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  557. package/app/.next-cli-build/server/middleware.js +4 -4
  558. package/app/.next-cli-build/server/pages/404.html +1 -1
  559. package/app/.next-cli-build/server/pages/500.html +1 -1
  560. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  561. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  562. package/app/.next-cli-build/static/chunks/1321-272aef69f8a5a079.js +1 -0
  563. package/app/.next-cli-build/static/chunks/{5497-e8e1e33b585b7c3e.js → 5497-6e1985d958a64ed9.js} +1 -1
  564. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-a51a293917886fef.js +1 -0
  565. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-81c19a6fe2231d96.js → page-ec258bc489c68411.js} +1 -1
  566. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9e34cc08c32987bd.js +1 -0
  567. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-79901f3a01b79627.js +1 -0
  568. package/app/.next-cli-build/static/chunks/app/_global-error/{page-d737e9373491be4a.js → page-5ba6931159d13181.js} +1 -1
  569. package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-d737e9373491be4a.js → route-5ba6931159d13181.js} +1 -1
  570. package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-d737e9373491be4a.js → route-5ba6931159d13181.js} +1 -1
  571. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-d737e9373491be4a.js → route-5ba6931159d13181.js} +1 -1
  572. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-5ba6931159d13181.js +1 -0
  573. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-5ba6931159d13181.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-5ba6931159d13181.js +1 -0
  575. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-5ba6931159d13181.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-5ba6931159d13181.js +1 -0
  577. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-5ba6931159d13181.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-5ba6931159d13181.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-5ba6931159d13181.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-5ba6931159d13181.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-5ba6931159d13181.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-5ba6931159d13181.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-5ba6931159d13181.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-5ba6931159d13181.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-5ba6931159d13181.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-5ba6931159d13181.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-5ba6931159d13181.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-5ba6931159d13181.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-5ba6931159d13181.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-5ba6931159d13181.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-5ba6931159d13181.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-5ba6931159d13181.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-5ba6931159d13181.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/combos/route-5ba6931159d13181.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-5ba6931159d13181.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-5ba6931159d13181.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-5ba6931159d13181.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-5ba6931159d13181.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/health/route-5ba6931159d13181.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-5ba6931159d13181.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/init/route-5ba6931159d13181.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-5ba6931159d13181.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/keys/route-5ba6931159d13181.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/locale/route-5ba6931159d13181.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-5ba6931159d13181.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-5ba6931159d13181.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-5ba6931159d13181.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-5ba6931159d13181.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-5ba6931159d13181.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-5ba6931159d13181.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-5ba6931159d13181.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-5ba6931159d13181.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-5ba6931159d13181.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-5ba6931159d13181.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-5ba6931159d13181.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/models/route-5ba6931159d13181.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/models/test/route-5ba6931159d13181.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-5ba6931159d13181.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-5ba6931159d13181.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-5ba6931159d13181.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-5ba6931159d13181.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-5ba6931159d13181.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-5ba6931159d13181.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-5ba6931159d13181.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-5ba6931159d13181.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-5ba6931159d13181.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-5ba6931159d13181.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-5ba6931159d13181.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-5ba6931159d13181.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-5ba6931159d13181.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/pricing/route-5ba6931159d13181.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-5ba6931159d13181.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-5ba6931159d13181.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-5ba6931159d13181.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-5ba6931159d13181.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-5ba6931159d13181.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-5ba6931159d13181.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-5ba6931159d13181.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-5ba6931159d13181.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-5ba6931159d13181.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/providers/route-5ba6931159d13181.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-5ba6931159d13181.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-5ba6931159d13181.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-5ba6931159d13181.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-5ba6931159d13181.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-5ba6931159d13181.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-5ba6931159d13181.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-5ba6931159d13181.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-5ba6931159d13181.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-5ba6931159d13181.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-5ba6931159d13181.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-5ba6931159d13181.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-5ba6931159d13181.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/settings/route-5ba6931159d13181.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-5ba6931159d13181.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-5ba6931159d13181.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-5ba6931159d13181.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/tags/route-5ba6931159d13181.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-5ba6931159d13181.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-5ba6931159d13181.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-5ba6931159d13181.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-5ba6931159d13181.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-5ba6931159d13181.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-5ba6931159d13181.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-5ba6931159d13181.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-5ba6931159d13181.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-5ba6931159d13181.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-5ba6931159d13181.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-5ba6931159d13181.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-5ba6931159d13181.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-5ba6931159d13181.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-5ba6931159d13181.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-5ba6931159d13181.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-5ba6931159d13181.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-5ba6931159d13181.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-5ba6931159d13181.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-5ba6931159d13181.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-5ba6931159d13181.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-5ba6931159d13181.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-5ba6931159d13181.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-5ba6931159d13181.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-5ba6931159d13181.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-5ba6931159d13181.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-5ba6931159d13181.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-5ba6931159d13181.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-5ba6931159d13181.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-5ba6931159d13181.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-5ba6931159d13181.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-5ba6931159d13181.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-5ba6931159d13181.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-5ba6931159d13181.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-5ba6931159d13181.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-5ba6931159d13181.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-5ba6931159d13181.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-5ba6931159d13181.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-5ba6931159d13181.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/v1/route-5ba6931159d13181.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-5ba6931159d13181.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-5ba6931159d13181.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-5ba6931159d13181.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-5ba6931159d13181.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/version/route-5ba6931159d13181.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-5ba6931159d13181.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/version/update/route-5ba6931159d13181.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-5ba6931159d13181.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/page-5ba6931159d13181.js +1 -0
  707. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-5ba6931159d13181.js +1 -0
  708. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-5ba6931159d13181.js +1 -0
  709. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-5ba6931159d13181.js +1 -0
  710. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-5ba6931159d13181.js +1 -0
  711. package/app/.next-cli-build/static/css/f8bcd5e082a2459f.css +1 -0
  712. package/app/.next-cli-build/static/nn0K2UwbRB5lQVINYaLtq/_buildManifest.js +1 -0
  713. package/app/cli/.build-home/AppData/Local/npm-cache/_update-notifier-last-checked +0 -0
  714. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.6.4-to-0.6.5-0.6.5-20260705-054523/data.sqlite +0 -0
  715. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.6.5-to-0.6.6-0.6.6-20260707-011739/data.sqlite +0 -0
  716. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  717. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  718. package/app/package.json +1 -1
  719. package/app/public/providers/adapta-web.svg +6 -0
  720. package/app/public/providers/blackbox-web.svg +6 -0
  721. package/app/public/providers/chatglm-cn.svg +7 -0
  722. package/app/public/providers/chatgpt-web.svg +6 -0
  723. package/app/public/providers/claude-web.svg +6 -0
  724. package/app/public/providers/copilot-web.svg +6 -0
  725. package/app/public/providers/deepseek-web.svg +6 -0
  726. package/app/public/providers/doubao-web.svg +8 -0
  727. package/app/public/providers/duckduckgo-web.svg +7 -0
  728. package/app/public/providers/gemini-web.svg +5 -0
  729. package/app/public/providers/huggingchat.svg +9 -0
  730. package/app/public/providers/kimi-web.svg +8 -0
  731. package/app/public/providers/lmarena.svg +8 -0
  732. package/app/public/providers/muse-spark-web.svg +6 -0
  733. package/app/public/providers/poe-web.svg +8 -0
  734. package/app/public/providers/pollinations.svg +9 -0
  735. package/app/public/providers/puter.svg +5 -0
  736. package/app/public/providers/qwen-web.svg +6 -0
  737. package/app/public/providers/t3-web.svg +6 -0
  738. package/app/public/providers/v0-vercel-web.svg +6 -0
  739. package/app/public/providers/venice-web.svg +6 -0
  740. package/app/public/providers/veoaifree-web.svg +8 -0
  741. package/package.json +1 -1
  742. package/app/.next-cli-build/static/chunks/1321-063dbf2b0db9ec56.js +0 -1
  743. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-d70dcc6c9a151a80.js +0 -1
  744. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-933a4cc7d2dae064.js +0 -1
  745. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-d737e9373491be4a.js +0 -1
  746. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-d737e9373491be4a.js +0 -1
  747. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-d737e9373491be4a.js +0 -1
  748. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-d737e9373491be4a.js +0 -1
  749. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-d737e9373491be4a.js +0 -1
  750. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d737e9373491be4a.js +0 -1
  751. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-d737e9373491be4a.js +0 -1
  752. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-d737e9373491be4a.js +0 -1
  753. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-d737e9373491be4a.js +0 -1
  754. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-d737e9373491be4a.js +0 -1
  755. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-d737e9373491be4a.js +0 -1
  756. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-d737e9373491be4a.js +0 -1
  757. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-d737e9373491be4a.js +0 -1
  758. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-d737e9373491be4a.js +0 -1
  759. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-d737e9373491be4a.js +0 -1
  760. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-d737e9373491be4a.js +0 -1
  761. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-d737e9373491be4a.js +0 -1
  762. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-d737e9373491be4a.js +0 -1
  763. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-d737e9373491be4a.js +0 -1
  764. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-d737e9373491be4a.js +0 -1
  765. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-d737e9373491be4a.js +0 -1
  766. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-d737e9373491be4a.js +0 -1
  767. package/app/.next-cli-build/static/chunks/app/api/combos/route-d737e9373491be4a.js +0 -1
  768. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-d737e9373491be4a.js +0 -1
  769. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-d737e9373491be4a.js +0 -1
  770. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-d737e9373491be4a.js +0 -1
  771. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-d737e9373491be4a.js +0 -1
  772. package/app/.next-cli-build/static/chunks/app/api/health/route-d737e9373491be4a.js +0 -1
  773. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-d737e9373491be4a.js +0 -1
  774. package/app/.next-cli-build/static/chunks/app/api/init/route-d737e9373491be4a.js +0 -1
  775. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-d737e9373491be4a.js +0 -1
  776. package/app/.next-cli-build/static/chunks/app/api/keys/route-d737e9373491be4a.js +0 -1
  777. package/app/.next-cli-build/static/chunks/app/api/locale/route-d737e9373491be4a.js +0 -1
  778. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-d737e9373491be4a.js +0 -1
  779. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-d737e9373491be4a.js +0 -1
  780. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-d737e9373491be4a.js +0 -1
  781. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d737e9373491be4a.js +0 -1
  782. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-d737e9373491be4a.js +0 -1
  783. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-d737e9373491be4a.js +0 -1
  784. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-d737e9373491be4a.js +0 -1
  785. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-d737e9373491be4a.js +0 -1
  786. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-d737e9373491be4a.js +0 -1
  787. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-d737e9373491be4a.js +0 -1
  788. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-d737e9373491be4a.js +0 -1
  789. package/app/.next-cli-build/static/chunks/app/api/models/route-d737e9373491be4a.js +0 -1
  790. package/app/.next-cli-build/static/chunks/app/api/models/test/route-d737e9373491be4a.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-d737e9373491be4a.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-d737e9373491be4a.js +0 -1
  793. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-d737e9373491be4a.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-d737e9373491be4a.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-d737e9373491be4a.js +0 -1
  796. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-d737e9373491be4a.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-d737e9373491be4a.js +0 -1
  798. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-d737e9373491be4a.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-d737e9373491be4a.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-d737e9373491be4a.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-d737e9373491be4a.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-d737e9373491be4a.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-d737e9373491be4a.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/pricing/route-d737e9373491be4a.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-d737e9373491be4a.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-d737e9373491be4a.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-d737e9373491be4a.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-d737e9373491be4a.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-d737e9373491be4a.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-d737e9373491be4a.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-d737e9373491be4a.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-d737e9373491be4a.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-d737e9373491be4a.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/providers/route-d737e9373491be4a.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-d737e9373491be4a.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-d737e9373491be4a.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-d737e9373491be4a.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-d737e9373491be4a.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-d737e9373491be4a.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-d737e9373491be4a.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-d737e9373491be4a.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-d737e9373491be4a.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-d737e9373491be4a.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-d737e9373491be4a.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-d737e9373491be4a.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-d737e9373491be4a.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/settings/route-d737e9373491be4a.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-d737e9373491be4a.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-d737e9373491be4a.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-d737e9373491be4a.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/tags/route-d737e9373491be4a.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-d737e9373491be4a.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-d737e9373491be4a.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-d737e9373491be4a.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-d737e9373491be4a.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-d737e9373491be4a.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-d737e9373491be4a.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-d737e9373491be4a.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-d737e9373491be4a.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-d737e9373491be4a.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-d737e9373491be4a.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-d737e9373491be4a.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-d737e9373491be4a.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-d737e9373491be4a.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-d737e9373491be4a.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-d737e9373491be4a.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-d737e9373491be4a.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-d737e9373491be4a.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-d737e9373491be4a.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-d737e9373491be4a.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-d737e9373491be4a.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-d737e9373491be4a.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-d737e9373491be4a.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-d737e9373491be4a.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-d737e9373491be4a.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-d737e9373491be4a.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-d737e9373491be4a.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-d737e9373491be4a.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-d737e9373491be4a.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-d737e9373491be4a.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-d737e9373491be4a.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-d737e9373491be4a.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-d737e9373491be4a.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-d737e9373491be4a.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-d737e9373491be4a.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-d737e9373491be4a.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-d737e9373491be4a.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-d737e9373491be4a.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/v1/route-d737e9373491be4a.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-d737e9373491be4a.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-d737e9373491be4a.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-d737e9373491be4a.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-d737e9373491be4a.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/version/route-d737e9373491be4a.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-d737e9373491be4a.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/version/update/route-d737e9373491be4a.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-d737e9373491be4a.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/page-d737e9373491be4a.js +0 -1
  879. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-d737e9373491be4a.js +0 -1
  880. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-d737e9373491be4a.js +0 -1
  881. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-d737e9373491be4a.js +0 -1
  882. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-d737e9373491be4a.js +0 -1
  883. package/app/.next-cli-build/static/css/57a0456cd89c95aa.css +0 -1
  884. package/app/.next-cli-build/static/wmMfolDh46kO-VuBq1X-C/_buildManifest.js +0 -1
  885. /package/app/.next-cli-build/static/{wmMfolDh46kO-VuBq1X-C → nn0K2UwbRB5lQVINYaLtq}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{73411:(e,s,t)=>{Promise.resolve().then(t.bind(t,98378))},98378:(e,s,t)=>{"use strict";t.d(s,{default:()=>f});var r=t(95155),a=t(12115),n=t(35497),i=t(14051),o=t.n(i);let c=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"Via RTK + Headroom"},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function l({data:e}){if(!e)return null;let s={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:c.map(e=>{let t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-panel border border-border-subtle bg-panel p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[e.color]}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:e.icon})}),(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("span",{className:"text-2xl font-bold text-text-main",children:(t=Number(s[e.key]||0))>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()})})]}),(0,r.jsx)("div",{className:"text-sm font-medium text-text-main",children:e.label}),(0,r.jsx)("div",{className:"text-xs text-text-muted",children:e.sub})]},e.key)})})}l.propTypes={data:o().object};let d=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function m({settings:e}){return e?(0,r.jsx)("div",{className:"flex flex-wrap gap-3",children:d.map(s=>{let t=!!e[s.key];return(0,r.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${t?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] ${t?"text-success":"text-text-muted"}`,children:s.icon}),(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s.name}),(0,r.jsx)(n.Ex,{variant:t?"success":"default",size:"sm",dot:!0,children:t?"Active":"Off"})]},s.key)})}):null}m.propTypes={settings:o().object};var u=t(98500),x=t.n(u),p=t(57250);let b=new Set(["windsurf","trae","cody","kimchi","chatglm-cn","blackbox-web","puter","adapta-web","deepseek-web","chatgpt-web","doubao-web","gemini-web","copilot-web","muse-spark-web","duckduckgo-web","venice-web","t3-web","lmarena","veoaifree-web","claude-web","pollinations","poe-web","v0-vercel-web","qwen-web","kimi-web","huggingchat"]),g=e=>{let s=Number(e||0);return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString()};function h({providers:e}){return e&&0!==e.length?(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:e.map(e=>{var s;let t=e.color||"#6b7280",a=t.length>7?t:t+"15";return(0,r.jsxs)(x(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,r.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:a},children:(0,r.jsx)(p.A,{src:(s=e.id,`/providers/${s}.${b.has(s)?"svg":"png"}`),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"font-medium",children:[g(e.requests)," requests"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("span",{children:[g(e.tokens)," tokens"]})]}):e.connected?(0,r.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,r.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,r.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,r.jsx)(n.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function f(){let[e,s]=(0,a.useState)(null),[t,i]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||s(e)}).catch(()=>{}).finally(()=>i(!1))},[]),t)?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,r.jsx)(l,{data:e}),(0,r.jsx)(n.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,r.jsx)(m,{settings:e?.tokenSaverSettings})}),(0,r.jsx)(n.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,r.jsx)(h,{providers:e?.freeProviders||[]})})]})}h.propTypes={providers:o().arrayOf(o().shape({id:o().string,name:o().string,icon:o().string,color:o().string,requests:o().number,tokens:o().number}))}}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=73411)),_N_E=e.O()}]);
@@ -7,4 +7,4 @@ sk-key-only-auto-named`;function A({isOpen:e,provider:t,providerName:s,isCompati
7
7
  "idToken": "eyJhbGc...",
8
8
  "email": "user@example.com"
9
9
  }
10
- ]`;function P({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[o,n]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[p,x]=(0,i.useState)(null),h=()=>{o||(r(""),m(""),x(null),t())},f=async()=>{var e;let t;m(""),x(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,u.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void m((0,u.Tl)("No accounts found in input"));n(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,u.Tl)("Request failed"))}finally{n(!1)}},g=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(d.aF,{isOpen:e,title:(0,u.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,u.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.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:O,value:l,onChange:e=>r(e.target.value),disabled:o}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,u.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,u.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:f,fullWidth:!0,disabled:o||!l.trim(),children:o?(0,u.Tl)("Importing..."):(0,u.Tl)("Import All")}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:o,children:(0,u.Tl)("Close")})]})]})})}P.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onSuccess:b().func};let E={claude:"claudeAutoPing",codex:"codexAutoPing"};function I(){let e,t,s,r=(0,l.useParams)(),h=(0,l.useRouter)(),y=r.id,{getCaps:b}=(0,x.y)(),[j,N]=(0,i.useState)([]),[k,S]=(0,i.useState)(!0),[O,I]=(0,i.useState)(null),[R,D]=(0,i.useState)([]),[U,_]=(0,i.useState)(!1),[z,q]=(0,i.useState)(!1),[M,K]=(0,i.useState)(!1),[L,F]=(0,i.useState)(""),[J,W]=(0,i.useState)(!1),[B,H]=(0,i.useState)(!1),[G,V]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)(!1),[X,Y]=(0,i.useState)(null),[ee,et]=(0,i.useState)({}),[es,ea]=(0,i.useState)([]),[ei,el]=(0,i.useState)(!1),[er,eo]=(0,i.useState)({}),[en,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(()=>new Set),[ep,ex]=(0,i.useState)(""),[eu,eh]=(0,i.useState)(!1),[ef,eg]=(0,i.useState)(!1),[ey,eb]=(0,i.useState)([]),[ev,ej]=(0,i.useState)("__none__"),[ew,eN]=(0,i.useState)(!1),[ek,eC]=(0,i.useState)(null),[eS,eA]=(0,i.useState)(""),[e$,eT]=(0,i.useState)("auto"),[eO,eP]=(0,i.useState)({enabled:!1,connections:{}}),[eE,eI]=(0,i.useState)([]),[eR,eD]=(0,i.useState)([]),[eU,e_]=(0,i.useState)([]),[ez,eq]=(0,i.useState)(null),[eM,eK]=(0,i.useState)(!1),[eL,eF]=(0,i.useState)(!1),[eJ,eW]=(0,i.useState)(!1),[eB,eH]=(0,i.useState)(null),[eG,eV]=(0,i.useState)({}),[eQ,eZ]=(0,i.useState)(null),eX=(0,i.useRef)(!1),[eY,e0]=(0,i.useState)(!1),{copied:e1,copy:e2}=(0,p.C)(),e5="ag_risk_confirmed",e3=()=>{_(!0)},e4=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(e5)?eK(!0):te?e3():(F(""),K(!0))},e7=()=>{F(""),K(!0)},e8=()=>{te?e4():e7()},e6=O?{id:O.id,name:O.name||("anthropic-compatible"===O.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===O.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===O.type?"AC":"OC",apiType:O.apiType,baseUrl:O.baseUrl,type:O.type}:c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y]||c.br[y],e9=e6?.authModes||[],te=!!c.zN[y]||!!c.IS[y]||e9.includes("oauth"),tt=!!c.fg[y]||e9.includes("apikey"),ts=!!c.IS[y]?.noAuth,ta=(0,m.KC)(y),ti=(0,c.wG)(y),tl=(0,c.mq)(y),tr=(0,c.gb)(y),to=tl||tr,tn=!to&&te&&tt,td="xai"===y?"Grok Build OAuth":"OAuth",tc="xai"===y?"xAI API Key":"API Key";c.Q2[y]?.thinkingConfig||c.s9.extended;let tm=to?y:ti,tp=to?O?.prefix||y:ti,tx=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}`,{cache:"no-store"}),t=await e.json();e.ok&&e_(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tm]),tu=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tm,ids:[e]})})).ok&&await tx()}catch(e){console.log("Error disabling model:",e)}},th=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error enabling model:",e)}},tf=async e=>{e.length&&eq({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eq(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tm,ids:e})})).ok&&await tx()}catch(e){console.log("Error disabling all models:",e)}}})},tg=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error enabling all models:",e)}},ty=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&et(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tb=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ea(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eD(e.models)}).catch(()=>{})},[y]);let tv=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=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"})]),i=await e.json(),l=await t.json(),r=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===y);N(e)}s.ok&&D(r.proxyPools||[]);let n=(o.providerStrategies||{})[y]||{};eC(n.fallbackStrategy||null),eA(null!=n.stickyRoundRobinLimit?String(n.stickyRoundRobinLimit):"1");let d=(o.providerThinking||{})[y]||{};eT(d.mode||"auto");let c=E[y],m=c&&o[c]||{};if(eP({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===y)||null;if(!e&&to)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===y)||null))break}I(e)}}catch(e){console.log("Error fetching connections:",e)}finally{S(!1)}},[y,to]),tj=async e=>{try{let t=await fetch(`/api/provider-nodes/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(I(s.node),await tv(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tw=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[y]:l[y]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tN=async e=>{let t=E[y];if(t){eP(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,i.useEffect)(()=>{tv(),ty(),tb(),tx()},[tv,ty,tb,tx]),(0,i.useEffect)(()=>{let e=(c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y])?.modelsFetcher;e&&f(e).then(eI)},[y]);let tk=async(e,t,s=ti)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await ty();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tC=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ty()}catch(e){console.log("Error deleting alias:",e)}},tS=async(e,t="llm",s=tm)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t})});if(a.ok)await tb(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tA=async(e,t="llm",s=tm)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await tb(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},t$=async()=>{if(eY)return;let e=j.find(e=>!1!==e.isActive);if(!e)return void alert((0,u.Tl)("Please add an active Qoder connection first"));e0(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,u.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,u.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");es.some(e=>e.providerAlias===tm&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(ee).includes(`${tm}/${s}`)||(await tS(s,"llm",tm),i+=1)}0===i?alert((0,u.Tl)("All models already exist, no new models added")):alert((0,u.Tl)("Successfully added")+` ${i} `+(0,u.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,u.Tl)("Error fetching models")+": "+e.message)}finally{e0(!1)}},tT=async()=>{if(eL||0===j.length)return;let e=Object.fromEntries(j.map(e=>[e.id,{state:"queued",error:null}]));eX.current=!1,eF(!0),eW(!1),eH(null),eV(e),eZ({total:j.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<j.length;e+=1){if(eX.current){eZ({total:j.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=j[e];eH(a.id),eV(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eV(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eV(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eZ({total:j.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<j.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eH(null),eF(!1),eW(!1),eX.current=!1}},tO=async e=>{eq({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eq(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&N(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tP=()=>{tv(),_(!1)},tE=async e=>{F("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:y,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tv(),K(!1);return}F(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),F("Failed to save connection")}},tI=async e=>{try{(await fetch(`/api/providers/${X.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tv(),H(!1))}catch(e){console.log("Error updating connection:",e)}},tR=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&N(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tD=async(e,t)=>{let s=[...j];[s[e],s[t]]=[s[t],s[e]],N(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tv()}},tU=j.filter(e=>ey.includes(e.id)),t_=j.length>0&&ey.length===j.length;(0,i.useEffect)(()=>{eb(e=>e.filter(e=>j.some(t=>t.id===e)))},[j]),(()=>{if(0===tU.length)return;let e=new Set(tU.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=R.find(e=>e.id===t);return s?.name}})();let tz=()=>{ew||Z(!1)},tq=async e=>{eN(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tv(),Z(!1)}finally{eN(!1)}},tM=e=>tq(j.map(t=>({connectionId:t.id,proxyPoolId:e}))),tK=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:j.map((e,t)=>{let s;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,ey.includes(s)),onChange:()=>{var t;return t=e.id,void eb(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,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(C,{connection:e,proxyPools:R,isOAuth:te,isFirst:0===t,isLast:t===j.length-1,onMoveUp:()=>tD(t,t-1),onMoveDown:()=>tD(t,t+1),onToggleActive:t=>tR(e.id,t),autoPing:E[y]&&"oauth"===e.authType?{on:!0===eO.connections[e.id],onToggle:t=>{var s;return s=e.id,void tN({...eO,connections:{...eO.connections,[s]:t}})},provider:y}: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&&N(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{Y(e),H(!0)},onDelete:()=>tO(e.id),oneByOneStatus:eG[e.id]||null})})]},e.id)})}),tL=R.filter(e=>!0===e.isActive),tF=(0,a.jsx)(d.aF,{isOpen:Q,onClose:tz,title:`Apply Proxy (${j.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=R.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tq(j.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:ew||0===tL.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tM(null),disabled:ew,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),R.map(e=>(0,a.jsxs)("button",{onClick:()=>tM(e.id),disabled:ew||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),ew&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tz,variant:"ghost",fullWidth:!0,disabled:ew,children:"Cancel"})]})}),tJ=async e=>{if(!ec.has(e)){em(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:`${tm}/${e}`})}),s=await t.json();eo(t=>({...t,[e]:s.ok?"ok":"error"})),ed(s.ok?"":s.error||"Model not reachable")}catch{eo(t=>({...t,[e]:"error"})),ed("Network error")}finally{em(t=>{let s=new Set(t);return s.delete(e),s})}}},tW=async e=>{eu||0===e.length||(eh(!0),ed(""),await Promise.all(e.map(e=>tJ(e))),eh(!1))};return k?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):e6?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(o(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e6.color}15`},children:ei?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:e6.color},children:e6.textIcon||e6.id.slice(0,2).toUpperCase()}):(0,a.jsx)(n.default,{src:tl&&e6.apiType?"responses"===e6.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tr?"/providers/anthropic-m.png":`/providers/${e6.id}.png`,alt:e6.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>el(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e6.name}),(e6.notice?.apiKeyUrl||e6.notice?.signupUrl||e6.website)&&(0,a.jsxs)("a",{href:e6.notice?.apiKeyUrl||e6.notice?.signupUrl||e6.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e6.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[j.length," connection",1===j.length?"":"s"]})]})]})]}),e6.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e6.deprecationNotice})]}),e6.notice?.text&&!e6.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-info shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:e6.notice.text}),e6.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e6.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 →"})]}),to&&O&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tr?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tr?"Messages API":"responses"===O.apiType?"Responses API":"Chat Completions"," \xb7 ",(O.baseUrl||"").replace(/\/$/,""),"/",tr?"messages":"responses"===O.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{F(""),K(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eq({title:"Delete Compatible Node",message:`Delete this ${tr?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eq(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ts?(0,a.jsx)(d.gw,{providerId:y}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[j.length>0&&R.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>Z(!0),children:"Apply Proxy"}),j.length>0&&(0,a.jsxs)(a.Fragment,{children:[ey.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ey.length;0!==e&&eq({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eq(null);let e=0,t=[...ey];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}N(e=>e.filter(e=>!t.includes(e.id))),eb([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ey.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tT,disabled:eL,children:eL?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eL&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eL&&(eX.current=!0,eW(!0))},disabled:eJ,children:eJ?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ek,onChange:e=>{let t=e?"round-robin":null,s=e?eS||"1":eS;e&&!eS&&eA("1"),eC(t),tw(t,s)}}),"round-robin"===ek&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eS,onChange:e=>{var t;eA(t=e.target.value),tw("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===j.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:te?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tn&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",td," or ",tc,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tn?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e4,children:td}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e7,children:tc})]}):(0,a.jsxs)(a.Fragment,{children:[!to&&"iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>q(!0),children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),children:(0,u.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e8,children:to?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eQ&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eQ.total]}),(0,a.jsxs)("span",{children:["Completed: ",eQ.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eQ.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eQ.failed]}),eQ.stopped&&(0,a.jsx)("span",{className:"text-warning",children:"Stopped"}),eL&&eB&&(0,a.jsxs)("span",{children:["Running: ",j.find(e=>e.id===eB)?.name||eB]})]})}),j.length>0&&(0,a.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,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:t_,onChange:()=>{t_?eb([]):eb(j.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tK,!to&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>q(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),title:(0,u.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,u.Tl)("Bulk Add")}),tn?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e4,className:"w-full sm:w-auto",children:td}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e7,className:"w-full sm:w-auto",children:tc})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e8,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!to&&(e=[...ta,...eR.filter(e=>!ta.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eU.includes(e)),t=ep.trim().toLowerCase(),s=e.filter(e=>!t||e.toLowerCase().includes(t)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[eU.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tg,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tf(e),children:"Disable All"}),(j.length>0||ts)&&s.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:eu?"progress_activity":"play_arrow",onClick:()=>tW(s),disabled:eu,children:eu?"Testing...":`Test All (${s.length})`})]}))]}),(0,a.jsx)("div",{className:"sm:max-w-xs",children:(0,a.jsx)(d.pd,{type:"search",placeholder:"Search models...",value:ep,onChange:e=>ex(e.target.value),className:"w-full"})})]}),!!en&&(0,a.jsx)("p",{className:"text-xs text-danger mb-3 break-words",children:en}),(()=>{let e,t,s;if(to)return(0,a.jsx)(w,{providerStorageAlias:tm,providerDisplayAlias:tp,modelAliases:ee,customModels:es,copied:e1,onCopy:e2,onSetAlias:tk,onDeleteAlias:tC,onAddCustomModel:e=>tS(e,"llm",tm),onDeleteCustomModel:e=>tA(e,"llm",tm),connections:j,isAnthropic:tr});let i=[...ta,...eR.filter(e=>!ta.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),l=new Set(eU),r=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),n=g({customModels:es,modelAliases:ee,providerAlias:tm,builtInModels:ta,type:"llm"}),d=ep.trim().toLowerCase(),c=(e,t="")=>!d||e.toLowerCase().includes(d)||String(t).toLowerCase().includes(d),p=r.filter(e=>c(e.id,e.name)),x=n.filter(e=>c(e.id,e.name));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[x.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${tp}/${e.id}`,alias:e.alias,copied:e1,onCopy:e2,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tA(e.id,"llm",tm):tC(e.alias)},testStatus:er[e.id],onTest:j.length>0||ts?()=>tJ(e.id):void 0,isTesting:ec.has(e.id),isCustom:!0,isFree:!1,caps:b(`${y}/${e.id}`)},`${e.source}-${e.fullModel}`)),p.map(e=>{let t=`${tm}/${e.id}`,s=`${y}/${e.id}`,i=Object.entries(ee).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${tp}/${e.id}`,alias:i,copied:e1,onCopy:e2,onSetAlias:t=>tk(e.id,t,tm),onDeleteAlias:()=>tC(i),testStatus:er[e.id],onTest:j.length>0||ts?()=>tJ(e.id):void 0,isTesting:ec.has(e.id),isFree:e.isFree,onDisable:()=>tu(e.id),caps:b(`${y}/${e.id}`)},e.id)}),ep.trim()&&0===p.length&&0===x.length&&(0,a.jsxs)("p",{className:"w-full text-center text-sm text-text-muted py-4",children:["No models match “",ep,"”"]}),(0,a.jsxs)("button",{onClick:()=>eg(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===y&&j.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:t$,disabled:eY,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-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eY?{animation:"spin 1s linear infinite"}:void 0,children:eY?"progress_activity":"download"}),eY?(0,u.Tl)("Fetching..."):(0,u.Tl)("Fetch Qoder Models")]}),eE.length>0&&(e=new Set([...Object.values(ee),...n.map(e=>e.fullModel)]),t=new Set(ta.map(e=>e.id)),0===(s=eE.filter(s=>!e.has(`${tm}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await tS(e.id,"llm",tm)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>th(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tF,"kiro"===y?(0,a.jsx)(d.Mh,{isOpen:U,providerInfo:e6,onSuccess:tP,onClose:()=>_(!1)}):"cursor"===y?(0,a.jsx)(d.G9,{isOpen:U,onSuccess:tP,onClose:()=>_(!1)}):"gitlab"===y?(0,a.jsx)(d.vj,{isOpen:U,providerInfo:e6,onSuccess:tP,onClose:()=>_(!1)}):(0,a.jsx)(d.LF,{isOpen:U,provider:y,providerInfo:e6,onSuccess:tP,onClose:()=>_(!1)}),"iflow"===y&&(0,a.jsx)(d.vE,{isOpen:z,onSuccess:()=>{tv(),q(!1)},onClose:()=>q(!1)}),(0,a.jsx)(A,{isOpen:M,provider:y,providerName:e6.name,isCompatible:to,isAnthropic:tr,authType:e6?.authType,authHint:e6?.authHint,website:e6?.website,proxyPools:R,error:L,onSave:tE,onBulkDone:tv,onClose:()=>{F(""),K(!1)}}),(0,a.jsx)(d.wI,{isOpen:B,connection:X,proxyPools:R,onSave:tI,onClose:()=>H(!1)}),to&&(0,a.jsx)($,{isOpen:G,node:O,onSave:tj,onClose:()=>V(!1),isAnthropic:tr}),!to&&(0,a.jsx)(T,{isOpen:ef,providerAlias:tm,providerDisplayAlias:tp,onSave:async e=>{await tS(e,"llm",tm),eg(!1)},onClose:()=>eg(!1)}),"codex"===y&&(0,a.jsx)(P,{isOpen:J,onClose:()=>W(!1),onSuccess:tv}),(0,a.jsx)(d.uo,{isOpen:eM,onClose:()=>eK(!1),onConfirm:()=>{(window.localStorage.setItem(e5,"true"),eK(!1),te)?e3():e7()},title:"Risk Notice",message:e6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!ez,onClose:()=>eq(null),onConfirm:ez?.onConfirm,title:ez?.title||"Confirm",message:ez?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(o(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},88845:(e,t,s)=>{Promise.resolve().then(s.bind(s,78907))}},e=>{e.O(0,[27,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=88845)),_N_E=e.O()}]);
10
+ ]`;function P({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[o,n]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[p,x]=(0,i.useState)(null),h=()=>{o||(r(""),m(""),x(null),t())},f=async()=>{var e;let t;m(""),x(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,u.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void m((0,u.Tl)("No accounts found in input"));n(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,u.Tl)("Request failed"))}finally{n(!1)}},g=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(d.aF,{isOpen:e,title:(0,u.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,u.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.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:O,value:l,onChange:e=>r(e.target.value),disabled:o}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,u.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,u.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:f,fullWidth:!0,disabled:o||!l.trim(),children:o?(0,u.Tl)("Importing..."):(0,u.Tl)("Import All")}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:o,children:(0,u.Tl)("Close")})]})]})})}P.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onSuccess:b().func};let E={claude:"claudeAutoPing",codex:"codexAutoPing"};function I(){let e,t,s,r=(0,l.useParams)(),h=(0,l.useRouter)(),y=r.id,{getCaps:b}=(0,x.y)(),[j,N]=(0,i.useState)([]),[k,S]=(0,i.useState)(!0),[O,I]=(0,i.useState)(null),[R,D]=(0,i.useState)([]),[U,_]=(0,i.useState)(!1),[z,q]=(0,i.useState)(!1),[M,K]=(0,i.useState)(!1),[L,F]=(0,i.useState)(""),[J,W]=(0,i.useState)(!1),[B,H]=(0,i.useState)(!1),[G,V]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)(!1),[X,Y]=(0,i.useState)(null),[ee,et]=(0,i.useState)({}),[es,ea]=(0,i.useState)([]),[ei,el]=(0,i.useState)(!1),[er,eo]=(0,i.useState)({}),[en,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(()=>new Set),[ep,ex]=(0,i.useState)(""),[eu,eh]=(0,i.useState)(!1),[ef,eg]=(0,i.useState)(!1),[ey,eb]=(0,i.useState)([]),[ev,ej]=(0,i.useState)("__none__"),[ew,eN]=(0,i.useState)(!1),[ek,eC]=(0,i.useState)(null),[eS,eA]=(0,i.useState)(""),[e$,eT]=(0,i.useState)("auto"),[eO,eP]=(0,i.useState)({enabled:!1,connections:{}}),[eE,eI]=(0,i.useState)([]),[eR,eD]=(0,i.useState)([]),[eU,e_]=(0,i.useState)([]),[ez,eq]=(0,i.useState)(null),[eM,eK]=(0,i.useState)(!1),[eL,eF]=(0,i.useState)(!1),[eJ,eW]=(0,i.useState)(!1),[eB,eH]=(0,i.useState)(null),[eG,eV]=(0,i.useState)({}),[eQ,eZ]=(0,i.useState)(null),eX=(0,i.useRef)(!1),[eY,e0]=(0,i.useState)(!1),{copied:e1,copy:e2}=(0,p.C)(),e5="ag_risk_confirmed",e3=()=>{_(!0)},e4=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(e5)?eK(!0):te?e3():(F(""),K(!0))},e7=()=>{F(""),K(!0)},e8=()=>{te?e4():e7()},e6=O?{id:O.id,name:O.name||("anthropic-compatible"===O.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===O.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===O.type?"AC":"OC",apiType:O.apiType,baseUrl:O.baseUrl,type:O.type}:c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y]||c.br[y],e9=e6?.authModes||[],te=(!!c.zN[y]||!!c.IS[y]||e9.includes("oauth"))&&e6?.hasOAuth!==!1,tt=!!c.fg[y]||e9.includes("apikey")||e6?.hasOAuth===!1,ts=!!c.IS[y]?.noAuth,ta=(0,m.KC)(y),ti=(0,c.wG)(y),tl=(0,c.mq)(y),tr=(0,c.gb)(y),to=tl||tr,tn=!to&&te&&tt,td="xai"===y?"Grok Build OAuth":"OAuth",tc="xai"===y?"xAI API Key":"API Key";c.Q2[y]?.thinkingConfig||c.s9.extended;let tm=to?y:ti,tp=to?O?.prefix||y:ti,tx=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}`,{cache:"no-store"}),t=await e.json();e.ok&&e_(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tm]),tu=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tm,ids:[e]})})).ok&&await tx()}catch(e){console.log("Error disabling model:",e)}},th=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error enabling model:",e)}},tf=async e=>{e.length&&eq({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eq(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tm,ids:e})})).ok&&await tx()}catch(e){console.log("Error disabling all models:",e)}}})},tg=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tm)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error enabling all models:",e)}},ty=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&et(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tb=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ea(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eD(e.models)}).catch(()=>{})},[y]);let tv=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=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"})]),i=await e.json(),l=await t.json(),r=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===y);N(e)}s.ok&&D(r.proxyPools||[]);let n=(o.providerStrategies||{})[y]||{};eC(n.fallbackStrategy||null),eA(null!=n.stickyRoundRobinLimit?String(n.stickyRoundRobinLimit):"1");let d=(o.providerThinking||{})[y]||{};eT(d.mode||"auto");let c=E[y],m=c&&o[c]||{};if(eP({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===y)||null;if(!e&&to)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===y)||null))break}I(e)}}catch(e){console.log("Error fetching connections:",e)}finally{S(!1)}},[y,to]),tj=async e=>{try{let t=await fetch(`/api/provider-nodes/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(I(s.node),await tv(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tw=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[y]:l[y]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tN=async e=>{let t=E[y];if(t){eP(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,i.useEffect)(()=>{tv(),ty(),tb(),tx()},[tv,ty,tb,tx]),(0,i.useEffect)(()=>{let e=(c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y])?.modelsFetcher;e&&f(e).then(eI)},[y]);let tk=async(e,t,s=ti)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await ty();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tC=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ty()}catch(e){console.log("Error deleting alias:",e)}},tS=async(e,t="llm",s=tm)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t})});if(a.ok)await tb(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tA=async(e,t="llm",s=tm)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await tb(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},t$=async()=>{if(eY)return;let e=j.find(e=>!1!==e.isActive);if(!e)return void alert((0,u.Tl)("Please add an active Qoder connection first"));e0(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,u.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,u.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");es.some(e=>e.providerAlias===tm&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(ee).includes(`${tm}/${s}`)||(await tS(s,"llm",tm),i+=1)}0===i?alert((0,u.Tl)("All models already exist, no new models added")):alert((0,u.Tl)("Successfully added")+` ${i} `+(0,u.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,u.Tl)("Error fetching models")+": "+e.message)}finally{e0(!1)}},tT=async()=>{if(eL||0===j.length)return;let e=Object.fromEntries(j.map(e=>[e.id,{state:"queued",error:null}]));eX.current=!1,eF(!0),eW(!1),eH(null),eV(e),eZ({total:j.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<j.length;e+=1){if(eX.current){eZ({total:j.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=j[e];eH(a.id),eV(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eV(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eV(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eZ({total:j.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<j.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eH(null),eF(!1),eW(!1),eX.current=!1}},tO=async e=>{eq({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eq(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&N(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tP=()=>{tv(),_(!1)},tE=async e=>{F("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:y,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tv(),K(!1);return}F(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),F("Failed to save connection")}},tI=async e=>{try{(await fetch(`/api/providers/${X.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tv(),H(!1))}catch(e){console.log("Error updating connection:",e)}},tR=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&N(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tD=async(e,t)=>{let s=[...j];[s[e],s[t]]=[s[t],s[e]],N(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tv()}},tU=j.filter(e=>ey.includes(e.id)),t_=j.length>0&&ey.length===j.length;(0,i.useEffect)(()=>{eb(e=>e.filter(e=>j.some(t=>t.id===e)))},[j]),(()=>{if(0===tU.length)return;let e=new Set(tU.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=R.find(e=>e.id===t);return s?.name}})();let tz=()=>{ew||Z(!1)},tq=async e=>{eN(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tv(),Z(!1)}finally{eN(!1)}},tM=e=>tq(j.map(t=>({connectionId:t.id,proxyPoolId:e}))),tK=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:j.map((e,t)=>{let s;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,ey.includes(s)),onChange:()=>{var t;return t=e.id,void eb(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,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(C,{connection:e,proxyPools:R,isOAuth:te,isFirst:0===t,isLast:t===j.length-1,onMoveUp:()=>tD(t,t-1),onMoveDown:()=>tD(t,t+1),onToggleActive:t=>tR(e.id,t),autoPing:E[y]&&"oauth"===e.authType?{on:!0===eO.connections[e.id],onToggle:t=>{var s;return s=e.id,void tN({...eO,connections:{...eO.connections,[s]:t}})},provider:y}: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&&N(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{Y(e),H(!0)},onDelete:()=>tO(e.id),oneByOneStatus:eG[e.id]||null})})]},e.id)})}),tL=R.filter(e=>!0===e.isActive),tF=(0,a.jsx)(d.aF,{isOpen:Q,onClose:tz,title:`Apply Proxy (${j.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=R.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tq(j.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:ew||0===tL.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tM(null),disabled:ew,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),R.map(e=>(0,a.jsxs)("button",{onClick:()=>tM(e.id),disabled:ew||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),ew&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tz,variant:"ghost",fullWidth:!0,disabled:ew,children:"Cancel"})]})}),tJ=async e=>{if(!ec.has(e)){em(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:`${tm}/${e}`})}),s=await t.json();eo(t=>({...t,[e]:s.ok?"ok":"error"})),ed(s.ok?"":s.error||"Model not reachable")}catch{eo(t=>({...t,[e]:"error"})),ed("Network error")}finally{em(t=>{let s=new Set(t);return s.delete(e),s})}}},tW=async e=>{eu||0===e.length||(eh(!0),ed(""),await Promise.all(e.map(e=>tJ(e))),eh(!1))};return k?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):e6?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(o(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e6.color}15`},children:ei?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:e6.color},children:e6.textIcon||e6.id.slice(0,2).toUpperCase()}):(0,a.jsx)(n.default,{src:tl&&e6.apiType?"responses"===e6.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tr?"/providers/anthropic-m.png":`/providers/${e6.id}.png`,alt:e6.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>el(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e6.name}),(e6.notice?.apiKeyUrl||e6.notice?.signupUrl||e6.website)&&(0,a.jsxs)("a",{href:e6.notice?.apiKeyUrl||e6.notice?.signupUrl||e6.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e6.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[j.length," connection",1===j.length?"":"s"]})]})]})]}),e6.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e6.deprecationNotice})]}),e6.notice?.text&&!e6.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-info shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:e6.notice.text}),e6.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e6.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 →"})]}),to&&O&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tr?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tr?"Messages API":"responses"===O.apiType?"Responses API":"Chat Completions"," \xb7 ",(O.baseUrl||"").replace(/\/$/,""),"/",tr?"messages":"responses"===O.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{F(""),K(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eq({title:"Delete Compatible Node",message:`Delete this ${tr?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eq(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ts?(0,a.jsx)(d.gw,{providerId:y}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[j.length>0&&R.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>Z(!0),children:"Apply Proxy"}),j.length>0&&(0,a.jsxs)(a.Fragment,{children:[ey.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=ey.length;0!==e&&eq({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eq(null);let e=0,t=[...ey];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}N(e=>e.filter(e=>!t.includes(e.id))),eb([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",ey.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tT,disabled:eL,children:eL?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eL&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eL&&(eX.current=!0,eW(!0))},disabled:eJ,children:eJ?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ek,onChange:e=>{let t=e?"round-robin":null,s=e?eS||"1":eS;e&&!eS&&eA("1"),eC(t),tw(t,s)}}),"round-robin"===ek&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eS,onChange:e=>{var t;eA(t=e.target.value),tw("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===j.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:te?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tn&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",td," or ",tc,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tn?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e4,children:td}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e7,children:tc})]}):(0,a.jsxs)(a.Fragment,{children:[!to&&"iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>q(!0),children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),children:(0,u.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e8,children:to?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eQ&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eQ.total]}),(0,a.jsxs)("span",{children:["Completed: ",eQ.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eQ.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eQ.failed]}),eQ.stopped&&(0,a.jsx)("span",{className:"text-warning",children:"Stopped"}),eL&&eB&&(0,a.jsxs)("span",{children:["Running: ",j.find(e=>e.id===eB)?.name||eB]})]})}),j.length>0&&(0,a.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,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:t_,onChange:()=>{t_?eb([]):eb(j.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tK,!to&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>q(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),title:(0,u.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,u.Tl)("Bulk Add")}),tn?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e4,className:"w-full sm:w-auto",children:td}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e7,className:"w-full sm:w-auto",children:tc})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e8,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!to&&(e=[...ta,...eR.filter(e=>!ta.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eU.includes(e)),t=ep.trim().toLowerCase(),s=e.filter(e=>!t||e.toLowerCase().includes(t)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[eU.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tg,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tf(e),children:"Disable All"}),(j.length>0||ts)&&s.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:eu?"progress_activity":"play_arrow",onClick:()=>tW(s),disabled:eu,children:eu?"Testing...":`Test All (${s.length})`})]}))]}),(0,a.jsx)("div",{className:"sm:max-w-xs",children:(0,a.jsx)(d.pd,{type:"search",placeholder:"Search models...",value:ep,onChange:e=>ex(e.target.value),className:"w-full"})})]}),!!en&&(0,a.jsx)("p",{className:"text-xs text-danger mb-3 break-words",children:en}),(()=>{let e,t,s;if(to)return(0,a.jsx)(w,{providerStorageAlias:tm,providerDisplayAlias:tp,modelAliases:ee,customModels:es,copied:e1,onCopy:e2,onSetAlias:tk,onDeleteAlias:tC,onAddCustomModel:e=>tS(e,"llm",tm),onDeleteCustomModel:e=>tA(e,"llm",tm),connections:j,isAnthropic:tr});let i=[...ta,...eR.filter(e=>!ta.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),l=new Set(eU),r=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),n=g({customModels:es,modelAliases:ee,providerAlias:tm,builtInModels:ta,type:"llm"}),d=ep.trim().toLowerCase(),c=(e,t="")=>!d||e.toLowerCase().includes(d)||String(t).toLowerCase().includes(d),p=r.filter(e=>c(e.id,e.name)),x=n.filter(e=>c(e.id,e.name));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[x.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${tp}/${e.id}`,alias:e.alias,copied:e1,onCopy:e2,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tA(e.id,"llm",tm):tC(e.alias)},testStatus:er[e.id],onTest:j.length>0||ts?()=>tJ(e.id):void 0,isTesting:ec.has(e.id),isCustom:!0,isFree:!1,caps:b(`${y}/${e.id}`)},`${e.source}-${e.fullModel}`)),p.map(e=>{let t=`${tm}/${e.id}`,s=`${y}/${e.id}`,i=Object.entries(ee).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${tp}/${e.id}`,alias:i,copied:e1,onCopy:e2,onSetAlias:t=>tk(e.id,t,tm),onDeleteAlias:()=>tC(i),testStatus:er[e.id],onTest:j.length>0||ts?()=>tJ(e.id):void 0,isTesting:ec.has(e.id),isFree:e.isFree,onDisable:()=>tu(e.id),caps:b(`${y}/${e.id}`)},e.id)}),ep.trim()&&0===p.length&&0===x.length&&(0,a.jsxs)("p",{className:"w-full text-center text-sm text-text-muted py-4",children:["No models match “",ep,"”"]}),(0,a.jsxs)("button",{onClick:()=>eg(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===y&&j.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:t$,disabled:eY,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-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eY?{animation:"spin 1s linear infinite"}:void 0,children:eY?"progress_activity":"download"}),eY?(0,u.Tl)("Fetching..."):(0,u.Tl)("Fetch Qoder Models")]}),eE.length>0&&(e=new Set([...Object.values(ee),...n.map(e=>e.fullModel)]),t=new Set(ta.map(e=>e.id)),0===(s=eE.filter(s=>!e.has(`${tm}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await tS(e.id,"llm",tm)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>th(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tF,"kiro"===y?(0,a.jsx)(d.Mh,{isOpen:U,providerInfo:e6,onSuccess:tP,onClose:()=>_(!1)}):"cursor"===y?(0,a.jsx)(d.G9,{isOpen:U,onSuccess:tP,onClose:()=>_(!1)}):"gitlab"===y?(0,a.jsx)(d.vj,{isOpen:U,providerInfo:e6,onSuccess:tP,onClose:()=>_(!1)}):(0,a.jsx)(d.LF,{isOpen:U,provider:y,providerInfo:e6,onSuccess:tP,onClose:()=>_(!1)}),"iflow"===y&&(0,a.jsx)(d.vE,{isOpen:z,onSuccess:()=>{tv(),q(!1)},onClose:()=>q(!1)}),(0,a.jsx)(A,{isOpen:M,provider:y,providerName:e6.name,isCompatible:to,isAnthropic:tr,authType:e6?.authType,authHint:e6?.authHint,website:e6?.website,proxyPools:R,error:L,onSave:tE,onBulkDone:tv,onClose:()=>{F(""),K(!1)}}),(0,a.jsx)(d.wI,{isOpen:B,connection:X,proxyPools:R,onSave:tI,onClose:()=>H(!1)}),to&&(0,a.jsx)($,{isOpen:G,node:O,onSave:tj,onClose:()=>V(!1),isAnthropic:tr}),!to&&(0,a.jsx)(T,{isOpen:ef,providerAlias:tm,providerDisplayAlias:tp,onSave:async e=>{await tS(e,"llm",tm),eg(!1)},onClose:()=>eg(!1)}),"codex"===y&&(0,a.jsx)(P,{isOpen:J,onClose:()=>W(!1),onSuccess:tv}),(0,a.jsx)(d.uo,{isOpen:eM,onClose:()=>eK(!1),onConfirm:()=>{(window.localStorage.setItem(e5,"true"),eK(!1),te)?e3():e7()},title:"Risk Notice",message:e6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!ez,onClose:()=>eq(null),onConfirm:ez?.onConfirm,title:ez?.title||"Confirm",message:ez?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(o(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},88845:(e,t,s)=>{Promise.resolve().then(s.bind(s,78907))}},e=>{e.O(0,[27,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=88845)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{34695:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>k});var a=s(95155),r=s(12115),i=s(98500),n=s.n(i),l=s(35497),o=s(90620),d=s(88105),c=s(65921),p=s(38003),m=s(14051),h=s.n(m),u=s(57250);let x=new Set(["windsurf","trae","cody","kimchi","chatglm-cn","blackbox-web","puter","adapta-web","deepseek-web","chatgpt-web","doubao-web","gemini-web","copilot-web","muse-spark-web","duckduckgo-web","venice-web","t3-web","lmarena","veoaifree-web","claude-web","pollinations","poe-web","v0-vercel-web","qwen-web","kimi-web","huggingchat"]);function g({providerId:e,provider:t,stats:s,onToggle:r,isNoAuth:i=!1,comingSoon:o=!1}){let c=e.startsWith(d.JH),p=e.startsWith(d.DI),{connected:m,error:h,errorCode:f,errorTime:b,allDisabled:v}=s;return(0,a.jsxs)("div",{className:"group relative flex items-center justify-between gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsxs)(n(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,a.jsx)(u.A,{src:c?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":p?"/providers/anthropic-m.png":`/providers/${t.id}.${x.has(t.id)?"svg":"png"}`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:t.name}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:[v?(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):i&&0===m&&0===h?(0,a.jsx)(l.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):m>0?(0,a.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[m," Connected"]}):null,h>0&&(0,a.jsx)(l.Ex,{variant:"error",size:"sm",dot:!0,children:f?`${h} Error (${f})`:`${h} Error`}),0===m&&0===h&&!i&&0===s.total&&(0,a.jsx)("span",{className:"text-text-muted",children:"No connections"}),o&&(0,a.jsx)(l.Ex,{variant:"warning",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),"Coming Soon"]})}),c&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),p&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"Messages"}),b&&(0,a.jsx)("span",{className:"text-text-muted",children:b})]})]})]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s.total>0&&r&&(0,a.jsx)("div",{className:"opacity-60 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!!v)},children:(0,a.jsx)(l.lM,{size:"sm",checked:!v,onChange:()=>{}})})})]})}function f({title:e,icon:t,count:s,connectedCount:r,isExpanded:i,onToggle:n,isSearching:o,onTestAll:d,testingMode:c,testModeKey:p,children:m,hasContent:h=!0,emptyTitle:u="No providers in this category",emptyDescription:x="Providers you add will appear here."}){let g=i||o;return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("button",{type:"button",onClick:n,className:"flex items-center gap-2 text-lg font-semibold leading-tight text-text-main transition-colors hover:text-primary","aria-expanded":g,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] transition-transform ${g?"rotate-90":""}`,children:"chevron_right"}),e,(0,a.jsxs)("span",{className:"text-xs font-normal text-text-muted",children:["(",s,")"]})]}),d&&h&&(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:c===p?"progress_activity":"play_arrow",onClick:d,disabled:!!c,className:c===p?"animate-pulse":"",children:c===p?"Testing...":"Test All"})]}),g&&(h?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:m}):(0,a.jsx)(l.pp,{icon:t||"dns",title:u,description:x}))]})}g.propTypes={providerId:h().string.isRequired,provider:h().shape({id:h().string,name:h().string,color:h().string,textIcon:h().string,apiType:h().string}).isRequired,stats:h().shape({connected:h().number,error:h().number,total:h().number,errorCode:h().string,errorTime:h().string,allDisabled:h().bool}).isRequired,onToggle:h().func,isNoAuth:h().bool,comingSoon:h().bool},f.propTypes={title:h().string.isRequired,icon:h().string,count:h().number.isRequired,connectedCount:h().number,isExpanded:h().bool.isRequired,onToggle:h().func.isRequired,isSearching:h().bool,onTestAll:h().func,testingMode:h().string,testModeKey:h().string,children:h().node,hasContent:h().bool,emptyTitle:h().string,emptyDescription:h().string};let b={oauth:"OAuth",free:"Free",apikey:"API Key",cookie:"Cookies",compatible:"Custom",provider:"Provider",all:"All"};function v({results:e}){if(e.error&&!e.results)return(0,a.jsxs)("div",{className:"py-6 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mb-2 block text-[32px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-danger",children:e.error})]});let{summary:t,mode:s}=e,r=e.results||[],i=b[s]||s;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,a.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-2 text-xs sm:gap-3",children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[i," Test"]}),(0,a.jsxs)("span",{className:"rounded bg-success/15 px-2 py-0.5 font-medium text-success",children:[t.passed," passed"]}),t.failed>0&&(0,a.jsxs)("span",{className:"rounded bg-danger/15 px-2 py-0.5 font-medium text-danger",children:[t.failed," failed"]}),(0,a.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),r.map((e,t)=>(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-surface-2 px-3 py-2 text-xs sm:flex-nowrap",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-success":"text-danger"}`,children:e.valid?"check_circle":"error"}),(0,a.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,a.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,a.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,a.jsxs)("span",{className:"shrink-0 font-mono tabular-nums text-text-muted",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold uppercase ${e.valid?"bg-success/15 text-success":"bg-danger/15 text-danger"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===r.length&&(0,a.jsx)("div",{className:"py-4 text-center text-sm text-text-muted",children:"No active connections found for this group."})]})}function y({totalProviders:e,connectedProviders:t,errorCount:s,onTestAll:r,testingMode:i}){return(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-brand border border-border-subtle bg-panel p-4 shadow-[var(--shadow-soft)] sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"dns"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:e}),(0,a.jsx)("span",{className:"text-text-muted",children:"providers"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-success"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:t}),(0,a.jsx)("span",{className:"text-text-muted",children:"connected"})]}),s>0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-danger"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:s}),(0,a.jsx)("span",{className:"text-text-muted",children:"errors"})]})]}),r&&(0,a.jsx)(l.$n,{size:"sm",variant:"primary",icon:"all"===i?"progress_activity":"bolt",onClick:r,disabled:!!i,className:"all"===i?"animate-pulse":"",children:"all"===i?"Testing All...":"Test All Providers"})]})}v.propTypes={results:h().shape({mode:h().string,results:h().array,summary:h().shape({total:h().number,passed:h().number,failed:h().number}),error:h().string}).isRequired},y.propTypes={totalProviders:h().number,connectedProviders:h().number,errorCount:h().number,onTestAll:h().func,testingMode:h().string};let j={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},C=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function N({variant:e,isOpen:t,onClose:s,onCreated:i}){let n=j[e],o=()=>({name:"",prefix:"",...n.hasApiType?{apiType:"chat"}:{},baseUrl:n.defaultBaseUrl}),[d,c]=(0,r.useState)(o),[p,m]=(0,r.useState)(!1),[h,u]=(0,r.useState)(""),[x,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null);(0,r.useEffect)(()=>{n.hasApiType?c(e=>({...e,baseUrl:n.defaultBaseUrl})):t&&(y(null),u(""),g(""))},[n.hasApiType?d.apiType:t]);let w=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...n.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:n.type})}),t=await e.json();e.ok&&(i(t.node),c(o()),u(""),y(null))}catch(e){console.log(`Error creating ${n.errorLabel} node:`,e)}finally{m(!1)}}},k=async()=>{b(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:h,type:n.type,modelId:x.trim()||void 0})}),t=await e.json();y(t)}catch{y({valid:!1,error:"Network error"})}finally{b(!1)}};return(0,a.jsx)(l.aF,{isOpen:t,title:n.title,onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(l.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:n.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,a.jsx)(l.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:n.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),n.hasApiType&&(0,a.jsx)(l.l6,{label:"API Type",options:C,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,a.jsx)(l.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:n.defaultBaseUrl,hint:n.baseUrlHint}),(0,a.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>u(e.target.value)}),(0,a.jsx)(l.pd,{label:"Model ID (optional)",value:x,onChange:e=>g(e.target.value),placeholder:n.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,a.jsx)(l.$n,{onClick:k,disabled:!h||f||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:f?"Checking...":"Check"}),(()=>{if(!v)return null;let{valid:e,error:t,method:s}=v;return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,a.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(l.$n,{onClick:w,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w(e,t){return e?.hasOAuth===!1?"apikey":t}function k(){let e,[t,s]=(0,r.useState)([]),[i,n]=(0,r.useState)([]),[m,h]=(0,r.useState)(!0),[u,x]=(0,r.useState)(!1),[b,j]=(0,r.useState)(!1),[C,k]=(0,r.useState)(!1),[T,A]=(0,r.useState)(!0),[S,I]=(0,r.useState)(!0),[P,O]=(0,r.useState)(!0),[$,E]=(0,r.useState)(!1),[U,R]=(0,r.useState)(!1),[z,M]=(0,r.useState)(null),[_,D]=(0,r.useState)(null),q=(0,r.useRef)(!1),L=(0,c.i)(),K=(0,p.C)(e=>e.query),J=(0,p.C)(e=>e.register),F=(0,p.C)(e=>e.unregister),W=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&s(t.connections||[])}catch{}},[]);(0,r.useEffect)(()=>(J("Search providers..."),()=>F()),[J,F]),(0,r.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),a=await e.json(),r=await t.json();e.ok&&s(a.connections||[]),t.ok&&n(r.nodes||[])}catch{}h(!1)})()},[]);let B=!!K.trim(),H=(e=K.trim().toLowerCase(),(t,s="",a="")=>!e||t.toLowerCase().includes(e)||s.toLowerCase().includes(e)||a.toLowerCase().includes(e)),Q=(e,s)=>{let a=Array.isArray(s)?s:[s],r=t.filter(t=>t.provider===e&&a.includes(t.authType)),i=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},n=r.filter(e=>{let t=i(e);return"active"===t||"success"===t}).length,l=r.filter(e=>{let t=i(e);return"error"===t||"failed"===t}),o=l.length,d=l[0],c=d?Object.entries(d).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now())?"COOLDOWN":d.errorCode||null:null,p=d?.lastErrorAt?function(e){if(!e)return null;let t=new Date(e),s=Math.floor((new Date().getTime()-t.getTime())/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;let a=Math.floor(s/60);if(a<24)return`${a}h ago`;let r=Math.floor(a/24);return r<7?`${r}d ago`:t.toLocaleDateString()}(d.lastErrorAt):null,m=r.length>0&&r.every(e=>!1===e.isActive);return{connected:n,error:o,total:r.length,errorCode:c,errorTime:p,allDisabled:m}},V=(e,t)=>[...e].sort(([e,s],[a,r])=>{let i=s.priority??999,n=r.priority??999;if(i!==n)return i-n;let l=Q(e,t),o=Q(a,t),d=l.total>0?0:1,c=o.total>0?0:1;return d!==c?d-c:(s.name||"").localeCompare(r.name||"")}),Y=(0,r.useCallback)((e,t,a)=>{let r=Array.isArray(t)?t:[t],i=t=>t.provider===e&&r.includes(t.authType);s(e=>(Promise.allSettled(e.filter(i).map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})}))),e.map(e=>i(e)?{...e,isActive:a}:e)))},[]),G=(0,r.useCallback)(async(e,t=null)=>{if(!q.current){q.current=!0,M("provider"===e?t:e),D(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),a=await s.json();if(D(a),a.summary){let{passed:e,failed:t,total:s}=a.summary;0===t?L.success(`All ${s} tests passed`):L.warning(`${e}/${s} passed, ${t} failed`)}W()}catch{D({error:"Test request failed"}),L.error("Provider test failed")}finally{M(null),q.current=!1}}},[L,W]),X=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>H(e.name,e.id)),Z=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>H(e.name,e.id)),ee=V(Object.entries(o.zN).filter(([,e])=>!e.hidden&&H(e.name,e.id,e.alias)),"oauth"),et=Object.entries(d.IS).filter(([,e])=>!e.hidden&&H(e.name,e.id,e.alias)).sort(([,e],[,t])=>!!t.noAuth-!!e.noAuth),es=V(Object.entries(d.nJ).filter(([,e])=>!e.hidden&&H(e.name,e.id,e.alias)),"apikey"),ea=Object.entries(o.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&H(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=Q(e,"apikey").total>0?0:1,i=Q(s,"apikey").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),er=Object.entries(d.br).filter(([,e])=>!e.hidden&&H(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=Q(e,"cookie").total>0?0:1,i=Q(s,"cookie").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),ei=B||u?ea:ea.slice(0,20),en=ee.length+et.length+es.length+ea.length+er.length,el=[...ee,...et,...es,...ea,...er].map(([e])=>e),eo=el.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return Q(e,w(t,t?.authType||"apikey")).connected>0}).length,ed=el.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return Q(e,w(t,t?.authType||"apikey")).error>0}).length;if(m)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]});let ec=X.length>0||Z.length>0||ee.length>0||et.length>0||es.length>0||ea.length>0||er.length>0;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Providers",description:"Connect, configure, and manage AI providers",icon:"dns",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:"add",onClick:()=>R(!0),children:"Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>E(!0),children:"OpenAI"})]})}),(0,a.jsx)(y,{totalProviders:en,connectedProviders:eo,errorCount:ed,onTestAll:()=>G("all"),testingMode:z}),B&&!ec&&(0,a.jsx)(l.pp,{icon:"search_off",title:`No providers match "${K}"`,description:"Try a different search term, or browse the sections below."}),(0,a.jsxs)(f,{title:"Custom Providers (OpenAI/Anthropic Compatible)",icon:"extension",count:X.length+Z.length,isExpanded:b,onToggle:()=>j(e=>!e),isSearching:B,hasContent:X.length>0||Z.length>0,emptyTitle:"No custom providers",emptyDescription:"Add OpenAI or Anthropic compatible endpoints to get started.",children:[(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>R(!0),children:"Add Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>E(!0),children:"Add OpenAI"}),[...X,...Z].map(e=>(0,a.jsx)(g,{providerId:e.id,provider:e,stats:Q(e.id,"apikey"),onToggle:t=>Y(e.id,"apikey",t)},e.id))]}),(0,a.jsx)(f,{title:"Cookies Provider",icon:"cookie",count:er.length,isExpanded:C,onToggle:()=>k(e=>!e),isSearching:B,onTestAll:()=>G("cookie"),testingMode:z,testModeKey:"cookie",hasContent:er.length>0,children:er.map(([e,t])=>(0,a.jsx)(g,{providerId:e,provider:t,stats:Q(e,"cookie"),isNoAuth:!!t.noAuth,onToggle:t=>Y(e,"cookie",t)},e))}),(0,a.jsx)(f,{title:"OAuth Providers",icon:"lock",count:ee.length,isExpanded:T,onToggle:()=>A(e=>!e),isSearching:B,onTestAll:()=>G("oauth"),testingMode:z,testModeKey:"oauth",hasContent:ee.length>0,children:ee.map(([e,t])=>{let s=w(t,"oauth");return(0,a.jsx)(g,{providerId:e,provider:t,stats:Q(e,s),comingSoon:!!t.comingSoon,onToggle:t=>Y(e,s,t)},e)})}),(0,a.jsxs)(f,{title:"Free Tier Providers",icon:"redeem",count:et.length+es.length,isExpanded:S,onToggle:()=>I(e=>!e),isSearching:B,onTestAll:()=>G("free"),testingMode:z,testModeKey:"free",hasContent:et.length>0||es.length>0,children:[et.map(([e,t])=>{let s="kiro"===e?["oauth","apikey","api_key"]:"oauth";return(0,a.jsx)(g,{providerId:e,provider:t,stats:Q(e,s),isNoAuth:!!t.noAuth,onToggle:t=>Y(e,s,t)},e)}),es.map(([e,t])=>(0,a.jsx)(g,{providerId:e,provider:t,stats:Q(e,"apikey"),onToggle:t=>Y(e,"apikey",t)},e))]}),(0,a.jsxs)(f,{title:"API Key Providers",icon:"key",count:ea.length,isExpanded:P,onToggle:()=>O(e=>!e),isSearching:B,onTestAll:()=>G("apikey"),testingMode:z,testModeKey:"apikey",hasContent:ea.length>0,children:[ei.map(([e,t])=>(0,a.jsx)(g,{providerId:e,provider:t,stats:Q(e,"apikey"),onToggle:t=>Y(e,"apikey",t)},e)),!B&&!u&&ea.length>20&&(0,a.jsxs)("button",{onClick:()=>x(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-brand border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",ea.length," providers"]})]}),_&&(0,a.jsx)(l.aF,{isOpen:!!_,onClose:()=>D(null),title:"Provider Test Results",size:"md",children:(0,a.jsx)(v,{results:_})}),(0,a.jsx)(N,{variant:"openai",isOpen:$,onClose:()=>E(!1),onCreated:e=>{n(t=>[...t,e]),E(!1)}}),(0,a.jsx)(N,{variant:"anthropic",isOpen:U,onClose:()=>R(!1),onCreated:e=>{n(t=>[...t,e]),R(!1)}})]})}N.propTypes={variant:h().oneOf(["openai","anthropic"]).isRequired,isOpen:h().bool.isRequired,onClose:h().func.isRequired,onCreated:h().func.isRequired}},86296:(e,t,s)=>{Promise.resolve().then(s.bind(s,34695))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=86296)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{37925:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>e_});var r=s(95155),a=s(12115),l=s(73321),n=s(35497),i=s(84588),o=s(92542),c=s(31474);function d({isOpen:e,onClose:t,title:s,children:l,width:n="md",className:i}){let o={sm:"w-[400px]",md:"w-[500px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-full"};return((0,a.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,a.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:(0,c.cn)("absolute right-0 top-0 h-full bg-surface flex flex-col","shadow-[var(--shadow-elev)]","slide-in-right","border-l border-border-subtle",o[n]||o.md,i),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border-subtle flex-shrink-0",children:[(0,r.jsx)("div",{className:"flex items-center gap-3",children:s&&(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})}),(0,r.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:l})]})]}):null}function m({currentPage:e,pageSize:t,totalItems:s,onPageChange:a,onPageSizeChange:l,className:n}){let i=Math.ceil(s/t),d=s>0?(e-1)*t+1:0,x=Math.min(e*t,s),u=(()=>{let t=[],s=Math.max(1,e-2),r=Math.min(i,s+5-1);r-s+1<5&&(s=Math.max(1,r-5+1));for(let e=s;e<=r;e++)t.push(e);return t})();return(0,r.jsxs)("div",{className:(0,c.cn)("flex flex-col sm:flex-row items-center justify-between gap-4 py-4 px-2",n),children:[s>0&&(0,r.jsxs)("div",{className:"text-sm text-text-muted",children:["Showing ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:d})," to"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:x})," of"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[l&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,r.jsx)("select",{value:t,onChange:e=>l(Number(e.target.value)),className:(0,c.cn)("h-9 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","cursor-pointer"),style:{colorScheme:"auto"},children:[10,20,50].map(e=>(0,r.jsx)("option",{value:e,children:e},e))})]}),i>1&&(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>a(e-1),disabled:1===e,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),u[0]>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default,{variant:"ghost",size:"sm",onClick:()=>a(1),className:"w-9 px-0 hidden sm:inline-flex",children:"1"}),u[0]>2&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."})]}),u.map(t=>(0,r.jsx)(o.default,{variant:e===t?"primary":"ghost",size:"sm",onClick:()=>a(t),className:(0,c.cn)("w-9 px-0",e===t?"inline-flex":"hidden sm:inline-flex"),children:t},t)),u[u.length-1]<i&&(0,r.jsxs)(r.Fragment,{children:[u[u.length-1]<i-1&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."}),(0,r.jsx)(o.default,{variant:"ghost",size:"sm",onClick:()=>a(i),className:"w-9 px-0 hidden sm:inline-flex",children:i})]}),(0,r.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>a(e+1),disabled:e===i,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})]})]})}var x=s(88105);let u=null,p=null;async function h(){if(u&&p)return{providerNameCache:u,providerNodesCache:p};let e=await fetch("/api/provider-nodes"),t=(await e.json()).nodes||[];for(let e of(p={},t))p[e.id]=e.name;return{providerNameCache:u={...x.Q2,...p},providerNodesCache:p}}function f(e,t){if(!e||!t)return e;let s=t[e];if("string"==typeof s)return s;if(s?.name)return s.name;let r=(0,x.zt)(e)||x.Q2[e];return r?.name||e}function g({title:e,children:t,defaultOpen:s=!1,icon:l=null}){let[n,i]=(0,a.useState)(s);return(0,r.jsxs)("div",{className:"border border-border-subtle rounded-lg overflow-hidden",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"w-full flex items-center justify-between p-3 bg-surface-2 hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:l}),(0,r.jsx)("span",{className:"font-semibold text-sm text-text-main",children:e})]}),(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[20px] text-text-muted transition-transform duration-200",n?"rotate-90":""),children:"chevron_right"})]}),n&&(0,r.jsx)("div",{className:"p-4 border-t border-border-subtle",children:t})]})}function j(e){return e?.cached_tokens||e?.cache_read_input_tokens||0}function b(e){return e?.cache_creation_input_tokens||0}function v(e){let t=e?.prompt_tokens||e?.input_tokens||0,s=j(e);return t<s?s:t}function y(){let[e,t]=(0,a.useState)([]),[s,l]=(0,a.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[n,x]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),[y,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)([]),[C,S]=(0,a.useState)(null),[T,M]=(0,a.useState)({provider:"",startDate:"",endDate:""}),q=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/usage/providers"),t=await e.json();k(t.providers||[]);let s=await h();S(s.providerNameCache)}catch(e){console.error("Failed to fetch providers:",e)}},[]),R=(0,a.useCallback)(async()=>{x(!0);try{let e=new URLSearchParams({page:s.page.toString(),pageSize:s.pageSize.toString()});T.provider&&e.append("provider",T.provider),T.startDate&&e.append("startDate",T.startDate),T.endDate&&e.append("endDate",T.endDate);let r=await fetch(`/api/usage/request-details?${e}`),a=await r.json();t(a.details||[]),l(e=>({...e,...a.pagination}))}catch(e){console.error("Failed to fetch request details:",e)}finally{x(!1)}},[s.page,s.pageSize,T]);return(0,a.useEffect)(()=>{q()},[q]),(0,a.useEffect)(()=>{R()},[R]),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,r.jsx)(i.default,{padding:"md",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"provider-filter",className:"text-sm font-medium text-text-main",children:"Provider"}),(0,r.jsxs)("select",{id:"provider-filter",value:T.provider,onChange:e=>M({...T,provider:e.target.value}),className:(0,c.cn)("h-9 px-3 rounded-lg border border-border bg-surface-2","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","w-full min-w-0 cursor-pointer"),style:{colorScheme:"auto"},children:[(0,r.jsx)("option",{value:"",children:"All Providers"}),w.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"start-date-filter",className:"text-sm font-medium text-text-main",children:"Start Date"}),(0,r.jsx)("input",{id:"start-date-filter",type:"datetime-local",value:T.startDate,onChange:e=>M({...T,startDate:e.target.value}),className:(0,c.cn)("h-9 px-3 rounded-lg border border-border bg-surface-2","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"end-date-filter",className:"text-sm font-medium text-text-main",children:"End Date"}),(0,r.jsx)("input",{id:"end-date-filter",type:"datetime-local",value:T.endDate,onChange:e=>M({...T,endDate:e.target.value}),className:(0,c.cn)("h-9 px-3 rounded-lg border border-border bg-surface-2","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:col-span-2 lg:col-span-1",children:[(0,r.jsx)("span",{className:"hidden text-sm font-medium text-text-main opacity-0 lg:block","aria-hidden":"true",children:"Clear"}),(0,r.jsx)(o.default,{variant:"ghost",onClick:()=>{M({provider:"",startDate:"",endDate:""})},disabled:!T.provider&&!T.startDate&&!T.endDate,className:"w-full",children:"Clear Filters"})]})]})}),(0,r.jsxs)(i.default,{padding:"none",children:[(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[880px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Input Tokens"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Cached"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Cache Creation"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Output Tokens"}),(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Latency"}),(0,r.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Action"})]})}),(0,r.jsx)("tbody",{children:n?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading..."]})})}):0===e.length?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:"No request details found"})}):e.map((e,t)=>(0,r.jsxs)("tr",{className:"border-b border-border-subtle last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,r.jsx)("td",{className:"max-w-[260px] truncate p-4 font-mono text-sm text-text-main",children:e.model}),(0,r.jsx)("td",{className:"max-w-[180px] truncate p-4 text-sm text-text-main",children:(0,r.jsx)("span",{className:"font-medium",children:f(e.provider,C)})}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:v(e.tokens).toLocaleString()}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:j(e.tokens)>0?j(e.tokens).toLocaleString():"—"}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:b(e.tokens)>0?b(e.tokens).toLocaleString():"—"}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:e.tokens?.completion_tokens?.toLocaleString()||0}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-muted",children:(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsxs)("div",{children:["TTFT: ",(0,r.jsxs)("span",{className:"font-mono",children:[e.latency?.ttft||0,"ms"]})]}),(0,r.jsxs)("div",{children:["Total: ",(0,r.jsxs)("span",{className:"font-mono",children:[e.latency?.total||0,"ms"]})]})]})}),(0,r.jsx)("td",{className:"p-4 text-center",children:(0,r.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>{p(e),N(!0)},children:"Detail"})})]},`${e.id}-${t}`))})]})}),!n&&e.length>0&&(0,r.jsx)("div",{className:"border-t border-border-subtle",children:(0,r.jsx)(m,{currentPage:s.page,pageSize:s.pageSize,totalItems:s.totalItems,onPageChange:e=>{l(t=>({...t,page:e}))},onPageSizeChange:e=>{l(t=>({...t,pageSize:e,page:1}))}})})]}),(0,r.jsx)(d,{isOpen:y,onClose:()=>N(!1),title:"Request Details",width:"lg",children:u&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 text-sm sm:grid-cols-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"ID:"})," ",(0,r.jsx)("span",{className:"break-all font-mono text-text-main",children:u.id})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Timestamp:"})," ",(0,r.jsx)("span",{className:"text-text-main",children:new Date(u.timestamp).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Provider:"})," ",(0,r.jsx)("span",{className:"text-text-main font-medium",children:f(u.provider,C)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Model:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:u.model})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,r.jsx)("span",{className:(0,c.cn)("font-medium","success"===u.status?"text-green-600":"text-red-600"),children:u.status})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Latency:"})," ",(0,r.jsxs)("span",{className:"text-text-main font-mono",children:["TTFT ",u.latency?.ttft||0,"ms / Total ",u.latency?.total||0,"ms"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Input Tokens:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:v(u.tokens).toLocaleString()})]}),j(u.tokens)>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Cached Tokens:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:j(u.tokens).toLocaleString()})]}),b(u.tokens)>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Cache Creation:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:b(u.tokens).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Output Tokens:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:u.tokens?.completion_tokens?.toLocaleString()||0})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(g,{title:"1. Client Request (Input)",defaultOpen:!0,icon:"input",children:(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:JSON.stringify(u.request,null,2)})}),u.providerRequest&&(0,r.jsx)(g,{title:"2. Provider Request (Translated)",icon:"translate",children:(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:JSON.stringify(u.providerRequest,null,2)})}),u.providerResponse&&(0,r.jsx)(g,{title:"3. Provider Response (Raw)",icon:"data_object",children:(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:"object"==typeof u.providerResponse?JSON.stringify(u.providerResponse,null,2):u.providerResponse})}),(0,r.jsxs)(g,{title:"4. Client Response (Final)",defaultOpen:!0,icon:"output",children:[u.response?.thinking&&(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h4",{className:"font-semibold text-text-main mb-2 flex items-center gap-2 text-xs uppercase tracking-wide opacity-70",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"psychology"}),"Thinking Process"]}),(0,r.jsx)("pre",{className:"max-h-[200px] max-w-full overflow-auto rounded-lg border border-amber-200 bg-amber-50 p-3 font-mono text-xs text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-100 sm:p-4",children:u.response.thinking})]}),(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-2 text-xs uppercase tracking-wide opacity-70",children:"Content"}),(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:u.response?.content||"[No content]"})]})]})]})})]})}var N=s(14051),w=s.n(N),k=s(81750),C=s(6793);function S({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,c]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(k.h7,{type:"target",position:C.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"target",position:C.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"target",position:C.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"target",position:C.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>c(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function T({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(k.h7,{type:"source",position:C.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"source",position:C.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"source",position:C.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"source",position:C.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"ExtremeRouter",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"ExtremeRouter"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(53255),S.propTypes={data:w().object.isRequired},T.propTypes={data:w().object.isRequired};let M={provider:S,router:T};function q({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let n=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),i=s?.toLowerCase()||"",o=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(n?n.split(","):[]),[n]),d=(0,a.useMemo)(()=>new Set(i?[i]:[]),[i]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),u=(0,a.useRef)({}),[p,h]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=u.current,t=Date.now();for(let s of c)e[s]||(e[s]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,a.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let f=(0,a.useMemo)(()=>{let e=Date.now(),t=new Set;for(let s of c){let r=u.current[s];(!r||e-r<6e4)&&t.add(s)}return t},[c,p]),{nodes:g,edges:j}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),n=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let i=[],o=[];return i.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var d,m;let u,p,h=(d=e.provider,x.Q2[d]||{color:"#6b7280",name:d}),f=t.has(e.provider?.toLowerCase()),g=!f&&s.has(e.provider?.toLowerCase()),j=!f&&r.has(e.provider?.toLowerCase()),b=`provider-${e.provider}`,v={label:(h.name!==e.provider?h.name:null)||e.nodeName||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(m=e.provider,`/providers/${m}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:f},y=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(y),w=n*Math.sin(y);Math.abs(y+Math.PI/2)<Math.PI/4||Math.abs(y-3*Math.PI/2)<Math.PI/4?(u="top",p="bottom"):Math.abs(y-Math.PI/2)<Math.PI/4?(u="bottom",p="top"):N>0?(u="right",p="left"):(u="left",p="right"),i.push({id:b,type:"provider",position:{x:N-90,y:w-15},data:v,draggable:!1}),o.push({id:`e-${b}`,source:"router",sourceHandle:u,target:b,targetHandle:p,animated:f,style:(h.color,j?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:f?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:g?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:i,edges:o}})(e,f,d,m),[e,f,i,o]),b=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,a.useRef)(null),y=(0,a.useRef)(null),N={padding:.2,duration:200},w=(0,a.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(N),50)},[]);return(0,a.useEffect)(()=>{let e=y.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(N)});return t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(N),50);return()=>clearTimeout(e)}},[g.length]),(0,r.jsx)("div",{ref:y,className:"h-[320px] w-full min-w-0 overflow-hidden rounded-lg bg-surface-2/50 sm:h-[480px]",children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(k.Gc,{nodes:g,edges:j,nodeTypes:M,fitView:!0,fitViewOptions:N,minZoom:.1,maxZoom:2,onInit:w,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,r.jsx)(k.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},b)})}q.propTypes={providers:w().arrayOf(w().shape({id:w().string,provider:w().string,name:w().string})),activeRequests:w().arrayOf(w().shape({provider:w().string,model:w().string,account:w().string})),lastProvider:w().string,errorProvider:w().string};var R=s(21742),O=s(90639),L=s(59656),$=s(97779);let z={primary:"var(--color-primary)",info:"var(--color-info)",success:"var(--color-success)",warning:"var(--color-warning)",danger:"var(--color-danger)",cyan:"var(--color-cyan)"};function D({data:e=[],color:t="primary",height:s=36,className:a=""}){if(!e||0===e.length)return(0,r.jsx)("div",{style:{height:s},className:a,"aria-hidden":!0});let l=e.map((e,t)=>({i:t,v:Number(e)||0})),n=z[t]||z.primary,i=`spark-${t}`,o=function(e){let t=e.replace(/^var\(--(.*)\)$/,"$1");try{return getComputedStyle(document.documentElement).getPropertyValue(`--${t}`).trim()||e}catch{return e}}(n);return(0,r.jsx)("div",{className:a,style:{height:s,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:l,margin:{top:2,right:0,bottom:0,left:0},children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:i,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:o,stopOpacity:.35}),(0,r.jsx)("stop",{offset:"100%",stopColor:o,stopOpacity:0})]})}),(0,r.jsx)(L.h,{hide:!0,domain:["dataMin","dataMax"]}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:"v",stroke:o,strokeWidth:1.5,fill:`url(#${i})`,isAnimationActive:!1,dot:!1})]})})})}function E(e){return new Intl.NumberFormat().format(e||0)}function K(e){return`$${(e||0).toFixed(2)}`}function P(e){let t=Number(e||0);return t>=1e3?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}D.propTypes={data:w().arrayOf(w().number),color:w().oneOf(["primary","info","success","warning","danger","cyan"]),height:w().number,className:w().string};let _=(e,t)=>(e||[]).map(e=>Number(e?.[t])||0),I={primary:"bg-primary/12 text-primary ring-1 ring-primary/20",info:"bg-info/12 text-info ring-1 ring-info/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},A={primary:"text-primary",info:"text-info",success:"text-success",warning:"text-warning",cyan:"text-cyan"};function F({icon:e,color:t,label:s,value:a,sublabel:l,spark:n}){return(0,r.jsxs)(i.default,{padding:"sm",className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("span",{className:`flex size-9 shrink-0 items-center justify-center rounded-brand ${I[t]||I.primary}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e})}),(0,r.jsx)("span",{className:"truncate text-xs font-medium uppercase tracking-wide text-text-muted",children:s})]}),(0,r.jsx)("div",{className:"flex min-w-0 items-baseline gap-1",children:(0,r.jsx)("span",{className:`truncate text-2xl font-bold tracking-tight ${A[t]||A.primary}`,children:a})}),(0,r.jsx)(D,{data:n,color:t,height:32,className:"-mb-1"}),l&&(0,r.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:l})]})}function U({stats:e}){let t=e?.last10Minutes||[];return(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-2 gap-3 lg:grid-cols-5 lg:gap-4",children:[(0,r.jsx)(F,{icon:"bolt",color:"primary",label:"Total Requests",value:E(e?.totalRequests),spark:_(t,"requests")}),(0,r.jsx)(F,{icon:"input",color:"info",label:"Input Tokens",value:E(e?.totalPromptTokens),spark:_(t,"promptTokens")}),(0,r.jsx)(F,{icon:"output",color:"success",label:"Output Tokens",value:E(e?.totalCompletionTokens),spark:_(t,"completionTokens")}),(0,r.jsx)(F,{icon:"cached",color:"cyan",label:"Cache Saved",value:E(e?.totalCachedTokens),spark:t.length?t.map((s,r)=>r===t.length-1&&Number(e?.totalCachedTokens)||0):[Number(e?.totalCachedTokens)||0]}),(0,r.jsx)(F,{icon:"payments",color:"warning",label:"Est. Cost",value:`~${K(e?.totalCost)}`,sublabel:"Estimated, not actual billing",spark:_(t,"cost")})]})}F.propTypes={icon:w().string.isRequired,color:w().string.isRequired,label:w().string.isRequired,value:w().string.isRequired,sublabel:w().string,spark:w().arrayOf(w().number)},U.propTypes={stats:w().object.isRequired};var W=s(56061);function Q({req:e}){let t=!e.status||"ok"===e.status||"success"===e.status,s=e.model||"unknown",a=e.provider||"—",l=Number(e.promptTokens)||0,n=Number(e.completionTokens)||0;return(0,r.jsxs)("div",{className:"flex shrink-0 flex-col gap-1 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:`size-1.5 shrink-0 rounded-full ${t?"bg-success":"bg-danger"}`,title:t?"OK":"Error"}),(0,r.jsx)("span",{className:"max-w-[140px] truncate font-mono text-xs font-medium text-text-main",title:s,children:s})]}),(0,r.jsx)("div",{className:"flex items-center gap-1.5 text-[11px] text-text-muted",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",className:"!px-1.5",children:a})}),(0,r.jsxs)("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[(0,r.jsxs)("span",{className:"text-primary",children:[l.toLocaleString(),"↑"]}),(0,r.jsxs)("span",{className:"text-success",children:[n.toLocaleString(),"↓"]}),(0,r.jsx)("span",{className:"ml-auto whitespace-nowrap text-text-muted",children:function(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}(e.timestamp)})]})]})}function G({stats:e}){!function(e=3e4){let[,t]=(0,a.useState)(0);(0,a.useEffect)(()=>{let s=setInterval(()=>t(e=>e+1),e);return()=>clearInterval(s)},[e])}();let t=e?.activeRequests||[],s=(e?.recentRequests||[]).slice(0,10),l=t.reduce((e,t)=>e+(Number(t.count)||1),0)||t.length;return(0,r.jsxs)(i.default,{padding:"sm",className:"flex min-w-0 flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"relative flex size-2.5",children:[l>0&&(0,r.jsx)("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-success opacity-60"}),(0,r.jsx)("span",{className:`relative inline-flex size-2.5 rounded-full ${l>0?"bg-success":"bg-text-subtle"}`})]}),(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:l>0?`${l} active`:"No active requests"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"\xb7 recent activity"})]}),0===s.length?(0,r.jsx)("div",{className:"flex items-center justify-center py-3 text-sm text-text-muted",children:"No recent activity"}):(0,r.jsx)("div",{className:"-mx-1 flex gap-2 overflow-x-auto px-1 pb-1",children:s.map((e,t)=>(0,r.jsx)(Q,{req:e},`${e.timestamp}-${t}`))})]})}Q.propTypes={req:w().shape({status:w().string,model:w().string,provider:w().string,promptTokens:w().number,completionTokens:w().number,timestamp:w().oneOfType([w().string,w().number])}).isRequired},G.propTypes={stats:w().object};let J={primary:"var(--color-primary)",info:"var(--color-info)",success:"var(--color-success)",warning:"var(--color-warning)",danger:"var(--color-danger)",cyan:"var(--color-cyan)",muted:"var(--color-surface-3)"};function V({segments:e=[],size:t=140,thickness:s=14,centerLabel:a,centerValue:l,className:n=""}){let i=e.reduce((e,t)=>e+(Number(t.value)||0),0),o=(t-s)/2,c=2*Math.PI*o,d=t/2,m=t/2,x=0,u=e.map((e,t)=>{let s=Number(e.value)||0,r=(i>0?s/i:0)*c,a={key:t,color:J[e.color]||e.color||J.muted,dash:r,gap:c-r,offset:-x};return x+=r,a});return(0,r.jsxs)("div",{className:`relative inline-flex items-center justify-center ${n}`,style:{width:t,height:t},children:[(0,r.jsxs)("svg",{width:t,height:t,className:"-rotate-90",children:[(0,r.jsx)("circle",{cx:d,cy:m,r:o,fill:"none",stroke:"var(--color-surface-2)",strokeWidth:s}),i>0&&u.map(e=>(0,r.jsx)("circle",{cx:d,cy:m,r:o,fill:"none",stroke:e.color,strokeWidth:s,strokeDasharray:`${e.dash} ${e.gap}`,strokeDashoffset:e.offset,strokeLinecap:"butt",style:{transition:"stroke-dasharray 0.4s ease, stroke-dashoffset 0.4s ease"}},e.key))]}),(void 0!==l||a)&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[void 0!==l&&(0,r.jsx)("span",{className:"text-xl font-bold text-text-main leading-none",children:l}),a&&(0,r.jsx)("span",{className:"mt-0.5 text-[10px] uppercase tracking-wide text-text-muted",children:a})]})]})}V.propTypes={segments:w().arrayOf(w().shape({value:w().number.isRequired,color:w().oneOf(["primary","info","success","warning","danger","cyan","muted"]),label:w().string})),size:w().number,thickness:w().number,centerLabel:w().string,centerValue:w().string,className:w().string};var X=s(99312);let Z=new Set(["error","errors","failed","failure","fail","timeout","5xx","4xx"]);function B({stats:e}){let{segments:t,okCount:s,errCount:l,total:n,ratePct:o}=(0,a.useMemo)(()=>{let t=e?.statusCounts||{},s=0,r=0;for(let[e,a]of Object.entries(t)){let t=Number(a)||0;Z.has(String(e).toLowerCase())?r+=t:s+=t}let a=s+r;return{segments:[{value:s,color:"success",label:"Success"},{value:r,color:"danger",label:"Error"}],okCount:s,errCount:r,total:a,ratePct:a>0?r/a*100:0}},[e]),c=e?.errorRate,d=null!=c?`${(100*c).toFixed(1)}%`:`${o.toFixed(1)}%`;return(0,r.jsx)(i.default,{title:"Success Rate",icon:"check_circle",className:"flex h-full min-w-0 flex-col",children:0===n?(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center py-6",children:(0,r.jsx)(X.default,{icon:"sentiment_neutral",title:"No requests yet",description:"Request outcomes will appear here once traffic flows through.",className:"border-0 p-0"})}):(0,r.jsxs)("div",{className:"flex flex-col items-center gap-5",children:[(0,r.jsx)(V,{segments:t,size:150,thickness:16,centerValue:d,centerLabel:"error rate"}),(0,r.jsxs)("div",{className:"grid w-full grid-cols-2 gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsx)("span",{className:"size-2.5 rounded-full bg-success"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted",children:"Success"}),(0,r.jsx)("div",{className:"truncate text-sm font-semibold text-text-main",children:E(s)})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsx)("span",{className:"size-2.5 rounded-full bg-danger"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted",children:"Errors"}),(0,r.jsx)("div",{className:"truncate text-sm font-semibold text-text-main",children:E(l)})]})]})]})]})})}B.propTypes={stats:w().object};var H=s(25086),Y=s(28408),ee=s(32539),et=s(34430);let es=["var(--color-primary)","var(--color-cyan)","var(--color-info)","var(--color-success)","var(--color-warning)","#f472b6","#34d399","#a78bfa","var(--color-danger)"];function er({active:e,payload:t,label:s,providerMeta:a}){if(!e||!t||!t.length)return null;let l=[...t].sort((e,t)=>(t.value||0)-(e.value||0)),n=l.reduce((e,t)=>e+(t.value||0),0);return(0,r.jsxs)("div",{className:"rounded-brand border border-border bg-panel p-2.5 text-xs shadow-[var(--shadow-elev)]",children:[(0,r.jsx)("div",{className:"mb-1 font-medium text-text-main",children:s}),(0,r.jsxs)("div",{className:"space-y-0.5",children:[l.map(e=>{let t=a?.[e.dataKey];return(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5 text-text-muted",children:[(0,r.jsx)("span",{className:"size-2 rounded-full",style:{backgroundColor:e.color}}),t?.name||e.dataKey]}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:(e.value||0).toLocaleString()})]},e.dataKey)}),(0,r.jsxs)("div",{className:"mt-1 flex items-center justify-between gap-3 border-t border-border-subtle pt-1 font-medium",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Total"}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:n.toLocaleString()})]})]})]})}function ea({data:e=[],providers:t=[],height:s=260}){if(!e||0===e.length||0===t.length)return(0,r.jsx)("div",{className:"flex items-center justify-center text-sm text-text-muted",style:{height:s},children:"No provider breakdown for this period"});let a={};return t.forEach((e,t)=>{a[e.id]={name:e.name||e.id,color:es[t%es.length]}}),(0,r.jsx)("div",{style:{height:s,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:e,margin:{top:8,right:8,bottom:0,left:-16},children:[(0,r.jsx)("defs",{children:t.map((e,t)=>{let s=es[t%es.length],a=`stack-grad-${t}`;return(0,r.jsxs)("linearGradient",{id:a,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:s,stopOpacity:.7}),(0,r.jsx)("stop",{offset:"100%",stopColor:s,stopOpacity:.15})]},a)})}),(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:48,tickFormatter:e=>e>=1e3?`${(e/1e3).toFixed(0)}k`:e}),(0,r.jsx)(et.m,{content:(0,r.jsx)(er,{providerMeta:a})}),t.map((e,t)=>(0,r.jsx)($.Gk,{type:"monotone",dataKey:e.id,name:e.name||e.id,stackId:"1",stroke:es[t%es.length],strokeWidth:1.5,fill:`url(#stack-grad-${t})`,isAnimationActive:!1},e.id))]})})})}function el(e,{initial:t=null,deps:s=[]}={}){let[r,l]=(0,a.useState)(t),[n,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)(null),d=(0,a.useRef)(0);return(0,a.useEffect)(()=>{let s,r;return s=++d.current,r=!1,fetch(e).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{r||d.current!==s||(l(e??t),c(null),i(!1))}).catch(e=>{r||d.current!==s||(l(t),c(e),i(!1))}),()=>{r=!0}},[e,...s]),{data:r,loading:n,error:o}}function en({period:e}){let{data:t,loading:s}=el(`/api/usage/chart?view=stacked&period=${e}`,{initial:null,deps:[e]}),l=(0,a.useMemo)(()=>Array.isArray(t)?t:[],[t]),n=(0,a.useMemo)(()=>(function(e){if(!e||0===e.length)return[];let t={};for(let s of e)for(let[e,r]of Object.entries(s))"label"!==e&&(t[e]=(t[e]||0)+(Number(r)||0));return Object.keys(t).sort((e,s)=>t[s]-t[e]).map(e=>({id:e,name:x.Q2[e]?.name||e}))})(l),[l]),o=l.length>0&&n.length>0;return(0,r.jsx)(i.default,{title:"Token Share by Provider",subtitle:"Stacked token volume per provider over the selected period",icon:"stacked_bar_chart",children:s?(0,r.jsx)(H.CardSkeleton,{}):o?(0,r.jsx)(ea,{data:l,providers:n,height:280}):(0,r.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,r.jsx)(X.default,{icon:"stacked_bar_chart",title:"No provider breakdown",description:"No token volume recorded for this period yet.",className:"border-0 p-0"})})})}function ei({active:e,payload:t,label:s}){if(!e||!t||!t.length)return null;let a=t[0]?.payload||{};return(0,r.jsxs)("div",{className:"rounded-brand border border-border bg-panel p-2.5 text-xs shadow-[var(--shadow-elev)]",children:[(0,r.jsx)("div",{className:"mb-1 font-medium text-text-main",children:s}),(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"p95"}),(0,r.jsxs)("span",{className:"font-mono text-text-main",children:[(a.p95Ms||0).toLocaleString()," ms"]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"avg"}),(0,r.jsxs)("span",{className:"font-mono text-text-main",children:[(a.avgMs||0).toLocaleString()," ms"]})]}),a.samples>0&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4 border-t border-border-subtle pt-1 text-text-subtle",children:[(0,r.jsx)("span",{children:"samples"}),(0,r.jsx)("span",{className:"font-mono",children:a.samples})]})]})]})}function eo({data:e=[],height:t=220}){return e&&0!==e.length?(0,r.jsx)("div",{style:{height:t,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:e,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"lat-p95",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"var(--color-cyan)",stopOpacity:.4}),(0,r.jsx)("stop",{offset:"100%",stopColor:"var(--color-cyan)",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"lat-avg",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"var(--color-primary)",stopOpacity:.3}),(0,r.jsx)("stop",{offset:"100%",stopColor:"var(--color-primary)",stopOpacity:0})]})]}),(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:44,tickFormatter:e=>e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}),(0,r.jsx)(et.m,{content:(0,r.jsx)(ei,{})}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:"p95Ms",name:"p95",stroke:"var(--color-cyan)",strokeWidth:1.5,fill:"url(#lat-p95)",isAnimationActive:!1}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:"avgMs",name:"avg",stroke:"var(--color-primary)",strokeWidth:1.5,fill:"url(#lat-avg)",isAnimationActive:!1})]})})}):(0,r.jsx)("div",{className:"flex items-center justify-center text-sm text-text-muted",style:{height:t},children:"No latency data for this period"})}function ec({period:e,stats:t}){let{data:s,loading:l}=el(`/api/usage/chart?view=latency&period=${e}`,{initial:null,deps:[e]}),n=(0,a.useMemo)(()=>Array.isArray(s)?s:[],[s]),o=(0,a.useMemo)(()=>{if(t?.latency&&(null!=t.latency.avg||null!=t.latency.p95))return{avg:t.latency.avg,p50:t.latency.p50,p95:t.latency.p95,samples:t.latency.sampleCount};let e=n.length?n[n.length-1]:null;return e?{avg:e.avgMs,p50:null,p95:e.p95Ms,samples:e.samples}:null},[t,n]),c=n.length>0;return(0,r.jsx)(i.default,{title:"Latency (avg vs p95)",subtitle:"Response time distribution over the selected period",icon:"timer",children:l?(0,r.jsx)(H.CardSkeleton,{}):c?(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsxs)("div",{className:"mb-4 grid grid-cols-2 gap-2 sm:grid-cols-4",children:[(0,r.jsx)(ed,{label:"Avg",value:null!=o.avg?P(o.avg):"—"}),(0,r.jsx)(ed,{label:"p50",value:null!=o.p50?P(o.p50):"—"}),(0,r.jsx)(ed,{label:"p95",value:null!=o.p95?P(o.p95):"—",accent:!0}),(0,r.jsx)(ed,{label:"Samples",value:null!=o.samples?E(o.samples):"—"})]}),(0,r.jsx)(eo,{data:n,height:240})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,r.jsx)(X.default,{icon:"timer",title:"No latency data",description:"Latency samples will appear here once requests complete.",className:"border-0 p-0"})})})}function ed({label:e,value:t,accent:s=!1}){return(0,r.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted",children:e}),(0,r.jsx)("div",{className:`truncate text-sm font-semibold ${s?"text-cyan":"text-text-main"}`,children:t})]})}ea.propTypes={data:w().arrayOf(w().object),providers:w().arrayOf(w().shape({id:w().string,name:w().string})),height:w().number},en.propTypes={period:w().string},eo.propTypes={data:w().arrayOf(w().object),height:w().number},ed.propTypes={label:w().string.isRequired,value:w().string.isRequired,accent:w().bool},ec.propTypes={period:w().string,stats:w().object};var em=s(28067);let ex=e=>new Intl.NumberFormat().format(e||0),eu=e=>`$${(e||0).toFixed(2)}`;function ep(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function eh({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function ef({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":ex(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedTokens?ex(e.cachedTokens):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":ex(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:ex(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":eu(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedCost?eu(e.cachedCost):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":eu(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:eu(e.totalCost||e.cost)})]})}function eg({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:o,onToggleSort:c,viewMode:d,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:p}){let[h,f]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&f(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let g=(0,a.useCallback)(e=>{f(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),j=(0,a.useMemo)(()=>"tokens"===d?[{field:"promptTokens",label:"Input Tokens"},{field:"cachedTokens",label:"Cached"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"cachedCost",label:"Cached Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[d]),b=t.length+j.length;return(0,r.jsxs)(i.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>c(l,e.field),children:[e.label," ",(0,r.jsx)(eh,{field:e.field,currentSort:n,currentOrder:o})]},e.field)),j.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>c(l,e.field),children:[e.label," ",(0,r.jsx)(eh,{field:e.field,currentSort:n,currentOrder:o})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>g(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(ef,{item:e.summary,viewMode:d,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(ef,{item:e,viewMode:d})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:b,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}eh.propTypes={field:w().string.isRequired,currentSort:w().string.isRequired,currentOrder:w().string.isRequired},ef.propTypes={item:w().object.isRequired,viewMode:w().string.isRequired,isSummary:w().bool},eg.propTypes={title:w().string.isRequired,columns:w().arrayOf(w().shape({field:w().string.isRequired,label:w().string.isRequired,align:w().string})).isRequired,groupedData:w().array.isRequired,tableType:w().string.isRequired,sortBy:w().string.isRequired,sortOrder:w().string.isRequired,onToggleSort:w().func.isRequired,viewMode:w().string.isRequired,storageKey:w().string.isRequired,renderDetailCells:w().func.isRequired,renderSummaryCells:w().func.isRequired,emptyMessage:w().string.isRequired};let ej=[{value:"byModel",label:"Model",groupKey:"rawModel",storageKey:"ov-models"},{value:"byAccount",label:"Account",groupKey:"accountName",storageKey:"ov-accounts"},{value:"byApiKey",label:"API Key",groupKey:"keyName",storageKey:"ov-apikeys"},{value:"byEndpoint",label:"Endpoint",groupKey:"endpoint",storageKey:"ov-endpoints"}],eb=[{value:"tokens",label:"Tokens"},{value:"costs",label:"Cost"}],ev={byModel:[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],byAccount:[{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"}],byApiKey:[{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"}],byEndpoint:[{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"}]},ey={byModel:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})},byAccount:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.accountName||(e.connectionId?`Account ${String(e.connectionId).slice(0,8)}…`:"Unknown")}),(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})},byApiKey:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName||"Unknown Key"}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})},byEndpoint:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-mono text-sm font-medium",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})}},eN={byModel:"No model usage recorded yet.",byAccount:"No account usage recorded yet.",byApiKey:"No API key usage recorded yet.",byEndpoint:"No endpoint usage recorded yet."};function ew({stats:e}){let[t,s]=(0,a.useState)("byModel"),[l,n]=(0,a.useState)("tokens"),[i,o]=(0,a.useState)("rawModel"),[c,d]=(0,a.useState)("asc"),m=ej.find(e=>e.value===t),x=(0,a.useMemo)(()=>{var s;return e&&m?function(e,t){if(!Array.isArray(e))return[];let s={};for(let r of e){let e=r[t]||`Unknown ${t}`;s[e]||(s[e]={groupKey:e,summary:{requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,totalTokens:0,cost:0,inputCost:0,cachedCost:0,outputCost:0,lastUsed:null},items:[]});let a=s[e].summary;a.requests+=r.requests||0,a.promptTokens+=r.promptTokens||0,a.completionTokens+=r.completionTokens||0,a.cachedTokens+=r.cachedTokens||0,a.totalTokens+=r.totalTokens||0,a.cost+=r.cost||0,a.inputCost+=r.inputCost||0,a.cachedCost+=r.cachedCost||0,a.outputCost+=r.outputCost||0,r.lastUsed&&(!a.lastUsed||new Date(r.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=r.lastUsed),s[e].items.push(r)}return Object.values(s)}((s=e[t],Object.entries(s||{}).map(([e,t])=>{let s=(t.promptTokens||0)+(t.completionTokens||0),r=t.cost||0,a=t.cachedTokens||0,l=Math.max(0,(t.promptTokens||0)-a),n=s>0?(t.completionTokens||0)*(r/s):0;return{...t,key:e,totalTokens:s,totalCost:r,inputCost:s>0?r/s*l:0,cachedCost:s>0?r/s*a:0,outputCost:n}}).sort((e,t)=>{let s=e[i],r=t[i];return("string"==typeof s&&(s=s.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),s<r)?"asc"===c?-1:1:s>r?"asc"===c?1:-1:0})),m.groupKey):[]},[e,t,m,i,c]),u=(0,a.useCallback)((e,t)=>{o(e=>e===t?(d(e=>"asc"===e?"desc":"asc"),e):(d("asc"),t))},[]),p=(0,a.useCallback)(e=>{s(e);let t=ej.find(t=>t.value===e);o(t?.groupKey||"rawModel"),d("asc")},[]),h=ey[t],f=ej.find(e=>e.value===t);return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)(em.default,{options:ej.map(e=>({value:e.value,label:e.label})),value:t,onChange:p,size:"sm",className:"overflow-x-auto"}),(0,r.jsx)(em.default,{options:eb,value:l,onChange:n,size:"sm"})]}),(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)(eg,{title:`Usage by ${f?.label||"Dimension"}`,columns:ev[t],groupedData:x,tableType:t,sortBy:i,sortOrder:c,onToggleSort:u,viewMode:l,storageKey:m?.storageKey||"ov-default",renderDetailCells:h.detail,renderSummaryCells:h.summary,emptyMessage:eN[t]})})]})}ew.propTypes={stats:w().object,period:w().string};var ek=s(48035),eC=s(46357);function eS({active:e,payload:t,label:s}){if(!e||!t||!t.length)return null;let a=t[0]?.payload||{},l=(a.ok||0)+(a.error||0),n=l>0?(a.error/l*100).toFixed(1):"0.0";return(0,r.jsxs)("div",{className:"rounded-brand border border-border bg-panel p-2.5 text-xs shadow-[var(--shadow-elev)]",children:[(0,r.jsx)("div",{className:"mb-1 font-medium text-text-main",children:s}),(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5 text-text-muted",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-success"})," OK"]}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:(a.ok||0).toLocaleString()})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5 text-text-muted",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-danger"})," Error"]}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:(a.error||0).toLocaleString()})]}),(0,r.jsxs)("div",{className:"mt-1 flex items-center justify-between gap-4 border-t border-border-subtle pt-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"error rate"}),(0,r.jsxs)("span",{className:"font-mono font-medium text-danger",children:[n,"%"]})]})]})]})}function eT({data:e=[],height:t=180}){return e&&0!==e.length?(0,r.jsx)("div",{style:{height:t,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(ek.E,{data:e,margin:{top:8,right:8,bottom:0,left:-16},children:[(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:32,allowDecimals:!1}),(0,r.jsx)(et.m,{content:(0,r.jsx)(eS,{}),cursor:{fill:"var(--color-surface-2)",opacity:.5}}),(0,r.jsx)(eC.yP,{dataKey:"ok",stackId:"a",name:"OK",fill:"var(--color-success)",fillOpacity:.6,radius:[0,0,0,0],isAnimationActive:!1}),(0,r.jsx)(eC.yP,{dataKey:"error",stackId:"a",name:"Error",fill:"var(--color-danger)",fillOpacity:.85,radius:[2,2,0,0],isAnimationActive:!1})]})})}):(0,r.jsx)("div",{className:"flex items-center justify-center text-sm text-text-muted",style:{height:t},children:"No request data for this period"})}function eM(e){let t=x.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}eT.propTypes={data:w().arrayOf(w().object),height:w().number};let eq=[{value:"tokens",label:"Tokens"},{value:"cost",label:"Cost"},{value:"latency",label:"Latency"},{value:"errors",label:"Errors"}];function eR({data:e,dataKey:t,color:s}){let a=`main-${t}`,l=`var(--color-${s})`;return e&&e.some(e=>(Number(e?.[t])||0)>0)?(0,r.jsx)("div",{style:{height:260,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:e,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:a,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:l,stopOpacity:.3}),(0,r.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:0})]})}),(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:48,tickFormatter:e=>"cost"===t?K(e):e>=1e3?`${(e/1e3).toFixed(0)}k`:String(e)}),(0,r.jsx)(et.m,{contentStyle:{backgroundColor:"var(--color-panel)",border:"1px solid var(--color-border-subtle)",borderRadius:"10px",fontSize:"12px"},formatter:e=>"cost"===t?[K(e),"Cost"]:[E(e),"Tokens"]}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:t,stroke:l,strokeWidth:2,fill:`url(#${a})`,dot:!1,isAnimationActive:!1})]})})}):(0,r.jsx)("div",{className:"flex h-[260px] items-center justify-center text-sm text-text-muted",children:"No data for this period"})}function eO({period:e}){let[t,s]=(0,a.useState)(null),[l,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)([]),[d,m]=(0,a.useState)("tokens"),{data:u,loading:p}=el(`/api/usage/chart?view=${d}&period=${e}`,{initial:null,deps:[d,e]}),h=(0,a.useRef)(!1),f=(0,a.useRef)(0);(0,a.useEffect)(()=>{let e=!1;return Promise.all([fetch("/api/providers").then(e=>e.ok?e.json():null).catch(()=>null),fetch("/api/provider-nodes").then(e=>e.ok?e.json():null).catch(()=>null)]).then(([t,s])=>{if(e)return;let r={};for(let e of s?.nodes||[])r[e.id]=e.name;let a=new Set;c([...(t?.connections||[]).filter(e=>!1!==e.isActive&&eM(e.provider)&&!a.has(e.provider)&&a.add(e.provider)).map(e=>({...e,nodeName:r[e.provider]||null})),...Object.values(x.IS).filter(e=>e.noAuth&&!a.has(e.id)&&eM(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{}),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let t=++f.current,r=!1;return fetch(`/api/usage/stats?period=${e}`).then(e=>e.ok?e.json():null).then(e=>{r||f.current!==t||(e&&(h.current=!0,s(t=>({...t,...e}))),i(!1))}).catch(()=>{r||f.current!==t||i(!1)}),()=>{r=!0}},[e]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);s(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending,statusCounts:t.statusCounts??e.statusCounts,errorRate:t.errorRate??e.errorRate,errorCount:t.errorCount??e.errorCount,latency:t.latency??e.latency}:e),h.current&&i(!1)}catch{}},e.onerror=()=>{h.current&&i(!1)},()=>e.close()},[]);let g=(0,a.useCallback)(()=>{if(p||!u)return(0,r.jsx)(n.Qv,{});if(!u.length)return(0,r.jsx)("div",{className:"flex h-[260px] items-center justify-center",children:(0,r.jsx)(n.pp,{icon:"show_chart",title:"No chart data",description:"No requests recorded for this view in the selected period.",className:"border-0 p-0"})});switch(d){case"tokens":return(0,r.jsx)(eR,{data:u,dataKey:"tokens",color:"primary"});case"cost":return(0,r.jsx)(eR,{data:u,dataKey:"cost",color:"warning"});case"latency":return(0,r.jsx)(eo,{data:u,height:260});case"errors":return(0,r.jsx)(eT,{data:u,height:260});default:return null}},[u,p,d]),j=(0,a.useMemo)(()=>t?.recentRequests?.[0]?.provider||"",[t]);return l&&!t?(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsx)("div",{className:"grid min-w-0 grid-cols-2 gap-3 lg:grid-cols-5 lg:gap-4",children:Array.from({length:5}).map((e,t)=>(0,r.jsx)(n.Qv,{},t))}),(0,r.jsx)(n.Qv,{}),(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]})]}):t?(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4 lg:gap-6",children:[(0,r.jsx)(U,{stats:t}),(0,r.jsx)(G,{stats:t}),(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(300px,1fr)] lg:gap-6",children:[(0,r.jsx)(n.Zp,{title:"Usage Trend",icon:"monitoring",action:(0,r.jsx)(n.Iz,{options:eq,value:d,onChange:m,size:"sm"}),children:g()}),(0,r.jsx)(B,{stats:t})]}),(0,r.jsx)(en,{period:e}),(0,r.jsx)(ec,{period:e,stats:t}),(0,r.jsx)(ew,{stats:t,period:e}),(0,r.jsx)(n.Zp,{title:"Provider Topology",subtitle:"Live routing state across connected providers",icon:"hub",padding:"none",children:(0,r.jsx)("div",{className:"px-5 pb-5",children:(0,r.jsx)(q,{providers:o,activeRequests:t.activeRequests||[],lastProvider:j,errorProvider:t.errorProvider||""})})})]}):(0,r.jsx)(n.pp,{icon:"cloud_off",title:"Couldn't load usage",description:"We failed to fetch usage statistics. Please try again."})}eR.propTypes={data:w().arrayOf(w().object),dataKey:w().string.isRequired,color:w().string.isRequired},eO.propTypes={period:w().string};let eL=[{value:"all",label:"All",icon:"subject"},{value:"ok",label:"OK",icon:"check_circle"},{value:"errors",label:"Errors",icon:"error"}],e$=new Intl.NumberFormat,ez=e=>e$.format(e||0),eD=e=>`${e.timestamp??""}|${e.model??""}|${e.provider??""}`;function eE(){let[e,t]=(0,a.useState)([]),[s,l]=(0,a.useState)(!1),[i,o]=(0,a.useState)("all"),[d,m]=(0,a.useState)(""),[x,u]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onopen=()=>l(!0),e.onerror=()=>l(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data),r=Array.isArray(s.recentRequests)?s.recentRequests:[];if(0===r.length)return;t(e=>{let t=new Set(e.map(eD)),s=r.filter(e=>!t.has(eD(e)));return 0===s.length?e:[...s,...e].sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime()).slice(0,100)})}catch{}},()=>e.close()},[]),(0,a.useEffect)(()=>{let e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[]);let p=(0,a.useMemo)(()=>{let t=d.trim().toLowerCase();return e.filter(e=>{let s,r;return("ok"!==i||!!(!(s=e.status)||"ok"===s))&&("errors"!==i||!!(r=e.status)&&"ok"!==r)&&(!t||!!`${e.model??""} ${e.provider??""}`.toLowerCase().includes(t))&&!0})},[e,i,d]);return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.Zp,{padding:"sm",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,r.jsx)("span",{className:(0,c.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-warning")}),(0,r.jsx)("span",{className:(0,c.cn)("font-semibold",s?"text-success":"text-warning"),children:s?"Live":"Reconnecting"}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["\xb7 ",e.length,"/",100," buffered"]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.Iz,{options:eL,value:i,onChange:o,size:"sm"}),(0,r.jsx)(n.pd,{icon:"search",placeholder:"Filter by model or provider",value:d,onChange:e=>m(e.target.value),className:"sm:w-64"})]})]})}),(0,r.jsx)(n.Zp,{padding:"none",className:"overflow-hidden",children:0===p.length?(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(n.pp,{icon:0===e.length?"history":"search_off",title:0===e.length?"No requests yet":"No matching requests",description:0===e.length?"Live requests will appear here.":"Try adjusting your filters or search."})}):(0,r.jsxs)("div",{className:"max-h-[600px] overflow-y-auto",children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 grid grid-cols-[4.5rem_1fr_auto] items-center gap-3 border-b border-border-subtle bg-panel/95 px-4 py-2 text-[11px] font-semibold uppercase tracking-wide text-text-subtle backdrop-blur sm:grid-cols-[4.5rem_1fr_6rem_6rem_5rem_1.25rem]",children:[(0,r.jsx)("span",{children:"When"}),(0,r.jsx)("span",{children:"Model"}),(0,r.jsx)("span",{className:"hidden text-right sm:block",children:"In"}),(0,r.jsx)("span",{className:"hidden text-right sm:block",children:"Out"}),(0,r.jsx)("span",{className:"hidden sm:block",children:"Cache"}),(0,r.jsx)("span",{className:"text-right","aria-hidden":!0})]}),(0,r.jsx)("ul",{role:"list",className:"divide-y divide-border-subtle",children:p.map(e=>{let t,s=!(t=e.status)||"ok"===t,a=(e.cachedTokens??0)>0;return(0,r.jsxs)("li",{className:"fade-in grid grid-cols-[4.5rem_1fr_auto] items-center gap-3 px-4 py-2.5 transition-colors hover:bg-surface-2/70 sm:grid-cols-[4.5rem_1fr_6rem_6rem_5rem_1.25rem]",children:[(0,r.jsx)("span",{className:"truncate font-mono text-xs text-text-muted tabular-nums",title:e.timestamp?new Date(e.timestamp).toLocaleString():void 0,children:function(e,t){if(!e)return"—";let s=new Date(e).getTime();if(Number.isNaN(s))return"—";let r=t-s;return r<1e4?"just now":r<6e4?`${Math.floor(r/1e3)}s ago`:r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:new Date(s).toLocaleTimeString()}(e.timestamp,x)}),(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)("span",{className:"truncate text-sm font-medium text-text-main",title:e.model,children:e.model||"—"}),e.provider&&(0,r.jsx)(n.Ex,{variant:"default",size:"sm",className:"hidden shrink-0 sm:inline-flex",children:e.provider})]}),(0,r.jsxs)("span",{className:"hidden text-right font-mono text-xs text-primary tabular-nums sm:block",children:["↑ ",ez(e.promptTokens)]}),(0,r.jsxs)("span",{className:"hidden text-right font-mono text-xs text-success tabular-nums sm:block",children:["↓ ",ez(e.completionTokens)]}),(0,r.jsx)("span",{className:"hidden sm:block",children:a?(0,r.jsx)(n.Ex,{variant:"cyan",size:"sm",children:"cached"}):(0,r.jsx)("span",{className:"text-text-subtle",children:"—"})}),(0,r.jsx)("span",{className:"flex justify-end",children:(0,r.jsx)("span",{className:(0,c.cn)("size-2 rounded-full",s?"bg-success":"bg-danger"),role:"img","aria-label":s?"OK":"Error",title:s?"OK":e.status||"Error"})})]},eD(e))})})]})})]})}let eK=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"},{value:"all",label:"All"}],eP=[{value:"overview",label:"Overview"},{value:"logs",label:"Logs"},{value:"details",label:"Details"}];function e_(){return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(n.Qv,{}),children:(0,r.jsx)(eI,{})})}function eI(){let e=(0,l.useSearchParams)(),t=(0,l.useRouter)(),[s,i]=(0,a.useState)("today"),o=e.get("tab"),c=o&&["overview","logs","details"].includes(o)?o:"overview";return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Usage",description:"Requests, analytics, latency, and live activity",icon:"bar_chart"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)(n.Iz,{options:eP,value:c,onChange:s=>{if(s===c)return;let r=new URLSearchParams(e);r.set("tab",s),t.push(`/dashboard/usage?${r.toString()}`,{scroll:!1})},className:"w-full sm:w-auto"}),"overview"===c&&(0,r.jsx)(n.Iz,{options:eK,value:s,onChange:i,size:"sm",className:"w-full sm:w-auto"})]}),"overview"===c&&(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(n.Qv,{}),children:(0,r.jsx)(eO,{period:s})}),"logs"===c&&(0,r.jsx)(eE,{}),"details"===c&&(0,r.jsx)(y,{})]})}},86559:(e,t,s)=>{Promise.resolve().then(s.bind(s,37925))}},e=>{e.O(0,[2574,3862,27,1636,1321,705,5497,8441,3794,7358],()=>e(e.s=86559)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6478,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);