@hilbras/omnihilbras 2.9.1 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1095) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +24 -30
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +23 -23
  5. package/app/.next-cli-build/react-loadable-manifest.json +2 -2
  6. package/app/.next-cli-build/routes-manifest.json +0 -36
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +16 -16
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +5 -5
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  77. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.rsc +9 -9
  89. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +9 -9
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +9 -9
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js +3 -2
  93. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +2 -1
  103. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +3 -3
  147. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  195. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/chat/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/chat/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/models/test-batch/route.js +2 -2
  221. package/app/.next-cli-build/server/app/api/models/test-batch/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  251. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  257. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/web-session/[id]/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/web-session/[id]/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  297. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  299. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +2 -2
  301. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  309. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  311. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  315. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  319. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  321. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/settings/route.js +2 -1
  329. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  335. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  357. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/rate-limit/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/rate-limit/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  393. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  435. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  437. package/app/.next-cli-build/server/app/callback.html +1 -1
  438. package/app/.next-cli-build/server/app/callback.rsc +9 -9
  439. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +9 -9
  440. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +9 -9
  442. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +14 -14
  444. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +14 -14
  445. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +14 -14
  446. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +27 -28
  449. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +16 -16
  450. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +27 -28
  451. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/combos.rsc +14 -14
  454. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +14 -14
  455. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +14 -14
  456. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +27 -28
  459. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +16 -16
  460. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +27 -28
  461. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +14 -14
  464. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +14 -14
  465. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +14 -14
  466. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +15 -15
  469. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +15 -15
  470. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +15 -15
  471. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/profile.rsc +14 -14
  474. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +14 -14
  475. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +14 -14
  476. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +14 -14
  479. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +14 -14
  480. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +14 -14
  481. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/providers.rsc +14 -14
  484. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +14 -14
  485. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +14 -14
  486. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +14 -14
  489. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +14 -14
  490. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +14 -14
  491. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  492. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +14 -14
  494. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +14 -14
  495. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +14 -14
  496. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  497. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/quota.rsc +15 -15
  499. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +15 -15
  500. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +15 -15
  501. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +9 -9
  507. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +9 -9
  508. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +9 -9
  510. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/skills.rsc +14 -14
  512. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +14 -14
  513. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +14 -14
  514. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +14 -14
  517. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +14 -14
  518. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +14 -14
  519. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/translator.rsc +14 -14
  522. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +14 -14
  523. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +14 -14
  524. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/usage.rsc +14 -14
  527. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +14 -14
  528. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +14 -14
  529. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard.rsc +15 -15
  532. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +15 -15
  533. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +15 -15
  534. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  535. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  536. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/index.html +1 -1
  538. package/app/.next-cli-build/server/app/index.rsc +9 -9
  539. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +9 -9
  540. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +9 -9
  541. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  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 +10 -10
  547. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +10 -10
  548. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +10 -10
  550. package/app/.next-cli-build/server/app/login/page.js +1 -1
  551. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  552. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  553. package/app/.next-cli-build/server/app/login.html +1 -1
  554. package/app/.next-cli-build/server/app/login.rsc +11 -11
  555. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +11 -11
  556. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +11 -11
  558. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  559. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  560. package/app/.next-cli-build/server/app/page.js +1 -1
  561. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  562. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  563. package/app/.next-cli-build/server/app-paths-manifest.json +24 -30
  564. package/app/.next-cli-build/server/chunks/1159.js +1 -1
  565. package/app/.next-cli-build/server/chunks/1204.js +1 -1
  566. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  567. package/app/.next-cli-build/server/chunks/1640.js +1 -1
  568. package/app/.next-cli-build/server/chunks/1679.js +1 -1
  569. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  570. package/app/.next-cli-build/server/chunks/24.js +1 -1
  571. package/app/.next-cli-build/server/chunks/2617.js +1 -1
  572. package/app/.next-cli-build/server/chunks/2881.js +1 -1
  573. package/app/.next-cli-build/server/chunks/3104.js +1 -1
  574. package/app/.next-cli-build/server/chunks/3118.js +1 -1
  575. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  576. package/app/.next-cli-build/server/chunks/3817.js +1 -1
  577. package/app/.next-cli-build/server/chunks/3845.js +1 -1
  578. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  579. package/app/.next-cli-build/server/chunks/3966.js +1 -1
  580. package/app/.next-cli-build/server/chunks/412.js +1 -1
  581. package/app/.next-cli-build/server/chunks/4123.js +3 -2
  582. package/app/.next-cli-build/server/chunks/4199.js +1 -1
  583. package/app/.next-cli-build/server/chunks/4217.js +1 -1
  584. package/app/.next-cli-build/server/chunks/4293.js +1 -1
  585. package/app/.next-cli-build/server/chunks/436.js +1 -1
  586. package/app/.next-cli-build/server/chunks/4693.js +132 -0
  587. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  588. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  589. package/app/.next-cli-build/server/chunks/4785.js +2 -2
  590. package/app/.next-cli-build/server/chunks/507.js +1 -1
  591. package/app/.next-cli-build/server/chunks/5232.js +1 -0
  592. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  593. package/app/.next-cli-build/server/chunks/5330.js +1 -1
  594. package/app/.next-cli-build/server/chunks/5433.js +1 -1
  595. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  596. package/app/.next-cli-build/server/chunks/5908.js +1 -1
  597. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  598. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  599. package/app/.next-cli-build/server/chunks/615.js +1 -1
  600. package/app/.next-cli-build/server/chunks/6503.js +1 -0
  601. package/app/.next-cli-build/server/chunks/6723.js +1 -0
  602. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  603. package/app/.next-cli-build/server/chunks/698.js +1 -1
  604. package/app/.next-cli-build/server/chunks/7068.js +1 -1
  605. package/app/.next-cli-build/server/chunks/7073.js +1 -1
  606. package/app/.next-cli-build/server/chunks/7121.js +1 -1
  607. package/app/.next-cli-build/server/chunks/7211.js +1 -1
  608. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  609. package/app/.next-cli-build/server/chunks/{6249.js → 7373.js} +1 -1
  610. package/app/.next-cli-build/server/chunks/7431.js +5 -0
  611. package/app/.next-cli-build/server/chunks/7525.js +1 -1
  612. package/app/.next-cli-build/server/chunks/7552.js +1 -1
  613. package/app/.next-cli-build/server/chunks/7557.js +1 -1
  614. package/app/.next-cli-build/server/chunks/7568.js +1 -0
  615. package/app/.next-cli-build/server/chunks/7911.js +1 -1
  616. package/app/.next-cli-build/server/chunks/7914.js +1 -0
  617. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  618. package/app/.next-cli-build/server/chunks/7971.js +1 -1
  619. package/app/.next-cli-build/server/chunks/820.js +1 -0
  620. package/app/.next-cli-build/server/chunks/8251.js +1 -1
  621. package/app/.next-cli-build/server/chunks/8287.js +1 -1
  622. package/app/.next-cli-build/server/chunks/8401.js +1 -1
  623. package/app/.next-cli-build/server/chunks/8499.js +4 -4
  624. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  625. package/app/.next-cli-build/server/chunks/8525.js +1 -1
  626. package/app/.next-cli-build/server/chunks/8895.js +4 -4
  627. package/app/.next-cli-build/server/chunks/8910.js +1 -1
  628. package/app/.next-cli-build/server/chunks/9055.js +1 -1
  629. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  630. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  631. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  632. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  633. package/app/.next-cli-build/server/middleware.js +2 -2
  634. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  635. package/app/.next-cli-build/server/pages/404.html +1 -1
  636. package/app/.next-cli-build/server/pages/500.html +1 -1
  637. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  638. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  639. package/app/.next-cli-build/static/PjqleVLTs4em65uMZGgAe/_buildManifest.js +1 -0
  640. package/app/.next-cli-build/static/chunks/2723-162ff7c284698fd5.js +1 -0
  641. package/app/.next-cli-build/static/chunks/4864-87ba59d0ded310b4.js +132 -0
  642. package/app/.next-cli-build/static/chunks/5497-ed5ffabb85a19716.js +7 -0
  643. package/app/.next-cli-build/static/chunks/{6.a39be827fd6d332c.js → 6.14774bfbac824225.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/7958-316473a002b2e084.js +5 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-be58ffbf710a5dec.js +2 -0
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-2ee3f149ace63801.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8159f7d4c09ab7cb.js → page-033b10da013937e4.js} +1 -1
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-90317ba3e66b73c8.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-82a7e01a2e463ba2.js → page-4773b0af283b77f7.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-22bd9a3196952cf5.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{error-c23142e5f5729b5c.js → error-abf20f892d461b85.js} +1 -1
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-4431f9b1cc053b18.js +69 -0
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-1fa0d89500a5ec38.js → page-509dda0d0869b182.js} +1 -1
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-1015ef8b964c4dd3.js → page-40f87ec4dfb87552.js} +1 -1
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-c837efcd1edb9841.js → page-a4ab01f328185628.js} +1 -1
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-268b6a5d47d71042.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-631c216c13c7bd3d.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-b345ebe088e2e3d7.js → page-7b0e605f98432f1c.js} +1 -1
  659. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-7f56fcd67de5a4df.js +27 -0
  660. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-4284719a1858706e.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9c31829dd643cc3e.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-f4cd8f5657152167.js +4 -0
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-1e8ce4fa24e2def5.js → page-fbd06481ffdbb573.js} +1 -1
  664. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-2f6a4a085c8dd9a3.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-6d6e4ef9ef854866.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-277d1751a4a9a74b.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-7f602deed988a26d.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-219ebab18ab5b82b.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-c10319f075f1df9e.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/_global-error/page-706c2ea1969b3c65.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-706c2ea1969b3c65.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-706c2ea1969b3c65.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-706c2ea1969b3c65.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-706c2ea1969b3c65.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-706c2ea1969b3c65.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-706c2ea1969b3c65.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-706c2ea1969b3c65.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-706c2ea1969b3c65.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-706c2ea1969b3c65.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-706c2ea1969b3c65.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-706c2ea1969b3c65.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-706c2ea1969b3c65.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-706c2ea1969b3c65.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-706c2ea1969b3c65.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-706c2ea1969b3c65.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-706c2ea1969b3c65.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-706c2ea1969b3c65.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-706c2ea1969b3c65.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-706c2ea1969b3c65.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-706c2ea1969b3c65.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-706c2ea1969b3c65.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-706c2ea1969b3c65.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-706c2ea1969b3c65.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-706c2ea1969b3c65.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-706c2ea1969b3c65.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-706c2ea1969b3c65.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-706c2ea1969b3c65.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-706c2ea1969b3c65.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-706c2ea1969b3c65.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-706c2ea1969b3c65.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-706c2ea1969b3c65.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-706c2ea1969b3c65.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-706c2ea1969b3c65.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-706c2ea1969b3c65.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-706c2ea1969b3c65.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-706c2ea1969b3c65.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-706c2ea1969b3c65.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-706c2ea1969b3c65.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-706c2ea1969b3c65.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/combos/route-706c2ea1969b3c65.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-706c2ea1969b3c65.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-706c2ea1969b3c65.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-706c2ea1969b3c65.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-706c2ea1969b3c65.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-706c2ea1969b3c65.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-706c2ea1969b3c65.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/health/route-706c2ea1969b3c65.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/init/route-706c2ea1969b3c65.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-706c2ea1969b3c65.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/keys/route-706c2ea1969b3c65.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/locale/route-706c2ea1969b3c65.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-706c2ea1969b3c65.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-706c2ea1969b3c65.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-706c2ea1969b3c65.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-706c2ea1969b3c65.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-706c2ea1969b3c65.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-706c2ea1969b3c65.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-706c2ea1969b3c65.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-706c2ea1969b3c65.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/models/chat/route-706c2ea1969b3c65.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-706c2ea1969b3c65.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-706c2ea1969b3c65.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/models/route-706c2ea1969b3c65.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/models/test/route-706c2ea1969b3c65.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/models/test-batch/route-706c2ea1969b3c65.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-706c2ea1969b3c65.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-706c2ea1969b3c65.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-706c2ea1969b3c65.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-706c2ea1969b3c65.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-706c2ea1969b3c65.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-706c2ea1969b3c65.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-706c2ea1969b3c65.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-706c2ea1969b3c65.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-706c2ea1969b3c65.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-706c2ea1969b3c65.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-706c2ea1969b3c65.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-706c2ea1969b3c65.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-706c2ea1969b3c65.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-706c2ea1969b3c65.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-706c2ea1969b3c65.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-706c2ea1969b3c65.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-706c2ea1969b3c65.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-706c2ea1969b3c65.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-706c2ea1969b3c65.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/pricing/route-706c2ea1969b3c65.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-706c2ea1969b3c65.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-706c2ea1969b3c65.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-706c2ea1969b3c65.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-706c2ea1969b3c65.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-706c2ea1969b3c65.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-706c2ea1969b3c65.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-706c2ea1969b3c65.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-706c2ea1969b3c65.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-706c2ea1969b3c65.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-706c2ea1969b3c65.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/providers/route-706c2ea1969b3c65.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-706c2ea1969b3c65.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-706c2ea1969b3c65.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-706c2ea1969b3c65.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/providers/web-session/[id]/route-706c2ea1969b3c65.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-706c2ea1969b3c65.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-706c2ea1969b3c65.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-706c2ea1969b3c65.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-706c2ea1969b3c65.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-706c2ea1969b3c65.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-706c2ea1969b3c65.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-706c2ea1969b3c65.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-706c2ea1969b3c65.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-706c2ea1969b3c65.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-706c2ea1969b3c65.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-706c2ea1969b3c65.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-706c2ea1969b3c65.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-706c2ea1969b3c65.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-706c2ea1969b3c65.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-706c2ea1969b3c65.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-706c2ea1969b3c65.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-706c2ea1969b3c65.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-706c2ea1969b3c65.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/settings/route-706c2ea1969b3c65.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-706c2ea1969b3c65.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-706c2ea1969b3c65.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-706c2ea1969b3c65.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-706c2ea1969b3c65.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-706c2ea1969b3c65.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-706c2ea1969b3c65.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-706c2ea1969b3c65.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-706c2ea1969b3c65.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-706c2ea1969b3c65.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-706c2ea1969b3c65.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-706c2ea1969b3c65.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-706c2ea1969b3c65.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-706c2ea1969b3c65.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-706c2ea1969b3c65.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-706c2ea1969b3c65.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-706c2ea1969b3c65.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-706c2ea1969b3c65.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-706c2ea1969b3c65.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-706c2ea1969b3c65.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-706c2ea1969b3c65.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/usage/rate-limit/route-706c2ea1969b3c65.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-706c2ea1969b3c65.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-706c2ea1969b3c65.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-706c2ea1969b3c65.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-706c2ea1969b3c65.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-706c2ea1969b3c65.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-706c2ea1969b3c65.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-706c2ea1969b3c65.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-706c2ea1969b3c65.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-706c2ea1969b3c65.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-706c2ea1969b3c65.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-706c2ea1969b3c65.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-706c2ea1969b3c65.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-706c2ea1969b3c65.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-706c2ea1969b3c65.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-706c2ea1969b3c65.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-706c2ea1969b3c65.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-706c2ea1969b3c65.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-706c2ea1969b3c65.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/v1/route-706c2ea1969b3c65.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-706c2ea1969b3c65.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-706c2ea1969b3c65.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-706c2ea1969b3c65.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-706c2ea1969b3c65.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-706c2ea1969b3c65.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-706c2ea1969b3c65.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-706c2ea1969b3c65.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-706c2ea1969b3c65.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-706c2ea1969b3c65.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/version/route-706c2ea1969b3c65.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-706c2ea1969b3c65.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/version/update/route-706c2ea1969b3c65.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/landing/page-3cec872ac0a7df86.js +20 -0
  843. package/app/.next-cli-build/static/chunks/app/{layout-9a382aa3bca368d1.js → layout-d239786c2792c351.js} +1 -1
  844. package/app/.next-cli-build/static/chunks/app/login/{page-f1d11179aeb87a7b.js → page-5b2e90e19afaec82.js} +1 -1
  845. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-706c2ea1969b3c65.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/page-706c2ea1969b3c65.js +1 -0
  847. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-706c2ea1969b3c65.js +1 -0
  848. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-706c2ea1969b3c65.js +1 -0
  849. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-706c2ea1969b3c65.js +1 -0
  850. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-706c2ea1969b3c65.js +1 -0
  851. package/app/.next-cli-build/static/chunks/webpack-a0202fae312024d7.js +1 -0
  852. package/app/.next-cli-build/static/css/e8a9dbb2db708090.css +1 -0
  853. package/app/package.json +1 -1
  854. package/cli.js +15 -1
  855. package/package.json +1 -1
  856. package/src/cli/menus/settings.js +19 -11
  857. package/src/cli/utils/initialPassword.js +22 -0
  858. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +0 -2
  859. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +0 -1
  860. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +0 -1
  861. package/app/.next-cli-build/server/app/api/models/availability/route.js +0 -1
  862. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +0 -1
  863. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +0 -1
  864. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +0 -1
  865. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +0 -1
  866. package/app/.next-cli-build/server/app/api/models/catalog-sync/route_client-reference-manifest.js +0 -1
  867. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +0 -1
  868. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +0 -1
  869. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +0 -1
  870. package/app/.next-cli-build/server/app/api/tags/route.js +0 -1
  871. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +0 -1
  872. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +0 -1
  873. package/app/.next-cli-build/server/app/api/usage/history/route.js +0 -1
  874. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +0 -1
  875. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +0 -1
  876. package/app/.next-cli-build/server/chunks/1004.js +0 -1
  877. package/app/.next-cli-build/server/chunks/1260.js +0 -1
  878. package/app/.next-cli-build/server/chunks/199.js +0 -1
  879. package/app/.next-cli-build/server/chunks/3099.js +0 -1
  880. package/app/.next-cli-build/server/chunks/32.js +0 -1
  881. package/app/.next-cli-build/server/chunks/3276.js +0 -5
  882. package/app/.next-cli-build/server/chunks/3390.js +0 -1
  883. package/app/.next-cli-build/server/chunks/3946.js +0 -1
  884. package/app/.next-cli-build/server/chunks/5299.js +0 -132
  885. package/app/.next-cli-build/server/chunks/9713.js +0 -1
  886. package/app/.next-cli-build/static/OAeFlmVsdSK27F9zlps1b/_buildManifest.js +0 -1
  887. package/app/.next-cli-build/static/chunks/5497-b25ea0870709c4a3.js +0 -7
  888. package/app/.next-cli-build/static/chunks/761-7590878484e89ed1.js +0 -132
  889. package/app/.next-cli-build/static/chunks/7958-2225e7f9ffa50c55.js +0 -5
  890. package/app/.next-cli-build/static/chunks/85-f029a8034bfaa5f4.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4cf42b10bafdba52.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-1c0b229abad77799.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-030895183c4a1b17.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-760cfc8d9a00b49d.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-de738056c6c3f5e2.js +0 -69
  896. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-7127308e5eea216f.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-0ce06644f7408c8e.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-5830aae99fea0caa.js +0 -27
  899. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-99fd3aed621a28fc.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-33bd2ae28949bf4c.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-59307c2c6aa6807f.js +0 -4
  902. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-826990e074e94349.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-e478c2c7c2491d20.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d599af5870c7cbbe.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-fb9f4ab6f11d4816.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-c123f1f5a02afed4.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-3276d4952049b42b.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/_global-error/page-bf2caba997335c3a.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-bf2caba997335c3a.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-bf2caba997335c3a.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-bf2caba997335c3a.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-bf2caba997335c3a.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-bf2caba997335c3a.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-bf2caba997335c3a.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-bf2caba997335c3a.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-bf2caba997335c3a.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-bf2caba997335c3a.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-bf2caba997335c3a.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-bf2caba997335c3a.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-bf2caba997335c3a.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-bf2caba997335c3a.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-bf2caba997335c3a.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-bf2caba997335c3a.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-bf2caba997335c3a.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-bf2caba997335c3a.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-bf2caba997335c3a.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-bf2caba997335c3a.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-bf2caba997335c3a.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-bf2caba997335c3a.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-bf2caba997335c3a.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-bf2caba997335c3a.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-bf2caba997335c3a.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-bf2caba997335c3a.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-bf2caba997335c3a.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-bf2caba997335c3a.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-bf2caba997335c3a.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-bf2caba997335c3a.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-bf2caba997335c3a.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-bf2caba997335c3a.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-bf2caba997335c3a.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-bf2caba997335c3a.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-bf2caba997335c3a.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-bf2caba997335c3a.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-bf2caba997335c3a.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-bf2caba997335c3a.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-bf2caba997335c3a.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-bf2caba997335c3a.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-bf2caba997335c3a.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/combos/route-bf2caba997335c3a.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-bf2caba997335c3a.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-bf2caba997335c3a.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-bf2caba997335c3a.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-bf2caba997335c3a.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-bf2caba997335c3a.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-bf2caba997335c3a.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/health/route-bf2caba997335c3a.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/init/route-bf2caba997335c3a.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-bf2caba997335c3a.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/keys/route-bf2caba997335c3a.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/locale/route-bf2caba997335c3a.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-bf2caba997335c3a.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-bf2caba997335c3a.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-bf2caba997335c3a.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-bf2caba997335c3a.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-bf2caba997335c3a.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-bf2caba997335c3a.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-bf2caba997335c3a.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-bf2caba997335c3a.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-bf2caba997335c3a.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-bf2caba997335c3a.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/models/chat/route-bf2caba997335c3a.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-bf2caba997335c3a.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-bf2caba997335c3a.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/models/route-bf2caba997335c3a.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/models/test/route-bf2caba997335c3a.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/models/test-batch/route-bf2caba997335c3a.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-bf2caba997335c3a.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-bf2caba997335c3a.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-bf2caba997335c3a.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-bf2caba997335c3a.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-bf2caba997335c3a.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-bf2caba997335c3a.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-bf2caba997335c3a.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-bf2caba997335c3a.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-bf2caba997335c3a.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-bf2caba997335c3a.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-bf2caba997335c3a.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-bf2caba997335c3a.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-bf2caba997335c3a.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-bf2caba997335c3a.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-bf2caba997335c3a.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-bf2caba997335c3a.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-bf2caba997335c3a.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-bf2caba997335c3a.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-bf2caba997335c3a.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-bf2caba997335c3a.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/pricing/route-bf2caba997335c3a.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-bf2caba997335c3a.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-bf2caba997335c3a.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-bf2caba997335c3a.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-bf2caba997335c3a.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-bf2caba997335c3a.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-bf2caba997335c3a.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-bf2caba997335c3a.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-bf2caba997335c3a.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-bf2caba997335c3a.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-bf2caba997335c3a.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/providers/route-bf2caba997335c3a.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-bf2caba997335c3a.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-bf2caba997335c3a.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-bf2caba997335c3a.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/providers/web-session/[id]/route-bf2caba997335c3a.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-bf2caba997335c3a.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-bf2caba997335c3a.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-bf2caba997335c3a.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-bf2caba997335c3a.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-bf2caba997335c3a.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-bf2caba997335c3a.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-bf2caba997335c3a.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-bf2caba997335c3a.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-bf2caba997335c3a.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-bf2caba997335c3a.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-bf2caba997335c3a.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-bf2caba997335c3a.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-bf2caba997335c3a.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-bf2caba997335c3a.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-bf2caba997335c3a.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-bf2caba997335c3a.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-bf2caba997335c3a.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-bf2caba997335c3a.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/settings/route-bf2caba997335c3a.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-bf2caba997335c3a.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/tags/route-bf2caba997335c3a.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-bf2caba997335c3a.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-bf2caba997335c3a.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-bf2caba997335c3a.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-bf2caba997335c3a.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-bf2caba997335c3a.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-bf2caba997335c3a.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-bf2caba997335c3a.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-bf2caba997335c3a.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-bf2caba997335c3a.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-bf2caba997335c3a.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-bf2caba997335c3a.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-bf2caba997335c3a.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-bf2caba997335c3a.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-bf2caba997335c3a.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-bf2caba997335c3a.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-bf2caba997335c3a.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-bf2caba997335c3a.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-bf2caba997335c3a.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-bf2caba997335c3a.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-bf2caba997335c3a.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/usage/rate-limit/route-bf2caba997335c3a.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-bf2caba997335c3a.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-bf2caba997335c3a.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-bf2caba997335c3a.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-bf2caba997335c3a.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-bf2caba997335c3a.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-bf2caba997335c3a.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-bf2caba997335c3a.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-bf2caba997335c3a.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-bf2caba997335c3a.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-bf2caba997335c3a.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-bf2caba997335c3a.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-bf2caba997335c3a.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-bf2caba997335c3a.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-bf2caba997335c3a.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-bf2caba997335c3a.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-bf2caba997335c3a.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-bf2caba997335c3a.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-bf2caba997335c3a.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/v1/route-bf2caba997335c3a.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-bf2caba997335c3a.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-bf2caba997335c3a.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-bf2caba997335c3a.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-bf2caba997335c3a.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-bf2caba997335c3a.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-bf2caba997335c3a.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-bf2caba997335c3a.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-bf2caba997335c3a.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-bf2caba997335c3a.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/version/route-bf2caba997335c3a.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-bf2caba997335c3a.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/version/update/route-bf2caba997335c3a.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/landing/page-0a57d1766f9a201d.js +0 -20
  1087. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-bf2caba997335c3a.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/page-bf2caba997335c3a.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-bf2caba997335c3a.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-bf2caba997335c3a.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-bf2caba997335c3a.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-bf2caba997335c3a.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/webpack-0c7ed5dbed92c324.js +0 -1
  1094. package/app/.next-cli-build/static/css/2aa77407ba4e4386.css +0 -1
  1095. /package/app/.next-cli-build/static/{OAeFlmVsdSK27F9zlps1b → PjqleVLTs4em65uMZGgAe}/_ssgManifest.js +0 -0
@@ -0,0 +1,27 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{10606:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(95155),l=s(12115),i=s(14051),r=s.n(i);function n({alias:e,onSetAlias:t,onClearAlias:s,size:i="md"}){let[r,o]=(0,l.useState)(!1),[d,c]=(0,l.useState)(""),m="sm"===i?"grid h-6 w-6 place-items-center rounded text-muted transition-colors hover:bg-surface hover:text-gold-text disabled:opacity-40":"grid h-8 w-8 place-items-center rounded-lg text-muted transition-colors hover:bg-surface hover:text-gold-text disabled:opacity-40",u="sm"===i?"text-[13px]":"text-[15px]",p=()=>{o(!1),c("")},x=async()=>{let a=d.trim();if(a){try{await t(a),e&&e!==a&&await s?.()}catch{return}o(!1),c("")}};return r?(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("input",{value:d,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&x(),"Escape"===e.key&&p()},placeholder:"alias","aria-label":"Model alias",autoFocus:!0,className:"w-24 rounded-md border border-line bg-surface px-1.5 py-1 font-mono text-[10px] text-text outline-none focus:border-gold"}),(0,a.jsx)("button",{type:"button",onClick:x,disabled:!d.trim(),"aria-label":"Save alias",title:"Save alias",className:m,children:(0,a.jsx)("span",{className:`material-symbols-outlined ${u}`,"aria-hidden":"true",children:"check"})}),(0,a.jsx)("button",{type:"button",onClick:p,"aria-label":"Cancel alias",title:"Cancel",className:m,children:(0,a.jsx)("span",{className:`material-symbols-outlined ${u}`,"aria-hidden":"true",children:"close"})})]}):(0,a.jsx)("button",{type:"button",onClick:()=>{c(e||""),o(!0)},"aria-label":e?`Rename alias ${e}`:"Set an alias",title:e?`Rename alias (${e})`:"Set an alias",className:m,children:(0,a.jsx)("span",{className:`material-symbols-outlined ${u}`,"aria-hidden":"true",children:"label"})})}n.propTypes={alias:r().string,onSetAlias:r().func.isRequired,onClearAlias:r().func,size:r().oneOf(["sm","md"])}},30840:(e,t,s)=>{Promise.resolve().then(s.bind(s,32172))},32172:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>en});var a=s(95155),l=s(12115),i=s(14051),r=s.n(i),n=s(73321),o=s(98500),d=s.n(o),c=s(5772),m=s(8247),u=s(35497),p=s(88105),x=s(28777),h=s(67899),f=s(62630);s(67468);var g=s(13097);let y=["none","low","medium","high"],b=["none","thinking"],v=["none","low","medium","high","xhigh","max"],j={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":v,"claude-budget":v,"gemini-level":["minimal","low","medium","high"],"gemini-budget":y,zai:b,qwen:y,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:b,hunyuan:y,step:y,nous:y},w=["none","minimal","low","medium","high","xhigh","max"],N=["none","low","medium","high","max"],k=[{pattern:"*gemini-4*",levels:["low","medium","high"]},{pattern:"*claude*4.6*",levels:N},{pattern:"*claude*4-6*",levels:N},{provider:"codex",pattern:"*gpt-6*",levels:w},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...w,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...w,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:w},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function C(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let s=function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return t?{major:Number(t[1]),minor:void 0===t[2]?null:Number(t[2])}:null}(e);if(!s)return null;let{major:a,minor:l}=s;return a<4||4===a&&(null===l||l<=5||null!==l&&l>=1e3)?null:"output_config"}(t))return null;let s=(0,h.nl)(e,t);if(!s.reasoning)return null;let a=String(t||"").replace(/\([^()]+\)\s*$/,""),l="codex"===e?(0,g.SM)("cx").find(e=>e.id===a)?.thinkingLevels:null,i=k.find(s=>(!s.provider||s.provider===e)&&(0,f.gH)(s.pattern,t)),r=l||i?.levels||j[s.thinkingFormat]||y;return!1===s.thinkingCanDisable&&(r=r.filter(e=>"none"!==e)),r}var S=s(65921),A=s(5293),$=s(929),T=s(73006);let O=new Map;async function P(e,t,{force:s=!1}={}){if(!e?.url||!e?.type)return{data:[]};let a=`${e.url}::${t||""}`;if(!s){let e=O.get(a);if(e&&Date.now()<e.expiresAt)return e.payload}try{let s=new URLSearchParams({url:e.url,type:e.type});t&&s.set("provider",t);let l=await fetch(`/api/providers/suggested-models?${s}`),i=await l.json().catch(()=>({})),r={data:Array.isArray(i.data)?i.data:[],...i.error?{error:i.error}:{},...i.upstream?{upstream:i.upstream}:{},...l.ok?{}:{error:i.error||`Request failed (HTTP ${l.status})`}};return r.data.length>0&&!r.error&&O.set(a,{payload:r,expiresAt:Date.now()+6e5}),r}catch(e){return{data:[],error:e?.message||"Network error"}}}function I({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:a=[],type:l="llm",includeLegacyAliases:i=!0}){let r=new Set(a.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||r.has(t.id))continue;let a=`${s}/${t.id}`;n.has(a)||(n.add(a),o.push({id:t.id,name:t.name||t.id,fullModel:a,source:"custom",type:e,origin:t.origin}))}if(!i)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||r.has(t)||n.has(s)||(n.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:l||"llm"}))}return o}var E=s(10606);function D({model:e,fullModel:t,alias:s,copied:l,onCopy:i,onSetAlias:r,onClearAlias:n,testStatus:o,isCustom:d,isFree:c,onDeleteAlias:m,onTest:p,isTesting:x,onDisable:h,caps:f,thinkingSuffix:g}){let y=g?`${t}(${g})`:t,b=`model-${e.id}`;return(0,a.jsxs)("div",{className:"flex w-full min-w-0 max-w-full flex-col gap-3 rounded-xl border border-line bg-bg-soft/45 p-3.5 transition-colors hover:border-line-strong sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("span",{className:`grid h-8 w-8 shrink-0 place-items-center rounded-lg border ${"ok"===o?"border-success/25 bg-success/10 text-success":"error"===o?"border-danger/25 bg-danger/10 text-danger":"border-line bg-surface text-muted"}`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${x?"animate-spin text-gold-text":""}`,"aria-hidden":"true",children:x?"progress_activity":"ok"===o?"check_circle":"error"===o?"cancel":"memory"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-xs font-semibold",title:y,children:y}),e.name&&e.name!==e.id&&(0,a.jsx)("p",{className:"truncate text-[10px] text-muted",children:e.name}),s&&(0,a.jsxs)("span",{className:"shrink-0 rounded border border-line bg-surface px-1.5 py-0.5 font-mono text-[9px] text-muted",children:["alias: ",s]}),d&&(0,a.jsx)("span",{className:"shrink-0 rounded border border-gold/30 bg-gold-soft px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-wide text-gold-text",children:"custom"}),c&&(0,a.jsx)("span",{className:"shrink-0 rounded border border-success/25 bg-success/10 px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-wide text-success",children:"free"}),(0,a.jsx)(u.nh,{caps:f,colorOverride:"text-muted",size:12})]}),(0,a.jsx)("code",{className:"mt-1 block truncate font-mono text-[10px] text-muted",children:y})]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[r&&(0,a.jsx)(E.A,{alias:s,onSetAlias:r,onClearAlias:n}),(0,a.jsx)("button",{type:"button",onClick:()=>i(y,b),"aria-label":`Copy ${e.id} model ID`,className:"grid h-8 w-8 place-items-center rounded-lg text-muted transition-colors hover:bg-surface hover:text-gold-text",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]","aria-hidden":"true",children:l===b?"check":"content_copy"})}),p&&(0,a.jsxs)("button",{type:"button",onClick:p,disabled:x,"aria-label":`Test ${e.id}`,"aria-busy":x,className:"btn-quiet !px-2 !py-2 !text-[11px]",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${x?"animate-spin":""}`,"aria-hidden":"true",children:x?"progress_activity":"bolt"}),x?"Testing":"Test"]}),d?(0,a.jsx)("button",{type:"button",onClick:m,className:"grid h-8 w-8 place-items-center rounded-lg text-muted transition-colors hover:bg-danger/10 hover:text-danger",title:"Remove custom model","aria-label":`Remove ${e.id}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]","aria-hidden":"true",children:"close"})}):h?(0,a.jsx)("button",{type:"button",onClick:h,className:"grid h-8 w-8 place-items-center rounded-lg text-muted transition-colors hover:bg-danger/10 hover:text-danger sm:opacity-0 sm:group-hover/model-list:opacity-100",title:"Disable this model","aria-label":`Disable ${e.id}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]","aria-hidden":"true",children:"close"})}):null]})]})}function R({modelId:e,fullModel:t,alias:s,copied:l,onCopy:i,onSetAlias:r,onClearAlias:n,onDeleteAlias:o,onTest:d,testStatus:c,isTesting:m}){let u="ok"===c?"#22c55e":"error"===c?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===c?"border-green-500/40":"error"===c?"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:u?{color:u}:void 0,children:"ok"===c?"check_circle":"error"===c?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),s&&(0,a.jsxs)("span",{className:"shrink-0 rounded border border-line bg-surface px-1.5 py-0.5 font-mono text-[9px] text-muted",children:["alias: ",s]})]}),(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:l===`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:l===`model-${e}`?"Copied!":"Copy"})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:m,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:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"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:m?"Testing...":"Test"})]})]})]}),r&&(0,a.jsx)(E.A,{alias:s,onSetAlias:r,onClearAlias:n}),(0,a.jsx)("button",{onClick:o,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 z({providerAlias:e,modelAliases:t,customModels:s,copied:i,onCopy:r,onSetAlias:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:c}){let[m,p]=(0,l.useState)(""),[x,h]=(0,l.useState)(!1),f=I({customModels:s,modelAliases:t,providerAlias:e,type:"llm"}),g=async()=>{if(!m.trim()||x)return;let e=m.trim();if(f.some(t=>t.id===e))return void alert("Model already exists for this provider.");h(!0);try{await d(e),p("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}};return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"This provider accepts any model id. Add models and create aliases for quick access."}),(0,a.jsxs)("div",{className:"flex items-end gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{htmlFor:"new-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-model-input",type:"text",value:m,onChange:e=>p(e.target.value),onKeyDown:e=>"Enter"===e.key&&g(),placeholder:"anthropic/claude-3-opus",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:g,disabled:!m.trim()||x,children:x?"Adding...":"Add"})]}),f.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:f.map(({id:s,fullModel:l,alias:d,source:m})=>{let u=d||Object.entries(t).find(([,t])=>t===`${e}/${s}`)?.[0];return(0,a.jsx)(R,{modelId:s,fullModel:l,alias:u,copied:i,onCopy:r,onSetAlias:n?t=>n(s,t,e):void 0,onClearAlias:u?()=>o(u):void 0,onDeleteAlias:()=>"custom"===m?c(s):o(u)},`${m}-${l}`)})})]})}function M({modelId:e,fullModel:t,alias:s,copied:l,onCopy:i,onSetAlias:r,onClearAlias:n,onDeleteAlias:o,onTest:d,testStatus:c,isTesting:m}){let u="ok"===c?"#22c55e":"error"===c?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===c?"border-green-500/40":"error"===c?"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:u?{color:u}:void 0,children:"ok"===c?"check_circle":"error"===c?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),s&&(0,a.jsxs)("span",{className:"shrink-0 rounded border border-line bg-surface px-1.5 py-0.5 font-mono text-[9px] text-muted",children:["alias: ",s]})]}),(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:l===`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:l===`model-${e}`?"Copied!":"Copy"})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:m,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:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"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:m?"Testing...":"Test"})]})]})]}),r&&(0,a.jsx)(E.A,{alias:s,onSetAlias:r,onClearAlias:n}),(0,a.jsx)("button",{onClick:o,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 q({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:i,copied:r,onCopy:n,onSetAlias:o,onDeleteAlias:d,onAddCustomModel:c,onDeleteCustomModel:m,connections:p,isAnthropic:x}){let[h,f]=(0,l.useState)(""),[g,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(null),[N,k]=(0,l.useState)({}),C=async t=>{if(!j){w(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{w(null)}}},S=I({customModels:i,modelAliases:s,providerAlias:e,type:"llm"}),A=async()=>{if(!h.trim()||g)return;let e=h.trim();if(S.some(t=>t.id===e))return void alert("Model already exists for this provider.");y(!0);try{await c(e),f("")}catch(e){console.log("Error adding model:",e)}finally{y(!1)}},$=async()=>{if(b)return;let e=p.find(e=>!1!==e.isActive);if(e){v(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let l=0;for(let e of a){let t=e.id||e.name||e.model;t&&(S.some(e=>e.id===t)||(await c(t),l+=1))}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{v(!1)}}},T=p.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 ",x?"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:h,onChange:e=>f(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:x?"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)(u.$n,{size:"sm",icon:"add",onClick:A,disabled:!h.trim()||g,children:g?"Adding...":"Add"}),(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!T||b,children:b?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),S.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:S.map(({id:l,alias:i,source:c})=>{let u=i||Object.entries(s).find(([,t])=>t===`${e}/${l}`)?.[0];return(0,a.jsx)(M,{modelId:l,fullModel:`${t}/${l}`,alias:u,copied:r,onCopy:n,onSetAlias:o?t=>o(l,t,e):void 0,onClearAlias:u?()=>d(u):void 0,onDeleteAlias:()=>"custom"===c?m(l):d(u),onTest:p.length>0?()=>C(l):void 0,testStatus:N[l],isTesting:j===l},`${c}-${e}/${l}`)})})]})}D.propTypes={model:r().shape({id:r().string.isRequired,name:r().string}).isRequired,fullModel:r().string.isRequired,alias:r().string,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func,onClearAlias:r().func,testStatus:r().oneOf(["ok","error"]),isCustom:r().bool,isFree:r().bool,onDeleteAlias:r().func,onTest:r().func,isTesting:r().bool,onDisable:r().func,caps:r().object,thinkingSuffix:r().string},R.propTypes={modelId:r().string.isRequired,fullModel:r().string.isRequired,alias:r().string,copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func,onClearAlias:r().func,onDeleteAlias:r().func.isRequired,onTest:r().func,testStatus:r().oneOf(["ok","error"]),isTesting:r().bool},z.propTypes={providerAlias:r().string.isRequired,modelAliases:r().object.isRequired,customModels:r().arrayOf(r().object),copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func,onDeleteAlias:r().func.isRequired,onAddCustomModel:r().func.isRequired,onDeleteCustomModel:r().func.isRequired},q.propTypes={providerStorageAlias:r().string.isRequired,providerDisplayAlias:r().string.isRequired,modelAliases:r().object.isRequired,customModels:r().arrayOf(r().object),copied:r().string,onCopy:r().func.isRequired,onSetAlias:r().func,onDeleteAlias:r().func.isRequired,onAddCustomModel:r().func.isRequired,onDeleteCustomModel:r().func.isRequired,connections:r().arrayOf(r().shape({id:r().string,isActive:r().bool})).isRequired,isAnthropic:r().bool};var _=s(47650),U=s(70217);function K({until:e}){let[t,s]=(0,l.useState)("");return((0,l.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 F({connection:e,proxyPools:t,isOAuth:s,isFirst:i,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:d,onUpdateProxy:c,onEdit:m,onDelete:p,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),v=(0,l.useRef)(null),j=(0,l.useRef)(null),[w,N]=(0,l.useState)(null),k=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,A=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,$=!!C||A,T=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:A?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",O=(()=>{if(!h)return"";let e=[];return(h.reactiveOn&&e.push("On reset"),h.scheduleOn&&e.push(`Scheduled (${h.scheduleSummary||"active"})`),e.length>0)?`Auto-ping active: ${e.join(" + ")}. Click to configure.`:"codex"===h.provider?"Auto-starts the next 5h Codex window after reset or on schedule. Click to configure.":"Auto-starts a new window on quota reset or fixed schedule. Click to configure."})(),P="";if(S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let I=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E="default";S?.isActive===!0?E="success":(C||A)&&(E="error"),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{v.current?.contains(e.target)||j.current?.contains(e.target)||g(!1)},t=()=>g(!1);return document.addEventListener("mousedown",e),window.addEventListener("resize",t),document.addEventListener("scroll",t,!0),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t),document.removeEventListener("scroll",t,!0)}},[f]);let D=async e=>{b(!0);try{await c("__none__"===e?null:e)}finally{b(!1),g(!1)}},R=e.authType||(s?"oauth":"apikey"),z="oauth"===R,M="cookie"===R,q=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(z?"OAuth Account":M?"Cookie Account":"API Key"),L=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[J,H]=(0,l.useState)(!1),W=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.useEffect)(()=>{let t=()=>{H(!!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=W?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[W]);let B="unavailable"!==e.testStatus||J?e.testStatus:"active",Z=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:M?"cookie":z?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:q}),L&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:L}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(u.Ex,{variant:(0,U.g)(e.isActive,B),size:"sm",dot:!0,children:!1===e.isActive?"disabled":B||"Unknown"}),(0,a.jsx)(u.Ex,{variant:"default",size:"sm",children:z?"OAuth":M?"Cookie":"API Key"}),$&&(0,a.jsx)(u.Ex,{variant:E,size:"sm",children:"Proxy"}),J&&!1!==e.isActive&&(0,a.jsx)(K,{until:W}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),Z()&&(0,a.jsx)(u.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:Z()})]}),$&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:T,children:T}),P&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:P}),I&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("button",{ref:j,onClick:()=>{if(f)return void g(!1);let e=j.current?.getBoundingClientRect();if(!e)return void g(!0);let s=((t?.length||0)+1)*34+8,a=window.innerHeight-e.bottom,l=a<s&&e.top>a;N({position:"fixed",right:window.innerWidth-e.right,...l?{bottom:window.innerHeight-e.top+4,maxHeight:Math.max(e.top-8,120)}:{top:e.bottom+4,maxHeight:Math.max(a-8,120)}}),g(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${$?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,_.createPortal)((0,a.jsxs)("div",{ref:v,style:w,className:"z-50 max-w-[78vw] min-w-[160px] overflow-y-auto rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>D("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>D(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]}),document.body)]}),h&&(0,a.jsx)(u.m_,{text:O,children:(0,a.jsxs)("button",{onClick:h.onConfigure,className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.isActive?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(u.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}K.propTypes={until:r().string.isRequired},F.propTypes={connection:r().shape({id:r().string,name:r().string,email:r().string,displayName:r().string,modelLockUntil:r().string,testStatus:r().string,isActive:r().bool,lastError:r().string,priority:r().number,globalPriority:r().number}).isRequired,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string,proxyUrl:r().string,noProxy:r().string,isActive:r().bool})),isOAuth:r().bool.isRequired,isFirst:r().bool.isRequired,isLast:r().bool.isRequired,onMoveUp:r().func.isRequired,onMoveDown:r().func.isRequired,onToggleActive:r().func.isRequired,onUpdateProxy:r().func,onEdit:r().func.isRequired,onDelete:r().func.isRequired,oneByOneStatus:r().shape({state:r().string,error:r().string}),autoPing:r().shape({isActive:r().bool,provider:r().string,reactiveOn:r().bool,scheduleOn:r().bool,scheduleSummary:r().string,onConfigure:r().func})};let L=`name1|sk-key1
2
+ name2|sk-key2
3
+ sk-key-only-auto-named`;function J({isOpen:e,provider:t,providerName:s,isCompatible:i,isAnthropic:r,authType:n,authHint:o,website:d,proxyPools:c,error:m,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",b="ollama-local"===t,v="cookie"===n,j="xai"===t&&!v,w=v?"Cookie Value":"qoder"===t||"qoder-cn"===t?"Personal Access Token (PAT)":"API Key",N="azure"===t,k="cloudflare-ai"===t,C=p.Q2?.[t]?.credentialForm==="aws",S=p.Q2?.[t]?.apiKeyOptionalWith||null,A=p.Q2?.[t]?.regions||null,$=p.Q2?.[t]?.defaultRegion||A?.[0]?.id||"",[T,O]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[P,I]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[E,D]=(0,l.useState)({accountId:""}),[R,z]=(0,l.useState)({profile:"",region:"",accessKeyId:"",sessionToken:""}),[M,q]=(0,l.useState)($),[_,U]=(0,l.useState)(!1),[K,F]=(0,l.useState)(null),[H,W]=(0,l.useState)(!1),B=k?`name1|sk-key1|acc123456
4
+ name2|sk-key2|def789012
5
+ sk-key-only-auto-named`:"qoder"===t||"qoder-cn"===t?`name1|pt-xxxxx
6
+ name2|pt-yyyyy
7
+ pt-only-auto-named`:L,[Z,G]=(0,l.useState)("single"),[Q,V]=(0,l.useState)(""),[X,Y]=(0,l.useState)(null),ee=()=>{if(b&&T.ollamaHostUrl.trim())return{baseUrl:T.ollamaHostUrl.trim()};if(N)return{azureEndpoint:P.azureEndpoint,apiVersion:P.apiVersion,deployment:P.deployment,organization:P.organization};if(k)return{accountId:E.accountId};if(C){let e={};return R.profile.trim()&&(e.profile=R.profile.trim()),R.region.trim()&&(e.region=R.region.trim()),R.accessKeyId.trim()&&(e.accessKeyId=R.accessKeyId.trim()),R.sessionToken.trim()&&(e.sessionToken=R.sessionToken.trim()),Object.keys(e).length?e:void 0}if(A&&M)return{region:M}},et=()=>{let e=ee();return!!(S&&e?.[S])||(C?!!T.apiKey&&!!e?.accessKeyId:!!T.apiKey)},es=async()=>{U(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:ee()})}),s=await e.json();F(s.valid?"success":"failed")}catch{F("failed")}finally{U(!1)}},ea=async()=>{if(t&&(b||et())&&(b||T.name)&&(!i||T.defaultModel.trim())){W(!0);try{let e=!1;try{U(!0),F(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:ee()})});e=!!(await s.json()).valid,F(e?"success":"failed")}catch{F("failed")}finally{U(!1)}await h({name:T.name||(b?"Ollama Local":""),apiKey:T.apiKey,defaultModel:i?T.defaultModel.trim():void 0,priority:T.priority,proxyPoolId:T.proxyPoolId===y?null:T.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:ee()})}finally{W(!1)}}},el=async()=>{let e=Q.split("\n");if(!e.length)return;let s=function(e,t,s={}){let{isCloudflareAi:a=!1}=s,l=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),i=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let r=function(e,t={}){let{isCloudflareAi:s=!1}=t,a=e.split("|");if(s&&a.length>=3){let e=a[0].trim();return{baseName:e||"Key",apiKey:a.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:a[a.length-1].trim()}}}return a.length>=2?{baseName:a[0].trim()||"Key",apiKey:a.slice(1).join("|").trim()}:{baseName:"Key",apiKey:a[0].trim()}}(s,{isCloudflareAi:a});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,l.has(e.toLowerCase());)o+=1;l.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),i.push(d)}return i}(e,x,{isCloudflareAi:k});if(!s.length)return;W(!0),Y(null);let a=0,l=0;for(let e of s)try{let s=!1;try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});s=!!(await a.json().catch(()=>({}))).valid}catch{s=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:s?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?a++:l++}catch{l++}W(!1),Y({success:a,failed:l}),a>0&&f&&f()};return t?(0,a.jsx)(u.aF,{isOpen:e,title:`Add ${s||t} ${w}`,onClose:g,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[!C&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{size:"sm",variant:"single"===Z?"primary":"ghost",onClick:()=>{G("single"),Y(null)},children:"Single"}),(0,a.jsx)(u.$n,{size:"sm",variant:"bulk"===Z?"primary":"ghost",onClick:()=>{G("bulk"),Y(null)},children:"Bulk Add"})]}),"bulk"===Z&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:k?(0,a.jsxs)(a.Fragment,{children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t||"qoder-cn"===t?(0,a.jsxs)(a.Fragment,{children:["One PAT per line. Format: ",(0,a.jsx)("code",{children:"name|pt-..."})," or just ",(0,a.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,a.jsxs)(a.Fragment,{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:B,value:Q,onChange:e=>V(e.target.value)}),X&&(0,a.jsxs)("div",{className:`text-sm font-medium ${X.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",X.success," added",X.failed>0?`, ✗ ${X.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{onClick:el,fullWidth:!0,disabled:H||!Q.trim(),children:H?"Adding...":"Add All Keys"}),(0,a.jsx)(u.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===Z&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.pd,{label:"Name",value:T.name,onChange:e=>O({...T,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.pd,{label:"Ollama Host URL",value:T.ollamaHostUrl,onChange:e=>O({...T,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(u.$n,{onClick:es,disabled:_||H,variant:"secondary",children:_?"Checking...":"Check"})})]}),!b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.pd,{label:w,type:v?"text":"password",value:T.apiKey,onChange:e=>O({...T,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t||"qoder-cn"===t?"pt-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(u.$n,{onClick:es,disabled:!et()||_||H,variant:"secondary",children:_?"Checking...":"Check"})})]}),j&&(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."}),v&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),A&&(0,a.jsx)(u.l6,{label:"Region",value:M,onChange:e=>q(e.target.value),options:A.map(e=>({value:e.id,label:e.label}))}),i&&(0,a.jsx)(u.pd,{label:"Default Model",value:T.defaultModel,onChange:e=>O({...T,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(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"}),")."]}),K&&(0,a.jsx)(u.Ex,{variant:"success"===K?"success":"error",children:"success"===K?"Valid":"Invalid"}),m&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:m}),i&&(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."}),k&&(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)(u.pd,{label:"Account ID",value:E.accountId,onChange:e=>D({...E,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"})]})]}),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:"AWS Bedrock Credentials"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(u.pd,{label:"AWS Profile (SSO — recommended)",value:R.profile,onChange:e=>z({...R,profile:e.target.value}),placeholder:"my-sso-profile"}),(0,a.jsx)(u.pd,{label:"Region",value:R.region,onChange:e=>z({...R,region:e.target.value}),placeholder:"us-east-1"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,a.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,a.jsxs)("code",{children:["aws sso login --profile ",R.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,a.jsx)(u.pd,{label:"Access Key ID (only for static keys)",value:R.accessKeyId,onChange:e=>z({...R,accessKeyId:e.target.value}),placeholder:"AKIA..."}),(0,a.jsx)(u.pd,{label:"Session Token (only for temporary ASIA… keys)",type:"password",value:R.sessionToken,onChange:e=>z({...R,sessionToken:e.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,a.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),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)(u.pd,{label:"Azure Endpoint",value:P.azureEndpoint,onChange:e=>I({...P,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(u.pd,{label:"Deployment Name",value:P.deployment,onChange:e=>I({...P,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(u.pd,{label:"API Version",value:P.apiVersion,onChange:e=>I({...P,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(u.pd,{label:"Organization",value:P.organization,onChange:e=>I({...P,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(u.pd,{label:"Priority",type:"number",value:T.priority,onChange:e=>O({...T,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(u.l6,{label:"Proxy Pool",value:T.proxyPoolId,onChange:e=>O({...T,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(c||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(c||[]).length&&(0,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)(u.$n,{onClick:ea,fullWidth:!0,disabled:H||!b&&(!T.name||!et())||i&&!T.defaultModel.trim()||N&&(!P.azureEndpoint||!P.deployment||!P.organization)||k&&!E.accountId,children:H?"Saving...":"Save"}),(0,a.jsx)(u.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function H({isOpen:e,node:t,onSave:s,onClose:i,isAnthropic:r}){let[n,o]=(0,l.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,c]=(0,l.useState)(!1),[m,p]=(0,l.useState)(""),[x,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null);(0,l.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){c(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{c(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(u.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:i,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(u.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)(u.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)(u.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)(u.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)(u.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>p(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(u.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(u.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(u.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,a.jsx)(u.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}J.propTypes={isOpen:r().bool.isRequired,provider:r().string,providerName:r().string,isCompatible:r().bool,isAnthropic:r().bool,authType:r().string,authHint:r().string,website:r().string,proxyPools:r().arrayOf(r().shape({id:r().string,name:r().string})),error:r().string,existingNames:r().arrayOf(r().string),onSave:r().func.isRequired,onBulkDone:r().func,onClose:r().func.isRequired},H.propTypes={isOpen:r().bool.isRequired,node:r().shape({id:r().string,name:r().string,prefix:r().string,apiType:r().string,baseUrl:r().string}),onSave:r().func.isRequired,onClose:r().func.isRequired,isAnthropic:r().bool};let W=()=>Object.fromEntries(Object.keys(x.bs).map(e=>[e,!1]));function B({isOpen:e,providerAlias:t,onSave:s,onClose:i}){let[r,n]=(0,l.useState)(""),[o,d]=(0,l.useState)(W),[c,m]=(0,l.useState)(null),[p,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)("");(0,l.useEffect)(()=>{e&&(n(""),d(W()),b(""),m(null),h(""))},[e]);let v=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},j=async()=>{let e=v(r.trim());if(e){m("testing"),h("");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();m(a.ok?"ok":"error"),h(a.error||"")}catch(e){m("error"),h(e.message)}}},w=async()=>{let e=v(r.trim());if(e&&!f){g(!0);try{await s(e,o,o.stt?y:null)}finally{g(!1)}}};return(0,a.jsx)(u.aF,{isOpen:e,onClose:i,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:r,onChange:e=>{n(e.target.value),m(null),h("")},onKeyDown:e=>{"Enter"===e.key&&j()},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)(u.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:j,disabled:!r.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:v(r.trim())||"model-id"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(x.bs).map(([e,t])=>(0,a.jsx)(u.lM,{checked:!!o[e],onChange:t=>d(s=>({...s,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(u.lM,{checked:!!o.stt,onChange:e=>{d(t=>({...t,stt:e})),e||b("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),o.stt&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(u.l6,{label:"Transport",value:y,onChange:e=>b(e.target.value),placeholder:"Provider default (REST)",options:x.vp.map(e=>({value:e,label:x.qw[e].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"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:p||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(u.$n,{onClick:i,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(u.$n,{onClick:w,fullWidth:!0,size:"sm",disabled:!r.trim()||f,children:f?"Adding...":"Add Model"})]})]})})}B.propTypes={isOpen:r().bool.isRequired,providerAlias:r().string.isRequired,onSave:r().func.isRequired,onClose:r().func.isRequired};let Z=`[
8
+ {
9
+ "accessToken": "eyJhbGc...",
10
+ "refreshToken": "rt_...",
11
+ "idToken": "eyJhbGc...",
12
+ "email": "user@example.com"
13
+ }
14
+ ]`;function G({isOpen:e,onClose:t,onSuccess:s}){let[i,r]=(0,l.useState)(""),[n,o]=(0,l.useState)(!1),[d,c]=(0,l.useState)(""),[m,p]=(0,l.useState)(null),x=()=>{n||(r(""),c(""),p(null),t())},h=async()=>{var e;let t;c(""),p(null);let a=i.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){c(`${(0,T.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void c((0,T.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void c(t?.error||`Request failed: ${e.status}`);p(t),t.success>0&&"function"==typeof s&&s()}catch(e){c(e.message||(0,T.Tl)("Request failed"))}finally{o(!1)}},f=m?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(u.aF,{isOpen:e,title:(0,T.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,T.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:Z,value:i,onChange:e=>r(e.target.value),disabled:n}),d&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,T.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,T.Tl)("failed")}`:""]}),f.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{onClick:h,fullWidth:!0,disabled:n||!i.trim(),children:n?(0,T.Tl)("Importing..."):(0,T.Tl)("Import All")}),(0,a.jsx)(u.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,T.Tl)("Close")})]})]})})}G.propTypes={isOpen:r().bool.isRequired,onClose:r().func.isRequired,onSuccess:r().func};let Q=`[
15
+ {
16
+ "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
17
+ "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
18
+ "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
19
+ "email": "account1@example.com"
20
+ },
21
+ {
22
+ "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
23
+ "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
24
+ "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
25
+ "email": "account2@example.com"
26
+ }
27
+ ]`;function V(e){let t,s=e.trim();if(!s)return[];try{t=JSON.parse(s)}catch(e){try{let e=s;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function X({isOpen:e,onClose:t,onSuccess:s}){let[i,r]=(0,l.useState)(""),[n,o]=(0,l.useState)(!1),[d,c]=(0,l.useState)(""),[m,p]=(0,l.useState)(null),[x,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(null),y=(0,l.useRef)(null),b=()=>{n||(r(""),c(""),p(null),g(null),h(!1),t())},v=async e=>{if(!e||0===e.length)return;c("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void c((0,T.Tl)("Please select valid .json files"));try{let e=[];for(let s of t){let t=await s.text(),a=V(t);Array.isArray(a)?e.push(...a):a&&e.push(a)}if(0===e.length)return void c((0,T.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){c(`${(0,T.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;c(""),p(null);try{e=V(i)}catch(e){c(`${(0,T.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void c((0,T.Tl)("No accounts found in input"));o(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),a=await t.json();if(!t.ok)return void c(a?.error||`Request failed: ${t.status}`);p(a),a.success>0&&"function"==typeof s&&s()}catch(e){c(e.message||(0,T.Tl)("Request failed"))}finally{o(!1)}},w=m?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(u.aF,{isOpen:e,title:(0,T.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,T.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,a.jsx)("input",{ref:y,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{v(e.target.files),e.target&&(e.target.value="")}}),(0,a.jsx)(u.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,T.Tl)("Upload JSON Files")})]}),(0,a.jsxs)("div",{onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer?.files?.length>0&&v(e.dataTransfer.files)},className:`relative rounded border transition-colors ${x?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,a.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:Q,value:i,onChange:e=>{r(e.target.value),g(null)},disabled:n}),x&&(0,a.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,a.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,T.Tl)("Drop .json files here")})]})]}),f&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,a.jsxs)("span",{children:[(0,T.Tl)("Loaded")," ",f.accountsCount," ",(0,T.Tl)("account(s) from")," ",f.filesCount," ",(0,T.Tl)("file(s)")]})]}),d&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&m.failed>0&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",m.failed," ",(0,T.Tl)("failed")]}),w.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{onClick:j,fullWidth:!0,disabled:n||!i.trim(),children:n?(0,T.Tl)("Importing..."):(0,T.Tl)("Import All")}),(0,a.jsx)(u.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,T.Tl)("Close")})]})]})})}let Y=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],ee=/^[A-Za-z0-9-]+$/;function et({providerId:e}){let t=(0,S.i)(),[s,i]=(0,l.useState)(!1),[r,n]=(0,l.useState)([{name:"",value:""}]),[o,d]=(0,l.useState)({}),[c,m]=(0,l.useState)(!1),[p,x]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let t=!1;return fetch(`/api/providers/${e}/overrides`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(t||!e)return;let s=e.builtinHeaders||{},a=Object.entries({...s,...e.headers||{}}).map(([e,t])=>({name:e,value:t}));d(s),n(a.length?a:[{name:"",value:""}]),m(Object.keys(e.headers||{}).length>0)}).catch(()=>{}),()=>{t=!0}},[e]);let h=(e,t,s)=>{n(a=>a.map((a,l)=>l===e?{...a,[t]:s}:a))},f=(0,l.useCallback)(async()=>{let s={};for(let e of r.filter(e=>e.name.trim())){let a=e.name.trim();if(!ee.test(a))return void t.error(`Invalid header name: ${a}`);if(Y.includes(a.toLowerCase()))return void t.error(`Header ${a} cannot be overridden`);if(a in s)return void t.error(`Duplicate header name: ${a}`);e.value!==o[a]&&(s[a]=e.value)}x(!0);try{let a=await fetch(`/api/providers/${e}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:s})});if(!a.ok){let e=await a.json().catch(()=>({}));t.error(e.error||"Failed to save");return}m(Object.keys(s).length>0),t.success("Custom headers saved")}finally{x(!1)}},[r,o,e,t]);return 0!==Object.keys(o).length||c?(0,a.jsxs)(u.Zp,{padding:"xs",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center justify-between text-left",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"tune"}),(0,a.jsx)("span",{className:"text-sm font-semibold",children:"Custom Headers"}),c&&(0,a.jsx)(u.Ex,{variant:"success",size:"sm",children:"Active"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:s?"expand_less":"expand_more"})]}),s&&(0,a.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2",children:r.map((e,t)=>{let s=e.name.trim()in o&&e.value!==o[e.name.trim()];return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{value:e.name,onChange:e=>h(t,"name",e.target.value),placeholder:"Header-Name",spellCheck:!1,className:"w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none"}),(0,a.jsx)("input",{value:e.value,onChange:e=>h(t,"value",e.target.value),placeholder:"Value",spellCheck:!1,title:s?"Overridden":e.name.trim()in o?"Registry default":"",className:`min-w-0 flex-1 rounded-md border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none ${s?"border-amber-400/60":"border-border"}`}),(0,a.jsx)("button",{type:"button",title:"Remove header",onClick:()=>n(e=>e.length>1?e.filter((e,s)=>s!==t):[{name:"",value:""}]),className:"shrink-0 text-text-muted hover:text-red-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},t)})}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>n(e=>[...e,{name:"",value:""}]),className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add header"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{type:"button",disabled:p,onClick:()=>{n(Object.entries(o).map(([e,t])=>({name:e,value:t})))},className:"rounded-md border border-border px-3 py-1.5 text-xs hover:bg-black/[0.03] dark:hover:bg-white/[0.03] disabled:opacity-50",children:"Reset"}),(0,a.jsx)("button",{type:"button",disabled:p,onClick:f,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:p?"Saving...":"Save"})]})]})]})]}):null}et.propTypes={providerId:r().string.isRequired};var es=s(97132),ea=s(93195);let el=[{value:"all",label:"All"},{value:"untested",label:"Untested"},{value:"passed",label:"Passed"},{value:"failed",label:"Failed"}],ei={claude:"claudeAutoPing",codex:"codexAutoPing"};function er({label:e,value:t,icon:s,tone:l="text-muted"}){return(0,a.jsxs)("div",{className:"rounded-xl border border-line bg-bg-soft/70 p-3.5",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[17px] ${l}`,"aria-hidden":"true",children:s}),(0,a.jsx)("p",{className:"muted mt-3 text-[10px] uppercase tracking-[0.1em]",children:e}),(0,a.jsx)("p",{className:"mt-1 truncate font-mono text-sm font-semibold",children:t})]})}function en(){let e,t,s,i,r,o,h=(0,n.useParams)(),f=(0,n.useRouter)(),g=h.id,{getCaps:y}=(0,$.y)(),[b,v]=(0,l.useState)([]),[j,w]=(0,l.useState)(!0),[N,k]=(0,l.useState)(null),[O,E]=(0,l.useState)([]),[R,M]=(0,l.useState)(!1),[_,U]=(0,l.useState)(!1),[K,L]=(0,l.useState)(!1),[W,Z]=(0,l.useState)(!1),[Q,V]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(""),[en,eo]=(0,l.useState)(!1),[ed,ec]=(0,l.useState)(!1),[em,eu]=(0,l.useState)(!1),[ep,ex]=(0,l.useState)(!1),[eh,ef]=(0,l.useState)(!1),[eg,ey]=(0,l.useState)(null),[eb,ev]=(0,l.useState)({}),[ej,ew]=(0,l.useState)([]),[eN,ek]=(0,l.useState)(!1),[eC,eS]=(0,l.useState)({}),[eA,e$]=(0,l.useState)(""),[eT,eO]=(0,l.useState)(()=>new Set),[eP,eI]=(0,l.useState)(""),eE=(0,S.i)(),[eD,eR]=(0,l.useState)("all"),[ez,eM]=(0,l.useState)(!1),[eq,e_]=(0,l.useState)(null),[eU,eK]=(0,l.useState)(!1),[eF,eL]=(0,l.useState)([]),[eJ,eH]=(0,l.useState)(!1),[eW,eB]=(0,l.useState)(null),[eZ,eG]=(0,l.useState)(""),[eQ,eV]=(0,l.useState)("auto"),[eX,eY]=(0,l.useState)({enabled:!1,connections:{},schedules:{}}),[e0,e1]=(0,l.useState)(null),[e2,e5]=(0,l.useState)([]),[e3,e4]=(0,l.useState)(!1),[e6,e9]=(0,l.useState)(null),[e8,e7]=(0,l.useState)([]),[te,tt]=(0,l.useState)(null),[ts,ta]=(0,l.useState)([]),[tl,ti]=(0,l.useState)([]),[tr,tn]=(0,l.useState)(null),[to,td]=(0,l.useState)(!1),[tc,tm]=(0,l.useState)(!1),[tu,tp]=(0,l.useState)(!1),[tx,th]=(0,l.useState)(null),[tf,tg]=(0,l.useState)({}),[ty,tb]=(0,l.useState)(null),tv=(0,l.useRef)(!1),[tj,tw]=(0,l.useState)(!1),[tN,tk]=(0,l.useState)(!1),{copied:tC,copy:tS}=(0,A.C)(),tA="ag_risk_confirmed",t$=()=>{M(!0)},tT=()=>{"antigravity"===g&&"true"!==window.localStorage.getItem(tA)?td(!0):"xiaomi-mimo"===g?U(!0):tD?t$():(ee(""),V(!0))},tO=()=>{(ee(""),tW)?Z(!0):V(!0)},tP=()=>{tD?tT():tO()},tI=N?{id:N.id,name:N.name||("anthropic-compatible"===N.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===N.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===N.type?"AC":"OC",apiType:N.apiType,baseUrl:N.baseUrl,type:N.type}:p.zN[g]||p.fg[g]||p.IS[g]||p.nJ[g]||p.br[g]||p.mh[g],tE=tI?.authModes||[],tD=!!p.zN[g]||!!p.IS[g]||tE.includes("oauth"),tR=!!p.fg[g]||tE.includes("apikey"),tz=!!p.IS[g]?.noAuth,tM=(0,x.KC)(g),tq=(0,l.useMemo)(()=>(0,p.Q5)(g),[g]),t_="opencode"===g||!tq,tU=("cursor"===g||"zed"===g)&&e8.length>0,tK=(0,l.useMemo)(()=>tU?e8:t_?tM:[],[tU,t_,tM,e8]),tF=(0,p.wG)(g),tL=(0,p.mq)(g),tJ=(0,p.gb)(g),tH=tL||tJ,tW=!!p.mh[g],tB=(0,l.useMemo)(()=>[...tK,...ts.filter(e=>!tK.some(t=>t.id===e.id))].filter(e=>{let t=(0,x.CP)(e);return!t||"llm"===t}).map(e=>e.id),[tK,ts]),tZ=!tH&&tD&&tR,tG="xai"===g?"Grok Build OAuth":"grok-cli"===g?"Grok CLI Device Login":"kimi"===g?"Kimi Coding OAuth":"tokenharbor"===g?"Token Harbor Login":"OAuth",tQ="xai"===g?"xAI API Key":"kimi"===g?"Kimi API Key":"qoder"===g||"qoder-cn"===g?"PAT":"API Key",tV=e=>{if(!eQ||"auto"===eQ)return null;let t=C(g,e);return t&&t.includes(eQ)?eQ:null},tX=tH?g:tF,tY=(()=>{let e=new Set,t=new Set,s=s=>{if(!s||t.has(s))return;t.add(s);let a=C(g,s);a&&a.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tK)s(e.id);for(let e of ts)s(e.id);for(let e of ej)e.providerAlias===tX&&"llm"===(e.kind||e.type||"llm")&&s(e.id);return e.size?["auto",...e]:null})(),t0=tH?N?.prefix||g:tF,t1=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tX)}`,{cache:"no-store"}),t=await e.json();e.ok&&ti(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tX]),t2=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tX,ids:[e]})})).ok&&await t1()}catch(e){console.log("Error disabling model:",e)}},t5=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tX)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t1()}catch(e){console.log("Error enabling model:",e)}},t3=async e=>{e.length&&tn({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{tn(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tX,ids:e})})).ok&&await t1()}catch(e){console.log("Error disabling all models:",e)}}})},t4=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tX)}`,{method:"DELETE"})).ok&&await t1()}catch(e){console.log("Error enabling all models:",e)}},t6=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ev(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),t9=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ew(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===g&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&ta(e.models)}).catch(()=>{})},[g]);let t8=(0,l.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"})]),l=await e.json(),i=await t.json(),r=await s.json(),n=a.ok?await a.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===g);v(e)}s.ok&&E(r.proxyPools||[]);let o=(n.providerStrategies||{})[g]||{};eB(o.fallbackStrategy||null),eG(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[g]||{};eV(d.mode||"auto");let c=ei[g],m=c&&n[c]||{};if(eY({enabled:!0===m.enabled,connections:m.connections||{},schedules:m.schedules||{}}),t.ok){let e=(i.nodes||[]).find(e=>e.id===g)||null;if(!e&&tH)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===g)||null))break}k(e)}}catch(e){console.log("Error fetching connections:",e)}finally{w(!1)}},[g,tH]),t7=async e=>{try{let t=await fetch(`/api/provider-nodes/${g}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(k(s.node),await t8(),ex(!1))}catch(e){console.log("Error updating provider node:",e)}},se=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},l={};e&&(l.fallbackStrategy=e),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let i={...a};0===Object.keys(l).length?delete i[g]:i[g]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:i})})}catch(e){console.log("Error saving provider strategy:",e)}},st=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[g]={mode:e}:delete s[g],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},ss=async e=>{let t=ei[g];if(t){eY(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{t8(),t6(),t9(),t1()},[t8,t6,t9,t1]),(0,l.useEffect)(()=>{if("cursor"!==g&&"zed"!==g)return void e7([]);let e=b.find(e=>!1!==e.isActive);if(!e?.id){e7([]),"zed"===g&&tt(null);return}let t=!1;return"zed"===g&&tt(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:s})=>{if(!t){if(e&&Array.isArray(s?.models)&&s.models.length>0){e7(s.models),"zed"===g&&s?.warning&&tt(s.warning);return}"zed"===g&&(e7([]),tt(s?.warning||s?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==g||(e7([]),tt("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[g,b]);let sa=async(e=!1,{autoAdd:t=!1}={})=>{if(tq){e4(!0);try{let{data:s,error:a}=await P(tq,g,{force:e});if(e5(s),0===s.length)return void e9({ok:!1,text:a||"The provider returned no models."});if(!t)return void e9({ok:!0,text:`Fetched ${s.length} models.`});let l=new Set;for(let e of tK)l.add(`${tX}/${e.id}`);for(let e of ej)e.providerAlias===tX&&e.id&&l.add(`${tX}/${e.id}`);for(let e of Object.values(eb))"string"==typeof e&&l.add(e);let i=0,r=0;for(let e of s)if(!l.has(`${tX}/${e.id}`))try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tX,id:e.id,type:"llm",name:e.name||e.id,origin:"fetch"})})).ok?i+=1:r+=1}catch{r+=1}i>0&&(await t9(),window.dispatchEvent(new CustomEvent("customModelChanged")));let n=s.length-i-r,o=[];i>0&&o.push(`Added ${i} model${1===i?"":"s"}`),r>0&&o.push(`${r} failed`),n>0&&o.push(`${n} already in the list`),e9({ok:0===r&&i>0,text:o.join(" \xb7 ")||"All models already in the list."})}finally{e4(!1)}}};(0,l.useEffect)(()=>{let e=!1;if(tq)return P(tq,g).then(({data:t})=>{e||e5(t)}),()=>{e=!0}},[g,tq]);let sl=async(e,t,s=tF)=>{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 t6();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},si=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t6()}catch(e){console.log("Error deleting alias:",e)}},sr=async(e,t="llm",s=tX,a,l)=>{try{let i=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t,...a?{caps:a}:{},...l?{transport:l}:{}})});if(i.ok)await t9(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await i.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},sn=async(e,t="llm",s=tX)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await t9(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},so=async()=>{if(tj)return;let e=b.find(e=>!1!==e.isActive);if(!e)return void alert((0,T.Tl)("Please add an active Qoder connection first"));tw(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,T.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,T.Tl)("No models returned"));let l=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^(qoder-cn|qoder)\//,"");ej.some(e=>e.providerAlias===tX&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(eb).includes(`${tX}/${s}`)||(await sr(s,"llm",tX),l+=1)}0===l?alert((0,T.Tl)("All models already exist, no new models added")):alert((0,T.Tl)("Successfully added")+` ${l} `+(0,T.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,T.Tl)("Error fetching models")+": "+e.message)}finally{tw(!1)}},sd=async()=>{if(tN)return;let e=b.find(e=>!1!==e.isActive);if(!e)return void alert((0,T.Tl)("Please add an active Cline connection first"));tk(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,T.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,T.Tl)("No models returned"));let l=0;for(let e of a){let t=e.id||e.name;t&&(ej.some(e=>e.providerAlias===tX&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(eb).includes(`${tX}/${t}`)||(await sr(t,"llm",tX),l+=1))}0===l?alert((0,T.Tl)("All models already exist, no new models added")):alert((0,T.Tl)("Successfully added")+` ${l} `+(0,T.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,T.Tl)("Error fetching models")+": "+e.message)}finally{tk(!1)}},sc=async()=>{if(tc||0===b.length)return;let e=Object.fromEntries(b.map(e=>[e.id,{state:"queued",error:null}]));tv.current=!1,tm(!0),tp(!1),th(null),tg(e),tb({total:b.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<b.length;e+=1){if(tv.current){tb({total:b.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=b[e];th(a.id),tg(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),l=await e.json(),i=!!l.valid;i?t+=1:s+=1,tg(e=>({...e,[a.id]:{state:i?"success":"failed",error:i?null:l.error||null}}))}catch(e){s+=1,tg(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}tb({total:b.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<b.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{th(null),tm(!1),tp(!1),tv.current=!1}},sm=async e=>{tn({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{tn(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&v(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},su=()=>{t8(),M(!1)},sp=async e=>{ee("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:g,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await t8(),V(!1),sa(!0,{autoAdd:!0});return}ee(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),ee("Failed to save connection")}},sx=async e=>{try{(await fetch(`/api/providers/${eg.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await t8(),eu(!1),sa(!0,{autoAdd:!0}))}catch(e){console.log("Error updating connection:",e)}},sh=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&v(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},sf=async(e,t)=>{let s=[...b];[s[e],s[t]]=[s[t],s[e]],v(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 t8()}},sg=b.filter(e=>eF.includes(e.id)),sy=b.length>0&&eF.length===b.length;(0,l.useEffect)(()=>{eL(e=>e.filter(e=>b.some(t=>t.id===e)))},[b]);let sb=(()=>{if(0===sg.length)return"";let e=new Set(sg.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=O.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),sv=()=>{eJ||ef(!1)},sj=async e=>{eH(!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 t8(),ef(!1)}finally{eH(!1)}},sw=e=>sj(sg.map(t=>({connectionId:t.id,proxyPoolId:e}))),sN=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:b.map((e,t)=>{let s;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,eF.includes(s)),onChange:()=>{var t;return t=e.id,void eL(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(F,{connection:e,proxyPools:O,isOAuth:tD,isFirst:0===t,isLast:t===b.length-1,onMoveUp:()=>sf(t,t-1),onMoveDown:()=>sf(t,t+1),onToggleActive:t=>sh(e.id,t),autoPing:ei[g]&&"oauth"===e.authType?{isActive:!0===eX.connections[e.id]||eX.schedules?.[e.id]?.enabled===!0,reactiveOn:!0===eX.connections[e.id],provider:g,scheduleOn:eX.schedules?.[e.id]?.enabled===!0,scheduleSummary:(0,ea.JW)(eX.schedules?.[e.id]).join(" / "),onConfigure:()=>e1(e)}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&v(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:()=>{ey(e),eu(!0)},onDelete:()=>sm(e.id),oneByOneStatus:tf[e.id]||null})})]},e.id)})}),sk=O.filter(e=>!0===e.isActive),sC=(0,a.jsx)(u.aF,{isOpen:eh,onClose:sv,title:`Apply Proxy (${sg.length} selected)`,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=O.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):sj(sg.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eJ||0===sk.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:()=>sw(null),disabled:eJ,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)"})]}),O.map(e=>(0,a.jsxs)("button",{onClick:()=>sw(e.id),disabled:eJ||!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))]}),eJ&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(u.$n,{onClick:sv,variant:"ghost",fullWidth:!0,disabled:eJ,children:"Cancel"})]})}),sS=async e=>{if(!eT.has(e)){eO(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tX}/${e}`})}),s=await t.json();eS(t=>({...t,[e]:s.ok?"ok":"error"})),e$(s.ok?"":s.error||"Model not reachable")}catch{eS(t=>({...t,[e]:"error"})),e$("Network error")}finally{eO(t=>{let s=new Set(t);return s.delete(e),s})}}},sA=async()=>{if(!ez&&0!==tB.length){eM(!0),e_({done:0,total:tB.length}),e$("");try{let e=await fetch("/api/models/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:tB.map(e=>`${tX}/${e}`)})});if(!e.ok){let t=await e.json().catch(()=>({}));e$(t.error||"Batch test failed");return}let t=e.body?.getReader(),s=new TextDecoder,a="",l=null;for(;t;){let{done:e,value:i}=await t.read();if(e)break;let r=(a+=s.decode(i,{stream:!0})).split("\n");for(let e of(a=r.pop()||"",r)){let t,s=e.trim();if(!s)continue;try{t=JSON.parse(s)}catch{continue}if(t.done){l=t.summary;continue}let a=function(e,t){let s="string"==typeof e?e:"";if(!s)return"";let a=t?`${t}/`:"";return a&&s.startsWith(a)?s.slice(a.length):s}(t.model,tX);a&&(eS(e=>({...e,[a]:t.ok?"ok":"error"})),e_(e=>e?{...e,done:e.done+1}:e))}}if(l){let{passed:e,failed:t,total:s}=l;0===t?eE.success(`All ${s} models passed`):eE.warning(`${e}/${s} models passed, ${t} failed`)}}catch(e){e$(e?.message||"Batch test failed")}finally{eM(!1),e_(null)}}};if(j)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(u.Qv,{}),(0,a.jsx)(u.Qv,{})]});if(!tI)return(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)(d(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let s$=()=>tL&&tI.apiType?"responses"===tI.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tJ?"/providers/anthropic-m.png":(0,m.HY)(tI.id);return(0,a.jsxs)("div",{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)(d(),{href:"/dashboard/providers",className:"btn-quiet -ml-2 mb-4 !px-2 !py-1.5 !text-xs inline-flex",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]","aria-hidden":"true",children:"arrow_back"}),"Back to providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col justify-between gap-4 sm:flex-row sm:items-start",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3.5 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-xl border border-line",style:{backgroundColor:`${tI.color}15`},children:eN||!s$()?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tI.color},children:tI.textIcon||tI.id.slice(0,2).toUpperCase()}):(0,a.jsx)(c.A,{src:s$(),alt:tI.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,m.Kw)(tI.id),ek(!0)},loading:"lazy",decoding:"async"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-[-0.035em] sm:text-3xl",children:tI.name}),b.length>0?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-success/25 bg-success/10 px-2 py-1 font-mono text-[9px] text-success",children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-success","aria-hidden":"true"}),b.length," Connected"]}):(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-line-strong bg-surface-2 px-2 py-1 font-mono text-[9px] text-muted",children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-muted","aria-hidden":"true"}),"Not connected"]})]}),(tI.notice?.apiKeyUrl||tI.notice?.signupUrl||tI.website)&&(0,a.jsxs)("a",{href:tI.notice?.apiKeyUrl||tI.notice?.signupUrl||tI.website,target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-flex items-center gap-1 text-xs text-gold-text hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",children:"open_in_new"}),tI.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,a.jsxs)("p",{className:"muted mt-1 text-xs",children:[b.length," connection",1===b.length?"":"s"," \xb7 local workspace"]})]})]}),(0,a.jsx)("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:tP,className:"btn-gold !px-3 !py-2.5 !text-xs",children:tW?"Connect Session":tH?"Add API Key":"Add connection"})})]})]}),(0,a.jsxs)("section",{className:"grid grid-cols-2 gap-3 xl:grid-cols-4","aria-label":"Provider summary",children:[(0,a.jsx)(er,{label:"Connections",value:String(b.length),icon:"key",tone:b.length>0?"text-success":"text-muted"}),(0,a.jsx)(er,{label:"Models",value:(e=[...tK,...ts.filter(e=>!tK.some(t=>t.id===e.id))].filter(e=>{let t=(0,x.CP)(e);return!t||"llm"===t}).length)>0?String(e):"—",icon:"memory",tone:"text-[#5d98e8]"}),(0,a.jsx)(er,{label:"Status",value:b.length>0?"Connected":"Not connected",icon:"activity",tone:b.length>0?"text-success":"text-muted"}),(0,a.jsx)(er,{label:"Endpoint",value:tI.website?new URL(tI.website).hostname:g,icon:"dns",tone:"text-gold-text"})]}),tI.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:tI.deprecationNotice})]}),tI.notice?.text&&!tI.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:tI.notice.text}),tI.notice.apiKeyUrl&&(0,a.jsx)("a",{href:tI.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 →"})]}),tH&&N&&(0,a.jsx)(u.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tJ?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tJ?"Messages API":"responses"===N.apiType?"Responses API":"Chat Completions"," \xb7 ",(N.baseUrl||"").replace(/\/$/,""),"/",tJ?"messages":"responses"===N.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:()=>{ee(""),V(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ex(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{tn({title:"Delete Compatible Node",message:`Delete this ${tJ?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{tn(null);try{(await fetch(`/api/provider-nodes/${g}`,{method:"DELETE"})).ok&&f.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tz?(0,a.jsx)(u.gw,{providerId:g}):(0,a.jsxs)(u.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",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Connections"}),(0,a.jsx)("p",{className:"muted mt-1 text-xs",children:"Credentials and endpoints used by this provider."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[b.length>0&&O.length>0&&(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>{0!==sg.length&&ef(!0)},disabled:0===eF.length,title:sb||"Tick the connections the proxy pool should apply to",children:"Apply Proxy"}),b.length>0&&(0,a.jsxs)(a.Fragment,{children:[eF.length>0&&(0,a.jsxs)(u.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eF.length;0!==e&&tn({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{tn(null);let e=0,t=[...eF];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}v(e=>e.filter(e=>!t.includes(e.id))),eL([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eF.length,")"]}),(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:sc,disabled:tc,children:tc?"Testing Connection One-by-One...":"Test Connection One-by-One"}),tc&&(0,a.jsx)(u.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{tc&&(tv.current=!0,tp(!0))},disabled:tu,children:tu?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(u.lM,{checked:"round-robin"===eW,onChange:e=>{let t=e?"round-robin":null,s=e?eZ||"1":eZ;e&&!eZ&&eG("1"),eB(t),se(t,s)}}),"round-robin"===eW&&(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:eZ,onChange:e=>{var t;eG(t=e.target.value),se("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===b.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tD?"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"}),tZ&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tG," or ",tQ,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tZ?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tT,children:tG}),(0,a.jsx)(u.$n,{size:"sm",icon:"key",onClick:tO,children:tQ})]}):(0,a.jsxs)(a.Fragment,{children:[!tH&&"iflow"===g&&(0,a.jsx)(u.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),children:"Cookie"}),"codex"===g&&(0,a.jsx)(u.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>eo(!0),children:(0,T.Tl)("Bulk Add")}),"grok-cli"===g&&(0,a.jsx)(u.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ec(!0),children:(0,T.Tl)("Bulk Add")}),(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:tP,children:tW?"Connect Session":tH?"Add API Key":"iflow"===g?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[ty&&(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: ",ty.total]}),(0,a.jsxs)("span",{children:["Completed: ",ty.completed]}),(0,a.jsxs)("span",{children:["Passed: ",ty.passed]}),(0,a.jsxs)("span",{children:["Failed: ",ty.failed]}),ty.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),tc&&tx&&(0,a.jsxs)("span",{children:["Running: ",b.find(e=>e.id===tx)?.name||tx]})]})}),b.length>0&&(0,a.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:sy,onChange:()=>{sy?eL([]):eL(b.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),sN,!tH&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===g&&(0,a.jsx)(u.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===g&&(0,a.jsx)(u.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>eo(!0),title:(0,T.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,T.Tl)("Bulk Add")}),"grok-cli"===g&&(0,a.jsx)(u.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ec(!0),title:(0,T.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,T.Tl)("Bulk Add")}),tZ?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tT,className:"w-full sm:w-auto",children:tG}),(0,a.jsx)(u.$n,{size:"sm",icon:"key",onClick:tO,className:"w-full sm:w-auto",children:tQ})]}):(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:tP,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsx)(et,{providerId:g}),(0,a.jsxs)(u.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col justify-between gap-3 sm:flex-row sm:items-start",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Available models"}),(0,a.jsx)("p",{className:"muted mt-1 text-xs",children:"Models currently exposed by this provider route. Test sends one real minimal request."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[e6&&(0,a.jsx)("span",{role:"status",className:`max-w-[240px] truncate rounded-lg border px-2 py-1 text-[11px] ${e6.ok?"border-success/25 bg-success/10 text-success":"border-danger/30 bg-danger/10 text-danger"}`,title:e6.text,children:e6.text}),tq&&(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:e3?"progress_activity":"cloud_download",onClick:()=>void sa(!0),disabled:e3,title:"Fetch the live model list from the provider API (uses your saved key)",className:e3?"[&_.material-symbols-outlined]:animate-spin":"",children:e3?"Fetching…":"Fetch models"}),!tH&&tB.length>0&&(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:ez?"progress_activity":"bolt",onClick:()=>void sA(),disabled:ez||0===b.length&&!tz,title:0!==b.length||tz?`Send one real request to each of the ${tB.length} models`:"Add a connection first — a model test needs a credential",className:ez?"[&_.material-symbols-outlined]:animate-spin":"",children:ez?`Testing ${eq?`${eq.done}/${eq.total}`:"…"}`:"Test all"}),tY&&(0,a.jsx)("select",{value:eQ,onChange:e=>{var t;eV(t=e.target.value),st(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-line bg-surface px-2 py-1 text-[11px] focus:border-gold focus:outline-none",children:tY.map(e=>(0,a.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))}),!tH&&(t=[...tK,...ts.filter(e=>!tK.some(t=>t.id===e.id))].filter(e=>{let t=(0,x.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!tl.includes(e)),(0,a.jsxs)(a.Fragment,{children:[tl.length>0&&(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:t4,children:"Active All"}),t.length>0&&(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>t3(t),children:"Disable All"})]}))]})]}),!tH&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,a.jsxs)("label",{className:"relative block flex-1",children:[(0,a.jsx)("span",{className:"sr-only",children:"Search models"}),(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[15px] text-muted","aria-hidden":"true",children:"search"}),(0,a.jsx)("input",{value:eP,onChange:e=>eI(e.target.value),placeholder:"Search models","aria-label":"Search models",className:"input !h-9 !w-full !py-2 !pl-9 !pr-8 !text-xs",autoComplete:"off",spellCheck:!1}),eP&&(0,a.jsx)("button",{type:"button",onClick:()=>eI(""),"aria-label":"Clear model search",title:"Clear search",className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 text-muted transition-colors hover:text-text",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]","aria-hidden":"true",children:"close"})})]}),(0,a.jsx)("div",{className:"flex shrink-0 overflow-x-auto rounded-lg border border-line bg-bg-soft p-0.5",role:"tablist","aria-label":"Filter models by test result",children:el.map(e=>(0,a.jsx)("button",{type:"button",role:"tab","aria-selected":eD===e.value,onClick:()=>eR(e.value),className:`whitespace-nowrap rounded-md px-2.5 py-1.5 text-[10px] font-medium transition-colors ${eD===e.value?"bg-surface text-gold-text shadow-sm":"text-muted hover:text-text"}`,children:e.label},e.value))})]}),!!eA&&(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:eA}),/RegionError|hosted in China|regionNotAllowed/i.test(eA)&&(i=(s="string"==typeof eA?eA:JSON.stringify(eA)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),r=s.match(/wrk_[0-9A-Za-z]+/),o=i?i[0].endsWith("/go")?i[0]:`${i[0]}/go`:r?`https://opencode.ai/workspace/${r[0]}/go`:"https://opencode.ai",(0,a.jsx)("div",{className:"mt-1.5",children:(0,a.jsxs)("a",{href:o,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,a.jsx)("span",{children:"Allow China-hosted models"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"})]})}))]}),"zed"===g&&!!te&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:te}),(()=>{let e,t,s;if(tH)return(0,a.jsx)(q,{providerStorageAlias:tX,providerDisplayAlias:t0,modelAliases:eb,customModels:ej,copied:tC,onCopy:tS,onSetAlias:sl,onDeleteAlias:si,onAddCustomModel:e=>sr(e,"llm",tX),onDeleteCustomModel:e=>sn(e,"llm",tX),connections:b,isAnthropic:tJ});let l=[...tK,...ts.filter(e=>!tK.some(t=>t.id===e.id))].filter(e=>{let t=(0,x.CP)(e);return!t||"llm"===t}),i=new Set(tl),r=eP.trim().toLowerCase(),n=e=>!r||e.id.toLowerCase().includes(r)||(e.name||"").toLowerCase().includes(r),o=e=>{if("all"===eD)return!0;let t=eC[e.id];return"untested"===eD?!t:"passed"===eD?"ok"===t:"failed"!==eD||"error"===t},d=l.filter(e=>!i.has(e.id)&&n(e)&&o(e)),c=l.filter(e=>i.has(e.id)),m=I({customModels:ej,modelAliases:eb,providerAlias:tX,builtInModels:tK,type:"llm"}).filter(e=>n({id:e.id,name:e.name})&&o({id:e.id}));return(0,a.jsxs)("div",{className:"group/model-list space-y-2",children:[0===m.length&&0===d.length&&(0,a.jsxs)("div",{className:"rounded-xl border border-dashed border-line-strong px-5 py-9 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mx-auto text-[24px] text-muted","aria-hidden":"true",children:"memory"}),(0,a.jsx)("p",{className:"mt-3 text-sm font-semibold",children:eP.trim()||"all"!==eD?"No matching models":"No models discovered"}),(0,a.jsx)("p",{className:"muted mt-1 text-xs",children:eP.trim()||"all"!==eD?"Try a different search or filter.":"Connect the provider or add a custom model ID below."})]}),m.map(e=>{let t=e.alias||Object.entries(eb).find(([,t])=>t===`${tX}/${e.id}`)?.[0];return(0,a.jsx)(D,{model:{id:e.id,name:e.name},fullModel:`${t0}/${e.id}`,alias:t,copied:tC,onCopy:tS,onSetAlias:t=>sl(e.id,t,tX),onClearAlias:t?()=>si(t):void 0,onDeleteAlias:()=>{"custom"===e.source?sn(e.id,"llm",tX):si(t)},testStatus:eC[e.id],onTest:b.length>0||tz?()=>sS(e.id):void 0,isTesting:eT.has(e.id),isCustom:"fetch"!==e.origin,isFree:!1,caps:y(`${g}/${e.id}`),thinkingSuffix:tV(e.id)},`${e.source}-${e.fullModel}`)}),d.map(e=>{let t=`${tX}/${e.id}`,s=`${g}/${e.id}`,l=Object.entries(eb).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(D,{model:e,fullModel:`${t0}/${e.id}`,alias:l,copied:tC,onCopy:tS,onSetAlias:t=>sl(e.id,t,tX),onClearAlias:l?()=>si(l):void 0,onDeleteAlias:()=>si(l),testStatus:eC[e.id],onTest:b.length>0||tz?()=>sS(e.id):void 0,isTesting:eT.has(e.id),isFree:e.isFree,onDisable:()=>t2(e.id),caps:y(`${g}/${e.id}`),thinkingSuffix:tV(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>eK(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-gold/40 px-3 py-2 text-xs font-medium text-gold-text transition-colors hover:border-gold hover:bg-gold-soft sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",children:"add"}),"Add Model"]}),("qoder"===g||"qoder-cn"===g)&&b.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:so,disabled:tj,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:tj?{animation:"spin 1s linear infinite"}:void 0,children:tj?"progress_activity":"download"}),tj?(0,T.Tl)("Fetching..."):(0,T.Tl)("Fetch Qoder Models")]}),("cline"===g||"clinepass"===g)&&b.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:sd,disabled:tN,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:tN?{animation:"spin 1s linear infinite"}:void 0,children:tN?"progress_activity":"download"}),tN?(0,T.Tl)("Fetching..."):(0,T.Tl)("Import from /models")]}),e2.length>0&&(e=new Set([...Object.values(eb),...m.map(e=>e.fullModel)]),t=new Set(tK.map(e=>e.id)),0===(s=e2.filter(s=>!e.has(`${tX}/${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 models from the provider API:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await sr(e.id,"llm",tX)},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.contextLength?`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`:e.name||e.id,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),c.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 (",c.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(e=>(0,a.jsxs)("button",{onClick:()=>t5(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))})]}),tI.passthroughModels&&(0,a.jsx)("div",{className:"w-full mt-4 border-t border-line pt-4",children:(0,a.jsx)(z,{providerAlias:tX,modelAliases:eb,customModels:ej,copied:tC,onCopy:tS,onSetAlias:(e,t)=>sl(e,t,tX),onDeleteAlias:si,onAddCustomModel:e=>sr(e,"llm",tX),onDeleteCustomModel:e=>sn(e,"llm",tX)})})]})})()]}),!tH&&tB.length>0&&(0,a.jsx)(u.Zp,{children:(0,a.jsx)(u.Tt,{providerId:g,providerName:tI?.name||g,models:tB,defaultModel:tB[0],connections:b})}),sC,"kiro"===g?(0,a.jsx)(u.Mh,{isOpen:R,providerInfo:tI,onSuccess:su,onClose:()=>M(!1)}):"cursor"===g?(0,a.jsx)(u.G9,{isOpen:R,onSuccess:su,onClose:()=>M(!1)}):"zed"===g?(0,a.jsx)(u.TE,{isOpen:R,providerInfo:tI,onSuccess:su,onClose:()=>M(!1)}):"gitlab"===g?(0,a.jsx)(u.vj,{isOpen:R,providerInfo:tI,onSuccess:su,onClose:()=>M(!1)}):"tokenharbor"===g?(0,a.jsx)(u.O1,{isOpen:R,providerInfo:tI,onSuccess:su,onClose:()=>M(!1)}):(0,a.jsx)(u.LF,{isOpen:R,provider:g,providerInfo:tI,onSuccess:su,onClose:()=>M(!1)}),(0,a.jsx)(u.LH,{isOpen:_,onSuccess:su,onClose:()=>U(!1)}),"iflow"===g&&(0,a.jsx)(u.vE,{isOpen:K,onSuccess:()=>{t8(),L(!1)},onClose:()=>L(!1)}),tW&&(0,a.jsx)(u.Sg,{isOpen:W,providerId:g,onSuccess:su,onClose:()=>Z(!1)}),(0,a.jsx)(J,{isOpen:Q,provider:g,providerName:tI.name,isCompatible:tH,isAnthropic:tJ,authType:tI?.authType,authHint:tI?.authHint,website:tI?.website,proxyPools:O,error:Y,existingNames:b.map(e=>e.name).filter(Boolean),onSave:sp,onBulkDone:t8,onClose:()=>{ee(""),V(!1)}},g),(0,a.jsx)(u.wI,{isOpen:em,connection:eg,proxyPools:O,onSave:sx,onClose:()=>eu(!1)}),tH&&(0,a.jsx)(H,{isOpen:ep,node:N,onSave:t7,onClose:()=>ex(!1),isAnthropic:tJ}),!tH&&(0,a.jsx)(B,{isOpen:eU,providerAlias:tX,onSave:async(e,t,s)=>{await sr(e,t?.stt?"stt":"llm",tX,t,s),eK(!1)},onClose:()=>eK(!1)}),"codex"===g&&(0,a.jsx)(G,{isOpen:en,onClose:()=>eo(!1),onSuccess:t8}),"grok-cli"===g&&(0,a.jsx)(X,{isOpen:ed,onClose:()=>ec(!1),onSuccess:t8}),e0&&(0,a.jsx)(es.A,{isOpen:!!e0,onClose:()=>e1(null),connection:e0,reactive:!0===eX.connections[e0.id],schedule:eX.schedules?.[e0.id]||null,onSave:e=>((e,{reactive:t,schedule:s})=>{ss({...eX,connections:{...eX.connections,[e]:t},schedules:{...eX.schedules,[e]:s}})})(e0.id,e)}),(0,a.jsx)(u.uo,{isOpen:to,onClose:()=>td(!1),onConfirm:()=>{(window.localStorage.setItem(tA,"true"),td(!1),tD)?t$():tO()},title:"Risk Notice",message:tI?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(u.uo,{isOpen:!!tr,onClose:()=>tn(null),onConfirm:tr?.onConfirm,title:tr?.title||"Confirm",message:tr?.message,variant:"danger"})]})}er.propTypes={label:r().string.isRequired,value:r().string.isRequired,icon:r().string.isRequired,tone:r().string}},93195:(e,t,s)=>{"use strict";function a(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}s.d(t,{JW:()=>o,Vm:()=>a,fB:()=>i,gy:()=>l,nz:()=>r});let l={anchor:"09:30",timezone:a(),windowHours:5,slotsPerDay:3};function i(e){let t=/^(\d{1,2}):(\d{2})$/.exec(String(e||"").trim());if(!t)return null;let s=Number(t[1]),a=Number(t[2]);return s>23||a>59?null:{hour:s,minute:a}}function r(e){return Math.max(1,Math.floor(24/e))}function n(e,t,s,a){let l="number"==typeof e?e:Number(e);return Number.isFinite(l)?Math.min(a,Math.max(s,l)):t}function o(e){let t=function(e){if(!e||!0!==e.enabled)return null;let t=i(e.anchor)||i(l.anchor),s=`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}`,a=!function(e){if(!e||"string"!=typeof e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(e.timezone)?l.timezone:e.timezone,o=n(e.windowHours,l.windowHours,.5,24),d=Math.round(n(e.slotsPerDay,l.slotsPerDay,1,r(o)));return{enabled:!0,anchor:s,timezone:a,windowHours:o,slotsPerDay:d}}(e);if(!t)return[];let{hour:s,minute:a}=i(t.anchor),o=60*s+a;return Array.from({length:t.slotsPerDay},(e,s)=>{let a=Math.round(o+s*t.windowHours*60)%1440;return`${String(Math.floor(a/60)).padStart(2,"0")}:${String(a%60).padStart(2,"0")}`})}},97132:(e,t,s)=>{"use strict";s.d(t,{A:()=>m});var a=s(95155),l=s(12115),i=s(14051),r=s.n(i),n=s(35497),o=s(31474),d=s(93195);let c=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function m({isOpen:e,onClose:t,onSave:s,connection:i,reactive:r=!1,schedule:u=null}){let[p,x]=(0,l.useState)(()=>({mode:u?.enabled===!0?"schedule":!0===r?"reset":"off",anchor:u?.anchor||d.gy.anchor,timezone:(0,d.Vm)(),windowHours:String(u?.windowHours??d.gy.windowHours),slotsPerDay:String(u?.slotsPerDay??d.gy.slotsPerDay)})),h=Number(p.windowHours),f=Number(p.slotsPerDay),g=!!(0,d.fB)(p.anchor),y=Number.isFinite(h)&&h>=.5&&h<=24,b=y?(0,d.nz)(h):24,v=Number.isInteger(f)&&f>=1&&f<=b,j=g&&y&&v,w="schedule"!==p.mode||j,N=j?(0,d.JW)({enabled:!0,...p,windowHours:h,slotsPerDay:f}):[],k=N.length&&y?(()=>{let{hour:e,minute:t}=(0,d.fB)(p.anchor),s=Math.round(60*e+t+f*h*60)%1440;return`${String(Math.floor(s/60)).padStart(2,"0")}:${String(s%60).padStart(2,"0")}`})():"",C=e=>x(t=>({...t,...e}));return(0,a.jsx)(n.aF,{isOpen:e,onClose:t,title:"Auto-ping settings",size:"lg",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.$n,{variant:"secondary",onClick:t,children:"Cancel"}),(0,a.jsx)(n.$n,{onClick:()=>{w&&(s({reactive:"reset"===p.mode,schedule:"schedule"===p.mode?{enabled:!0,anchor:p.anchor,timezone:p.timezone,windowHours:h,slotsPerDay:f}:{enabled:!1}}),t())},disabled:!w,children:"Save"})]}),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",i?.name?` for ${i.name}`:""," — pick one mode."]}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:c.map(e=>{let t=p.mode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>C({mode:e.value}),className:(0,o.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",t?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:e.icon}),(0,a.jsx)("span",{children:e.label})]},e.value)})}),"reset"===p.mode&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===p.mode&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,a.jsx)(n.pd,{label:"Anchor time",type:"time",value:p.anchor,onChange:e=>C({anchor:e.target.value}),error:g?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,a.jsx)(n.pd,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:p.windowHours,onChange:e=>C({windowHours:e.target.value}),error:y?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,a.jsx)(n.pd,{label:"Pings per day",type:"number",min:"1",max:String(b),step:"1",value:p.slotsPerDay,onChange:e=>C({slotsPerDay:e.target.value}),error:v?"":`1 – ${b}`,hint:v?`Max ${b}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),N.length>0&&(0,a.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,a.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",p.timezone,")"]}),(0,a.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:N.join(" → ")}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",N[0]," – ",k,", then pauses until ",N[0]," next day."]})]})]})]})})}m.propTypes={isOpen:r().bool.isRequired,onClose:r().func.isRequired,onSave:r().func.isRequired,connection:r().object,reactive:r().bool,schedule:r().object}}},e=>{e.O(0,[8500,246,5772,2723,705,5497,8441,3794,7358],()=>e(e.s=30840)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{21785:(e,t,r)=>{Promise.resolve().then(r.bind(r,64485))},64485:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var a=r(95155),i=r(12115),s=r(73321),o=r(98500),l=r.n(o),d=r(35497),n=r(90620);let c={oauth:"OAuth",apikey:"API Key",cookie:"Cookie"},h={oauth:"lock",apikey:"key",cookie:"cookie"};function u(e){return"apikey"===e||"cookie"===e}function p(e){return"cookie"===e?"Cookie Value":"API Key"}let m=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),x=Object.values(n.MA).map(e=>({value:e.id,label:c[e.id]||e.id}));function v(){let e=(0,s.useRouter)(),[t,r]=(0,i.useState)(!1),[o,c]=(0,i.useState)({provider:"",authMethod:"apikey",apiKey:"",displayName:""}),[v,b]=(0,i.useState)({}),y=(e,t)=>{c(r=>({...r,[e]:t})),v[e]&&b(t=>({...t,[e]:null}))},f=async t=>{let a;if(t.preventDefault(),a={},o.provider||(a.provider="Please select a provider"),u(o.authMethod)&&!o.apiKey&&(a.apiKey=`${p(o.authMethod)} is required`),b(a),0===Object.keys(a).length){r(!0);try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o.provider,apiKey:o.apiKey,displayName:o.displayName})});if(t.ok)e.push("/dashboard/providers");else{let e=await t.json();b({submit:e.error||"Failed to create provider"})}}catch(e){b({submit:"An error occurred. Please try again."})}finally{r(!1)}}},j=n.Q2[o.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(l(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("form",{onSubmit:f,className:"flex flex-col gap-6",children:[(0,a.jsx)(d.l6,{label:"Provider",options:m,value:o.provider,onChange:e=>y("provider",e.target.value),placeholder:"Select a provider",error:v.provider,required:!0}),j&&(0,a.jsxs)(d.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:j.color},children:j.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:j.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:x.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>y("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${o.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:h[e.value]||"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),u(o.authMethod)&&(0,a.jsx)(d.pd,{label:p(o.authMethod),type:"cookie"===o.authMethod?"text":"password",placeholder:"cookie"===o.authMethod?"Paste your session cookie":"Enter your API key",value:o.apiKey,onChange:e=>y("apiKey",e.target.value),error:v.apiKey,hint:"Your credential will be encrypted and stored securely.",required:!0}),"oauth"===o.authMethod&&(0,a.jsxs)(d.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication. The sign-in continues on the provider page."}),(0,a.jsx)(d.$n,{type:"button",variant:"secondary",icon:"link",onClick:()=>{o.provider?e.push(`/dashboard/providers/${o.provider}`):b(e=>({...e,provider:"Please select a provider"}))},children:"Connect with OAuth2"})]}),(0,a.jsx)(d.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:o.displayName,onChange:e=>y("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),v.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:v.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(l(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(d.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(d.$n,{type:"submit",loading:t,fullWidth:!0,className:"flex-1",disabled:"oauth"===o.authMethod,title:"oauth"===o.authMethod?"An OAuth connection is created by the sign-in above":void 0,children:"Create Provider"})]})]})})]})}}},e=>{e.O(0,[8500,246,2723,705,5497,8441,3794,7358],()=>e(e.s=21785)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{76427:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>N});var r=t(95155),l=t(12115),a=t(14051),i=t.n(a),n=t(35497),o=t(57250),d=t(8247),c=t(90620),p=t(88105),m=t(98500),x=t.n(m),u=t(65921),h=t(38003);let g={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},f=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function b({variant:e,isOpen:s,onClose:t,onCreated:a}){let i=g[e],o=()=>({name:"",prefix:"",...i.hasApiType?{apiType:"chat"}:{},baseUrl:i.defaultBaseUrl}),[d,c]=(0,l.useState)(o),[p,m]=(0,l.useState)(!1),[x,u]=(0,l.useState)(""),[h,v]=(0,l.useState)(""),[y,j]=(0,l.useState)(!1),[N,w]=(0,l.useState)(null),[k,C]=(0,l.useState)(null);(0,l.useEffect)(()=>{i.hasApiType?c(e=>({...e,baseUrl:i.defaultBaseUrl})):s&&(w(null),u(""),v(""))},[i.hasApiType?d.apiType:s]);let T=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0),C(null);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...i.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:i.type})}),s=await e.json().catch(()=>({}));e.ok?(a(s.node),c(o()),u(""),w(null)):C(s.error||`Failed to create ${i.errorLabel} node (${e.status})`)}catch(e){console.log(`Error creating ${i.errorLabel} node:`,e)}finally{m(!1)}}},A=async()=>{j(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:x,type:i.type,modelId:h.trim()||void 0})}),s=await e.json();w(s)}catch{w({valid:!1,error:"Network error"})}finally{j(!1)}};return(0,r.jsx)(n.aF,{isOpen:s,title:i.title,onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:i.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:i.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),i.hasApiType&&(0,r.jsx)(n.l6,{label:"API Type",options:f,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,r.jsx)(n.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:i.defaultBaseUrl,hint:i.baseUrlHint}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:x,onChange:e=>u(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:h,onChange:e=>v(e.target.value),placeholder:i.modelIdPlaceholder,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:A,disabled:!x||y||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:y?"Checking...":"Check"}),(()=>{if(!N)return null;let{valid:e,error:s,method:t}=N;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===t&&(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"}),s&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:s})]})})()]}),k&&(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Failed"}),(0,r.jsx)("span",{className:"text-sm text-red-500",children:k})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:T,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}b.propTypes={variant:i().oneOf(["openai","anthropic"]).isRequired,isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired};let v=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"none",label:"No connection"}];function y(e,s,t){let l=[];if(e>0&&l.push((0,r.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),s>0){let e=t?`${s} Error (${t})`:`${s} Error`;l.push((0,r.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===l.length?(0,r.jsx)("span",{className:"text-text-muted",children:"No connections"}):l}function j({label:e,value:s,detail:t,tone:l,icon:a}){return(0,r.jsxs)("article",{className:"card min-w-0 p-4 sm:p-5",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsx)("span",{className:`grid h-9 w-9 shrink-0 place-items-center rounded-lg border ${l}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[17px]","aria-hidden":"true",children:a})}),(0,r.jsx)("span",{className:"muted font-mono text-[10px]",children:t})]}),(0,r.jsx)("p",{className:"muted mt-5 text-[10px] font-semibold uppercase tracking-[0.1em]",children:e}),(0,r.jsx)("p",{className:"mt-1 font-mono text-2xl font-semibold tracking-tight",children:s})]})}function N(){let e,s,[t,a]=(0,l.useState)([]),[i,o]=(0,l.useState)([]),[d,m]=(0,l.useState)(!0),[x,g]=(0,l.useState)(!1),[f,y]=(0,l.useState)(!1),[N,T]=(0,l.useState)(!1),[A,I]=(0,l.useState)(null),[P,O]=(0,l.useState)(null),[R,S]=(0,l.useState)("all"),$=(0,u.i)(),E=(0,h.C)(e=>e.query),U=(0,h.C)(e=>e.register),q=(0,h.C)(e=>e.unregister);(0,l.useEffect)(()=>(U("Search providers..."),()=>q()),[U,q]);let _=e=>!E.trim()||!!e&&e.toLowerCase().includes(E.trim().toLowerCase());(0,l.useEffect)(()=>{(async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),t=await e.json(),r=await s.json();e.ok&&a(t.connections||[]),s.ok&&o(r.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{m(!1)}})()},[]);let z=(e,s)=>{let r=Array.isArray(s)?s:[s],l=t.filter(s=>s.provider===e&&r.includes(s.authType)),a=e=>{let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"},i=l.filter(e=>{let s=a(e);return"active"===s||"success"===s}).length,n=l.filter(e=>{let s=a(e);return"error"===s||"expired"===s||"unavailable"===s}),o=n.length,d=l.length,c=d>0&&l.every(e=>!1===e.isActive),p=n.sort((e,s)=>new Date(s.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:i,error:o,total:d,errorCode:p?function(e){if(!e)return null;let s=Number(e.errorCode);if(Number.isFinite(s)&&s>=400)return String(s);let t=function(e){if(!e)return null;let s=e.match(/\b([45]\d{2})\b/);return s?s[1]:"ERR"}(e.lastError);if("401"===t||"403"===t)return"AUTH";if(t&&"ERR"!==t)return t;let r=(e.lastError||"").toLowerCase();return r.includes("runtime")||r.includes("not runnable")||r.includes("not installed")?"RUNTIME":r.includes("invalid api key")||r.includes("token invalid")||r.includes("revoked")||r.includes("unauthorized")?"AUTH":"ERR"}(p):null,errorTime:p?.lastErrorAt?function(e){if(!e)return"";let s=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;let t=Math.floor(s/60);if(t<24)return`${t}h ago`;let r=Math.floor(t/24);return`${r}d ago`}(p.lastErrorAt):null,allDisabled:c}},D=(e,s)=>(function(e,s,t=!1){return"all"===e||function(e,s=!1){return s?"active":e&&0!==e.total?e.allDisabled?"inactive":"active":"none"}(s,t)===e})(R,e,s),F=async(e,s,r)=>{let l=Array.isArray(s)?s:[s],i=s=>s.provider===e&&l.includes(s.authType),n=t.filter(i);a(e=>e.map(e=>i(e)?{...e,isActive:r}:e)),await Promise.allSettled(n.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})})))},L=async(e,s=null)=>{if(!A){I("provider"===e?s:e),O(null);try{let t=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:s})}),r=await t.json();if(O(r),r.summary){let{passed:e,failed:s,total:t}=r.summary;0===s?$.success(`All ${t} tests passed`):$.warning(`${e}/${t} passed, ${s} failed`)}}catch(e){O({error:"Test request failed"}),$.error("Provider test failed")}finally{I(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)&&D(z(e.id,"apikey"))),K=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)&&D(z(e.id,"apikey"))),H=(e,s)=>{if("kiro"===s)return["oauth","apikey","api_key"];let t=e?.authModes;return Array.isArray(t)?t.includes("apikey")?["oauth","apikey","api_key"]:"oauth":s in p.nJ||s in c.fg?["oauth","apikey","api_key"]:"oauth"},B=(e=Object.entries(c.zN).filter(([e,s])=>!s.hidden&&_(s.name)&&D(z(e,H(s,e)),s.noAuth)),s="oauth",[...e].sort(([e,t],[r,l])=>{let a=t.priority??999,i=l.priority??999;if(a!==i)return a-i;let n=z(e,s),o=z(r,s),d=+(n.connected>0),c=+(o.connected>0);return d!==c?c-d:(t.name||"").localeCompare(l.name||"")})),J=Object.entries(p.IS).filter(([e,s])=>!s.hidden&&_(s.name)&&D(z(e,H(s,e)),s.noAuth)).sort(([,e],[,s])=>!!s.noAuth-!!e.noAuth),W=Object.entries(p.nJ).filter(([e,s])=>!s.hidden&&_(s.name)&&(s.serviceKinds??["llm"]).includes("llm")&&D(z(e,H(s,e)),s.noAuth)).sort(([e,s],[t,r])=>{let l=s.priority??999,a=r.priority??999;if(l!==a)return l-a;let i=!!r.noAuth-!!s.noAuth;if(0!==i)return i;let n=z(e,H(s,e)).connected>0?0:1,o=z(t,H(r,t)).connected>0?0:1;return n!==o?n-o:(s.name||"").localeCompare(r.name||"")}),Y=Object.entries(c.fg).filter(([e,s])=>!s.hidden&&(s.serviceKinds??["llm"]).includes("llm")&&_(s.name)&&D(z(e,"apikey"),s.noAuth)).sort(([e,s],[t,r])=>{let l=z(e,"apikey").total>0?0:1,a=z(t,"apikey").total>0?0:1;return l!==a?l-a:(s.name||"").localeCompare(r.name||"")}),Q=!!E.trim()||"all"!==R,Z=Q||x?Y:Y.slice(0,20),V=Y.length-20;if(d)return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]});let G=B.length>0||J.length>0||W.length>0||Y.length>0||M.length>0||K.length>0,X=[...B.map(([e,s])=>z(e,H(s,e))),...J.map(([e,s])=>z(e,H(s,e))),...W.map(([e,s])=>z(e,H(s,e))),...Y.map(([e])=>z(e,"apikey"))],ee=X.filter(e=>e.connected>0&&0===e.error).length,es=X.filter(e=>e.error>0).length,et=B.length+J.length+W.length+Y.length+M.length+K.length-ee-es,er=X.reduce((e,s)=>e+s.total,0);return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,r.jsxs)("div",{className:"mb-2 flex flex-col justify-between gap-5 sm:flex-row sm:items-end",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("span",{className:"eyebrow",children:[(0,r.jsx)("span",{className:"eyebrow-dot","aria-hidden":"true"}),"Provider control plane"]}),(0,r.jsx)("h2",{className:"mt-4 text-2xl font-semibold tracking-[-0.035em] sm:text-3xl",children:"Your provider layer."}),(0,r.jsx)("p",{className:"muted mt-2 max-w-xl text-sm leading-relaxed",children:"Bring every model provider behind one route. Credentials stay in your local workspace while OmniHilbras handles selection and fallback."})]}),(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,r.jsx)("select",{value:R,onChange:e=>S(e.target.value),className:"h-9 rounded-lg border border-line bg-surface px-2 text-xs text-text outline-none transition-colors hover:border-line-strong","aria-label":"Filter providers by connection status",children:v.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})]}),(0,r.jsxs)("section",{className:"grid grid-cols-2 gap-3 xl:grid-cols-4","aria-label":"Provider summary",children:[(0,r.jsx)(j,{label:"Connections",value:String(er),detail:"saved",tone:"border-success/20 bg-success/10 text-success",icon:"key"}),(0,r.jsx)(j,{label:"Connected",value:String(ee),detail:"serving",tone:"border-success/20 bg-success/10 text-success",icon:"check_circle"}),(0,r.jsx)(j,{label:"Needs attention",value:String(es),detail:"review",tone:"border-gold/25 bg-gold-soft text-gold-text",icon:"error"}),(0,r.jsx)(j,{label:"Available",value:String(Math.max(0,et)),detail:"ready to add",tone:"border-line-strong bg-surface-2 text-muted",icon:"dns"})]}),!G&&(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 or filters"})]}),(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:"mono-label",children:"Custom Providers \xb7 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:()=>T(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>y(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===M.length&&0===K.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,...K].map(e=>(0,r.jsx)(k,{providerId:e.id,provider:e,stats:z(e.id,"apikey"),authType:"compatible",onToggle:s=>F(e.id,"apikey",s)},e.id))})]}),B.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:"mono-label",children:"OAuth Providers"}),(0,r.jsx)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:(0,r.jsxs)("button",{onClick:()=>L("oauth"),disabled:!!A,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"oauth"===A?"border-gold/40 bg-gold-soft text-gold-text animate-pulse":"border-line bg-bg-soft text-muted hover:border-gold/40 hover:text-text"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===A?" animate-spin":""}`,children:"play_arrow"}),"oauth"===A?"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:B.map(([e,s])=>{let t=H(s,e);return(0,r.jsx)(w,{providerId:e,provider:s,stats:z(e,t),authType:"oauth",onToggle:s=>F(e,t,s)},e)})})]}),(J.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:"mono-label",children:"Free Tier Providers"}),(0,r.jsxs)("button",{onClick:()=>L("free"),disabled:!!A,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"free"===A?"border-gold/40 bg-gold-soft text-gold-text animate-pulse":"border-line bg-bg-soft text-muted hover:border-gold/40 hover:text-text"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===A?" animate-spin":""}`,children:"play_arrow"}),"free"===A?"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:[J.map(([e,s])=>{let t=H(s,e);return(0,r.jsx)(w,{providerId:e,provider:s,stats:z(e,t),authType:"free",onToggle:s=>F(e,t,s)},e)}),W.map(([e,s])=>{let t=H(s,e);return(0,r.jsx)(k,{providerId:e,provider:s,stats:z(e,t),authType:Array.isArray(t)?t[0]??"apikey":t,onToggle:s=>F(e,t,s)},e)})]})]}),Y.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:"mono-label",children:"API Key Providers"}),(0,r.jsxs)("button",{onClick:()=>L("apikey"),disabled:!!A,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"apikey"===A?"border-gold/40 bg-gold-soft text-gold-text animate-pulse":"border-line bg-bg-soft text-muted hover:border-gold/40 hover:text-text"}`,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"===A?" animate-spin":""}`,children:"play_arrow"}),"apikey"===A?"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:Z.map(([e,s])=>(0,r.jsx)(k,{providerId:e,provider:s,stats:z(e,"apikey"),authType:"apikey",onToggle:s=>F(e,"apikey",s)},e))}),!Q&&!x&&V>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-gold/40 px-3 py-2.5 text-sm font-medium text-gold-text transition-colors hover:border-gold hover:bg-gold-soft",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",Y.length," providers"]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("div",{className:"flex items-center justify-between",children:(0,r.jsxs)("h2",{className:"text-xl font-semibold flex items-center gap-2",children:["Web Cookie Providers"," "]})}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:Object.entries(p.br).map(([e,s])=>(0,r.jsx)(k,{providerId:e,provider:s,stats:z(e,"cookie"),authType:"cookie",onToggle:s=>F(e,"cookie",s)},e))})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("div",{className:"flex items-center justify-between",children:(0,r.jsxs)("h2",{className:"text-xl font-semibold flex items-center gap-2",children:["Web Cookie Sessions"," "]})}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:Object.entries(p.mh).map(([e,s])=>(0,r.jsx)(k,{providerId:e,provider:s,stats:z(e,"cookie"),authType:"cookie",onToggle:s=>F(e,"cookie",s)},e))})]}),(0,r.jsxs)("div",{className:"flex flex-col items-start justify-between gap-3 rounded-xl border border-gold/20 bg-gold-soft/45 px-4 py-3.5 sm:flex-row sm:items-center sm:px-5",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined mt-0.5 h-4 w-4 shrink-0 text-gold-text text-[16px]","aria-hidden":"true",children:"shield"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs font-semibold",children:"Local credentials stay local."}),(0,r.jsx)("p",{className:"muted mt-1 text-[11px]",children:"Keys are stored in your local workspace vault — never sent to Hilbras."})]})]}),(0,r.jsx)("span",{className:"font-mono text-[10px] text-gold-text",children:"BYOK \xb7 local mode"})]}),(0,r.jsx)(b,{variant:"openai",isOpen:f,onClose:()=>y(!1),onCreated:e=>{o(s=>[...s,e]),y(!1)}}),(0,r.jsx)(b,{variant:"anthropic",isOpen:N,onClose:()=>T(!1),onCreated:e=>{o(s=>[...s,e]),T(!1)}}),P&&(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>O(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 rounded-t-xl",children:[(0,r.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,r.jsx)("button",{onClick:()=>O(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:P})})]})]})]})}function w({providerId:e,provider:s,stats:t,authType:l,onToggle:a}){let{connected:i,error:d,errorCode:c,errorTime:p,allDisabled:m}=t,u=!!s.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 border-line transition-colors cursor-pointer hover:border-line-strong hover:bg-surface-2/75 ${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-10 shrink-0 rounded-xl flex items-center justify-center",style:{backgroundColor:`${s.color?.length>7?s.color:s.color+"15"}`},children:(0,r.jsx)(o.A,{src:`/providers/${s.id}.png`,alt:s.name,size:32,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:s.textIcon||s.id.slice(0,2).toUpperCase(),fallbackColor:s.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold transition-colors group-hover:text-gold-text",children:s.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 text-[11px] 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:[y(i,d,c),p&&(0,r.jsx)("span",{className:"text-text-muted",children:p})]})})]})]}),(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:t.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(),a(!!m)},children:(0,r.jsx)(n.lM,{size:"sm",checked:!m,onChange:()=>{},title:m?"Enable provider":"Disable provider"})})})]})})})}function k({providerId:e,provider:s,stats:t,authType:l,onToggle:a}){let{connected:i,error:c,errorCode:m,errorTime:u,allDisabled:h}=t,g=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 border-line transition-colors cursor-pointer hover:border-line-strong hover:bg-surface-2/75 ${h?"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-10 shrink-0 rounded-xl flex items-center justify-center",style:{backgroundColor:`${s.color?.length>7?s.color:s.color+"15"}`},children:(0,r.jsx)(o.A,{src:g&&s.apiType?"responses"===s.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":f?"/providers/anthropic-m.png":(0,d.HY)(s.id),alt:s.name,size:32,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:s.textIcon||s.id.slice(0,2).toUpperCase(),fallbackColor:s.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold transition-colors group-hover:text-gold-text",children:s.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 text-[11px] flex-wrap",children:h?(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:[y(i,c,m),g&&(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===s.apiType?"Responses":"Chat"}),f&&(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),u&&(0,r.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:t.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(),a(!!h)},children:(0,r.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?"Enable provider":"Disable provider"})})})]})})})}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:s,mode:t}=e,l=e.results||[];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[s&&(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"}[t]||t," Test"]}),(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[s.passed," passed"]}),s.failed>0&&(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[s.failed," failed"]}),(0,r.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[s.total," tested"]})]}),l.map((e,s)=>(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||s)),0===l.length&&(0,r.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}j.propTypes={label:i().string.isRequired,value:i().string.isRequired,detail:i().string,tone:i().string,icon:i().string.isRequired},w.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},k.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},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}},81102:(e,s,t)=>{Promise.resolve().then(t.bind(t,76427))}},e=>{e.O(0,[8500,246,2723,705,5497,8441,3794,7358],()=>e(e.s=81102)),_N_E=e.O()}]);
@@ -0,0 +1,4 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{29286:(e,t,l)=>{Promise.resolve().then(l.bind(l,38846))},38846:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>d});var r=l(95155),s=l(12115),a=l(35497),o=l(65921);function i(e,t=""){return`${function(e){let t=(e||"").trim();if(!t)return"";try{return new URL(t).toString()}catch{return t}}(e)}|||${(t||"").trim()}`}function n(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,s.useState)([]),[l,d]=(0,s.useState)(!0),[c,x]=(0,s.useState)(!1),[p,m]=(0,s.useState)(!1),[h,u]=(0,s.useState)(!1),[y,f]=(0,s.useState)(!1),[g,j]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1),[k,N]=(0,s.useState)(!1),[w,C]=(0,s.useState)(null),[P,$]=(0,s.useState)(n()),[D,T]=(0,s.useState)(""),[S,A]=(0,s.useState)({vercelToken:"",projectName:"vercel-relay"}),[E,I]=(0,s.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[U,O]=(0,s.useState)({denoToken:"",orgDomain:"",projectName:""}),[R,F]=(0,s.useState)({netlifyToken:"",projectName:"netlify-relay"}),[z,W]=(0,s.useState)(!1),[_,L]=(0,s.useState)(!1),[q,V]=(0,s.useState)(!1),[G,J]=(0,s.useState)(null),[B,M]=(0,s.useState)([]),[H,Y]=(0,s.useState)(!1),[Q,K]=(0,s.useState)({current:0,total:0}),[Z,X]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(null),el=(0,s.useRef)(null),er=(0,o.i)();(0,s.useEffect)(()=>{let e=e=>{el.current&&!el.current.contains(e.target)&&N(!1)};return k&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[k]);let es=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),l=await e.json();e.ok&&t(l.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{d(!1)}},[]);(0,s.useEffect)(()=>{es()},[es]);let ea=()=>{C(null),$(n())},eo=()=>{ea(),x(!0)},ei=()=>{x(!1),ea()},en=async()=>{let e={name:P.name.trim(),proxyUrl:P.proxyUrl.trim(),noProxy:P.noProxy.trim(),isActive:!0===P.isActive,strictProxy:!0===P.strictProxy};if(e.name&&e.proxyUrl){W(!0);try{let t=!!w,l=await fetch(t?`/api/proxy-pools/${w.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(l.ok)await es(),ei(),er.success(w?"Proxy pool updated":"Proxy pool created");else{let e=await l.json();er.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{W(!1)}}},ed=async e=>{et({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{et(null);try{let l=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(l.ok){t(t=>t.filter(t=>t.id!==e.id)),er.success("Proxy pool deleted");return}let r=await l.json();409===l.status?er.warning(`Cannot delete: ${r.boundConnectionCount||0} connection(s) are still using this pool.`):er.error(r.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),er.error("Failed to delete proxy pool")}}})},ec=async e=>{J(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),l=await t.json();if(!t.ok)return void er.error(l.error||"Failed to test proxy");await es(),er.success(l.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),er.error("Failed to test proxy")}finally{J(null)}},ex=async e=>{let l=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:l}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:l})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),er.error("Failed to update active state"))}catch(l){console.log("Error toggling active:",l),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},ep=e.length>0&&B.length===e.length,em=()=>M([]),eh=async t=>{let l=B.length>0?B:e.map(e=>e.id);if(0!==l.length){X(!0);try{let e=0,r=0;for(let s of l)try{(await fetch(`/api/proxy-pools/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?e+=1:r+=1}catch{r+=1}await es(),er.success(`${t?"Activated":"Deactivated"} ${e}${r?`, failed ${r}`:""}`)}finally{X(!1)}}},eu=async()=>{0!==B.length&&et({title:"Delete Proxy Pools",message:`Delete ${B.length} proxy pool(s)?`,onConfirm:async()=>{et(null),X(!0);try{let e=0,t=0,l=0;for(let r of B)try{let s=await fetch(`/api/proxy-pools/${r}`,{method:"DELETE"});s.ok?e+=1:409===s.status?t+=1:l+=1}catch{l+=1}await es(),em(),er.success(`Deleted ${e}${t?`, ${t} bound`:""}${l?`, ${l} failed`:""}`)}finally{X(!1)}}})},ey=async()=>{let t=B.length>0?e.filter(e=>B.includes(e.id)):e;if(0===t.length)return;Y(!0),K({current:0,total:t.length});let l=0,r=[],s=0,a=[...t],o=async()=>{for(;a.length>0;){let e=a.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),s=await t.json();t.ok&&s.ok?l+=1:r.push(e.id)}catch{r.push(e.id)}finally{K({current:s+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},o)),await es(),Y(!1),K({current:0,total:0}),r.length>0?et({title:"Disable Dead Proxies",message:`Alive: ${l}, Dead: ${r.length}.
2
+
3
+ Disable ${r.length} dead proxies?`,onConfirm:async()=>{et(null),X(!0);try{for(let e of r)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await es(),er.success(`Disabled ${r.length} dead proxies`)}finally{X(!1)}}}):er.success(`Health check done. Alive: ${l}, Dead: ${r.length}`)};(0,s.useEffect)(()=>{M(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let ef=()=>{_||m(!1)},eg=()=>{q||u(!1)},ej=()=>{q||f(!1)},eb=()=>{q||j(!1)},ev=()=>{q||v(!1)},ek=async()=>{if(S.vercelToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),t=await e.json();e.ok?(await es(),eg(),er.success(`Deployed: ${t.deployUrl}`)):er.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),er.error("Deploy failed")}finally{V(!1)}}},eN=async()=>{if(E.accountId.trim()&&E.apiToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)}),t=await e.json();e.ok?(await es(),ej(),er.success(`Deployed: ${t.deployUrl}`)):er.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),er.error("Deploy failed")}finally{V(!1)}}},ew=async()=>{if(U.denoToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U)}),t=await e.json();e.ok?(await es(),eb(),er.success(`Deployed: ${t.deployUrl}`)):er.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),er.error("Deploy failed")}finally{V(!1)}}},eC=async()=>{if(R.netlifyToken.trim()){V(!0);try{let e=await fetch("/api/proxy-pools/netlify-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),t=await e.json();e.ok?(await es(),ev(),er.success(`Deployed: ${t.deployUrl}`)):er.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Netlify relay:",e),er.error("Deploy failed")}finally{V(!1)}}},eP=async()=>{let t=D.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void er.warning("Please paste at least one proxy line.");let l=[],r=[];if(t.forEach((e,t)=>{try{let r=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),l=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${l}`}}let l=t.split(":");if(4===l.length){let[e,t,r,s]=l;if(!e||!t||!r||!s)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(r)}:${encodeURIComponent(s)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);r&&l.push({...r,lineNumber:t+1})}catch(e){r.push(`Line ${t+1}: ${e.message}`)}}),r.length>0)return void er.error(`Invalid proxy format:
4
+ ${r.join("\n")}`);L(!0);try{let t=new Set(e.map(e=>i(e.proxyUrl,e.noProxy))),r=0,s=0,a=0;for(let e of l){let l=i(e.proxyUrl);if(t.has(l)){s+=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?(r+=1,t.add(l)):a+=1}await es(),m(!1),er.success(`Batch import completed: Created ${r}, Skipped ${s}, Failed ${a}`)}catch(e){console.log("Error batch importing proxies:",e),er.error("Batch import failed")}finally{L(!1)}},e$=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return l?(0,r.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,r.jsx)(a.Qv,{}),(0,r.jsx)(a.Qv,{})]}):(0,r.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,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("h1",{className:"text-xl font-semibold sm:text-2xl",children:"Proxy Pools"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,r.jsxs)("div",{className:"relative",ref:el,children:[(0,r.jsxs)(a.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>N(!k),children:["Deploy Relay",(0,r.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:k?"expand_less":"expand_more"})]}),k&&(0,r.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,r.jsxs)("button",{onClick:()=>{I({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),f(!0),N(!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,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,r.jsxs)("button",{onClick:()=>{A({vercelToken:"",projectName:"vercel-relay"}),u(!0),N(!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,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,r.jsxs)("button",{onClick:()=>{O({denoToken:"",orgDomain:"",projectName:""}),j(!0),N(!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,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]}),(0,r.jsxs)("button",{onClick:()=>{F({netlifyToken:"",projectName:"netlify-relay"}),v(!0),N(!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,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-teal-500",children:"deployed_code"}),"Netlify Relay"]})]})]}),(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{T(""),m(!0)},children:"Batch Import"}),(0,r.jsx)(a.$n,{size:"sm",icon:"add",onClick:eo,children:"Add Proxy Pool"})]})]}),(0,r.jsxs)(a.Zp,{children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,r.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:ep,onChange:()=>M(ep?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ep?"Unselect all":"Select all"]}),(0,r.jsxs)(a.Ex,{variant:"default",children:["Total: ",e.length]}),(0,r.jsxs)(a.Ex,{variant:"success",children:["Active: ",e$]})]}),(B.length>0||H)&&(0,r.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,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:B.length>0?`${B.length} selected`:"All pools"}),(0,r.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,r.jsx)(a.$n,{size:"sm",icon:H?"progress_activity":"health_and_safety",onClick:ey,disabled:H||Z||0===e.length,children:H?`Checking ${Q.current}/${Q.total}`:"Health Check"}),B.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>eh(!0),disabled:Z||H,children:"Activate"}),(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>eh(!1),disabled:Z||H,children:"Deactivate"}),(0,r.jsx)(a.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:eu,disabled:Z||H,children:"Delete"}),(0,r.jsx)(a.$n,{size:"sm",variant:"ghost",onClick:em,disabled:Z||H,children:"Clear"})]})]})]}),0===e.length?(0,r.jsxs)("div",{className:"text-center py-10",children:[(0,r.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,r.jsx)(a.$n,{icon:"add",onClick:eo,children:"Add Proxy Pool"})]}):(0,r.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,r.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,r.jsx)("input",{type:"checkbox",checked:B.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-black/20 dark:border-white/20"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,r.jsx)(a.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,r.jsx)(a.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),"deno"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"deno relay"}),"netlify"===e.type&&(0,r.jsx)(a.Ex,{variant:"default",size:"sm",children:"netlify relay"}),(0,r.jsxs)(a.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,r.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,r.jsxs)("p",{className:"text-[11px] text-text-muted 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,r.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,r.jsx)(a.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ex(e),title:e.isActive?"Disable":"Enable"}),(0,r.jsx)("button",{onClick:()=>ec(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:G===e.id,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:G===e.id?{animation:"spin 1s linear infinite"}:void 0,children:G===e.id?"progress_activity":"science"})}),(0,r.jsx)("button",{onClick:()=>{C(e),$(n(e)),x(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,r.jsx)("button",{onClick:()=>ed(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,r.jsx)(a.aF,{isOpen:p,title:"Batch Import Proxies",onClose:ef,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,r.jsx)("textarea",{value:D,onChange:e=>T(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,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eP,disabled:!D.trim()||_,children:_?"Importing...":"Import"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:ef,disabled:_,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:h,title:"Deploy Vercel Relay",onClose:eg,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,r.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,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,r.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,r.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,r.jsx)(a.pd,{label:"Vercel API Token",value:S.vercelToken,onChange:e=>A(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(a.pd,{label:"Project Name",value:S.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,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:ek,disabled:!S.vercelToken.trim()||q,children:q?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:eg,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:y,title:"Deploy Cloudflare Relay",onClose:ej,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,r.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,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,r.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,r.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"My Profile"})," → ",(0,r.jsx)("b",{children:"API Tokens"})," → ",(0,r.jsx)("b",{children:"Create Token"})]}),(0,r.jsxs)("li",{children:["Scroll down to ",(0,r.jsx)("b",{children:"Custom Token"})," and click ",(0,r.jsx)("b",{children:"Get started"})]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,r.jsxs)("li",{children:["Under ",(0,r.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,r.jsx)("i",{children:"Your Account Name"})]}),(0,r.jsxs)("li",{children:["Click ",(0,r.jsx)("b",{children:"Continue to summary"})," → ",(0,r.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,r.jsx)(a.pd,{label:"Account ID",value:E.accountId,onChange:e=>I(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,r.jsx)(r.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,r.jsx)(a.pd,{label:"API Token",value:E.apiToken,onChange:e=>I(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,r.jsxs)(r.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,r.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,r.jsx)(a.pd,{label:"Worker Name",value:E.projectName,onChange:e=>I(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eN,disabled:!E.accountId.trim()||!E.apiToken.trim()||q,children:q?"Deploying...":"Deploy Worker"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:ej,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:g,title:"Deploy Deno Relay",onClose:eb,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.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,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,r.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,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,r.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,r.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,r.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,r.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"console.deno.com"})]}),(0,r.jsxs)("li",{children:["Select your ",(0,r.jsx)("b",{children:"Organization"})," → ",(0,r.jsx)("b",{children:"Settings"})," → ",(0,r.jsx)("b",{children:"Organization Tokens"})]}),(0,r.jsxs)("li",{children:["Create a ",(0,r.jsx)("b",{children:"Organization Token"})," (prefix ",(0,r.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,r.jsx)(a.pd,{label:"Deno Deploy API Token",value:U.denoToken,onChange:e=>O(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,r.jsx)(r.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,r.jsx)(a.pd,{label:"Organization Domain",value:U.orgDomain,onChange:e=>O(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,r.jsx)(a.pd,{label:"App Name",value:U.projectName,onChange:e=>O(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:ew,disabled:!U.denoToken.trim()||!U.orgDomain.trim()||q,children:q?"Deploying...":"Deploy Relay"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:eb,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:b,title:"Deploy Netlify Relay",onClose:ev,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"rounded-lg bg-teal-500/5 border border-teal-500/10 p-3 flex flex-col gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Netlify Relay?"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a serverless relay function to Netlify's global edge network. All AI provider requests are forwarded through Netlify's edge, masking your real IP."}),(0,r.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,r.jsx)("li",{children:"Runs on Netlify Functions with a 60-second execution limit and streaming support"}),(0,r.jsx)("li",{children:"Free tier: 125,000 function invocations and 100GB bandwidth per month"}),(0,r.jsx)("li",{children:"Relay URL format: https://your-site.netlify.app/.netlify/functions/relay"}),(0,r.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]}),(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-teal-500/10 text-xs text-text-muted",children:[(0,r.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,r.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,r.jsxs)("li",{children:["Go to ",(0,r.jsx)("b",{children:"User Settings"})," → ",(0,r.jsx)("b",{children:"Applications"})," → ",(0,r.jsx)("b",{children:"Personal access tokens"})]}),(0,r.jsxs)("li",{children:["Select ",(0,r.jsx)("b",{children:"New access token"})," and generate a token"]}),(0,r.jsx)("li",{children:"Copy the token — you won't see it again after leaving the page"})]})]})]}),(0,r.jsx)(a.pd,{label:"Netlify API Token",value:R.netlifyToken,onChange:e=>F(t=>({...t,netlifyToken:e.target.value})),placeholder:"nfp_xxxxxxxxxxxxxxxx",hint:(0,r.jsxs)(r.Fragment,{children:["Token is used once for deployment and not stored. ",(0,r.jsx)("a",{href:"https://app.netlify.com/user/applications#personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,r.jsx)(a.pd,{label:"Site Name",value:R.projectName,onChange:e=>F(t=>({...t,projectName:e.target.value})),placeholder:"netlify-relay",hint:"Unique site name (lowercase letters, numbers, hyphens). Your relay URL will be https://site-name.netlify.app/.netlify/functions/relay"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:eC,disabled:!R.netlifyToken.trim()||q,children:q?"Deploying... (may take ~1 min)":"Deploy"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:ev,disabled:q,children:"Cancel"})]})]})}),(0,r.jsx)(a.aF,{isOpen:c,title:w?"Edit Proxy Pool":"Add Proxy Pool",onClose:ei,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(a.pd,{label:"Name",value:P.name,onChange:e=>$(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,r.jsx)(a.pd,{label:"Proxy URL",value:P.proxyUrl,onChange:e=>$(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,r.jsx)(a.pd,{label:"No Proxy",value:P.noProxy,onChange:e=>$(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,r.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,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,r.jsx)(a.lM,{checked:!0===P.isActive,onChange:()=>$(e=>({...e,isActive:!e.isActive})),disabled:z})]}),(0,r.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,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,r.jsx)(a.lM,{checked:!0===P.strictProxy,onChange:()=>$(e=>({...e,strictProxy:!e.strictProxy})),disabled:z})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,r.jsx)(a.$n,{fullWidth:!0,onClick:en,disabled:!P.name.trim()||!P.proxyUrl.trim()||z,children:z?"Saving...":"Save"}),(0,r.jsx)(a.$n,{fullWidth:!0,variant:"ghost",onClick:ei,disabled:z,children:"Cancel"})]})]})}),(0,r.jsx)(a.uo,{isOpen:!!ee,onClose:()=>et(null),onConfirm:ee?.onConfirm,title:ee?.title||"Confirm",message:ee?.message,variant:"danger"})]})}}},e=>{e.O(0,[8500,246,2723,705,5497,8441,3794,7358],()=>e(e.s=29286)),_N_E=e.O()}]);