empyr-path 0.4.71 → 0.4.73

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 (951) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +11 -7
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +24 -0
  5. package/app/.next-cli-build/routes-manifest.json +26 -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.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +4 -4
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/users/page.js +2 -0
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/users/page.js.nft.json +1 -0
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/users/page_client-reference-manifest.js +1 -0
  72. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  73. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  84. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.rsc +6 -5
  88. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -5
  89. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  91. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +4 -3
  94. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/register/route.js +1 -0
  105. package/app/.next-cli-build/server/app/api/auth/register/route.js.nft.json +1 -0
  106. package/app/.next-cli-build/server/app/api/auth/register/route_client-reference-manifest.js +1 -0
  107. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  110. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  188. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  236. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  238. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  242. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  258. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  296. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/users/[id]/route.js +1 -0
  298. package/app/.next-cli-build/server/app/api/users/[id]/route.js.nft.json +1 -0
  299. package/app/.next-cli-build/server/app/api/users/[id]/route_client-reference-manifest.js +1 -0
  300. package/app/.next-cli-build/server/app/api/users/route.js +1 -0
  301. package/app/.next-cli-build/server/app/api/users/route.js.nft.json +1 -0
  302. package/app/.next-cli-build/server/app/api/users/route_client-reference-manifest.js +1 -0
  303. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  316. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  348. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  350. package/app/.next-cli-build/server/app/callback.html +1 -1
  351. package/app/.next-cli-build/server/app/callback.rsc +6 -5
  352. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -5
  353. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  354. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  355. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +4 -3
  356. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -7
  360. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  361. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  364. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -7
  365. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
  367. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +4 -3
  368. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +12 -10
  370. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -5
  371. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  374. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +12 -10
  375. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
  377. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +4 -3
  378. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -7
  380. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  381. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  384. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -7
  385. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  386. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
  387. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +4 -3
  388. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +12 -10
  390. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -5
  391. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  394. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +12 -10
  395. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
  397. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +4 -3
  398. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -7
  400. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  401. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -7
  406. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
  408. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +4 -3
  409. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +20 -18
  411. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -5
  412. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +20 -18
  416. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
  418. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +4 -3
  419. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -7
  421. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -7
  426. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
  428. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +4 -3
  429. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -7
  431. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -7
  437. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
  439. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +4 -3
  440. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -7
  442. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  443. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -7
  447. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
  449. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +4 -3
  450. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -7
  452. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -7
  457. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
  459. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +4 -3
  460. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/quota.rsc +21 -19
  462. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -6
  463. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +21 -19
  467. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
  469. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +4 -3
  470. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -6
  475. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -6
  476. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  478. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +4 -3
  479. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -7
  485. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -7
  490. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
  492. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +4 -3
  493. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -7
  495. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -7
  500. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
  502. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +4 -3
  503. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -7
  505. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -7
  510. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
  512. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +4 -3
  513. package/app/.next-cli-build/server/app/dashboard/users.html +1 -0
  514. package/app/.next-cli-build/server/app/dashboard/users.meta +17 -0
  515. package/app/.next-cli-build/server/app/dashboard/users.rsc +24 -0
  516. package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk/dashboard/users/__PAGE__.segment.rsc +6 -0
  517. package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk/dashboard/users.segment.rsc +5 -0
  518. package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  519. package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk.segment.rsc +6 -0
  520. package/app/.next-cli-build/server/app/dashboard/users.segments/_full.segment.rsc +24 -0
  521. package/app/.next-cli-build/server/app/dashboard/users.segments/_head.segment.rsc +6 -0
  522. package/app/.next-cli-build/server/app/dashboard/users.segments/_index.segment.rsc +8 -0
  523. package/app/.next-cli-build/server/app/dashboard/users.segments/_tree.segment.rsc +6 -0
  524. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  525. package/app/.next-cli-build/server/app/dashboard.rsc +8 -7
  526. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -7
  530. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
  532. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +4 -3
  533. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  534. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  535. package/app/.next-cli-build/server/app/index.html +1 -1
  536. package/app/.next-cli-build/server/app/index.rsc +6 -5
  537. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -5
  539. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  541. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +4 -3
  542. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  543. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  544. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  545. package/app/.next-cli-build/server/app/landing.html +1 -1
  546. package/app/.next-cli-build/server/app/landing.rsc +6 -5
  547. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -5
  548. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  550. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +4 -3
  551. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  552. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/login/page.js +2 -2
  554. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  556. package/app/.next-cli-build/server/app/login.html +1 -1
  557. package/app/.next-cli-build/server/app/login.rsc +7 -7
  558. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  559. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  560. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  561. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +4 -4
  562. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -3
  563. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  565. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  566. package/app/.next-cli-build/server/app/page.js +2 -2
  567. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  568. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  569. package/app/.next-cli-build/server/app-paths-manifest.json +11 -7
  570. package/app/.next-cli-build/server/chunks/1749.js +1 -1
  571. package/app/.next-cli-build/server/chunks/{4013.js → 2391.js} +1 -1
  572. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  573. package/app/.next-cli-build/server/chunks/{5221.js → 2437.js} +1 -1
  574. package/app/.next-cli-build/server/chunks/2722.js +1 -1
  575. package/app/.next-cli-build/server/chunks/3104.js +2 -2
  576. package/app/.next-cli-build/server/chunks/3110.js +16 -10
  577. package/app/.next-cli-build/server/chunks/3535.js +1 -0
  578. package/app/.next-cli-build/server/chunks/3588.js +1 -1
  579. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  580. package/app/.next-cli-build/server/chunks/3781.js +7 -0
  581. package/app/.next-cli-build/server/chunks/4055.js +1 -1
  582. package/app/.next-cli-build/server/chunks/4177.js +1 -1
  583. package/app/.next-cli-build/server/chunks/4306.js +1 -0
  584. package/app/.next-cli-build/server/chunks/4404.js +1 -1
  585. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  586. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  587. package/app/.next-cli-build/server/chunks/4884.js +1 -1
  588. package/app/.next-cli-build/server/chunks/507.js +1 -1
  589. package/app/.next-cli-build/server/chunks/5217.js +2 -2
  590. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  591. package/app/.next-cli-build/server/chunks/5681.js +1 -1
  592. package/app/.next-cli-build/server/chunks/6329.js +1 -0
  593. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  594. package/app/.next-cli-build/server/chunks/698.js +1 -1
  595. package/app/.next-cli-build/server/chunks/7568.js +1 -0
  596. package/app/.next-cli-build/server/chunks/7623.js +1 -1
  597. package/app/.next-cli-build/server/chunks/{318.js → 7937.js} +1 -1
  598. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  599. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  600. package/app/.next-cli-build/server/chunks/8540.js +1 -0
  601. package/app/.next-cli-build/server/chunks/8590.js +1 -0
  602. package/app/.next-cli-build/server/chunks/8895.js +2 -2
  603. package/app/.next-cli-build/server/chunks/9807.js +1 -1
  604. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  605. package/app/.next-cli-build/server/middleware.js +4 -4
  606. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  607. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  608. package/app/.next-cli-build/server/pages/404.html +1 -1
  609. package/app/.next-cli-build/server/pages/500.html +1 -1
  610. package/app/.next-cli-build/static/chunks/1321-c3eb6e9aa44b8136.js +1 -0
  611. package/app/.next-cli-build/static/chunks/5497-c2f356a9b428ac86.js +7 -0
  612. package/app/.next-cli-build/static/chunks/5907-b6bcdf2a4a25a3b8.js +1 -0
  613. package/app/.next-cli-build/static/chunks/{6069-ab59ce65effa2700.js → 6069-969bb675f612a35c.js} +1 -1
  614. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-51522d715f4bacd1.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-72dae7c05c70c7cb.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-c67de5786afc3dbb.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-e1d8a02189c8c861.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-34c131ab7dd4565e.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-5099e548497b1b43.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-89a30e2b77c1f1a8.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-adbd2a7e2de254c9.js +3 -0
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-3eb0a8df359ffb39.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-12ce13ef05d1aac7.js +4 -0
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-2045a758894ef457.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-4576ae5ee0bfdf47.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-aab39f201ba85a27.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-80ecdcb88766cf57.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/users/page-911f7d7e6893aba0.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-8a9237599caef70b.js → layout-b224c7522cd9b9d9.js} +1 -1
  630. package/app/.next-cli-build/static/chunks/app/_global-error/page-4ddb3e75ddf90c7a.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-4ddb3e75ddf90c7a.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-4ddb3e75ddf90c7a.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-4ddb3e75ddf90c7a.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-4ddb3e75ddf90c7a.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-4ddb3e75ddf90c7a.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/auth/register/route-4ddb3e75ddf90c7a.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4ddb3e75ddf90c7a.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4ddb3e75ddf90c7a.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4ddb3e75ddf90c7a.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4ddb3e75ddf90c7a.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4ddb3e75ddf90c7a.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4ddb3e75ddf90c7a.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4ddb3e75ddf90c7a.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4ddb3e75ddf90c7a.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4ddb3e75ddf90c7a.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4ddb3e75ddf90c7a.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4ddb3e75ddf90c7a.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4ddb3e75ddf90c7a.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4ddb3e75ddf90c7a.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4ddb3e75ddf90c7a.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4ddb3e75ddf90c7a.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4ddb3e75ddf90c7a.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4ddb3e75ddf90c7a.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4ddb3e75ddf90c7a.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4ddb3e75ddf90c7a.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/combos/route-4ddb3e75ddf90c7a.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/health/route-4ddb3e75ddf90c7a.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/init/route-4ddb3e75ddf90c7a.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4ddb3e75ddf90c7a.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/keys/route-4ddb3e75ddf90c7a.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/locale/route-4ddb3e75ddf90c7a.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4ddb3e75ddf90c7a.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4ddb3e75ddf90c7a.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4ddb3e75ddf90c7a.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4ddb3e75ddf90c7a.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4ddb3e75ddf90c7a.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4ddb3e75ddf90c7a.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4ddb3e75ddf90c7a.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4ddb3e75ddf90c7a.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4ddb3e75ddf90c7a.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4ddb3e75ddf90c7a.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4ddb3e75ddf90c7a.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/models/route-4ddb3e75ddf90c7a.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/models/test/route-4ddb3e75ddf90c7a.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4ddb3e75ddf90c7a.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4ddb3e75ddf90c7a.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4ddb3e75ddf90c7a.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4ddb3e75ddf90c7a.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4ddb3e75ddf90c7a.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4ddb3e75ddf90c7a.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4ddb3e75ddf90c7a.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4ddb3e75ddf90c7a.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4ddb3e75ddf90c7a.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4ddb3e75ddf90c7a.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/pricing/route-4ddb3e75ddf90c7a.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4ddb3e75ddf90c7a.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4ddb3e75ddf90c7a.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4ddb3e75ddf90c7a.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4ddb3e75ddf90c7a.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4ddb3e75ddf90c7a.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4ddb3e75ddf90c7a.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4ddb3e75ddf90c7a.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4ddb3e75ddf90c7a.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4ddb3e75ddf90c7a.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/providers/route-4ddb3e75ddf90c7a.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4ddb3e75ddf90c7a.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4ddb3e75ddf90c7a.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4ddb3e75ddf90c7a.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-4ddb3e75ddf90c7a.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-4ddb3e75ddf90c7a.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-4ddb3e75ddf90c7a.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-4ddb3e75ddf90c7a.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-4ddb3e75ddf90c7a.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-4ddb3e75ddf90c7a.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4ddb3e75ddf90c7a.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4ddb3e75ddf90c7a.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-4ddb3e75ddf90c7a.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/settings/route-4ddb3e75ddf90c7a.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4ddb3e75ddf90c7a.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/tags/route-4ddb3e75ddf90c7a.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4ddb3e75ddf90c7a.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4ddb3e75ddf90c7a.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4ddb3e75ddf90c7a.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4ddb3e75ddf90c7a.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4ddb3e75ddf90c7a.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4ddb3e75ddf90c7a.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-4ddb3e75ddf90c7a.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-4ddb3e75ddf90c7a.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-4ddb3e75ddf90c7a.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-4ddb3e75ddf90c7a.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-4ddb3e75ddf90c7a.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-4ddb3e75ddf90c7a.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-4ddb3e75ddf90c7a.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4ddb3e75ddf90c7a.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4ddb3e75ddf90c7a.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4ddb3e75ddf90c7a.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4ddb3e75ddf90c7a.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4ddb3e75ddf90c7a.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4ddb3e75ddf90c7a.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4ddb3e75ddf90c7a.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4ddb3e75ddf90c7a.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/users/[id]/route-4ddb3e75ddf90c7a.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/users/route-4ddb3e75ddf90c7a.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4ddb3e75ddf90c7a.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4ddb3e75ddf90c7a.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4ddb3e75ddf90c7a.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4ddb3e75ddf90c7a.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4ddb3e75ddf90c7a.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4ddb3e75ddf90c7a.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4ddb3e75ddf90c7a.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4ddb3e75ddf90c7a.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4ddb3e75ddf90c7a.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-4ddb3e75ddf90c7a.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4ddb3e75ddf90c7a.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4ddb3e75ddf90c7a.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4ddb3e75ddf90c7a.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4ddb3e75ddf90c7a.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/v1/route-4ddb3e75ddf90c7a.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4ddb3e75ddf90c7a.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4ddb3e75ddf90c7a.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4ddb3e75ddf90c7a.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4ddb3e75ddf90c7a.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/version/route-4ddb3e75ddf90c7a.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4ddb3e75ddf90c7a.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/version/update/route-4ddb3e75ddf90c7a.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-7ed1a13a42ec2488.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/layout-bf12368c3d76fa59.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/login/page-ad298d07b8c3998e.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4ddb3e75ddf90c7a.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/page-4ddb3e75ddf90c7a.js +1 -0
  761. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4ddb3e75ddf90c7a.js +1 -0
  762. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4ddb3e75ddf90c7a.js +1 -0
  763. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4ddb3e75ddf90c7a.js +1 -0
  764. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4ddb3e75ddf90c7a.js +1 -0
  765. package/app/.next-cli-build/static/chunks/{webpack-f482ccef6733ebcc.js → webpack-bf625b573599cefc.js} +1 -1
  766. package/app/.next-cli-build/static/css/0269f99a8d602835.css +1 -0
  767. package/app/.next-cli-build/static/css/fa4799b7efe6b5ea.css +1 -0
  768. package/app/.next-cli-build/static/media/13971731025ec697-s.p.woff2 +0 -0
  769. package/app/.next-cli-build/static/media/7ab938503e4547a1-s.woff2 +0 -0
  770. package/app/.next-cli-build/static/xLSfOaZFKRJcH_XvDjPSb/_buildManifest.js +1 -0
  771. package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.71-to-0.4.73-0.4.73-20260613-125219/data.sqlite +0 -0
  772. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  773. package/app/package.json +1 -1
  774. package/app/public/icons/Logo.png +0 -0
  775. package/app/public/icons/icon-192.png +0 -0
  776. package/app/public/icons/icon-512.png +0 -0
  777. package/app/public/providers/bai.png +0 -0
  778. package/app/public/providers/canopywave.png +0 -0
  779. package/app/public/providers/codebuddy.png +0 -0
  780. package/app/public/providers/morph.png +0 -0
  781. package/app/public/providers/qiniu.png +0 -0
  782. package/app/public/providers/routeway.png +0 -0
  783. package/app/public/providers/swiftrouter.png +0 -0
  784. package/app/public/providers/xiaomi-mimo-plan-sgp.png +0 -0
  785. package/cli.js +16 -0
  786. package/package.json +1 -1
  787. package/src/cli/api/client.js +25 -1
  788. package/src/cli/commands/admin.js +170 -0
  789. package/app/.next-cli-build/server/chunks/1260.js +0 -1
  790. package/app/.next-cli-build/server/chunks/412.js +0 -7
  791. package/app/.next-cli-build/server/chunks/42.js +0 -1
  792. package/app/.next-cli-build/server/chunks/595.js +0 -1
  793. package/app/.next-cli-build/server/chunks/6446.js +0 -1
  794. package/app/.next-cli-build/server/chunks/6980.js +0 -3
  795. package/app/.next-cli-build/server/chunks/7061.js +0 -1
  796. package/app/.next-cli-build/server/chunks/7532.js +0 -1
  797. package/app/.next-cli-build/static/chunks/1321-34d056ab60063097.js +0 -1
  798. package/app/.next-cli-build/static/chunks/334-5fe416d12185ebdf.js +0 -3
  799. package/app/.next-cli-build/static/chunks/5497-7ed8c19e2856c14a.js +0 -7
  800. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d82b229ad3d370c6.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8b21af4bccd9df9d.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-c939dcc7adb63878.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-d1e9f6fb258f248c.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-00b61d0a50b13c7e.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c29598c93bf8be4f.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-135df9db11e669bb.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d8898f7428b1414a.js +0 -3
  808. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-f5b0d232c8c671ae.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-1303b6a34844dcb7.js +0 -4
  810. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b78e56e00c42f2c1.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-9bd82b19d22062aa.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-e799349e158322fc.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-4d51824e5e28fa9d.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/_global-error/page-ac916ca15888ac18.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ac916ca15888ac18.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ac916ca15888ac18.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ac916ca15888ac18.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ac916ca15888ac18.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ac916ca15888ac18.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ac916ca15888ac18.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ac916ca15888ac18.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ac916ca15888ac18.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ac916ca15888ac18.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ac916ca15888ac18.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ac916ca15888ac18.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ac916ca15888ac18.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ac916ca15888ac18.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ac916ca15888ac18.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ac916ca15888ac18.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ac916ca15888ac18.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ac916ca15888ac18.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ac916ca15888ac18.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ac916ca15888ac18.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ac916ca15888ac18.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ac916ca15888ac18.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ac916ca15888ac18.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ac916ca15888ac18.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ac916ca15888ac18.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/combos/route-ac916ca15888ac18.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/health/route-ac916ca15888ac18.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/init/route-ac916ca15888ac18.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ac916ca15888ac18.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/keys/route-ac916ca15888ac18.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/locale/route-ac916ca15888ac18.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ac916ca15888ac18.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ac916ca15888ac18.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ac916ca15888ac18.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ac916ca15888ac18.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ac916ca15888ac18.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ac916ca15888ac18.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ac916ca15888ac18.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ac916ca15888ac18.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ac916ca15888ac18.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ac916ca15888ac18.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ac916ca15888ac18.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/models/route-ac916ca15888ac18.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/models/test/route-ac916ca15888ac18.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ac916ca15888ac18.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ac916ca15888ac18.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ac916ca15888ac18.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ac916ca15888ac18.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ac916ca15888ac18.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ac916ca15888ac18.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ac916ca15888ac18.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ac916ca15888ac18.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ac916ca15888ac18.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ac916ca15888ac18.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/pricing/route-ac916ca15888ac18.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ac916ca15888ac18.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ac916ca15888ac18.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ac916ca15888ac18.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ac916ca15888ac18.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ac916ca15888ac18.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ac916ca15888ac18.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ac916ca15888ac18.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ac916ca15888ac18.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ac916ca15888ac18.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/providers/route-ac916ca15888ac18.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ac916ca15888ac18.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ac916ca15888ac18.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ac916ca15888ac18.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ac916ca15888ac18.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ac916ca15888ac18.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ac916ca15888ac18.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ac916ca15888ac18.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ac916ca15888ac18.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ac916ca15888ac18.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ac916ca15888ac18.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ac916ca15888ac18.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ac916ca15888ac18.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/settings/route-ac916ca15888ac18.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ac916ca15888ac18.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/tags/route-ac916ca15888ac18.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ac916ca15888ac18.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ac916ca15888ac18.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ac916ca15888ac18.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ac916ca15888ac18.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ac916ca15888ac18.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ac916ca15888ac18.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ac916ca15888ac18.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ac916ca15888ac18.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ac916ca15888ac18.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ac916ca15888ac18.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ac916ca15888ac18.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ac916ca15888ac18.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ac916ca15888ac18.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ac916ca15888ac18.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ac916ca15888ac18.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ac916ca15888ac18.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ac916ca15888ac18.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ac916ca15888ac18.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ac916ca15888ac18.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ac916ca15888ac18.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ac916ca15888ac18.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ac916ca15888ac18.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ac916ca15888ac18.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ac916ca15888ac18.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ac916ca15888ac18.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ac916ca15888ac18.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ac916ca15888ac18.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ac916ca15888ac18.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ac916ca15888ac18.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ac916ca15888ac18.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ac916ca15888ac18.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ac916ca15888ac18.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ac916ca15888ac18.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ac916ca15888ac18.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ac916ca15888ac18.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/v1/route-ac916ca15888ac18.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ac916ca15888ac18.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ac916ca15888ac18.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ac916ca15888ac18.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ac916ca15888ac18.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/version/route-ac916ca15888ac18.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ac916ca15888ac18.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/version/update/route-ac916ca15888ac18.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-9287c6a07e263252.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/layout-4a9338d3a11fb1ec.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/login/page-abae3c367c6b3d37.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ac916ca15888ac18.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/page-ac916ca15888ac18.js +0 -1
  942. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ac916ca15888ac18.js +0 -1
  943. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ac916ca15888ac18.js +0 -1
  944. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ac916ca15888ac18.js +0 -1
  945. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ac916ca15888ac18.js +0 -1
  946. package/app/.next-cli-build/static/css/64d7624ad2e95249.css +0 -1
  947. package/app/.next-cli-build/static/css/7a3e1568f247f3d0.css +0 -1
  948. package/app/.next-cli-build/static/yRDoXhHsf4yF00gzQXPb1/_buildManifest.js +0 -1
  949. /package/app/.next-cli-build/static/{yRDoXhHsf4yF00gzQXPb1 → xLSfOaZFKRJcH_XvDjPSb}/_ssgManifest.js +0 -0
  950. /package/app/public/icons/{icon-512.svg → icon-5121.svg} +0 -0
  951. /package/app/public/icons/{icon-192.svg → icon-5122..svg} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{48132:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501)),Promise.resolve().then(l.bind(l,96748)),Promise.resolve().then(l.bind(l,56319)),Promise.resolve().then(l.bind(l,56061)),Promise.resolve().then(l.bind(l,92542)),Promise.resolve().then(l.bind(l,84588)),Promise.resolve().then(l.bind(l,40197)),Promise.resolve().then(l.bind(l,45455)),Promise.resolve().then(l.bind(l,30815)),Promise.resolve().then(l.bind(l,73579)),Promise.resolve().then(l.bind(l,92173)),Promise.resolve().then(l.bind(l,95088)),Promise.resolve().then(l.bind(l,24747)),Promise.resolve().then(l.bind(l,80752)),Promise.resolve().then(l.bind(l,23936)),Promise.resolve().then(l.bind(l,11910)),Promise.resolve().then(l.bind(l,61500)),Promise.resolve().then(l.bind(l,62899)),Promise.resolve().then(l.bind(l,94230)),Promise.resolve().then(l.bind(l,21931)),Promise.resolve().then(l.bind(l,91450)),Promise.resolve().then(l.bind(l,7648)),Promise.resolve().then(l.bind(l,25086)),Promise.resolve().then(l.bind(l,28815)),Promise.resolve().then(l.bind(l,28058)),Promise.resolve().then(l.bind(l,81127)),Promise.resolve().then(l.bind(l,72908)),Promise.resolve().then(l.bind(l,36548)),Promise.resolve().then(l.bind(l,4823)),Promise.resolve().then(l.bind(l,90882)),Promise.resolve().then(l.bind(l,23409)),Promise.resolve().then(l.bind(l,51825)),Promise.resolve().then(l.bind(l,23615)),Promise.resolve().then(l.bind(l,28067)),Promise.resolve().then(l.bind(l,98)),Promise.resolve().then(l.bind(l,92622)),Promise.resolve().then(l.bind(l,21110)),Promise.resolve().then(l.bind(l,61929)),Promise.resolve().then(l.bind(l,98542)),Promise.resolve().then(l.bind(l,97677)),Promise.resolve().then(l.bind(l,4809))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>h});var r=l(95155),i=l(12115),n=l(35497),o=l(3534),t=l(43666),a=l(98500),d=l.n(a),m=l(5772);function c({toolId:e,tool:s,status:l}){let i=l?l.installed?l.has9Router?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,r.jsx)(d(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,r.jsx)(n.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,r.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,r.jsx)(m.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,r.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,r.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${i.cls}`,children:i.label})]}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function h({machineId:e}){let[s,l]=(0,i.useState)(!0),[a,d]=(0,i.useState)({});if((0,i.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&d(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]});let m=Object.entries(o.dM),x=Object.entries(o.wn);return(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:m.map(([e,s])=>(0,r.jsx)(c,{toolId:e,tool:s,status:a[e]},e))}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:x.map(([e,s])=>(0,r.jsx)(t.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[2574,3862,2649,5772,1321,5497,6069,8441,3794,7358],()=>e(e.s=48132)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{20957:(e,t,o)=>{"use strict";o.d(t,{bP:()=>r});let r={endpoint:{color:"coral",eyebrow:"Endpoint",title:"API endpoint",description:"One URL for every model your agents can reach.",icon:"api"},providers:{color:"blue",eyebrow:"Providers",title:"Provider connections",description:"Authenticate, rotate keys, and balance traffic across upstreams.",icon:"dns"},combos:{color:"purple",eyebrow:"Combos",title:"Model combos",description:"Stack models with weighted fallback and round-robin.",icon:"layers"},usage:{color:"cyan",eyebrow:"Analytics",title:"Usage & analytics",description:"Token spend, request volume, and per-provider breakdowns.",icon:"bar_chart"},quota:{color:"coral",eyebrow:"Quota",title:"Quota tracker",description:"Watch limits per provider before you hit them.",icon:"data_usage"},mitm:{color:"magenta",eyebrow:"Network",title:"MITM proxy",description:"Intercept tool traffic and re-route it through 9Router.",icon:"security"},"cli-tools":{color:"purple",eyebrow:"Tooling",title:"CLI tools",description:"Wire Claude Code, Codex, Cursor and friends to this instance.",icon:"terminal"},"proxy-pools":{color:"blue",eyebrow:"Network",title:"Proxy pools",description:"Outbound proxy pools with health probes and rotation.",icon:"lan"},skills:{color:"magenta",eyebrow:"Extensions",title:"Agent skills",description:"Drop-in skills your AI can pick up without an install step.",icon:"extension"},users:{color:"ink",eyebrow:"Admin",title:"User management",description:"Provision and manage dashboard accounts and roles.",icon:"group"},profile:{color:"ink",eyebrow:"Settings",title:"Settings",description:"Manage your preferences and instance configuration.",icon:"settings"},"console-log":{color:"cyan",eyebrow:"Diagnostics",title:"Console log",description:"Live server output streamed straight from the running process.",icon:"monitor"},translator:{color:"purple",eyebrow:"Diagnostics",title:"Translator",description:"Inspect request/response translation between formats.",icon:"translate"},"media-providers":{color:"blue",eyebrow:"Providers",title:"Media providers",description:"Embeddings, image, audio, and search providers.",icon:"perm_media"}}},47295:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>u});var r=o(95155),s=o(12115),n=o(44923),i=o(87256),a=o(39768),l=o(5020),c=o(35497),d=o(20957),m=o(11059);o(52679);let x=d.bP.combos,p=/^[a-zA-Z0-9_.\-]+$/;function u(){let[e,t]=(0,s.useState)([]),[o,n]=(0,s.useState)(!0),[i,a]=(0,s.useState)(!1),[l,d]=(0,s.useState)(null),[p,u]=(0,s.useState)([]),[h,g]=(0,s.useState)({}),[y,j]=(0,s.useState)(null),{copied:v,copy:w}=(0,m.C)();(0,s.useEffect)(()=>{k()},[]);let k=async()=>{try{let[e,o,r]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),s=await e.json(),n=await o.json(),i=r.ok?await r.json():{};e.ok&&t((s.combos||[]).filter(e=>!e.kind)),o.ok&&u(n.connections||[]),g(i.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},N=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await k(),a(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},C=async(e,t)=>{try{let o=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(o.ok)await k(),d(null);else{let e=await o.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},S=async o=>{j({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{j(null);try{(await fetch(`/api/combos/${o}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==o))}catch(e){console.log("Error deleting combo:",e)}}})},E=async(e,t)=>{try{let o={...h};t?o[e]={fallbackStrategy:"round-robin"}:delete o[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:o})}),g(o)}catch(e){console.log("Error updating combo strategy:",e)}};return o?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(c.Qv,{}),(0,r.jsx)(c.Qv,{})]}):(0,r.jsxs)("div",{"data-section":x.color,className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,r.jsx)(c.WB,{section:x.color,eyebrow:x.eyebrow,title:x.title,description:x.description,icon:x.icon,actions:(0,r.jsx)(c.$n,{icon:"add",onClick:()=>a(!0),variant:"secondary",children:"Create Combo"})}),0===e.length?(0,r.jsx)(c.Zp,{children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("div",{className:"section-mark inline-flex items-center justify-center w-16 h-16 rounded-full mb-4",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,r.jsx)("p",{className:"text-ink font-semibold tracking-tight mb-1",children:"No combos yet"}),(0,r.jsx)("p",{className:"text-sm text-steel mb-5",children:"Stack models with weighted fallback and round-robin."}),(0,r.jsx)(c.$n,{icon:"add",onClick:()=>a(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,r.jsx)("div",{className:"grid gap-3 sm:gap-4 md:grid-cols-2",children:e.map(e=>(0,r.jsx)(b,{combo:e,copied:v,onCopy:w,onEdit:()=>d(e),onDelete:()=>S(e.id),roundRobinEnabled:h[e.name]?.fallbackStrategy==="round-robin",onToggleRoundRobin:t=>E(e.name,t)},e.id))}),(0,r.jsx)(f,{isOpen:i,onClose:()=>a(!1),onSave:N,activeProviders:p},"create"),(0,r.jsx)(f,{isOpen:!!l,combo:l,onClose:()=>d(null),onSave:e=>C(l.id,e),activeProviders:p},l?.id||"new"),(0,r.jsx)(c.uo,{isOpen:!!y,onClose:()=>j(null),onConfirm:y?.onConfirm,title:y?.title||"Confirm",message:y?.message,variant:"danger"})]})}function b({combo:e,copied:t,onCopy:o,onEdit:s,onDelete:n,roundRobinEnabled:i,onToggleRoundRobin:a}){return(0,r.jsxs)(c.Zp,{padding:"sm",section:"purple",className:"group",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"section-mark size-9 rounded-xl flex items-center justify-center shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"layers"})}),(0,r.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-sm font-semibold text-ink",children:e.name}),(0,r.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,r.jsxs)("div",{className:"mr-1 flex items-center gap-1.5 rounded-full bg-mm-surface px-2.5 py-1",children:[(0,r.jsx)("span",{className:"text-[11px] font-medium text-steel",children:"Round Robin"}),(0,r.jsx)(c.lM,{size:"sm",checked:i,onChange:a})]}),(0,r.jsx)(h,{label:"Copy combo name",icon:t===`combo-${e.id}`?"check":"content_copy",tone:"blue",onClick:t=>{t.stopPropagation(),o(e.name,`combo-${e.id}`)}}),(0,r.jsx)(h,{label:"Edit",icon:"edit",tone:"coral",onClick:s}),(0,r.jsx)(h,{label:"Delete",icon:"delete",tone:"danger",onClick:n})]})]}),(0,r.jsxs)("div",{className:"mt-3 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,r.jsx)("span",{className:"text-xs text-stone italic",children:"No models"}):e.models.slice(0,3).map((e,t)=>(0,r.jsx)("code",{className:"max-w-full truncate rounded-md bg-mm-surface px-1.5 py-0.5 font-mono text-[11px] text-slate sm:max-w-[220px]",children:e},t)),e.models.length>3&&(0,r.jsxs)("span",{className:"text-[11px] font-medium text-steel",children:["+",e.models.length-3," more"]})]})]})}function h({label:e,icon:t,tone:o,onClick:s}){let n={blue:"text-brand-blue-mm hover:bg-brand-blue-mm/10",coral:"text-brand-coral-mm hover:bg-brand-coral-mm/10",danger:"text-danger hover:bg-danger/10"};return(0,r.jsxs)("span",{className:"relative group/btn inline-flex",children:[(0,r.jsx)("button",{onClick:s,className:`flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors ${n[o]||n.blue}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:t})}),(0,r.jsx)("span",{className:"pointer-events-none absolute -top-8 left-1/2 z-50 -translate-x-1/2 whitespace-nowrap rounded-md bg-[#1c1c1c] px-2 py-1 text-[11px] font-medium text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover/btn:opacity-100 dark:bg-white dark:text-[#1c1c1c]",children:e})]})}function g({id:e,index:t,model:o,isFirst:n,isLast:l,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:p,listeners:u,setNodeRef:b,transform:h,isDragging:f}=(0,i.gl)({id:e}),y={transform:a.Ks.Transform.toString(h),opacity:f?.4:1,zIndex:f?999:void 0},[j,v]=(0,s.useState)(!1),[w,k]=(0,s.useState)(o),N=()=>{let e=w.trim();e&&e!==o?c(e):k(o),v(!1)};return(0,r.jsxs)("div",{ref:b,style:y,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${f?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,r.jsx)("button",{...p,...u,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,r.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,r.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,r.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,r.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,r.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,r.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,r.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),j?(0,r.jsx)("input",{autoFocus:!0,value:w,onChange:e=>k(e.target.value),onBlur:N,onKeyDown:e=>{"Enter"===e.key&&N(),"Escape"===e.key&&(k(o),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,r.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>v(!0),title:"Click to edit",children:o}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,r.jsx)("button",{onClick:d,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,r.jsx)("button",{onClick:m,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,r.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function f({isOpen:e,combo:t,onClose:o,onSave:a,activeProviders:d,kindFilter:m=null}){let[x,u]=(0,s.useState)(t?.name||""),[b,h]=(0,s.useState)(t?.models||[]),[y,j]=(0,s.useState)(!1),[v,w]=(0,s.useState)(!1),[k,N]=(0,s.useState)(""),[C,S]=(0,s.useState)({}),E=(0,n.FR)((0,n.MS)(n.AN,{activationConstraint:{distance:5}}),(0,n.MS)(n.uN,{coordinateGetter:i.JR})),M=b.map((e,t)=>({uid:`item-${t}`,model:e})),P=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,s.useEffect)(()=>{e&&P()},[e]);let O=e=>e.trim()?p.test(e)?(N(""),!0):(N("Only letters, numbers, -, _ and . allowed"),!1):(N("Name is required"),!1),_=async()=>{O(x)&&(w(!0),await a({name:x.trim(),models:b}),w(!1))},D=!!t;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.aF,{isOpen:e,onClose:o,title:D?"Edit Combo":"Create Combo",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(c.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?O(t):N("")},placeholder:"my-combo",error:k}),(0,r.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===b.length?(0,r.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,r.jsx)(n.Mp,{sensors:E,collisionDetection:n.fp,onDragEnd:e=>{let{active:t,over:o}=e;if(o&&t.id!==o.id){let e=M.findIndex(e=>e.uid===t.id),r=M.findIndex(e=>e.uid===o.id);-1!==e&&-1!==r&&h(t=>(0,i.be)(t,e,r))}},modifiers:[l.FN,l.gj],children:(0,r.jsx)(i.gB,{items:M.map(e=>e.uid),strategy:i._G,children:(0,r.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:M.map(({uid:e,model:t},o)=>(0,r.jsx)(g,{id:e,index:o,model:t,isFirst:0===o,isLast:o===M.length-1,onEdit:e=>{let t=[...b];t[o]=e,h(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...b];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(o),onMoveDown:()=>(e=>{if(e===b.length-1)return;let t=[...b];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(o),onRemove:()=>{h(b.filter((e,t)=>t!==o))}},e))})})}),(0,r.jsxs)("button",{onClick:()=>j(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,r.jsx)(c.$n,{onClick:o,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,r.jsx)(c.$n,{onClick:_,fullWidth:!0,size:"sm",disabled:!x.trim()||!!k||v,children:v?"Saving...":D?"Save":"Create"})]})]})}),(0,r.jsx)(c.rq,{isOpen:y,onClose:()=>j(!1),onSelect:e=>{b.includes(e.value)||h([...b,e.value])},onDeselect:e=>{h(b.filter(t=>t!==e.value))},activeProviders:d,modelAliases:C,title:"Add Model to Combo",kindFilter:m,addedModelValues:b,closeOnSelect:!1})]})}},93327:(e,t,o)=>{Promise.resolve().then(o.bind(o,47295))}},e=>{e.O(0,[2574,3862,2649,7055,1321,5497,8441,3794,7358],()=>e(e.s=93327)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{20171:(e,s,n)=>{Promise.resolve().then(n.bind(n,44493)),Promise.resolve().then(n.bind(n,96748)),Promise.resolve().then(n.bind(n,56319)),Promise.resolve().then(n.bind(n,56061)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,40197)),Promise.resolve().then(n.bind(n,45455)),Promise.resolve().then(n.bind(n,30815)),Promise.resolve().then(n.bind(n,73579)),Promise.resolve().then(n.bind(n,92173)),Promise.resolve().then(n.bind(n,95088)),Promise.resolve().then(n.bind(n,24747)),Promise.resolve().then(n.bind(n,80752)),Promise.resolve().then(n.bind(n,23936)),Promise.resolve().then(n.bind(n,11910)),Promise.resolve().then(n.bind(n,61500)),Promise.resolve().then(n.bind(n,62899)),Promise.resolve().then(n.bind(n,94230)),Promise.resolve().then(n.bind(n,21931)),Promise.resolve().then(n.bind(n,91450)),Promise.resolve().then(n.bind(n,7648)),Promise.resolve().then(n.bind(n,25086)),Promise.resolve().then(n.bind(n,28815)),Promise.resolve().then(n.bind(n,28058)),Promise.resolve().then(n.bind(n,81127)),Promise.resolve().then(n.bind(n,72908)),Promise.resolve().then(n.bind(n,36548)),Promise.resolve().then(n.bind(n,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,23409)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,23615)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,92622)),Promise.resolve().then(n.bind(n,21110)),Promise.resolve().then(n.bind(n,61929)),Promise.resolve().then(n.bind(n,98542)),Promise.resolve().then(n.bind(n,97677)),Promise.resolve().then(n.bind(n,4809))},44493:(e,s,n)=>{"use strict";n.d(s,{default:()=>d});var r=n(95155),o=n(12115),i=n(35497),t=n(90620);let l={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function d(){let[e,s]=(0,o.useState)([]),[n,d]=(0,o.useState)(!1),h=(0,o.useRef)(null),m=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,o.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>d(!0),e.onmessage=e=>{let n=JSON.parse(e.data);"init"===n.type?s(n.logs.slice(-t.UY.maxLines)):"line"===n.type?s(e=>{let s=[...e,n.line];return s.length>t.UY.maxLines?s.slice(-t.UY.maxLines):s}):"clear"===n.type&&s([])},e.onerror=()=>d(!1),()=>e.close()},[]),(0,o.useEffect)(()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)},[e]),(0,r.jsx)("div",{className:"",children:(0,r.jsxs)(i.Zp,{children:[(0,r.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,r.jsx)(i.$n,{size:"sm",variant:"outline",icon:"delete",onClick:m,children:"Clear"})}),(0,r.jsx)("div",{ref:h,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,r.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,r.jsx)("div",{className:"space-y-0.5",children:e.map((e,s)=>{let n,o;return(0,r.jsx)("div",{children:(o=l[(n=e.match(/\[(\w+)\]/g))?n[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,r.jsx)("span",{className:o,children:e}))},s)})})})]})})}}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=20171)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{30601:(e,s,n)=>{Promise.resolve().then(n.bind(n,95907)),Promise.resolve().then(n.bind(n,96748)),Promise.resolve().then(n.bind(n,56319)),Promise.resolve().then(n.bind(n,56061)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,40197)),Promise.resolve().then(n.bind(n,45455)),Promise.resolve().then(n.bind(n,30815)),Promise.resolve().then(n.bind(n,73579)),Promise.resolve().then(n.bind(n,92173)),Promise.resolve().then(n.bind(n,95088)),Promise.resolve().then(n.bind(n,24747)),Promise.resolve().then(n.bind(n,80752)),Promise.resolve().then(n.bind(n,23936)),Promise.resolve().then(n.bind(n,11910)),Promise.resolve().then(n.bind(n,61500)),Promise.resolve().then(n.bind(n,62899)),Promise.resolve().then(n.bind(n,94230)),Promise.resolve().then(n.bind(n,21931)),Promise.resolve().then(n.bind(n,91450)),Promise.resolve().then(n.bind(n,7648)),Promise.resolve().then(n.bind(n,25086)),Promise.resolve().then(n.bind(n,28815)),Promise.resolve().then(n.bind(n,28058)),Promise.resolve().then(n.bind(n,81127)),Promise.resolve().then(n.bind(n,72908)),Promise.resolve().then(n.bind(n,36548)),Promise.resolve().then(n.bind(n,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,23409)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,23615)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,92622)),Promise.resolve().then(n.bind(n,21110)),Promise.resolve().then(n.bind(n,61929)),Promise.resolve().then(n.bind(n,98542)),Promise.resolve().then(n.bind(n,97677)),Promise.resolve().then(n.bind(n,4809))}},e=>{e.O(0,[2574,3862,2649,1321,5497,5907,8441,3794,7358],()=>e(e.s=30601)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{11593:(e,s,i)=>{Promise.resolve().then(i.bind(i,23879)),Promise.resolve().then(i.bind(i,96748)),Promise.resolve().then(i.bind(i,56319)),Promise.resolve().then(i.bind(i,56061)),Promise.resolve().then(i.bind(i,92542)),Promise.resolve().then(i.bind(i,84588)),Promise.resolve().then(i.bind(i,40197)),Promise.resolve().then(i.bind(i,45455)),Promise.resolve().then(i.bind(i,30815)),Promise.resolve().then(i.bind(i,73579)),Promise.resolve().then(i.bind(i,92173)),Promise.resolve().then(i.bind(i,95088)),Promise.resolve().then(i.bind(i,24747)),Promise.resolve().then(i.bind(i,80752)),Promise.resolve().then(i.bind(i,23936)),Promise.resolve().then(i.bind(i,11910)),Promise.resolve().then(i.bind(i,61500)),Promise.resolve().then(i.bind(i,62899)),Promise.resolve().then(i.bind(i,94230)),Promise.resolve().then(i.bind(i,21931)),Promise.resolve().then(i.bind(i,91450)),Promise.resolve().then(i.bind(i,7648)),Promise.resolve().then(i.bind(i,25086)),Promise.resolve().then(i.bind(i,28815)),Promise.resolve().then(i.bind(i,28058)),Promise.resolve().then(i.bind(i,81127)),Promise.resolve().then(i.bind(i,72908)),Promise.resolve().then(i.bind(i,36548)),Promise.resolve().then(i.bind(i,4823)),Promise.resolve().then(i.bind(i,90882)),Promise.resolve().then(i.bind(i,23409)),Promise.resolve().then(i.bind(i,51825)),Promise.resolve().then(i.bind(i,23615)),Promise.resolve().then(i.bind(i,28067)),Promise.resolve().then(i.bind(i,98)),Promise.resolve().then(i.bind(i,92622)),Promise.resolve().then(i.bind(i,21110)),Promise.resolve().then(i.bind(i,61929)),Promise.resolve().then(i.bind(i,98542)),Promise.resolve().then(i.bind(i,97677)),Promise.resolve().then(i.bind(i,4809))},23879:(e,s,i)=>{"use strict";i.d(s,{default:()=>d});var n=i(95155),t=i(12115),o=i(3534),r=i(28777),l=i(52679),a=i(43666);function d(){let[e,s]=(0,t.useState)([]),[i,d]=(0,t.useState)([]),[h,v]=(0,t.useState)({}),[m,b]=(0,t.useState)(!1),[c,P]=(0,t.useState)(null),[u,p]=(0,t.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,t.useEffect)(()=>{w(),f(),y(),x()},[]);let w=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let i=await e.json();s(i.connections||[])}}catch{}},f=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},y=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();v(s.aliases||{})}}catch{}},x=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();b(s.cloudEnabled||!1)}}catch{}},g=()=>e.filter(e=>!1!==e.isActive),S=Object.entries(o.wn);return(0,n.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,n.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,n.jsx)(a.tA,{apiKeys:i,cloudEnabled:m,onStatusChange:p}),(0,n.jsx)("div",{className:"grid gap-3 sm:gap-4",children:S.map(([e,s])=>(0,n.jsx)(a.kn,{tool:s,isExpanded:c===e,onToggle:()=>P(c===e?null:e),serverRunning:u.running,dnsActive:u.dnsStatus?.[e]||!1,hasCachedPassword:u.hasCachedPassword||!1,needsSudoPassword:!1!==u.needsSudoPassword,isWin:!0===u.isWin,apiKeys:i,activeProviders:g(),hasActiveProviders:g().some(e=>(0,r.KC)(e.provider).length>0||(0,l.mq)(e.provider)||(0,l.gb)(e.provider)),modelAliases:h,cloudEnabled:m,onDnsChange:e=>p(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}}},e=>{e.O(0,[2574,3862,2649,5772,1321,5497,6069,8441,3794,7358],()=>e(e.s=11593)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{60334:(e,s,_)=>{Promise.resolve().then(_.bind(_,95907))}},e=>{e.O(0,[2574,3862,2649,1321,5497,5907,8441,3794,7358],()=>e(e.s=60334)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{20957:(e,t,s)=>{"use strict";s.d(t,{bP:()=>a});let a={endpoint:{color:"coral",eyebrow:"Endpoint",title:"API endpoint",description:"One URL for every model your agents can reach.",icon:"api"},providers:{color:"blue",eyebrow:"Providers",title:"Provider connections",description:"Authenticate, rotate keys, and balance traffic across upstreams.",icon:"dns"},combos:{color:"purple",eyebrow:"Combos",title:"Model combos",description:"Stack models with weighted fallback and round-robin.",icon:"layers"},usage:{color:"cyan",eyebrow:"Analytics",title:"Usage & analytics",description:"Token spend, request volume, and per-provider breakdowns.",icon:"bar_chart"},quota:{color:"coral",eyebrow:"Quota",title:"Quota tracker",description:"Watch limits per provider before you hit them.",icon:"data_usage"},mitm:{color:"magenta",eyebrow:"Network",title:"MITM proxy",description:"Intercept tool traffic and re-route it through 9Router.",icon:"security"},"cli-tools":{color:"purple",eyebrow:"Tooling",title:"CLI tools",description:"Wire Claude Code, Codex, Cursor and friends to this instance.",icon:"terminal"},"proxy-pools":{color:"blue",eyebrow:"Network",title:"Proxy pools",description:"Outbound proxy pools with health probes and rotation.",icon:"lan"},skills:{color:"magenta",eyebrow:"Extensions",title:"Agent skills",description:"Drop-in skills your AI can pick up without an install step.",icon:"extension"},users:{color:"ink",eyebrow:"Admin",title:"User management",description:"Provision and manage dashboard accounts and roles.",icon:"group"},profile:{color:"ink",eyebrow:"Settings",title:"Settings",description:"Manage your preferences and instance configuration.",icon:"settings"},"console-log":{color:"cyan",eyebrow:"Diagnostics",title:"Console log",description:"Live server output streamed straight from the running process.",icon:"monitor"},translator:{color:"purple",eyebrow:"Diagnostics",title:"Translator",description:"Inspect request/response translation between formats.",icon:"translate"},"media-providers":{color:"blue",eyebrow:"Providers",title:"Media providers",description:"Embeddings, image, audio, and search providers.",icon:"perm_media"}}},26801:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var a=s(95155),r=s(12115),o=s(73321),i=s(35497),l=s(20957),n=s(81127),d=s(21931),c=s(31474),m=s(90620),x=s(93308),p=s(38202);function u(){let e=(0,o.useRouter)(),[t,s]=(0,r.useState)("en"),[u,b]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[y,f]=(0,r.useState)(!1),[j,w]=(0,r.useState)({fallbackStrategy:"fill-first"}),[N,v]=(0,r.useState)(!0),[C,k]=(0,r.useState)({current:"",new:"",confirm:""}),[S,P]=(0,r.useState)({type:"",message:""}),[I,O]=(0,r.useState)(!1),[L,R]=(0,r.useState)(!1),[D,T]=(0,r.useState)({type:"",message:""}),[U,A]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[M,E]=(0,r.useState)(""),[$,F]=(0,r.useState)({type:"",message:""}),[q,J]=(0,r.useState)(!1),[_,H]=(0,r.useState)(!1),[W,Z]=(0,r.useState)({type:"",message:""}),[B,K]=(0,r.useState)("/api/auth/oidc/callback"),[Q,z]=(0,r.useState)(!1),G=(0,r.useRef)(null),[V,Y]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[X,ee]=(0,r.useState)({type:"",message:""}),[et,es]=(0,r.useState)(!1),[ea,er]=(0,r.useState)(!1);(0,r.useEffect)(()=>{s(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[u]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{w(e),A({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),E(""),(e?.authMode==="oidc"||e?.authMode==="both")&&z(!0),Y({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),v(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),v(!1)})},[]),(0,r.useEffect)(()=>{K(`${window.location.origin}/api/auth/oidc/callback`)},[]);let eo=async e=>{if(e.preventDefault(),!0===j.outboundProxyEnabled){es(!0),ee({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:V.outboundProxyUrl,outboundNoProxy:V.outboundNoProxy})}),t=await e.json();e.ok?(w(e=>({...e,...t})),ee({type:"success",message:"Proxy settings applied"})):ee({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ee({type:"error",message:"An error occurred"})}finally{es(!1)}}},ei=async()=>{if(!0!==j.outboundProxyEnabled)return;let e=(V.outboundProxyUrl||"").trim();if(!e)return void ee({type:"error",message:"Please enter a Proxy URL to test"});er(!0),ee({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?ee({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ee({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ee({type:"error",message:"An error occurred"})}finally{er(!1)}},el=async e=>{es(!0),ee({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(w(e=>({...e,...s})),Y(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ee({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ee({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ee({type:"error",message:"An error occurred"})}finally{es(!1)}},en=async e=>{if(e.preventDefault(),C.new!==C.confirm)return void P({type:"error",message:"Passwords do not match"});O(!0),P({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:C.current,newPassword:C.new})}),t=await e.json();e.ok?(P({type:"success",message:"Password updated successfully"}),k({current:"",new:"",confirm:""})):P({type:"error",message:t.error||"Failed to update password"})}catch(e){P({type:"error",message:"An error occurred"})}finally{O(!1)}},ed=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&w(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},ec=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&w(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},em=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&w(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},ex=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&w(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&w(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},eu=(e,t)=>{A(s=>({...s,[e]:t}))},eb=async(e=U.authMode||"password")=>{let t=U.oidcIssuerUrl.trim(),s=U.oidcClientId.trim(),a=U.oidcScopes.trim(),r=U.oidcLoginLabel.trim(),o=M.trim();if("password"!==e&&(!t||!s||!o)&&!j.oidcConfigured)return void F({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});J(!0),F({type:"",message:""}),Z({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(w(e=>({...e,...n})),A({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),E(""),F({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):F({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){F({type:"error",message:"An error occurred"})}finally{J(!1)}},eh=async()=>{let e=U.oidcIssuerUrl.trim(),t=U.oidcClientId.trim(),s=U.oidcScopes.trim(),a=M.trim();if(!e||!t)return void Z({type:"error",message:"Issuer URL and client ID are required to test the connection."});H(!0),F({type:"",message:""}),Z({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:U.authMode||j.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:U.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void Z({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;Z({type:"success",message:e})}else Z({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){Z({type:"error",message:"An error occurred"})}finally{H(!1)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&w(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},ey=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();w(t)}catch(e){console.error("Failed to reload settings:",e)}},ef=async()=>{R(!0),T({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`9router-backup-${i}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),T({type:"success",message:"Database backup downloaded"})}catch(e){T({type:"error",message:e.message||"Failed to export database"})}finally{R(!1)}},ej=async e=>{let t=e.target.files?.[0];if(t){R(!0),T({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await ey(),T({type:"success",message:"Database imported successfully"})}catch(e){T({type:"error",message:e.message||"Invalid backup file"})}finally{G.current&&(G.current.value=""),R(!1)}}},ew=!0===j.enableObservability,eN=async()=>{f(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}f(!1),g(!1)},ev=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{"data-section":l.bP.profile.color,className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(i.WB,{section:l.bP.profile.color,eyebrow:l.bP.profile.eyebrow,title:l.bP.profile.title,description:l.bP.profile.description,icon:l.bP.profile.icon}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]})}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.9router/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"secondary",icon:"download",onClick:ef,loading:L,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>G.current?.click(),disabled:L,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:G,type:"file",accept:"application/json,.json",className:"hidden",onChange:ej})]}),D.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===D.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:D.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:p.h[t]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===j.requireLogin,onChange:()=>ep(!j.requireLogin),disabled:N})]}),!0===j.requireLogin&&(0,a.jsxs)("form",{onSubmit:en,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[j.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:C.current,onChange:e=>k({...C,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:C.new,onChange:e=>k({...C,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:C.confirm,onChange:e=>k({...C,confirm:e.target.value}),required:!0})]})]}),S.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===S.type?"text-red-500":"text-green-500"}`,children:S.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:j.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>z(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===j.authMode?"OIDC active":"both"===j.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:Q?"expand_less":"expand_more"})]}),Q&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=U.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>eu("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:N||q,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(i.pd,{placeholder:"https://auth.example.com/application/o/9router/",value:U.oidcIssuerUrl,onChange:e=>eu("oidcIssuerUrl",e.target.value),disabled:N||q})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(i.pd,{placeholder:"9router-dashboard",value:U.oidcClientId,onChange:e=>eu("oidcClientId",e.target.value),disabled:N||q})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:M,onChange:e=>E(e.target.value),disabled:N||q}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(i.pd,{placeholder:"openid profile email",value:U.oidcScopes,onChange:e=>eu("oidcScopes",e.target.value),disabled:N||q})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(i.pd,{placeholder:"Sign in with OIDC",value:U.oidcLoginLabel,onChange:e=>eu("oidcLoginLabel",e.target.value),disabled:N||q})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:B})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(i.$n,{type:"button",variant:"primary",loading:q,onClick:()=>eb(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:_,onClick:eh,className:"w-full sm:w-auto",children:"Test connection"})]}),W.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===W.type?"text-red-500":"text-green-500"}`,children:W.message}),$.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===$.type?"text-red-500":"text-green-500"}`,children:$.message}),"oidc"===j.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===j.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===j.fallbackStrategy,onChange:()=>ed("round-robin"===j.fallbackStrategy?"fill-first":"round-robin"),disabled:N})]}),"round-robin"===j.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:j.stickyRoundRobinLimit||3,onChange:e=>em(e.target.value),disabled:N,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===j.comboStrategy,onChange:()=>ec("round-robin"===j.comboStrategy?"fallback":"round-robin"),disabled:N})]}),"round-robin"===j.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"100",value:j.comboStickyRoundRobinLimit||1,onChange:e=>ex(e.target.value),disabled:N,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===j.fallbackStrategy?`Currently distributing requests across all available accounts with ${j.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===j.comboStrategy?` Combos rotate after ${j.comboStickyRoundRobinLimit||1} call${1===(j.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(i.lM,{checked:!0===j.outboundProxyEnabled,onChange:()=>el(!0!==j.outboundProxyEnabled),disabled:N||et})]}),!0===j.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:eo,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(i.pd,{placeholder:"http://127.0.0.1:7897",value:V.outboundProxyUrl,onChange:e=>Y(t=>({...t,outboundProxyUrl:e.target.value})),disabled:N||et}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(i.pd,{placeholder:"localhost,127.0.0.1",value:V.outboundNoProxy,onChange:e=>Y(t=>({...t,outboundNoProxy:e.target.value})),disabled:N||et}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(i.$n,{type:"button",variant:"secondary",loading:ea,disabled:N||et,onClick:ei,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:et,className:"w-full sm:w-auto",children:"Apply"})]})]}),X.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===X.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:X.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(i.lM,{checked:ew,onChange:eg,disabled:N})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>g(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:ev,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(d.default,{hideTrigger:!0,isOpen:u,onClose:e=>{b(!1),s(e)}}),(0,a.jsx)(n.ConfirmModal,{isOpen:h,onClose:()=>g(!1),onConfirm:eN,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:y})]})}}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=26801)),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{17721:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>A});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),p=s(28777),m=s(11059),x=s(73006);let u=new Map;async function h(e){if(!e?.url||!e?.type)return[];let t=u.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return u.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var f=s(14051),g=s.n(f);function y({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:p,onDisable:m}){let x="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):m?(0,a.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function b({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function v({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:p}){let[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[y,j]=(0,i.useState)(null),[N,k]=(0,i.useState)({}),w=async t=>{if(!y){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();k(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{k(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},A=async()=>{if(!m.trim()||u)return;let t=m.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},$=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=S(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},T=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:p?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:A,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(b,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>w(e):void 0,testStatus:N[e],isTesting:y===e},s))})]})}function j({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function N({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:p,onEdit:m,onDelete:x,oneByOneStatus:u=null,isSelected:h,onSelect:f}){let[g,y]=(0,i.useState)(!1),[b,v]=(0,i.useState)(!1),[k,w]=(0,i.useState)(!1),C=(0,i.useRef)(null),S=new Map((t||[]).map(e=>[e.id,e])),A=e.providerSpecificData?.proxyPoolId||null,$=A?S.get(A):null,T=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,O=!!A||T,P=$?`Pool: ${$.name}`:A?`Pool: ${A} (inactive/missing)`:T?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",I="";if($?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=$?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);I=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{I=t}}$?.noProxy||e.providerSpecificData?.connectionNoProxy;let E="default";$?.isActive===!0?E="success":(A||T)&&(E="error"),(0,i.useEffect)(()=>{if(!g)return;let e=e=>{C.current&&!C.current.contains(e.target)&&y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let R=async e=>{v(!0);try{await p("__none__"===e?null:e)}finally{v(!1),y(!1)}},D=e.authType||(s?"oauth":"apikey"),U="oauth"===D,_=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),q=U?_(e.email)?e.email:_(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[z,M]=(0,i.useState)(!1),K=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{M(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=K?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[K]);let F="unavailable"!==e.testStatus||z?e.testStatus:"active",L=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("tr",{className:`group transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsx)("td",{className:"py-3 px-3",children:(0,a.jsx)("input",{type:"checkbox",checked:h,onChange:f,className:"rounded border-black/20 dark:border-white/20 bg-transparent text-primary focus:ring-primary focus:ring-offset-0 cursor-pointer"})}),(0,a.jsx)("td",{className:"py-3 px-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 group/row",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted min-w-[24px] text-right",children:e.priority}),(0,a.jsxs)("div",{className:"flex flex-col opacity-0 group-hover/row:opacity-100 transition-opacity",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded transition-colors ${l?"text-text-muted/20 cursor-not-allowed":"text-text-muted/60 hover:text-primary hover:bg-primary/10"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xs",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded transition-colors ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted/60 hover:text-primary hover:bg-primary/10"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xs",children:"keyboard_arrow_down"})})]})]})}),(0,a.jsx)("td",{className:"py-3 px-4",children:(0,a.jsx)("p",{className:"text-sm font-medium truncate max-w-[200px]",children:q})}),(0,a.jsx)("td",{className:"py-3 px-4",children:(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:U?"OAuth":"cookie"===D?"Cookie":"API Key"})}),(0,a.jsx)("td",{className:"py-3 px-4",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===F||"success"===F?"success":"error"===F||"expired"===F||"unavailable"===F?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),O&&(0,a.jsx)(d.Ex,{variant:E,size:"sm",children:"Proxy"}),z&&!1!==e.isActive&&(0,a.jsx)(j,{until:K}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-[180px] truncate text-xs text-red-500",title:e.lastError,children:e.lastError}),L()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:L()}),O&&(0,a.jsxs)("div",{className:"w-full flex items-center gap-2 mt-1",children:[(0,a.jsx)("span",{className:"max-w-[160px] truncate text-[11px] text-text-muted",title:P,children:P}),I&&(0,a.jsx)("code",{className:"max-w-[140px] truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5",children:I})]})]})}),(0,a.jsx)("td",{className:"py-3 px-4 text-right",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:C,children:[(0,a.jsxs)("button",{onClick:()=>y(e=>!e),className:`inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-xs font-medium transition-colors cursor-pointer ${O?"bg-primary/10 text-primary hover:bg-primary/15":"bg-black/5 text-text-muted hover:bg-black/10 dark:bg-white/5 dark:hover:bg-white/10"}`,disabled:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:b?"progress_activity":"lan"}),(0,a.jsx)("span",{children:"Proxy"})]}),g&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[280px] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!A?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>R(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${A===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,className:"inline-flex items-center gap-1 rounded-full bg-black/5 px-3 py-1.5 text-xs font-medium text-text-muted hover:bg-black/10 hover:text-primary dark:bg-white/5 dark:hover:bg-white/10 cursor-pointer transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"edit"}),(0,a.jsx)("span",{children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"inline-flex items-center gap-1 rounded-full bg-red-500/10 px-3 py-1.5 text-xs font-medium text-red-500 hover:bg-red-500/15 cursor-pointer transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"}),(0,a.jsx)("span",{children:"Delete"})]}),(0,a.jsxs)("button",{onClick:async()=>{let t=!(e.isActive??!0);w(!0);try{await c(t)}finally{w(!1)}},disabled:k,className:`inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-xs font-medium cursor-pointer transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${e.isActive??!0?"bg-emerald-500/10 text-emerald-600 hover:bg-emerald-500/15 dark:text-emerald-400":"bg-black/5 text-text-muted hover:bg-black/10 dark:bg-white/5 dark:hover:bg-white/10"}`,children:[k?(0,a.jsx)("span",{className:"material-symbols-outlined text-sm animate-spin",children:"progress_activity"}):(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:e.isActive??!0?"check_circle":"cancel"}),(0,a.jsx)("span",{children:e.isActive??!0?"Active":"Inactive"})]})]})})]})}y.propTypes={model:g().shape({id:g().string.isRequired}).isRequired,fullModel:g().string.isRequired,alias:g().string,copied:g().string,onCopy:g().func.isRequired,testStatus:g().oneOf(["ok","error"]),isCustom:g().bool,isFree:g().bool,onDeleteAlias:g().func,onTest:g().func,isTesting:g().bool,onDisable:g().func},g().string.isRequired,g().string.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func,g().oneOf(["ok","error"]),g().bool,g().string.isRequired,g().object.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func.isRequired,v.propTypes={providerStorageAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,modelAliases:g().object.isRequired,copied:g().string,onCopy:g().func.isRequired,onSetAlias:g().func.isRequired,onDeleteAlias:g().func.isRequired,connections:g().arrayOf(g().shape({id:g().string,isActive:g().bool})).isRequired,isAnthropic:g().bool},j.propTypes={until:g().string.isRequired},N.propTypes={connection:g().shape({id:g().string,name:g().string,email:g().string,displayName:g().string,modelLockUntil:g().string,testStatus:g().string,isActive:g().bool,lastError:g().string,priority:g().number,globalPriority:g().number}).isRequired,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string,proxyUrl:g().string,noProxy:g().string,isActive:g().bool})),isOAuth:g().bool.isRequired,isFirst:g().bool.isRequired,isLast:g().bool.isRequired,onMoveUp:g().func.isRequired,onMoveDown:g().func.isRequired,onToggleActive:g().func.isRequired,onUpdateProxy:g().func,onEdit:g().func.isRequired,onDelete:g().func.isRequired,oneByOneStatus:g().shape({state:g().string,error:g().string}),isSelected:g().bool.isRequired,onSelect:g().func.isRequired};let k=`name1|sk-key1
2
+ name2|sk-key2
3
+ sk-key-only-auto-named`;function w({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:p,proxyPools:m,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===n,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",N="azure"===t,C="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,A=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[$,T]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[O,P]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,E]=(0,i.useState)({accountId:""}),[R,D]=(0,i.useState)(A),[U,_]=(0,i.useState)(!1),[q,z]=(0,i.useState)(null),[M,K]=(0,i.useState)(!1),[F,L]=(0,i.useState)("single"),[J,W]=(0,i.useState)(""),[B,H]=(0,i.useState)(null),V=()=>y&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:N?{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization}:C?{accountId:I.accountId}:S&&R?{region:R}:void 0,Q=async()=>{_(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})}),s=await e.json();z(s.valid?"success":"failed")}catch{z("failed")}finally{_(!1)}},G=async()=>{if(t&&(y||$.apiKey)&&(y||$.name)&&(!l||$.defaultModel.trim())){K(!0);try{let e=!1;try{_(!0),z(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,z(e?"success":"failed")}catch{z("failed")}finally{_(!1)}await u({name:$.name||(y?"Ollama Local":""),apiKey:$.apiKey,defaultModel:l?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===g?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{K(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),H(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),H({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{L("single"),H(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{L("bulk"),H(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:k,value:J,onChange:e=>W(e.target.value)}),B&&(0,a.jsxs)("div",{className:`text-sm font-medium ${B.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",B.success," added",B.failed>0?`, ✗ ${B.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:$.name,onChange:e=>T({...$,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>T({...$,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:b?"text":"password",value:$.apiKey,onChange:e=>T({...$,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:!$.apiKey||U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,p&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:R,onChange:e=>D(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>T({...$,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),q&&(0,a.jsx)(d.Ex,{variant:"success"===q?"success":"error",children:"success"===q?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>E({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>P({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>P({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:O.apiVersion,onChange:e=>P({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:O.organization,onChange:e=>P({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>T({...$,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>T({...$,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:G,fullWidth:!0,disabled:M||!y&&(!$.name||!$.apiKey)||l&&!$.defaultModel.trim()||N&&(!O.azureEndpoint||!O.deployment||!O.organization)||C&&!I.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function C({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function S({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,p]=(0,i.useState)(null),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),p(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){p("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();p(a.ok?"ok":"error"),x(a.error||"")}catch(e){p("error"),x(e.message)}}},y=async()=>{let e=f(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),p(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:m||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}function A(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[u,f]=(0,i.useState)([]),[g,b]=(0,i.useState)(!0),[j,k]=(0,i.useState)(null),[A,$]=(0,i.useState)([]),[T,O]=(0,i.useState)(!1),[P,I]=(0,i.useState)(!1),[E,R]=(0,i.useState)(!1),[D,U]=(0,i.useState)(""),[_,q]=(0,i.useState)(!1),[z,M]=(0,i.useState)(!1),[K,F]=(0,i.useState)(!1),[L,J]=(0,i.useState)(null),[W,B]=(0,i.useState)({}),[H,V]=(0,i.useState)(!1),[Q,G]=(0,i.useState)({}),[Z,X]=(0,i.useState)(""),[Y,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,ei]=(0,i.useState)([]),[el,er]=(0,i.useState)("__none__"),[en,eo]=(0,i.useState)(!1),[ed,ec]=(0,i.useState)(null),[ep,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)("auto"),[eh,ef]=(0,i.useState)([]),[eg,ey]=(0,i.useState)([]),[eb,ev]=(0,i.useState)([]),[ej,eN]=(0,i.useState)(null),[ek,ew]=(0,i.useState)(!1),[eC,eS]=(0,i.useState)(!1),[eA,e$]=(0,i.useState)(!1),[eT,eO]=(0,i.useState)(null),[eP,eI]=(0,i.useState)({}),[eE,eR]=(0,i.useState)(null),eD=(0,i.useRef)(!1),[eU,e_]=(0,i.useState)(!1),[eq,ez]=(0,i.useState)(!0),{copied:eM,copy:eK}=(0,m.C)(),eF="ag_risk_confirmed",eL=()=>{O(!0)},eJ=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eF)?ew(!0):eV?eL():(U(""),R(!0))},eW=()=>{U(""),R(!0)},eB=j?{id:j.id,name:j.name||("anthropic-compatible"===j.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===j.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===j.type?"AC":"OC",apiType:j.apiType,baseUrl:j.baseUrl,type:j.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],eH=eB?.authModes||[],eV=!!c.zN[r]||!!c.IS[r]||eH.includes("oauth"),eQ=!!c.fg[r]||eH.includes("apikey"),eG=!!c.IS[r]?.noAuth,eZ=(0,p.KC)(r),eX=(0,c.wG)(r),eY=(0,c.mq)(r),e0=(0,c.gb)(r),e1=eY||e0,e2=!e1&&eV&&eQ,e5="xai"===r?"Grok Build OAuth":"OAuth",e3="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let e4=e1?r:eX,e6=e1?j?.prefix||r:eX,e8=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e4)}`,{cache:"no-store"}),t=await e.json();e.ok&&ev(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[e4]),e7=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e4,ids:[e]})})).ok&&await e8()}catch(e){console.log("Error disabling model:",e)}},e9=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e4)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await e8()}catch(e){console.log("Error enabling model:",e)}},te=async e=>{e.length&&eN({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eN(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e4,ids:e})})).ok&&await e8()}catch(e){console.log("Error disabling all models:",e)}}})},tt=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e4)}`,{method:"DELETE"})).ok&&await e8()}catch(e){console.log("Error enabling all models:",e)}},ts=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&B(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&ey(e.models)}).catch(()=>{})},[r]);let ta=(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(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);f(e)}s.ok&&$(n.proxyPools||[]);let d=(o.providerStrategies||{})[r]||{};ec(d.fallbackStrategy||null),em(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[r]||{};if(eu(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&e1)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===r)||null))break}k(e)}}catch(e){console.log("Error fetching connections:",e)}finally{b(!1)}},[r,e1]),ti=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(k(s.node),await ta(),M(!1))}catch(e){console.log("Error updating provider node:",e)}},tl=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[r]:l[r]=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)}};(0,i.useEffect)(()=>{ta(),ts(),e8()},[ta,ts,e8]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(ef)},[r]);let tr=async(e,t,s=eX)=>{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 ts();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tn=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ts()}catch(e){console.log("Error deleting alias:",e)}},to=async()=>{if(eU)return;let e=u.find(e=>!1!==e.isActive);if(!e)return void alert((0,x.Tl)("Please add an active Qoder connection first"));e_(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,x.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,x.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\//,""),a=`${e4}/${s}`;!Object.values(W).includes(a)&&(W[s]||(await tr(s,s,e4),i+=1))}0===i?alert((0,x.Tl)("All models already exist, no new models added")):alert((0,x.Tl)("Successfully added")+` ${i} `+(0,x.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,x.Tl)("Error fetching models")+": "+e.message)}finally{e_(!1)}},td=async()=>{if(eC||0===u.length)return;let e=Object.fromEntries(u.map(e=>[e.id,{state:"queued",error:null}]));eD.current=!1,eS(!0),e$(!1),eO(null),eI(e),eR({total:u.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<u.length;e+=1){if(eD.current){eR({total:u.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=u[e];eO(a.id),eI(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,eI(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eI(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eR({total:u.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<u.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eO(null),eS(!1),e$(!1),eD.current=!1}},tc=async e=>{eN({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eN(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&f(u.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tp=()=>{ta(),O(!1)},tm=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await ta(),R(!1);return}U(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tx=async e=>{try{(await fetch(`/api/providers/${L.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await ta(),q(!1))}catch(e){console.log("Error updating connection:",e)}},tu=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&f(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},th=async(e,t)=>{let s=[...u];[s[e],s[t]]=[s[t],s[e]],f(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 ta()}},tf=u.filter(e=>ea.includes(e.id)),tg=u.length>0&&ea.length===u.length;(0,i.useEffect)(()=>{ei(e=>e.filter(e=>u.some(t=>t.id===e)))},[u]),(()=>{if(0===tf.length)return;let e=new Set(tf.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=A.find(e=>e.id===t);return s?.name}})();let ty=()=>{en||F(!1)},tb=async e=>{eo(!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 ta(),F(!1)}finally{eo(!1)}},tv=e=>tb(u.map(t=>({connectionId:t.id,proxyPoolId:e}))),tj=u.length>5,tN=tj&&eq?u.slice(0,5):u,tk=(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-black/[0.08] dark:border-white/[0.08]",children:[(0,a.jsx)("th",{className:"text-left py-3 px-3",children:(0,a.jsx)("input",{type:"checkbox",checked:tg,onChange:()=>{tg?ei([]):ei(u.map(e=>e.id))},className:"rounded border-black/20 dark:border-white/20 bg-transparent text-primary focus:ring-primary focus:ring-offset-0 cursor-pointer"})}),(0,a.jsx)("th",{className:"text-center text-xs font-semibold text-text-muted uppercase tracking-wider pb-3 px-2",children:"#"}),(0,a.jsx)("th",{className:"text-left text-xs font-semibold text-text-muted uppercase tracking-wider pb-3 px-4",children:"Name"}),(0,a.jsx)("th",{className:"text-left text-xs font-semibold text-text-muted uppercase tracking-wider pb-3 px-4",children:"Identity"}),(0,a.jsx)("th",{className:"text-left text-xs font-semibold text-text-muted uppercase tracking-wider pb-3 px-4",children:"Status"}),(0,a.jsx)("th",{className:"text-right text-xs font-semibold text-text-muted uppercase tracking-wider pb-3 px-4",children:"Actions"})]})}),(0,a.jsx)("tbody",{children:tN.map((e,t)=>{let s;return(0,a.jsx)(N,{connection:e,proxyPools:A,isOAuth:eV,isFirst:0===t,isLast:t===tN.length-1,onMoveUp:()=>th(t,t-1),onMoveDown:()=>th(t,t+1),onToggleActive:t=>tu(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&f(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:()=>{J(e),q(!0)},onDelete:()=>tc(e.id),oneByOneStatus:eP[e.id]||null,isSelected:(s=e.id,ea.includes(s)),onSelect:()=>{var t;return t=e.id,void ei(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])}},e.id)})})]})}),tw=A.filter(e=>!0===e.isActive),tC=(0,a.jsx)(d.aF,{isOpen:K,onClose:ty,title:`Apply Proxy (${u.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=A.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tb(u.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:en||0===tw.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,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:()=>tv(null),disabled:en,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,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)"})]}),A.map(e=>(0,a.jsxs)("button",{onClick:()=>tv(e.id),disabled:en||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,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))]}),en&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:ty,variant:"ghost",fullWidth:!0,disabled:en,children:"Cancel"})]})}),tS=async e=>{if(!Y){ee(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e4}/${e}`})}),s=await t.json();G(t=>({...t,[e]:s.ok?"ok":"error"})),X(s.ok?"":s.error||"Model not reachable")}catch{G(t=>({...t,[e]:"error"})),X("Network error")}finally{ee(null)}}};return g?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):eB?(0,a.jsxs)("div",{"data-section":"blue",className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{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:"relative overflow-hidden rounded-3xl p-8 sm:p-10",style:{background:`linear-gradient(135deg, ${eB.color}20 0%, ${eB.color}10 50%, transparent 100%)`},children:[(0,a.jsx)("div",{className:"absolute -top-24 -right-24 w-64 h-64 rounded-full opacity-20 blur-3xl",style:{backgroundColor:eB.color}}),(0,a.jsx)("div",{className:"absolute -bottom-32 -left-32 w-80 h-80 rounded-full opacity-10 blur-3xl",style:{backgroundColor:eB.color}}),(0,a.jsxs)("div",{className:"relative flex min-w-0 items-center gap-5 sm:gap-6",children:[(0,a.jsx)("div",{className:"relative flex size-16 shrink-0 items-center justify-center rounded-2xl shadow-lg sm:size-20",style:{background:`linear-gradient(135deg, ${eB.color}30, ${eB.color}15)`,border:`2px solid ${eB.color}40`},children:H?(0,a.jsx)("span",{className:"text-xl font-bold sm:text-2xl",style:{color:eB.color},children:eB.textIcon||eB.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:eY&&eB.apiType?"responses"===eB.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":e0?"/providers/anthropic-m.png":`/providers/${eB.id}.png`,alt:eB.name,width:80,height:80,className:"max-h-20 max-w-20 rounded-xl object-contain sm:max-h-20 sm:max-w-20",sizes:"80px",onError:()=>V(!0)})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap mb-2",children:[(0,a.jsx)("h1",{className:"truncate text-3xl font-bold tracking-tight sm:text-4xl",children:eB.name}),(eB.notice?.apiKeyUrl||eB.notice?.signupUrl||eB.website)&&(0,a.jsxs)("a",{href:eB.notice?.apiKeyUrl||eB.notice?.signupUrl||eB.website,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-full px-3 py-1 text-xs font-medium transition-colors hover:opacity-80",style:{backgroundColor:`${eB.color}20`,color:eB.color,border:`1px solid ${eB.color}30`},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),eB.notice?.apiKeyUrl?"Get API Key":"Sign up"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-sm text-text-muted",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"link"}),u.length," connection",1===u.length?"":"s"]}),u.filter(e=>!1!==e.isActive).length>0&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),u.filter(e=>!1!==e.isActive).length," active"]})]})]})]})]})]}),eB.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:eB.deprecationNotice})]}),eB.notice?.text&&!eB.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:eB.notice.text}),eB.notice.apiKeyUrl&&(0,a.jsx)("a",{href:eB.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 →"})]}),e1&&j&&(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.jsxs)("div",{className:"flex items-center gap-2.5 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"api"})}),(0,a.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:e0?"Anthropic Compatible Details":"OpenAI Compatible Details"})]}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[e0?"Messages API":"responses"===j.apiType?"Responses API":"Chat Completions"," ","\xb7"," ",(j.baseUrl||"").replace(/\/$/,""),"/",e0?"messages":"responses"===j.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:()=>{U(""),R(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>M(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eN({title:"Delete Compatible Node",message:`Delete this ${e0?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eN(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),eG?(0,a.jsx)(d.gw,{providerId:r}):(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.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("div",{className:"section-mark flex items-center justify-center w-11 h-11 rounded-2xl",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"hub"})}),(0,a.jsx)("h2",{className:"text-2xl font-semibold tracking-tight",children:"Connections"}),ea.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=[...ea];0!==e.length&&eN({title:"Delete Connections",message:`Delete ${e.length} selected connection${1===e.length?"":"s"}? This cannot be undone.`,onConfirm:async()=>{eN(null);try{let t=await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"DELETE"}).then(t=>({id:e,ok:t.ok})).catch(()=>({id:e,ok:!1})))),s=new Set(t.filter(e=>e.ok).map(e=>e.id));f(e=>e.filter(e=>!s.has(e.id))),ei([]);let a=t.filter(e=>!e.ok).length;a>0&&alert(`${a} connection(s) could not be deleted.`)}catch(e){console.log("Error bulk deleting connections:",e)}}})},children:["Delete ",ea.length]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[u.length>0&&(0,a.jsxs)(a.Fragment,{children:[A.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>F(!0),children:"Apply Proxy"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:td,disabled:eC,children:eC?"Testing...":"Test One-by-One"}),eC&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eC&&(eD.current=!0,e$(!0))},disabled:eA,children:eA?"Stopping...":"Stop"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pl-1",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ed,onChange:e=>{let t=e?"round-robin":null,s=e?ep||"1":ep;e&&!ep&&em("1"),ec(t),tl(t,s)}}),"round-robin"===ed&&(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:ep,onChange:e=>{var t;em(t=e.target.value),tl("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),e2?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:eJ,children:e5}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:eW,children:e3})]}):(0,a.jsxs)(a.Fragment,{children:[!e1&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>I(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{eV?eJ():eW()},children:e1?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})]})]}),0===u.length?(0,a.jsxs)("div",{className:"flex items-center gap-3 py-6",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:eV?"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"}),e2&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",e5," or ",e3,"."]})]})]}):(0,a.jsxs)(a.Fragment,{children:[eE&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eE.total]}),(0,a.jsxs)("span",{children:["Completed: ",eE.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eE.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eE.failed]}),eE.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eC&&eT&&(0,a.jsxs)("span",{children:["Running: ",u.find(e=>e.id===eT)?.name||eT]})]})}),tk,tj&&(0,a.jsx)("div",{className:"mt-3 flex justify-center",children:(0,a.jsxs)("button",{type:"button",onClick:()=>ez(e=>!e),className:"inline-flex items-center gap-1.5 rounded-full border border-black/10 dark:border-white/10 px-4 py-1.5 text-xs font-medium text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:eq?"expand_more":"expand_less"}),eq?`Show all ${u.length}`:"Collapse to 5"]})})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("div",{className:"section-mark flex items-center justify-center w-11 h-11 rounded-2xl",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"deployed_code"})}),(0,a.jsx)("h2",{className:"text-2xl font-semibold tracking-tight",children:"Available Models"})]}),!e1&&(e=[...eZ,...eg.filter(e=>!eZ.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eb.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eb.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tt,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>te(e),children:"Disable All"})]}))]}),!!Z&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Z}),(()=>{let e,t,s;if(e1)return(0,a.jsx)(v,{providerStorageAlias:e4,providerDisplayAlias:e6,modelAliases:W,copied:eM,onCopy:eK,onSetAlias:tr,onDeleteAlias:tn,connections:u,isAnthropic:e0});let i=[...eZ,...eg.filter(e=>!eZ.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eb),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(W).filter(([e,t])=>{let s=`${e4}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return eB.passthroughModels?!eZ.some(e=>e.id===a):!eZ.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${e4}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(y,{model:{id:e.id},fullModel:`${e6}/${e.id}`,alias:e.alias,copied:eM,onCopy:eK,onSetAlias:()=>{},onDeleteAlias:()=>tn(e.alias),testStatus:Q[e.id],onTest:u.length>0||eG?()=>tS(e.id):void 0,isTesting:Y===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${e4}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(W).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(y,{model:e,fullModel:`${e6}/${e.id}`,alias:i,copied:eM,onCopy:eK,onSetAlias:t=>tr(e.id,t,e4),onDeleteAlias:()=>tn(i),testStatus:Q[e.id],onTest:u.length>0||eG?()=>tS(e.id):void 0,isTesting:Y===e.id,isFree:e.isFree,onDisable:()=>e7(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>es(!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"===r&&u.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:to,disabled:eU,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eU?{animation:"spin 1s linear infinite"}:void 0,children:eU?"progress_activity":"download"}),eU?(0,x.Tl)("Fetching..."):(0,x.Tl)("Fetch Qoder Models")]}),eh.length>0&&(e=new Set(Object.values(W)),t=new Set(eZ.map(e=>e.id)),0===(s=eh.filter(s=>!e.has(`${e4}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tr(e.id,t,e4)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),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:()=>e9(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tC,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:T,providerInfo:eB,onSuccess:tp,onClose:()=>O(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:T,onSuccess:tp,onClose:()=>O(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:T,providerInfo:eB,onSuccess:tp,onClose:()=>O(!1)}):(0,a.jsx)(d.LF,{isOpen:T,provider:r,providerInfo:eB,onSuccess:tp,onClose:()=>O(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:P,onSuccess:()=>{ta(),I(!1)},onClose:()=>I(!1)}),(0,a.jsx)(w,{isOpen:E,provider:r,providerName:eB.name,isCompatible:e1,isAnthropic:e0,authType:eB?.authType,authHint:eB?.authHint,website:eB?.website,proxyPools:A,error:D,onSave:tm,onBulkDone:ta,onClose:()=>{U(""),R(!1)}}),(0,a.jsx)(d.wI,{isOpen:_,connection:L,proxyPools:A,onSave:tx,onClose:()=>q(!1)}),e1&&(0,a.jsx)(C,{isOpen:z,node:j,onSave:ti,onClose:()=>M(!1),isAnthropic:e0}),!e1&&(0,a.jsx)(S,{isOpen:et,providerAlias:e4,providerDisplayAlias:e6,onSave:async e=>{let t=eB?.passthroughModels?e.split("/").pop():e;await tr(e,t,e4),es(!1)},onClose:()=>es(!1)}),(0,a.jsx)(d.uo,{isOpen:ek,onClose:()=>ew(!1),onConfirm:()=>{(window.localStorage.setItem(eF,"true"),ew(!1),eV)?eL():eW()},title:"Risk Notice",message:eB?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!ej,onClose:()=>eN(null),onConfirm:ej?.onConfirm,title:ej?.title||"Confirm",message:ej?.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)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}w.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerName:g().string,isCompatible:g().bool,isAnthropic:g().bool,authType:g().string,authHint:g().string,website:g().string,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),error:g().string,onSave:g().func.isRequired,onBulkDone:g().func,onClose:g().func.isRequired},C.propTypes={isOpen:g().bool.isRequired,node:g().shape({id:g().string,name:g().string,prefix:g().string,apiType:g().string,baseUrl:g().string}),onSave:g().func.isRequired,onClose:g().func.isRequired,isAnthropic:g().bool},S.propTypes={isOpen:g().bool.isRequired,providerAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,onSave:g().func.isRequired,onClose:g().func.isRequired}},56528:(e,t,s)=>{Promise.resolve().then(s.bind(s,17721))}},e=>{e.O(0,[2574,3862,2649,5772,1321,5497,8441,3794,7358],()=>e(e.s=56528)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{11366:(e,t,s)=>{Promise.resolve().then(s.bind(s,52154))},20957:(e,t,s)=>{"use strict";s.d(t,{bP:()=>r});let r={endpoint:{color:"coral",eyebrow:"Endpoint",title:"API endpoint",description:"One URL for every model your agents can reach.",icon:"api"},providers:{color:"blue",eyebrow:"Providers",title:"Provider connections",description:"Authenticate, rotate keys, and balance traffic across upstreams.",icon:"dns"},combos:{color:"purple",eyebrow:"Combos",title:"Model combos",description:"Stack models with weighted fallback and round-robin.",icon:"layers"},usage:{color:"cyan",eyebrow:"Analytics",title:"Usage & analytics",description:"Token spend, request volume, and per-provider breakdowns.",icon:"bar_chart"},quota:{color:"coral",eyebrow:"Quota",title:"Quota tracker",description:"Watch limits per provider before you hit them.",icon:"data_usage"},mitm:{color:"magenta",eyebrow:"Network",title:"MITM proxy",description:"Intercept tool traffic and re-route it through 9Router.",icon:"security"},"cli-tools":{color:"purple",eyebrow:"Tooling",title:"CLI tools",description:"Wire Claude Code, Codex, Cursor and friends to this instance.",icon:"terminal"},"proxy-pools":{color:"blue",eyebrow:"Network",title:"Proxy pools",description:"Outbound proxy pools with health probes and rotation.",icon:"lan"},skills:{color:"magenta",eyebrow:"Extensions",title:"Agent skills",description:"Drop-in skills your AI can pick up without an install step.",icon:"extension"},users:{color:"ink",eyebrow:"Admin",title:"User management",description:"Provision and manage dashboard accounts and roles.",icon:"group"},profile:{color:"ink",eyebrow:"Settings",title:"Settings",description:"Manage your preferences and instance configuration.",icon:"settings"},"console-log":{color:"cyan",eyebrow:"Diagnostics",title:"Console log",description:"Live server output streamed straight from the running process.",icon:"monitor"},translator:{color:"purple",eyebrow:"Diagnostics",title:"Translator",description:"Inspect request/response translation between formats.",icon:"translate"},"media-providers":{color:"blue",eyebrow:"Providers",title:"Media providers",description:"Embeddings, image, audio, and search providers.",icon:"perm_media"}}},52154:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s(95155),a=s(12115),l=s(14051),i=s.n(l),n=s(35497),o=s(20957),c=s(57250),d=s(90620),p=s(52679),m=s(98500),x=s.n(m),u=s(65921),h=s(38003);let f={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function b(){let[e,t]=(0,a.useState)(null),[s,l]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[c,d]=(0,a.useState)(null),p=(0,a.useRef)(null),m=(0,u.i)(),x=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let s=await e.json();t(s)}}catch{}finally{l(!1)}},[]);(0,a.useEffect)(()=>{x();let e=setInterval(x,3e4);return()=>clearInterval(e)},[x]),(0,a.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let h=async(e,t)=>{d(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(m.success(`Cooldown cleared for ${t}`),await x()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{d(null)}};if(s)return null;let b=e?.models||[],g=0===(e?.unavailableCount||b.filter(e=>"available"!==e.status).length),v={};return b.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";v[t]||(v[t]=[]),v[t].push(e)}),(0,r.jsx)("div",{className:"relative",ref:p,children:i&&(0,r.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:g?"#22c55e":"#f59e0b"},children:g?"verified":"warning"}),(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,r.jsx)("button",{onClick:x,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,r.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:g?(0,r.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,r.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(v).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=f[e.status]||f.unknown,s=c===`${e.provider}:${e.model}`;return(0,r.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,r.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(e.provider,e.model),disabled:s,className:"text-[10px] px-1.5! py-0.5! ml-2",children:s?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})})}function g(e,t,s){let a=[];if(e>0&&a.push((0,r.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=s?`${t} Error (${s})`:`${t} Error`;a.push((0,r.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===a.length?(0,r.jsx)("span",{className:"text-text-muted",children:"No connections"}):a}function v(){let e,t,[s,l]=(0,a.useState)([]),[i,c]=(0,a.useState)([]),[m,x]=(0,a.useState)(!0),[f,g]=(0,a.useState)(!1),[v,k]=(0,a.useState)(!1),[T,A]=(0,a.useState)(!1),[I,S]=(0,a.useState)(null),[E,P]=(0,a.useState)(null),O=(0,u.i)(),R=(0,h.C)(e=>e.query),U=(0,h.C)(e=>e.register),$=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>(U("Search providers..."),()=>$()),[U,$]);let _=e=>!R.trim()||e.toLowerCase().includes(R.trim().toLowerCase());(0,a.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),s=await e.json(),r=await t.json();e.ok&&l(s.connections||[]),t.ok&&c(r.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{x(!1)}})()},[]);let q=(e,t)=>{let r=s.filter(s=>s.provider===e&&s.authType===t),a=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"},l=r.filter(e=>{let t=a(e);return"active"===t||"success"===t}).length,i=r.filter(e=>{let t=a(e);return"error"===t||"expired"===t||"unavailable"===t}),n=i.length,o=r.length,c=o>0&&r.every(e=>!1===e.isActive),d=i.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:l,error:n,total:o,errorCode:d?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let s=Number(e.errorCode);if(Number.isFinite(s)&&s>=400)return String(s);let r=function(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}(e.lastError);if("401"===r||"403"===r)return"AUTH";if(r&&"ERR"!==r)return r;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(d):null,errorTime:d?.lastErrorAt?function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let r=Math.floor(s/24);return`${r}d ago`}(d.lastErrorAt):null,allDisabled:c}},D=async(e,t,r)=>{let a=s.filter(s=>s.provider===e&&s.authType===t);l(s=>s.map(s=>s.provider===e&&s.authType===t?{...s,isActive:r}:s)),await Promise.allSettled(a.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})})))},z=async(e,t=null)=>{if(!I){S("provider"===e?t:e),P(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),r=await s.json();if(P(r),r.summary){let{passed:e,failed:t,total:s}=r.summary;0===t?O.success(`All ${s} tests passed`):O.warning(`${e}/${s} passed, ${t} failed`)}}catch(e){P({error:"Test request failed"}),O.error("Provider test failed")}finally{S(null)}}},M=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=>_(e.name)),F=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>_(e.name)),L=Object.entries(d.zN).filter(([,e])=>!e.hidden&&_(e.name)),K=Object.entries(p.IS).filter(([,e])=>!e.hidden&&_(e.name)),W=Object.entries(p.nJ).filter(([,e])=>!e.hidden&&_(e.name)),J=(e=Object.entries(d.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&_(e.name)),t="apikey",[...e].sort(([e,s],[r,a])=>{let l=q(e,t),i=q(r,t),n=+(l.connected>0),o=+(i.connected>0);return n!==o?o-n:(s.name||"").localeCompare(a.name||"")})),H=!!R.trim(),Q=H||f?J:J.slice(0,20),B=J.length-20;if(m)return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]});let V=L.length>0||K.length>0||W.length>0||J.length>0||M.length>0||F.length>0;return(0,r.jsxs)("div",{"data-section":o.bP.providers.color,className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,r.jsx)(n.WB,{section:o.bP.providers.color,eyebrow:o.bP.providers.eyebrow,title:o.bP.providers.title,description:o.bP.providers.description,icon:o.bP.providers.icon}),!V&&(0,r.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["Custom Providers (OpenAI/Anthropic Compatible)"," "]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,r.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>A(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>k(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===M.length&&0===F.length?(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2 border border-dashed border-border rounded-xl text-text-muted text-sm",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"extension"}),(0,r.jsx)("span",{children:"No custom providers — use buttons above to add OpenAI/Anthropic compatible endpoints"})]}):(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:[...M,...F].map(e=>(0,r.jsx)(j,{providerId:e.id,provider:e,stats:q(e.id,"apikey"),authType:"compatible",onToggle:t=>D(e.id,"apikey",t)},e.id))})]}),L.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsx)(b,{}),(0,r.jsxs)("button",{onClick:()=>z("oauth"),disabled:!!I,className:`cursor-pointer flex w-full items-center justify-center gap-1.5 rounded-full border px-3 py-2 text-xs font-semibold transition-colors sm:w-auto sm:py-1.5 ${"oauth"===I?"bg-blue-500/20 border-blue-500/40 text-blue-400 animate-pulse":"bg-blue-500/10 border-blue-500/20 text-blue-400 hover:bg-blue-500/15"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===I?" animate-spin":""}`,children:"play_arrow"}),"oauth"===I?"Testing...":"Test All"]})]})]}),(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:L.map(([e,t])=>(0,r.jsx)(y,{providerId:e,provider:t,stats:q(e,"oauth"),authType:"oauth",onToggle:t=>D(e,"oauth",t)},e))})]}),(K.length>0||W.length>0)&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,r.jsxs)("button",{onClick:()=>z("free"),disabled:!!I,className:`cursor-pointer flex w-full items-center justify-center gap-1.5 rounded-full border px-3 py-2 text-xs font-semibold transition-colors sm:w-auto sm:py-1.5 ${"free"===I?"bg-blue-500/20 border-blue-500/40 text-blue-400 animate-pulse":"bg-blue-500/10 border-blue-500/20 text-blue-400 hover:bg-blue-500/15"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===I?" animate-spin":""}`,children:"play_arrow"}),"free"===I?"Testing...":"Test All"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[K.map(([e,t])=>(0,r.jsx)(y,{providerId:e,provider:t,stats:q(e,"oauth"),authType:"free",onToggle:t=>D(e,"oauth",t)},e)),W.map(([e,t])=>(0,r.jsx)(j,{providerId:e,provider:t,stats:q(e,"apikey"),authType:"apikey",onToggle:t=>D(e,"apikey",t)},e))]})]}),J.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,r.jsxs)("button",{onClick:()=>z("apikey"),disabled:!!I,className:`cursor-pointer flex w-full items-center justify-center gap-1.5 rounded-full border px-3 py-2 text-xs font-semibold transition-colors sm:w-auto sm:py-1.5 ${"apikey"===I?"bg-blue-500/20 border-blue-500/40 text-blue-400 animate-pulse":"bg-blue-500/10 border-blue-500/20 text-blue-400 hover:bg-blue-500/15"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===I?" animate-spin":""}`,children:"play_arrow"}),"apikey"===I?"Testing...":"Test All"]})]}),(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:Q.map(([e,t])=>(0,r.jsx)(j,{providerId:e,provider:t,stats:q(e,"apikey"),authType:"apikey",onToggle:t=>D(e,"apikey",t)},e))}),!H&&!f&&B>0&&(0,r.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg 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,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",J.length," providers"]})]}),(0,r.jsx)(w,{isOpen:v,onClose:()=>k(!1),onCreated:e=>{c(t=>[...t,e]),k(!1)}}),(0,r.jsx)(N,{isOpen:T,onClose:()=>A(!1),onCreated:e=>{c(t=>[...t,e]),A(!1)}}),E&&(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>P(null),children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,r.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,r.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,r.jsx)("button",{onClick:()=>P(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,r.jsx)("div",{className:"p-5",children:(0,r.jsx)(C,{results:E})})]})]})]})}function y({providerId:e,provider:t,stats:s,authType:a,onToggle:l}){let{connected:i,error:o,errorCode:d,errorTime:p,allDisabled:m}=s,u=!!t.noAuth;return(0,r.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${m?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.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,r.jsx)(c.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,r.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:m?(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):u?(0,r.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):(0,r.jsxs)(r.Fragment,{children:[g(i,o,d),p&&(0,r.jsx)("span",{className:"text-text-muted",children:p})]})})]})]}),(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!m)},children:(0,r.jsx)(n.lM,{size:"sm",checked:!m,onChange:()=>{},title:m?"Enable provider":"Disable provider"})})})]})})})}function j({providerId:e,provider:t,stats:s,authType:a,onToggle:l}){let{connected:i,error:o,errorCode:d,errorTime:m,allDisabled:u}=s,h=e.startsWith(p.JH),f=e.startsWith(p.DI);return(0,r.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.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,r.jsx)(c.A,{src:h?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":f?"/providers/anthropic-m.png":`/providers/${t.id}.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,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,r.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:u?(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):(0,r.jsxs)(r.Fragment,{children:[g(i,o,d),h&&(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),f&&(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),m&&(0,r.jsx)("span",{className:"text-text-muted",children:m})]})})]})]}),(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!u)},children:(0,r.jsx)(n.lM,{size:"sm",checked:!u,onChange:()=>{},title:u?"Enable provider":"Disable provider"})})})]})})})}function w({isOpen:e,onClose:t,onCreated:s}){let[l,i]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[o,c]=(0,a.useState)(!1),[d,p]=(0,a.useState)(""),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),[f,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{i(e=>({...e,baseUrl:"https://api.openai.com/v1"}))},[l.apiType]);let g=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){c(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,apiType:l.apiType,baseUrl:l.baseUrl,type:"openai-compatible"})}),t=await e.json();e.ok&&(s(t.node),i({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),p(""),b(null))}catch(e){console.log("Error creating OpenAI Compatible node:",e)}finally{c(!1)}}},v=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:d,type:"openai-compatible",modelId:m.trim()||void 0})}),t=await e.json();b(t)}catch{b({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add OpenAI Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:l.apiType,onChange:e=>i({...l,apiType:e.target.value})}),(0,r.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:d,onChange:e=>p(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:m,onChange:e=>x(e.target.value),placeholder:"e.g. gpt-4, claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:v,disabled:!d||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:g,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function N({isOpen:e,onClose:t,onCreated:s}){let[l,i]=(0,a.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[o,c]=(0,a.useState)(!1),[d,p]=(0,a.useState)(""),[m,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),[f,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{e&&(b(null),p(""),x(""))},[e]);let g=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){c(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,baseUrl:l.baseUrl,type:"anthropic-compatible"})}),t=await e.json();e.ok&&(s(t.node),i({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),p(""),b(null))}catch(e){console.log("Error creating Anthropic Compatible node:",e)}finally{c(!1)}}},v=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:d,type:"anthropic-compatible",modelId:m.trim()||void 0})}),t=await e.json();b(t)}catch{b({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add Anthropic Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.anthropic.com/v1",hint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:d,onChange:e=>p(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:m,onChange:e=>x(e.target.value),placeholder:"e.g. claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:v,disabled:!d||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:g,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function C({results:e}){if(e.error&&!e.results)return(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,r.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:s}=e,a=e.results||[];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,r.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[s]||s," Test"]}),(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,r.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),a.map((e,t)=>(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,r.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,r.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,r.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,r.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,r.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===a.length&&(0,r.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}y.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},j.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},w.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},N.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},C.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=11366)),_N_E=e.O()}]);
@@ -0,0 +1,4 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{20957:(e,t,r)=>{"use strict";r.d(t,{bP:()=>o});let o={endpoint:{color:"coral",eyebrow:"Endpoint",title:"API endpoint",description:"One URL for every model your agents can reach.",icon:"api"},providers:{color:"blue",eyebrow:"Providers",title:"Provider connections",description:"Authenticate, rotate keys, and balance traffic across upstreams.",icon:"dns"},combos:{color:"purple",eyebrow:"Combos",title:"Model combos",description:"Stack models with weighted fallback and round-robin.",icon:"layers"},usage:{color:"cyan",eyebrow:"Analytics",title:"Usage & analytics",description:"Token spend, request volume, and per-provider breakdowns.",icon:"bar_chart"},quota:{color:"coral",eyebrow:"Quota",title:"Quota tracker",description:"Watch limits per provider before you hit them.",icon:"data_usage"},mitm:{color:"magenta",eyebrow:"Network",title:"MITM proxy",description:"Intercept tool traffic and re-route it through 9Router.",icon:"security"},"cli-tools":{color:"purple",eyebrow:"Tooling",title:"CLI tools",description:"Wire Claude Code, Codex, Cursor and friends to this instance.",icon:"terminal"},"proxy-pools":{color:"blue",eyebrow:"Network",title:"Proxy pools",description:"Outbound proxy pools with health probes and rotation.",icon:"lan"},skills:{color:"magenta",eyebrow:"Extensions",title:"Agent skills",description:"Drop-in skills your AI can pick up without an install step.",icon:"extension"},users:{color:"ink",eyebrow:"Admin",title:"User management",description:"Provision and manage dashboard accounts and roles.",icon:"group"},profile:{color:"ink",eyebrow:"Settings",title:"Settings",description:"Manage your preferences and instance configuration.",icon:"settings"},"console-log":{color:"cyan",eyebrow:"Diagnostics",title:"Console log",description:"Live server output streamed straight from the running process.",icon:"monitor"},translator:{color:"purple",eyebrow:"Diagnostics",title:"Translator",description:"Inspect request/response translation between formats.",icon:"translate"},"media-providers":{color:"blue",eyebrow:"Providers",title:"Media providers",description:"Embeddings, image, audio, and search providers.",icon:"perm_media"}}},57076:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var o=r(95155),l=r(12115),s=r(35497),a=r(20957),i=r(65921);let n=a.bP["proxy-pools"];function c(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}function d(){let[e,t]=(0,l.useState)([]),[r,a]=(0,l.useState)(!0),[d,p]=(0,l.useState)(!1),[x,m]=(0,l.useState)(!1),[h,u]=(0,l.useState)(!1),[y,g]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!1),[j,v]=(0,l.useState)(!1),[k,w]=(0,l.useState)(null),[N,C]=(0,l.useState)(c()),[P,$]=(0,l.useState)(""),[D,A]=(0,l.useState)({vercelToken:"",projectName:"vercel-relay"}),[S,T]=(0,l.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[I,E]=(0,l.useState)({denoToken:"",orgDomain:"",projectName:""}),[U,O]=(0,l.useState)(!1),[z,W]=(0,l.useState)(!1),[F,R]=(0,l.useState)(!1),[_,L]=(0,l.useState)(null),[q,M]=(0,l.useState)([]),[V,B]=(0,l.useState)(!1),[J,G]=(0,l.useState)({current:0,total:0}),[H,Q]=(0,l.useState)(!1),[Y,K]=(0,l.useState)(null),Z=(0,l.useRef)(null),X=(0,i.i)();(0,l.useEffect)(()=>{let e=e=>{Z.current&&!Z.current.contains(e.target)&&v(!1)};return j&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let ee=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),r=await e.json();e.ok&&t(r.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{a(!1)}},[]);(0,l.useEffect)(()=>{ee()},[ee]);let et=()=>{w(null),C(c())},er=()=>{et(),p(!0)},eo=()=>{p(!1),et()},el=async()=>{let e={name:N.name.trim(),proxyUrl:N.proxyUrl.trim(),noProxy:N.noProxy.trim(),isActive:!0===N.isActive,strictProxy:!0===N.strictProxy};if(e.name&&e.proxyUrl){O(!0);try{let t=!!k,r=await fetch(t?`/api/proxy-pools/${k.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok)await ee(),eo(),X.success(k?"Proxy pool updated":"Proxy pool created");else{let e=await r.json();X.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{O(!1)}}},es=async e=>{K({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{K(null);try{let r=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(r.ok){t(t=>t.filter(t=>t.id!==e.id)),X.success("Proxy pool deleted");return}let o=await r.json();409===r.status?X.warning(`Cannot delete: ${o.boundConnectionCount||0} connection(s) are still using this pool.`):X.error(o.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),X.error("Failed to delete proxy pool")}}})},ea=async e=>{L(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),r=await t.json();if(!t.ok)return void X.error(r.error||"Failed to test proxy");await ee(),X.success(r.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),X.error("Failed to test proxy")}finally{L(null)}},ei=async e=>{let r=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:r}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),X.error("Failed to update active state"))}catch(r){console.log("Error toggling active:",r),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},en=e.length>0&&q.length===e.length,ec=()=>M([]),ed=async t=>{let r=q.length>0?q:e.map(e=>e.id);if(0!==r.length){Q(!0);try{let e=0,o=0;for(let l of r)try{(await fetch(`/api/proxy-pools/${l}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?e+=1:o+=1}catch{o+=1}await ee(),X.success(`${t?"Activated":"Deactivated"} ${e}${o?`, failed ${o}`:""}`)}finally{Q(!1)}}},ep=async()=>{0!==q.length&&K({title:"Delete Proxy Pools",message:`Delete ${q.length} proxy pool(s)?`,onConfirm:async()=>{K(null),Q(!0);try{let e=0,t=0,r=0;for(let o of q)try{let l=await fetch(`/api/proxy-pools/${o}`,{method:"DELETE"});l.ok?e+=1:409===l.status?t+=1:r+=1}catch{r+=1}await ee(),ec(),X.success(`Deleted ${e}${t?`, ${t} bound`:""}${r?`, ${r} failed`:""}`)}finally{Q(!1)}}})},ex=async()=>{let t=q.length>0?e.filter(e=>q.includes(e.id)):e;if(0===t.length)return;B(!0),G({current:0,total:t.length});let r=0,o=[],l=0,s=[...t],a=async()=>{for(;s.length>0;){let e=s.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),l=await t.json();t.ok&&l.ok?r+=1:o.push(e.id)}catch{o.push(e.id)}finally{G({current:l+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},a)),await ee(),B(!1),G({current:0,total:0}),o.length>0?K({title:"Disable Dead Proxies",message:`Alive: ${r}, Dead: ${o.length}.
2
+
3
+ Disable ${o.length} dead proxies?`,onConfirm:async()=>{K(null),Q(!0);try{for(let e of o)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await ee(),X.success(`Disabled ${o.length} dead proxies`)}finally{Q(!1)}}}):X.success(`Health check done. Alive: ${r}, Dead: ${o.length}`)};(0,l.useEffect)(()=>{M(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let em=()=>{z||m(!1)},eh=()=>{F||u(!1)},eu=()=>{F||g(!1)},ey=()=>{F||b(!1)},eg=async()=>{if(D.vercelToken.trim()){R(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}),t=await e.json();e.ok?(await ee(),eh(),X.success(`Deployed: ${t.deployUrl}`)):X.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),X.error("Deploy failed")}finally{R(!1)}}},ef=async()=>{if(S.accountId.trim()&&S.apiToken.trim()){R(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),t=await e.json();e.ok?(await ee(),eu(),X.success(`Deployed: ${t.deployUrl}`)):X.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),X.error("Deploy failed")}finally{R(!1)}}},eb=async()=>{if(I.denoToken.trim()){R(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)}),t=await e.json();e.ok?(await ee(),ey(),X.success(`Deployed: ${t.deployUrl}`)):X.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),X.error("Deploy failed")}finally{R(!1)}}},ej=async()=>{let t=P.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void X.warning("Please paste at least one proxy line.");let r=[],o=[];if(t.forEach((e,t)=>{try{let o=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),r=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${r}`}}let r=t.split(":");if(4===r.length){let[e,t,o,l]=r;if(!e||!t||!o||!l)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(o)}:${encodeURIComponent(l)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);o&&r.push({...o,lineNumber:t+1})}catch(e){o.push(`Line ${t+1}: ${e.message}`)}}),o.length>0)return void X.error(`Invalid proxy format:
4
+ ${o.join("\n")}`);W(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),o=0,l=0,s=0;for(let e of r){let r=`${e.proxyUrl}|||`;if(t.has(r)){l+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(o+=1,t.add(r)):s+=1}await ee(),m(!1),X.success(`Batch import completed: Created ${o}, Skipped ${l}, Failed ${s}`)}catch(e){console.log("Error batch importing proxies:",e),X.error("Batch import failed")}finally{W(!1)}},ev=(0,l.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return r?(0,o.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,o.jsx)(s.Qv,{}),(0,o.jsx)(s.Qv,{})]}):(0,o.jsxs)("div",{"data-section":n.color,className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,o.jsx)(s.WB,{section:n.color,eyebrow:n.eyebrow,title:n.title,description:n.description,icon:n.icon,actions:(0,o.jsx)(s.$n,{size:"sm",icon:"add",variant:"secondary",onClick:er,children:"Add Pool"})}),(0,o.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-end",children:(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,o.jsxs)("div",{className:"relative",ref:Z,children:[(0,o.jsxs)(s.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>v(!j),children:["Deploy Relay",(0,o.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,o.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-xl border border-black/10 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-zinc-900 sm:left-auto sm:right-0",children:[(0,o.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),g(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,o.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,o.jsxs)("button",{onClick:()=>{A({vercelToken:"",projectName:"vercel-relay"}),u(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,o.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,o.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),b(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,o.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]})]})]}),(0,o.jsx)(s.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{$(""),m(!0)},children:"Batch Import"}),(0,o.jsx)(s.$n,{size:"sm",icon:"add",onClick:er,children:"Add Proxy Pool"})]})}),(0,o.jsxs)(s.Zp,{children:[(0,o.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,o.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,o.jsx)("input",{type:"checkbox",checked:en,onChange:()=>M(en?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),en?"Unselect all":"Select all"]}),(0,o.jsxs)(s.Ex,{variant:"default",children:["Total: ",e.length]}),(0,o.jsxs)(s.Ex,{variant:"success",children:["Active: ",ev]})]}),(q.length>0||V)&&(0,o.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,o.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,o.jsx)("span",{className:"text-xs font-medium text-primary",children:q.length>0?`${q.length} selected`:"All pools"}),(0,o.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,o.jsx)(s.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||H||0===e.length,children:V?`Checking ${J.current}/${J.total}`:"Health Check"}),q.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:H||V,children:"Activate"}),(0,o.jsx)(s.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:H||V,children:"Deactivate"}),(0,o.jsx)(s.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ep,disabled:H||V,children:"Delete"}),(0,o.jsx)(s.$n,{size:"sm",variant:"ghost",onClick:ec,disabled:H||V,children:"Clear"})]})]})]}),0===e.length?(0,o.jsxs)("div",{className:"text-center py-10",children:[(0,o.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,o.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,o.jsx)(s.$n,{icon:"add",onClick:er,children:"Add Proxy Pool"})]}):(0,o.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,o.jsxs)("div",{className:"section-hover-row flex flex-col gap-3 -mx-2 sm:-mx-4 px-2 sm:px-4 py-3 rounded-xl sm:flex-row sm:items-center sm:justify-between",children:[(0,o.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,o.jsx)("input",{type:"checkbox",checked:q.includes(e.id),onChange:()=>{let t;return t=e.id,M(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-hairline accent-ink"}),(0,o.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,o.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-semibold text-ink sm:max-w-[18rem]",children:e.name}),(0,o.jsx)(s.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,o.jsx)(s.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,o.jsx)(s.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,o.jsx)(s.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,o.jsxs)(s.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,o.jsx)("p",{className:"text-xs font-mono text-slate truncate mt-1.5",children:e.proxyUrl}),e.noProxy?(0,o.jsxs)("p",{className:"text-xs text-steel truncate mt-0.5",children:["No proxy: ",(0,o.jsx)("span",{className:"font-mono",children:e.noProxy})]}):null,(0,o.jsxs)("p",{className:"text-[11px] text-stone mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,o.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,o.jsx)(s.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ei(e),title:e.isActive?"Disable":"Enable"}),(0,o.jsx)("button",{onClick:()=>ea(e.id),className:"p-2 rounded-full text-steel hover:bg-mm-surface hover:text-ink transition-colors disabled:opacity-50",title:"Test proxy",disabled:_===e.id,children:(0,o.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:_===e.id?{animation:"spin 1s linear infinite"}:void 0,children:_===e.id?"progress_activity":"science"})}),(0,o.jsx)("button",{onClick:()=>{w(e),C(c(e)),p(!0)},className:"p-2 rounded-full text-steel hover:bg-mm-surface hover:text-ink transition-colors",title:"Edit",children:(0,o.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,o.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded-full text-steel hover:bg-danger/10 hover:text-danger transition-colors",title:"Delete",children:(0,o.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,o.jsx)(s.aF,{isOpen:x,title:"Batch Import Proxies",onClose:em,children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,o.jsx)("textarea",{value:P,onChange:e=>$(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,o.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,o.jsx)(s.$n,{fullWidth:!0,onClick:ej,disabled:!P.trim()||z,children:z?"Importing...":"Import"}),(0,o.jsx)(s.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:z,children:"Cancel"})]})]})}),(0,o.jsx)(s.aF,{isOpen:h,title:"Deploy Vercel Relay",onClose:eh,children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,o.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,o.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,o.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,o.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,o.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,o.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,o.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,o.jsx)(s.pd,{label:"Vercel API Token",value:D.vercelToken,onChange:e=>A(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,o.jsxs)(o.Fragment,{children:["Token is used once for deployment and not stored. ",(0,o.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,o.jsx)(s.pd,{label:"Project Name",value:D.projectName,onChange:e=>A(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,o.jsx)(s.$n,{fullWidth:!0,onClick:eg,disabled:!D.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,o.jsx)(s.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,o.jsx)(s.aF,{isOpen:y,title:"Deploy Cloudflare Relay",onClose:eu,children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,o.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,o.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,o.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,o.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,o.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,o.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,o.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,o.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,o.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,o.jsxs)("li",{children:["Go to ",(0,o.jsx)("b",{children:"My Profile"})," → ",(0,o.jsx)("b",{children:"API Tokens"})," → ",(0,o.jsx)("b",{children:"Create Token"})]}),(0,o.jsxs)("li",{children:["Scroll down to ",(0,o.jsx)("b",{children:"Custom Token"})," and click ",(0,o.jsx)("b",{children:"Get started"})]}),(0,o.jsxs)("li",{children:["Under ",(0,o.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,o.jsxs)("li",{children:["Under ",(0,o.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,o.jsx)("i",{children:"Your Account Name"})]}),(0,o.jsxs)("li",{children:["Click ",(0,o.jsx)("b",{children:"Continue to summary"})," → ",(0,o.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,o.jsx)(s.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,o.jsx)(o.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,o.jsx)(s.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,o.jsxs)(o.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,o.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,o.jsx)(s.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,o.jsx)(s.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,o.jsx)(s.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,o.jsx)(s.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:ey,children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,o.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,o.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,o.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,o.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,o.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,o.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,o.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,o.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,o.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,o.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,o.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,o.jsxs)("li",{children:["Go to ",(0,o.jsx)("b",{children:"console.deno.com"})]}),(0,o.jsxs)("li",{children:["Select your ",(0,o.jsx)("b",{children:"Organization"})," → ",(0,o.jsx)("b",{children:"Settings"})," → ",(0,o.jsx)("b",{children:"Organization Tokens"})]}),(0,o.jsxs)("li",{children:["Create a ",(0,o.jsx)("b",{children:"Organization Token"})," (prefix ",(0,o.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,o.jsx)(s.pd,{label:"Deno Deploy API Token",value:I.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,o.jsx)(o.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,o.jsx)(s.pd,{label:"Organization Domain",value:I.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,o.jsx)(s.pd,{label:"App Name",value:I.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,o.jsx)(s.$n,{fullWidth:!0,onClick:eb,disabled:!I.denoToken.trim()||!I.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,o.jsx)(s.$n,{fullWidth:!0,variant:"ghost",onClick:ey,disabled:F,children:"Cancel"})]})]})}),(0,o.jsx)(s.aF,{isOpen:d,title:k?"Edit Proxy Pool":"Add Proxy Pool",onClose:eo,children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(s.pd,{label:"Name",value:N.name,onChange:e=>C(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,o.jsx)(s.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>C(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,o.jsx)(s.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>C(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,o.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,o.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,o.jsx)(s.lM,{checked:!0===N.isActive,onChange:()=>C(e=>({...e,isActive:!e.isActive})),disabled:U})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,o.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,o.jsx)(s.lM,{checked:!0===N.strictProxy,onChange:()=>C(e=>({...e,strictProxy:!e.strictProxy})),disabled:U})]}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,o.jsx)(s.$n,{fullWidth:!0,onClick:el,disabled:!N.name.trim()||!N.proxyUrl.trim()||U,children:U?"Saving...":"Save"}),(0,o.jsx)(s.$n,{fullWidth:!0,variant:"ghost",onClick:eo,disabled:U,children:"Cancel"})]})]})}),(0,o.jsx)(s.uo,{isOpen:!!Y,onClose:()=>K(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}},69550:(e,t,r)=>{Promise.resolve().then(r.bind(r,57076))}},e=>{e.O(0,[2574,3862,2649,1321,5497,8441,3794,7358],()=>e(e.s=69550)),_N_E=e.O()}]);