9router 0.4.9 → 0.4.11

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 (689) hide show
  1. package/README.md +74 -32
  2. package/app/.next/BUILD_ID +1 -1
  3. package/app/.next/app-path-routes-manifest.json +10 -8
  4. package/app/.next/build-manifest.json +2 -2
  5. package/app/.next/routes-manifest.json +12 -0
  6. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  10. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  13. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  16. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  19. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  22. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  25. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page.js +3 -3
  28. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page.js.nft.json +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  31. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  34. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  37. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  40. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  43. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  46. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  49. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  50. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  52. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  55. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  58. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  59. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  61. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  62. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/_global-error/page.js +3 -3
  64. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/_global-error.html +1 -1
  66. package/app/.next/server/app/_global-error.rsc +1 -1
  67. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  69. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  70. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  71. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  72. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  73. package/app/.next/server/app/_not-found/page.js +2 -2
  74. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  75. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/_not-found.html +1 -1
  77. package/app/.next/server/app/_not-found.rsc +4 -4
  78. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  79. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  80. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  81. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  82. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  83. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  84. package/app/.next/server/app/api/auth/login/route.js +1 -1
  85. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  86. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  87. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  88. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +1 -1
  89. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
  90. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  91. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
  92. package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  93. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  94. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  95. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  96. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  97. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  98. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  99. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  100. package/app/.next/server/app/api/combos/route.js +1 -1
  101. package/app/.next/server/app/api/health/route.js +1 -1
  102. package/app/.next/server/app/api/init/route.js +1 -1
  103. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  104. package/app/.next/server/app/api/keys/route.js +1 -1
  105. package/app/.next/server/app/api/locale/route.js +1 -1
  106. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -0
  107. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -0
  108. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -0
  109. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  110. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  111. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -0
  112. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -0
  113. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -0
  114. package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
  115. package/app/.next/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  116. package/app/.next/server/app/api/models/alias/route.js +1 -1
  117. package/app/.next/server/app/api/models/availability/route.js +1 -1
  118. package/app/.next/server/app/api/models/custom/route.js +1 -1
  119. package/app/.next/server/app/api/models/route.js +1 -1
  120. package/app/.next/server/app/api/models/route.js.nft.json +1 -1
  121. package/app/.next/server/app/api/models/test/route.js +1 -1
  122. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  123. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  124. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  125. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  126. package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
  127. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
  128. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  129. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  130. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  131. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  132. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  133. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  134. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  135. package/app/.next/server/app/api/pricing/route.js +1 -1
  136. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  137. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  138. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  139. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  140. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  141. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  142. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  143. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  144. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  145. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  146. package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  147. package/app/.next/server/app/api/providers/client/route.js +1 -1
  148. package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
  149. package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
  150. package/app/.next/server/app/api/providers/route.js +1 -1
  151. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  152. package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
  153. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  154. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  155. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  156. package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
  157. package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
  158. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  159. package/app/.next/server/app/api/proxy-pools/route.js +1 -1
  160. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  161. package/app/.next/server/app/api/settings/database/route.js +1 -1
  162. package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
  163. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  164. package/app/.next/server/app/api/settings/route.js +1 -1
  165. package/app/.next/server/app/api/shutdown/route.js +1 -1
  166. package/app/.next/server/app/api/tags/route.js +1 -1
  167. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  168. package/app/.next/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  169. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  170. package/app/.next/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  171. package/app/.next/server/app/api/translator/load/route.js +1 -1
  172. package/app/.next/server/app/api/translator/save/route.js +1 -1
  173. package/app/.next/server/app/api/translator/send/route.js +1 -1
  174. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  175. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  176. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  177. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  178. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  179. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +23 -4
  180. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  181. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  182. package/app/.next/server/app/api/tunnel/tailscale-install/route.js +2 -2
  183. package/app/.next/server/app/api/tunnel/tailscale-login/route.js +23 -4
  184. package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  185. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  186. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  187. package/app/.next/server/app/api/usage/chart/route.js +1 -1
  188. package/app/.next/server/app/api/usage/history/route.js +1 -1
  189. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  190. package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
  191. package/app/.next/server/app/api/usage/request-details/route.js +1 -1
  192. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  193. package/app/.next/server/app/api/usage/stats/route.js +1 -1
  194. package/app/.next/server/app/api/usage/stream/route.js +2 -2
  195. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  196. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  197. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  198. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  199. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  200. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  201. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  202. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  203. package/app/.next/server/app/api/v1/images/generations/route.js +2 -2
  204. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  205. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  206. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  207. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  208. package/app/.next/server/app/api/v1/models/route.js +1 -1
  209. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  210. package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
  211. package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  212. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  213. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  214. package/app/.next/server/app/api/v1/route.js +1 -1
  215. package/app/.next/server/app/api/v1/search/route.js +1 -1
  216. package/app/.next/server/app/api/v1/search/route.js.nft.json +1 -1
  217. package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
  218. package/app/.next/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  219. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  220. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  221. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  222. package/app/.next/server/app/api/v1beta/models/route.js.nft.json +1 -1
  223. package/app/.next/server/app/api/version/route.js +1 -1
  224. package/app/.next/server/app/api/version/update/route.js +1 -1
  225. package/app/.next/server/app/api/version/update/route.js.nft.json +1 -1
  226. package/app/.next/server/app/callback/page.js +2 -2
  227. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  228. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  229. package/app/.next/server/app/callback.html +1 -1
  230. package/app/.next/server/app/callback.rsc +4 -4
  231. package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
  232. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  233. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  234. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  235. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  236. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  237. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  238. package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
  239. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  240. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  241. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  242. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  243. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  244. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  245. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  246. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  247. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  248. package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
  249. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  250. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  251. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  252. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  253. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  254. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  255. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  256. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  257. package/app/.next/server/app/dashboard/combos.html +1 -1
  258. package/app/.next/server/app/dashboard/combos.rsc +6 -6
  259. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  260. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  261. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  262. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  263. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  264. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  265. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  266. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  267. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  268. package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
  269. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  270. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  271. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  272. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  273. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  274. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  275. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  276. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  277. package/app/.next/server/app/dashboard/media-providers/web.html +1 -1
  278. package/app/.next/server/app/dashboard/media-providers/web.rsc +6 -6
  279. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  280. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  281. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  282. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  283. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  284. package/app/.next/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  285. package/app/.next/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  286. package/app/.next/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  287. package/app/.next/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  288. package/app/.next/server/app/dashboard/mitm.html +1 -1
  289. package/app/.next/server/app/dashboard/mitm.rsc +6 -6
  290. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  291. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  292. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  293. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  294. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  295. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  296. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  297. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  298. package/app/.next/server/app/dashboard/profile.html +1 -1
  299. package/app/.next/server/app/dashboard/profile.rsc +6 -6
  300. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  301. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  302. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  303. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  304. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  305. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  306. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  307. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  308. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  309. package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
  310. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  311. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  312. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  313. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  314. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  315. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  316. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  317. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  318. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  319. package/app/.next/server/app/dashboard/providers.html +1 -1
  320. package/app/.next/server/app/dashboard/providers.rsc +6 -6
  321. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  322. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  323. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  324. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  325. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  326. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  327. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  328. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  329. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  330. package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
  331. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  332. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  333. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  334. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  335. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  336. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  337. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  338. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  339. package/app/.next/server/app/dashboard/quota.html +2 -2
  340. package/app/.next/server/app/dashboard/quota.rsc +7 -7
  341. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  342. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  343. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  344. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  345. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  346. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  347. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  348. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  349. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  350. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  351. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  352. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  353. package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
  354. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  355. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  356. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  357. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  358. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  359. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  360. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  361. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  362. package/app/.next/server/app/dashboard/translator.html +1 -1
  363. package/app/.next/server/app/dashboard/translator.rsc +6 -6
  364. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  365. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  366. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  367. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  368. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  369. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  370. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  371. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  372. package/app/.next/server/app/dashboard/usage.html +1 -1
  373. package/app/.next/server/app/dashboard/usage.rsc +6 -6
  374. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  375. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  376. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  377. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  378. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  379. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  380. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  381. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  382. package/app/.next/server/app/dashboard.html +1 -1
  383. package/app/.next/server/app/dashboard.rsc +6 -6
  384. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  385. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  386. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  387. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +6 -6
  388. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  389. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
  390. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  391. package/app/.next/server/app/favicon.ico/route.js +1 -1
  392. package/app/.next/server/app/index.html +1 -1
  393. package/app/.next/server/app/index.rsc +4 -4
  394. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  395. package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
  396. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  397. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  398. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  399. package/app/.next/server/app/landing/page.js +2 -2
  400. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  401. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  402. package/app/.next/server/app/landing.html +1 -1
  403. package/app/.next/server/app/landing.rsc +4 -4
  404. package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
  405. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  406. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  407. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  408. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  409. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  410. package/app/.next/server/app/login/page.js +2 -2
  411. package/app/.next/server/app/login/page.js.nft.json +1 -1
  412. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  413. package/app/.next/server/app/login.html +1 -1
  414. package/app/.next/server/app/login.rsc +5 -5
  415. package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
  416. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  417. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  418. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  419. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  420. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  421. package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
  422. package/app/.next/server/app/page.js +2 -2
  423. package/app/.next/server/app/page.js.nft.json +1 -1
  424. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  425. package/app/.next/server/app-paths-manifest.json +10 -8
  426. package/app/.next/server/chunks/1574.js +2 -2
  427. package/app/.next/server/chunks/2049.js +1 -1
  428. package/app/.next/server/chunks/21.js +1 -0
  429. package/app/.next/server/chunks/2141.js +1 -0
  430. package/app/.next/server/chunks/253.js +1 -1
  431. package/app/.next/server/chunks/450.js +1 -1
  432. package/app/.next/server/chunks/5053.js +2 -2
  433. package/app/.next/server/chunks/5221.js +1 -1
  434. package/app/.next/server/chunks/5339.js +1 -0
  435. package/app/.next/server/chunks/6379.js +42 -2
  436. package/app/.next/server/chunks/6762.js +1 -1
  437. package/app/.next/server/chunks/7770.js +1 -1
  438. package/app/.next/server/chunks/8035.js +1 -1
  439. package/app/.next/server/chunks/8193.js +1 -0
  440. package/app/.next/server/chunks/8202.js +8 -42
  441. package/app/.next/server/chunks/8443.js +1 -0
  442. package/app/.next/server/chunks/8513.js +37 -5
  443. package/app/.next/server/middleware-build-manifest.js +1 -1
  444. package/app/.next/server/middleware.js +4 -4
  445. package/app/.next/server/pages/404.html +1 -1
  446. package/app/.next/server/pages/500.html +1 -1
  447. package/app/.next/static/chunks/{4156-1f56c7a3aae06a55.js → 4156-dffbf1c435fa1271.js} +1 -1
  448. package/app/.next/static/chunks/{4380-a1b3532b40aa042e.js → 4380-8da8f918438df3db.js} +1 -1
  449. package/app/.next/static/chunks/505-2524099b7d200dd4.js +1 -0
  450. package/app/.next/static/chunks/8035-be13431b81f6e555.js +3 -0
  451. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-b983df0546f58fc3.js → page-72f2d697d6bc8b5f.js} +10 -10
  452. package/app/.next/static/chunks/app/_global-error/page-4474a75ccd0bff0e.js +1 -0
  453. package/app/.next/static/chunks/app/api/auth/login/route-4474a75ccd0bff0e.js +1 -0
  454. package/app/.next/static/chunks/app/api/auth/logout/route-4474a75ccd0bff0e.js +1 -0
  455. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4474a75ccd0bff0e.js +1 -0
  456. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-4474a75ccd0bff0e.js +1 -0
  457. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-4474a75ccd0bff0e.js +1 -0
  458. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-4474a75ccd0bff0e.js +1 -0
  459. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-4474a75ccd0bff0e.js +1 -0
  460. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-4474a75ccd0bff0e.js +1 -0
  461. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-4474a75ccd0bff0e.js +1 -0
  462. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-4474a75ccd0bff0e.js +1 -0
  463. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-4474a75ccd0bff0e.js +1 -0
  464. package/app/.next/static/chunks/app/api/cloud/auth/route-4474a75ccd0bff0e.js +1 -0
  465. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-4474a75ccd0bff0e.js +1 -0
  466. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-4474a75ccd0bff0e.js +1 -0
  467. package/app/.next/static/chunks/app/api/cloud/models/alias/route-4474a75ccd0bff0e.js +1 -0
  468. package/app/.next/static/chunks/app/api/combos/[id]/route-4474a75ccd0bff0e.js +1 -0
  469. package/app/.next/static/chunks/app/api/combos/route-4474a75ccd0bff0e.js +1 -0
  470. package/app/.next/static/chunks/app/api/health/route-4474a75ccd0bff0e.js +1 -0
  471. package/app/.next/static/chunks/app/api/init/route-4474a75ccd0bff0e.js +1 -0
  472. package/app/.next/static/chunks/app/api/keys/[id]/route-4474a75ccd0bff0e.js +1 -0
  473. package/app/.next/static/chunks/app/api/keys/route-4474a75ccd0bff0e.js +1 -0
  474. package/app/.next/static/chunks/app/api/locale/route-4474a75ccd0bff0e.js +1 -0
  475. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4474a75ccd0bff0e.js +1 -0
  476. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4474a75ccd0bff0e.js +1 -0
  477. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-4474a75ccd0bff0e.js +1 -0
  478. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-4474a75ccd0bff0e.js +1 -0
  479. package/app/.next/static/chunks/app/api/models/alias/route-4474a75ccd0bff0e.js +1 -0
  480. package/app/.next/static/chunks/app/api/models/availability/route-4474a75ccd0bff0e.js +1 -0
  481. package/app/.next/static/chunks/app/api/models/custom/route-4474a75ccd0bff0e.js +1 -0
  482. package/app/.next/static/chunks/app/api/models/route-4474a75ccd0bff0e.js +1 -0
  483. package/app/.next/static/chunks/app/api/models/test/route-4474a75ccd0bff0e.js +1 -0
  484. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-4474a75ccd0bff0e.js +1 -0
  485. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-4474a75ccd0bff0e.js +1 -0
  486. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-4474a75ccd0bff0e.js +1 -0
  487. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-4474a75ccd0bff0e.js +1 -0
  488. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-4474a75ccd0bff0e.js +1 -0
  489. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-4474a75ccd0bff0e.js +1 -0
  490. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-4474a75ccd0bff0e.js +1 -0
  491. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-4474a75ccd0bff0e.js +1 -0
  492. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-4474a75ccd0bff0e.js +1 -0
  493. package/app/.next/static/chunks/app/api/pricing/route-4474a75ccd0bff0e.js +1 -0
  494. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-4474a75ccd0bff0e.js +1 -0
  495. package/app/.next/static/chunks/app/api/provider-nodes/route-4474a75ccd0bff0e.js +1 -0
  496. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-4474a75ccd0bff0e.js +1 -0
  497. package/app/.next/static/chunks/app/api/providers/[id]/models/route-4474a75ccd0bff0e.js +1 -0
  498. package/app/.next/static/chunks/app/api/providers/[id]/route-4474a75ccd0bff0e.js +1 -0
  499. package/app/.next/static/chunks/app/api/providers/[id]/test/route-4474a75ccd0bff0e.js +1 -0
  500. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-4474a75ccd0bff0e.js +1 -0
  501. package/app/.next/static/chunks/app/api/providers/client/route-4474a75ccd0bff0e.js +1 -0
  502. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-4474a75ccd0bff0e.js +1 -0
  503. package/app/.next/static/chunks/app/api/providers/route-4474a75ccd0bff0e.js +1 -0
  504. package/app/.next/static/chunks/app/api/providers/suggested-models/route-4474a75ccd0bff0e.js +1 -0
  505. package/app/.next/static/chunks/app/api/providers/test-batch/route-4474a75ccd0bff0e.js +1 -0
  506. package/app/.next/static/chunks/app/api/providers/validate/route-4474a75ccd0bff0e.js +1 -0
  507. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-4474a75ccd0bff0e.js +1 -0
  508. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-4474a75ccd0bff0e.js +1 -0
  509. package/app/.next/static/chunks/app/api/proxy-pools/route-4474a75ccd0bff0e.js +1 -0
  510. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-4474a75ccd0bff0e.js +1 -0
  511. package/app/.next/static/chunks/app/api/settings/database/route-4474a75ccd0bff0e.js +1 -0
  512. package/app/.next/static/chunks/app/api/settings/proxy-test/route-4474a75ccd0bff0e.js +1 -0
  513. package/app/.next/static/chunks/app/api/settings/require-login/route-4474a75ccd0bff0e.js +1 -0
  514. package/app/.next/static/chunks/app/api/settings/route-4474a75ccd0bff0e.js +1 -0
  515. package/app/.next/static/chunks/app/api/shutdown/route-4474a75ccd0bff0e.js +1 -0
  516. package/app/.next/static/chunks/app/api/tags/route-4474a75ccd0bff0e.js +1 -0
  517. package/app/.next/static/chunks/app/api/translator/console-logs/route-4474a75ccd0bff0e.js +1 -0
  518. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-4474a75ccd0bff0e.js +1 -0
  519. package/app/.next/static/chunks/app/api/translator/load/route-4474a75ccd0bff0e.js +1 -0
  520. package/app/.next/static/chunks/app/api/translator/save/route-4474a75ccd0bff0e.js +1 -0
  521. package/app/.next/static/chunks/app/api/translator/send/route-4474a75ccd0bff0e.js +1 -0
  522. package/app/.next/static/chunks/app/api/translator/translate/route-4474a75ccd0bff0e.js +1 -0
  523. package/app/.next/static/chunks/app/api/tunnel/disable/route-4474a75ccd0bff0e.js +1 -0
  524. package/app/.next/static/chunks/app/api/tunnel/enable/route-4474a75ccd0bff0e.js +1 -0
  525. package/app/.next/static/chunks/app/api/tunnel/status/route-4474a75ccd0bff0e.js +1 -0
  526. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-4474a75ccd0bff0e.js +1 -0
  527. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-4474a75ccd0bff0e.js +1 -0
  528. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-4474a75ccd0bff0e.js +1 -0
  529. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-4474a75ccd0bff0e.js +1 -0
  530. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-4474a75ccd0bff0e.js +1 -0
  531. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-4474a75ccd0bff0e.js +1 -0
  532. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-4474a75ccd0bff0e.js +1 -0
  533. package/app/.next/static/chunks/app/api/usage/chart/route-4474a75ccd0bff0e.js +1 -0
  534. package/app/.next/static/chunks/app/api/usage/history/route-4474a75ccd0bff0e.js +1 -0
  535. package/app/.next/static/chunks/app/api/usage/providers/route-4474a75ccd0bff0e.js +1 -0
  536. package/app/.next/static/chunks/app/api/usage/request-details/route-4474a75ccd0bff0e.js +1 -0
  537. package/app/.next/static/chunks/app/api/usage/request-logs/route-4474a75ccd0bff0e.js +1 -0
  538. package/app/.next/static/chunks/app/api/usage/stats/route-4474a75ccd0bff0e.js +1 -0
  539. package/app/.next/static/chunks/app/api/usage/stream/route-4474a75ccd0bff0e.js +1 -0
  540. package/app/.next/static/chunks/app/api/v1/api/chat/route-4474a75ccd0bff0e.js +1 -0
  541. package/app/.next/static/chunks/app/api/v1/audio/speech/route-4474a75ccd0bff0e.js +1 -0
  542. package/app/.next/static/chunks/app/api/v1/chat/completions/route-4474a75ccd0bff0e.js +1 -0
  543. package/app/.next/static/chunks/app/api/v1/embeddings/route-4474a75ccd0bff0e.js +1 -0
  544. package/app/.next/static/chunks/app/api/v1/images/generations/route-4474a75ccd0bff0e.js +1 -0
  545. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-4474a75ccd0bff0e.js +1 -0
  546. package/app/.next/static/chunks/app/api/v1/messages/route-4474a75ccd0bff0e.js +1 -0
  547. package/app/.next/static/chunks/app/api/v1/models/route-4474a75ccd0bff0e.js +1 -0
  548. package/app/.next/static/chunks/app/api/v1/responses/compact/route-4474a75ccd0bff0e.js +1 -0
  549. package/app/.next/static/chunks/app/api/v1/responses/route-4474a75ccd0bff0e.js +1 -0
  550. package/app/.next/static/chunks/app/api/v1/route-4474a75ccd0bff0e.js +1 -0
  551. package/app/.next/static/chunks/app/api/v1/search/route-4474a75ccd0bff0e.js +1 -0
  552. package/app/.next/static/chunks/app/api/v1/web/fetch/route-4474a75ccd0bff0e.js +1 -0
  553. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-4474a75ccd0bff0e.js +1 -0
  554. package/app/.next/static/chunks/app/api/v1beta/models/route-4474a75ccd0bff0e.js +1 -0
  555. package/app/.next/static/chunks/app/api/version/route-4474a75ccd0bff0e.js +1 -0
  556. package/app/.next/static/chunks/app/api/version/update/route-4474a75ccd0bff0e.js +1 -0
  557. package/app/.next/static/chunks/app/manifest.webmanifest/route-4474a75ccd0bff0e.js +1 -0
  558. package/app/.next/static/chunks/app/page-4474a75ccd0bff0e.js +1 -0
  559. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-4474a75ccd0bff0e.js +1 -0
  560. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-4474a75ccd0bff0e.js +1 -0
  561. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-4474a75ccd0bff0e.js +1 -0
  562. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4474a75ccd0bff0e.js +1 -0
  563. package/app/.next/static/css/{7d19c5a9e0755804.css → e7f512f42893c6a3.css} +1 -1
  564. package/app/.next/static/g75qvBgg9uvwRkdVyyKkl/_buildManifest.js +1 -0
  565. package/app/package.json +1 -1
  566. package/app/public/providers/coqui.png +0 -0
  567. package/app/public/providers/inworld.png +0 -0
  568. package/app/public/providers/tortoise.png +0 -0
  569. package/app/public/providers/voyage-ai.png +0 -0
  570. package/app/src/mitm/server.js +49 -26
  571. package/package.json +1 -1
  572. package/app/.next/server/chunks/1389.js +0 -1
  573. package/app/.next/server/chunks/2947.js +0 -1
  574. package/app/.next/server/chunks/5445.js +0 -1
  575. package/app/.next/server/chunks/9737.js +0 -1
  576. package/app/.next/server/chunks/9939.js +0 -1
  577. package/app/.next/static/chunks/505-b98ff32c878b32ba.js +0 -1
  578. package/app/.next/static/chunks/8035-25d56a91f807bef3.js +0 -3
  579. package/app/.next/static/chunks/app/_global-error/page-d05c42dc5814fed2.js +0 -1
  580. package/app/.next/static/chunks/app/api/auth/login/route-d05c42dc5814fed2.js +0 -1
  581. package/app/.next/static/chunks/app/api/auth/logout/route-d05c42dc5814fed2.js +0 -1
  582. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d05c42dc5814fed2.js +0 -1
  583. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-d05c42dc5814fed2.js +0 -1
  584. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-d05c42dc5814fed2.js +0 -1
  585. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-d05c42dc5814fed2.js +0 -1
  586. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-d05c42dc5814fed2.js +0 -1
  587. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-d05c42dc5814fed2.js +0 -1
  588. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-d05c42dc5814fed2.js +0 -1
  589. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-d05c42dc5814fed2.js +0 -1
  590. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-d05c42dc5814fed2.js +0 -1
  591. package/app/.next/static/chunks/app/api/cloud/auth/route-d05c42dc5814fed2.js +0 -1
  592. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-d05c42dc5814fed2.js +0 -1
  593. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-d05c42dc5814fed2.js +0 -1
  594. package/app/.next/static/chunks/app/api/cloud/models/alias/route-d05c42dc5814fed2.js +0 -1
  595. package/app/.next/static/chunks/app/api/combos/[id]/route-d05c42dc5814fed2.js +0 -1
  596. package/app/.next/static/chunks/app/api/combos/route-d05c42dc5814fed2.js +0 -1
  597. package/app/.next/static/chunks/app/api/health/route-d05c42dc5814fed2.js +0 -1
  598. package/app/.next/static/chunks/app/api/init/route-d05c42dc5814fed2.js +0 -1
  599. package/app/.next/static/chunks/app/api/keys/[id]/route-d05c42dc5814fed2.js +0 -1
  600. package/app/.next/static/chunks/app/api/keys/route-d05c42dc5814fed2.js +0 -1
  601. package/app/.next/static/chunks/app/api/locale/route-d05c42dc5814fed2.js +0 -1
  602. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d05c42dc5814fed2.js +0 -1
  603. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-d05c42dc5814fed2.js +0 -1
  604. package/app/.next/static/chunks/app/api/models/alias/route-d05c42dc5814fed2.js +0 -1
  605. package/app/.next/static/chunks/app/api/models/availability/route-d05c42dc5814fed2.js +0 -1
  606. package/app/.next/static/chunks/app/api/models/custom/route-d05c42dc5814fed2.js +0 -1
  607. package/app/.next/static/chunks/app/api/models/route-d05c42dc5814fed2.js +0 -1
  608. package/app/.next/static/chunks/app/api/models/test/route-d05c42dc5814fed2.js +0 -1
  609. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-d05c42dc5814fed2.js +0 -1
  610. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-d05c42dc5814fed2.js +0 -1
  611. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-d05c42dc5814fed2.js +0 -1
  612. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-d05c42dc5814fed2.js +0 -1
  613. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-d05c42dc5814fed2.js +0 -1
  614. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-d05c42dc5814fed2.js +0 -1
  615. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-d05c42dc5814fed2.js +0 -1
  616. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-d05c42dc5814fed2.js +0 -1
  617. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-d05c42dc5814fed2.js +0 -1
  618. package/app/.next/static/chunks/app/api/pricing/route-d05c42dc5814fed2.js +0 -1
  619. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-d05c42dc5814fed2.js +0 -1
  620. package/app/.next/static/chunks/app/api/provider-nodes/route-d05c42dc5814fed2.js +0 -1
  621. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-d05c42dc5814fed2.js +0 -1
  622. package/app/.next/static/chunks/app/api/providers/[id]/models/route-d05c42dc5814fed2.js +0 -1
  623. package/app/.next/static/chunks/app/api/providers/[id]/route-d05c42dc5814fed2.js +0 -1
  624. package/app/.next/static/chunks/app/api/providers/[id]/test/route-d05c42dc5814fed2.js +0 -1
  625. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-d05c42dc5814fed2.js +0 -1
  626. package/app/.next/static/chunks/app/api/providers/client/route-d05c42dc5814fed2.js +0 -1
  627. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-d05c42dc5814fed2.js +0 -1
  628. package/app/.next/static/chunks/app/api/providers/route-d05c42dc5814fed2.js +0 -1
  629. package/app/.next/static/chunks/app/api/providers/suggested-models/route-d05c42dc5814fed2.js +0 -1
  630. package/app/.next/static/chunks/app/api/providers/test-batch/route-d05c42dc5814fed2.js +0 -1
  631. package/app/.next/static/chunks/app/api/providers/validate/route-d05c42dc5814fed2.js +0 -1
  632. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-d05c42dc5814fed2.js +0 -1
  633. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-d05c42dc5814fed2.js +0 -1
  634. package/app/.next/static/chunks/app/api/proxy-pools/route-d05c42dc5814fed2.js +0 -1
  635. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-d05c42dc5814fed2.js +0 -1
  636. package/app/.next/static/chunks/app/api/settings/database/route-d05c42dc5814fed2.js +0 -1
  637. package/app/.next/static/chunks/app/api/settings/proxy-test/route-d05c42dc5814fed2.js +0 -1
  638. package/app/.next/static/chunks/app/api/settings/require-login/route-d05c42dc5814fed2.js +0 -1
  639. package/app/.next/static/chunks/app/api/settings/route-d05c42dc5814fed2.js +0 -1
  640. package/app/.next/static/chunks/app/api/shutdown/route-d05c42dc5814fed2.js +0 -1
  641. package/app/.next/static/chunks/app/api/tags/route-d05c42dc5814fed2.js +0 -1
  642. package/app/.next/static/chunks/app/api/translator/console-logs/route-d05c42dc5814fed2.js +0 -1
  643. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-d05c42dc5814fed2.js +0 -1
  644. package/app/.next/static/chunks/app/api/translator/load/route-d05c42dc5814fed2.js +0 -1
  645. package/app/.next/static/chunks/app/api/translator/save/route-d05c42dc5814fed2.js +0 -1
  646. package/app/.next/static/chunks/app/api/translator/send/route-d05c42dc5814fed2.js +0 -1
  647. package/app/.next/static/chunks/app/api/translator/translate/route-d05c42dc5814fed2.js +0 -1
  648. package/app/.next/static/chunks/app/api/tunnel/disable/route-d05c42dc5814fed2.js +0 -1
  649. package/app/.next/static/chunks/app/api/tunnel/enable/route-d05c42dc5814fed2.js +0 -1
  650. package/app/.next/static/chunks/app/api/tunnel/status/route-d05c42dc5814fed2.js +0 -1
  651. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-d05c42dc5814fed2.js +0 -1
  652. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-d05c42dc5814fed2.js +0 -1
  653. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-d05c42dc5814fed2.js +0 -1
  654. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-d05c42dc5814fed2.js +0 -1
  655. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-d05c42dc5814fed2.js +0 -1
  656. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-d05c42dc5814fed2.js +0 -1
  657. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-d05c42dc5814fed2.js +0 -1
  658. package/app/.next/static/chunks/app/api/usage/chart/route-d05c42dc5814fed2.js +0 -1
  659. package/app/.next/static/chunks/app/api/usage/history/route-d05c42dc5814fed2.js +0 -1
  660. package/app/.next/static/chunks/app/api/usage/providers/route-d05c42dc5814fed2.js +0 -1
  661. package/app/.next/static/chunks/app/api/usage/request-details/route-d05c42dc5814fed2.js +0 -1
  662. package/app/.next/static/chunks/app/api/usage/request-logs/route-d05c42dc5814fed2.js +0 -1
  663. package/app/.next/static/chunks/app/api/usage/stats/route-d05c42dc5814fed2.js +0 -1
  664. package/app/.next/static/chunks/app/api/usage/stream/route-d05c42dc5814fed2.js +0 -1
  665. package/app/.next/static/chunks/app/api/v1/api/chat/route-d05c42dc5814fed2.js +0 -1
  666. package/app/.next/static/chunks/app/api/v1/audio/speech/route-d05c42dc5814fed2.js +0 -1
  667. package/app/.next/static/chunks/app/api/v1/chat/completions/route-d05c42dc5814fed2.js +0 -1
  668. package/app/.next/static/chunks/app/api/v1/embeddings/route-d05c42dc5814fed2.js +0 -1
  669. package/app/.next/static/chunks/app/api/v1/images/generations/route-d05c42dc5814fed2.js +0 -1
  670. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-d05c42dc5814fed2.js +0 -1
  671. package/app/.next/static/chunks/app/api/v1/messages/route-d05c42dc5814fed2.js +0 -1
  672. package/app/.next/static/chunks/app/api/v1/models/route-d05c42dc5814fed2.js +0 -1
  673. package/app/.next/static/chunks/app/api/v1/responses/compact/route-d05c42dc5814fed2.js +0 -1
  674. package/app/.next/static/chunks/app/api/v1/responses/route-d05c42dc5814fed2.js +0 -1
  675. package/app/.next/static/chunks/app/api/v1/route-d05c42dc5814fed2.js +0 -1
  676. package/app/.next/static/chunks/app/api/v1/search/route-d05c42dc5814fed2.js +0 -1
  677. package/app/.next/static/chunks/app/api/v1/web/fetch/route-d05c42dc5814fed2.js +0 -1
  678. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-d05c42dc5814fed2.js +0 -1
  679. package/app/.next/static/chunks/app/api/v1beta/models/route-d05c42dc5814fed2.js +0 -1
  680. package/app/.next/static/chunks/app/api/version/route-d05c42dc5814fed2.js +0 -1
  681. package/app/.next/static/chunks/app/api/version/update/route-d05c42dc5814fed2.js +0 -1
  682. package/app/.next/static/chunks/app/manifest.webmanifest/route-d05c42dc5814fed2.js +0 -1
  683. package/app/.next/static/chunks/app/page-d05c42dc5814fed2.js +0 -1
  684. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-d05c42dc5814fed2.js +0 -1
  685. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-d05c42dc5814fed2.js +0 -1
  686. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-d05c42dc5814fed2.js +0 -1
  687. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d05c42dc5814fed2.js +0 -1
  688. package/app/.next/static/gCRsyLIe80K11L3X2GfjE/_buildManifest.js +0 -1
  689. /package/app/.next/static/{gCRsyLIe80K11L3X2GfjE → g75qvBgg9uvwRkdVyyKkl}/_ssgManifest.js +0 -0
@@ -14,7 +14,7 @@ model = "${g}"
14
14
  provider: "custom"
15
15
  base_url: "${F()}"
16
16
  `},{filename:"~/.hermes/.env",content:`OPENAI_API_KEY=${h}
17
- `}])})]})}var h=s(96459);function g({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:o,apiKeys:d,activeProviders:c=[],cloudEnabled:x=!1,tunnelEnabled:m=!1}){let[p,u]=(0,a.useState)(null),[f,y]=(0,a.useState)(!1),[b,j]=(0,a.useState)(""),[N,v]=(0,a.useState)(()=>d?.length>0?d[0].key:""),w=e=>{let t=N&&N.trim()?N:x?"your-api-key":"sk_9router",s=o||"http://localhost:20128",l=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,l).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,b||"provider/model-id")},{copy:k}=(0,h.C)(),C=async(e,t)=>{await k(w(e),`toolcard-${t}`),u(t),setTimeout(()=>u(null),2e3)},S=c.length>0,_=()=>(!t.requiresExternalUrl||!!x||!!m)&&(!t.requiresCloud||!!x);return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,l.jsx)(i.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):t.icon?(0,l.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,l.jsx)(i.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,l.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[t.notes&&0!==t.notes.length?(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&(x||m))return null;let s="warning"===e.type,a="cloudCheck"===e.type&&!x&&!m,r="bg-blue-500/10 border-blue-500/30",i="text-blue-600 dark:text-blue-400",n="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",i="text-yellow-600 dark:text-yellow-400",n="text-yellow-500",o="warning"):a&&(r="bg-red-500/10 border-red-500/30",i="text-red-600 dark:text-red-400",n="text-red-500",o="error"),(0,l.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,l.jsx)("span",{className:`material-symbols-outlined text-lg ${n}`,children:o}),(0,l.jsx)("p",{className:`text-sm ${i}`,children:e.text})]},t)})}):null,_()&&t.guideSteps.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[(0,l.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,l.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,l.jsx)("div",{className:"mt-2 flex items-center gap-2",children:d&&d.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("select",{value:N,onChange:e=>v(e.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,l.jsx)("button",{onClick:()=>C(N,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===p?"check":"content_copy"})})]}):(0,l.jsx)("span",{className:"text-sm text-text-muted",children:x?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===e.type&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("input",{type:"text",value:b,onChange:e=>j(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>y(!0),disabled:!S,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${S?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>C(b,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===p?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>j(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:w(e.value)}),e.copyable&&(0,l.jsx)("button",{onClick:()=>C(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:p===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),_()&&t.codeBlock&&(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,l.jsxs)("button",{onClick:()=>C(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===p?"check":"content_copy"}),"codeblock"===p?"Copied!":"Copy"]})]}),(0,l.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,l.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:w(t.codeBlock.code)})})]})]}):(0,l.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,l.jsx)(r.rq,{isOpen:f,onClose:()=>y(!1),onSelect:e=>{j(e.value)},selectedModel:b,activeProviders:c,title:"Select Model"})]})}function f({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:x}){let m,p,u,h,g,[y,b]=(0,a.useState)(x||null),[j,N]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(!1),[S,_]=(0,a.useState)(null),[A,E]=(0,a.useState)(!1),[O,M]=(0,a.useState)(""),[I,R]=(0,a.useState)(""),[T,P]=(0,a.useState)(""),[$,L]=(0,a.useState)(!1),[U,K]=(0,a.useState)(!1),[z,D]=(0,a.useState)({}),[F,H]=(0,a.useState)(!1),[B,q]=(0,a.useState)(""),[W,G]=(0,a.useState)([]),[J,Z]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!O&&M(o[0].key)},[o,O]),(0,a.useEffect)(()=>{x&&b(x)},[x]),(0,a.useEffect)(()=>{t&&!y&&(Q(),Y()),t&&Y()},[t]),(0,a.useEffect)(()=>{y?.opencode?.models&&G(y.opencode.models),y?.opencode?.activeModel&&Z(y.opencode.activeModel),y?.config?.agent?.explorer?.model?.startsWith("9router/")&&P(y.config.agent.explorer.model.replace("9router/",""))},[y]);let Y=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&D(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},V=(()=>{if(!y?.installed)return null;if(!y.config)return"not_configured";let e=y.config?.provider?.["9router"]?.options?.baseURL||"",t=e.includes("localhost")||e.includes("127.0.0.1");return y.has9Router&&(t||e.includes(n))?"configured":y.has9Router?"other":"not_configured"})(),X=()=>{let e=B||n;return e.endsWith("/v1")?e:`${e}/v1`},Q=async()=>{N(!0);try{let e=await fetch("/api/cli-tools/opencode-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{N(!1)}},ee=async()=>{w(!0),_(null);try{let e=O&&O.trim()||c?O:"sk_9router",t=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:e,models:W,activeModel:""===J?"":J||W[0],subagentModel:T})}),s=await t.json();t.ok?(_({type:"success",text:"Settings applied successfully!"}),Q()):_({type:"error",text:s.error||"Failed to apply settings"})}catch(e){_({type:"error",text:e.message})}finally{w(!1)}},et=async()=>{C(!0),_(null);try{let e=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),t=await e.json();e.ok?(_({type:"success",text:"Settings reset successfully!"}),R(""),P(""),G([]),Z(""),Q()):_({type:"error",text:t.error||"Failed to reset settings"})}catch(e){_({type:"error",text:e.message})}finally{C(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/opencode.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===V&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===V&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===V&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!j&&y&&!y.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>H(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>E(!A),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:A?"expand_less":"help"}),A?"Hide":"How to Install"]})]})]}),A&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g opencode-ai"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!j&&y?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.config?.provider?.["9router"]?.options?.baseURL&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:y.config.provider["9router"].options.baseURL})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:B||`${n}/v1`,onChange:e=>q(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),B&&B!==`${n}/v1`&&(0,l.jsx)("button",{onClick:()=>q(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),o.length>0?(0,l.jsx)("select",{value:O,onChange:e=>M(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:o.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:c?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===W.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):W.map(e=>(0,l.jsxs)("span",{onClick:async()=>{if(e===J)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(Z(""),Q())}catch(e){console.log("Error clearing active model:",e)}else Z(e)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${e===J?"bg-primary/10 text-primary border border-primary":"bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border"}`,title:e===J?"Click to clear active model":"Click to set as active",children:[e===J&&(0,l.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),e,(0,l.jsx)("button",{onClick:async t=>{t.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(e)}`,{method:"DELETE"})).ok){let t=W.filter(t=>t!==e);G(t),J===e&&Z(""),Q()}}catch(e){console.log("Error removing model:",e)}},className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("button",{onClick:()=>L(!0),disabled:!d?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:W.length>0&&J?(0,l.jsxs)(l.Fragment,{children:["Active: ",(0,l.jsx)("span",{className:"text-primary",children:J})]}):W.length>0?(0,l.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Subagent Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:T,onChange:e=>P(e.target.value),placeholder:I||"provider/model-id (defaults to main model)",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>K(!0),disabled:!d?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),T&&(0,l.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),S&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===S.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===S.type?"check_circle":"error"}),(0,l.jsx)("span",{children:S.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ee,disabled:0===W.length,loading:v,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:et,disabled:!y.has9Router,loading:k,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>H(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:$,onClose:()=>L(!1),onSelect:e=>{!W.includes(e.value)&&(G([...W,e.value]),J||Z(e.value)),L(!1)},selectedModel:null,activeProviders:d,modelAliases:z,title:"Add Model for OpenCode"}),(0,l.jsx)(r.rq,{isOpen:U,onClose:()=>K(!1),onSelect:e=>{P(e.value),K(!1)},selectedModel:T,activeProviders:d,modelAliases:z,title:"Select Subagent Model for OpenCode"}),(0,l.jsx)(r.uR,{isOpen:F,onClose:()=>H(!1),title:"OpenCode - Manual Configuration",configs:(m=O&&O.trim()?O:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",p=W.length>0?W:["provider/model-id"],u=J||W[0]||p[0],h=T||u,g={},p.forEach(e=>{g[e]={name:e}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:X(),apiKey:m},models:g}},model:`9router/${u}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${h}`}}},null,2)}])})]})}let y="http://localhost:20128";function b({apiKeys:e,cloudEnabled:t,onStatusChange:s}){let[i,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),[c,x]=(0,a.useState)(!1),[m,p]=(0,a.useState)(""),[u,h]=(0,a.useState)(""),[g,f]=(0,a.useState)(null),[j,N]=(0,a.useState)(null),[v,w]=(0,a.useState)(null),[k,C]=(0,a.useState)(y),S="u">typeof navigator&&navigator.userAgent?.includes("Windows"),_=i?.isAdmin!==!1;(0,a.useEffect)(()=>{e?.length>0&&!u&&h(e[0].key)},[e,u]),(0,a.useEffect)(()=>{A()},[]);let A=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();n(t),t.mitmRouterBaseUrl&&C(t.mitmRouterBaseUrl),s?.(t)}}catch{n({running:!1,certExists:!1,dnsStatus:{}})}},E=e=>{w(null),S||i?.hasCachedPassword?O(e,""):(f(e),x(!0),N(null))},O=async(s,l)=>{d(!0),w(null);try{let a;if("trust-cert"===s)a=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"trust-cert",sudoPassword:l})});else if("start"===s){let s=u?.trim()||(e?.length>0?e[0].key:null)||(t?null:"sk_9router");a=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,sudoPassword:l,mitmRouterBaseUrl:k.trim()||y})})}else a=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:l})});if(!a.ok){let e=await a.json().catch(()=>({}));w(e.error||`Failed to ${s} MITM server`);return}x(!1),p(""),await A()}catch(e){w(e.message||"Network error")}finally{d(!1),f(null)}},M=()=>{m.trim()?O(g,m):N("Sudo password is required")},I=i?.running;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Zp,{padding:"sm",className:"border-primary/20 bg-primary/5",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"security"}),(0,l.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"MITM Server"}),I?(0,l.jsx)(r.Ex,{variant:"success",size:"sm",children:"Running"}):(0,l.jsx)(r.Ex,{variant:"default",size:"sm",children:"Stopped"})]}),(0,l.jsx)("div",{className:"flex items-center gap-1 text-xs text-text-muted","data-i18n-skip":"true",children:[{label:"Cert",ok:i?.certExists},{label:"Trusted",ok:i?.certTrusted},{label:"Server",ok:I}].map(({label:e,ok:t})=>(0,l.jsxs)("span",{className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded ${t?"text-green-600":"text-text-muted"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:t?"check_circle":"cancel"}),e]},e))})]}),(0,l.jsxs)("div",{className:"px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2",children:[(0,l.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Purpose:"})," Use Antigravity IDE & GitHub Copilot → with ANY provider/model from 9Router"]}),(0,l.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → 9Router → response to Antigravity/Copilot"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"9Router Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:y,disabled:I,className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]}),!I&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",list:"mitm-api-keys",value:u,onChange:e=>h(e.target.value),placeholder:t?"Enter or pick API key":"sk_9router (default)",className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50"}),e?.length>0&&(0,l.jsx)("datalist",{id:"mitm-api-keys",children:e.map(e=>(0,l.jsx)("option",{value:e.key,children:e.name||e.key},e.id))})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap","data-i18n-skip":"true",children:[i?.certExists&&!i?.certTrusted&&(0,l.jsxs)("button",{onClick:()=>E("trust-cert"),disabled:o,className:"px-4 py-1.5 rounded-lg bg-yellow-500/10 border border-yellow-500/30 text-yellow-600 font-medium text-xs flex items-center gap-1.5 hover:bg-yellow-500/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"verified_user"}),"Trust Cert"]}),I?(0,l.jsxs)("button",{onClick:()=>E("stop"),disabled:o,className:"px-4 py-1.5 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-xs flex items-center gap-1.5 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop Server"]}):(0,l.jsxs)("button",{onClick:()=>E("start"),disabled:o||S&&!_,className:"px-4 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-xs flex items-center gap-1.5 hover:bg-primary/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start Server"]}),I&&(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Enable DNS per tool below to activate interception"})]}),v&&(0,l.jsxs)("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5 shrink-0",children:"error"}),(0,l.jsx)("span",{children:v})]}),S&&!_&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 border border-red-500/20",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"shield_lock"}),(0,l.jsx)("span",{children:"Administrator required — restart 9Router as Administrator to use MITM"})]})]})}),c&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,l.jsxs)("div",{className:"bg-surface border border-border rounded-xl p-6 w-full max-w-sm flex flex-col gap-4 shadow-xl",children:[(0,l.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and server startup"})]}),(0,l.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:m,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"!==e.key||o||M()}}),j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,l.jsx)("span",{children:j})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,l.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{x(!1),p(""),N(null)},disabled:o,children:"Cancel"}),(0,l.jsx)(r.$n,{variant:"primary",size:"sm",onClick:M,loading:o,children:"Confirm"})]})]})})]})}var j=s(45727);function N({tool:e,isExpanded:t,onToggle:s,serverRunning:n,dnsActive:o,hasCachedPassword:d,apiKeys:c,activeProviders:x,hasActiveProviders:m,modelAliases:p={},cloudEnabled:u,onDnsChange:h}){let[g,f]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null),[v,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(""),[S,_]=(0,a.useState)(null),[A,E]=(0,a.useState)(null),[O,M]=(0,a.useState)({}),[I,R]=(0,a.useState)(!1),[T,P]=(0,a.useState)(null),$=j.TOOL_HOSTS[e.id]??[],L="u">typeof navigator&&navigator.userAgent?.includes("Windows");(0,a.useEffect)(()=>{t&&U()},[t]);let U=async()=>{try{let t=await fetch(`/api/cli-tools/antigravity-mitm/alias?tool=${e.id}`);if(t.ok){let e=await t.json();Object.keys(e.aliases||{}).length>0&&M(e.aliases)}}catch{}},K=(0,a.useCallback)(async t=>{try{await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:e.id,mappings:t})})}catch{}},[e.id]),z=(e,t)=>{M(s=>({...s,[e]:t}))},D=()=>{if(!n)return;let e=o?"disable":"enable";L||d?F(e,""):(_(e),w(!0),E(null))},F=async(t,s)=>{f(!0),b(null);try{let l=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:e.id,action:t,sudoPassword:s})}),a=await l.json();if(!l.ok)throw Error(a.error||"Failed to toggle DNS");"enable"===t&&b(`Restart ${e.name} to apply changes`),w(!1),C(""),h?.(a)}catch{}finally{f(!1),_(null)}},H=()=>{k.trim()?F(S,k):E("Sudo password is required")};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),n?o?(0,l.jsx)(r.Ex,{variant:"success",size:"sm",children:"Active"}):(0,l.jsx)(r.Ex,{variant:"warning",size:"sm",children:"DNS off"}):(0,l.jsx)(r.Ex,{variant:"default",size:"sm",children:"Server off"})]}),(0,l.jsxs)("p",{className:"text-xs text-text-muted",children:["Intercept ",e.name," requests via MITM proxy"]})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[$.length>0&&(0,l.jsxs)("div",{className:"mt-2 rounded-md border border-border bg-surface/50 px-2 py-1.5",children:[(0,l.jsx)("p",{className:"text-[10px] font-medium tracking-wide text-text-main/80 mb-1",children:"Edit hosts file manually to add the following entries:"}),(0,l.jsx)("ul",{className:"list-none space-y-0.5 font-mono text-[10px] text-text-muted break-all",children:$.map(e=>(0,l.jsxs)("li",{children:["127.0.0.1 ",e]},e))})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted px-1",children:[(0,l.jsxs)("p",{children:["Toggle DNS to redirect ",e.name," traffic through 9Router via MITM."]}),!o&&(0,l.jsx)("p",{className:"text-amber-600 text-[10px] mt-1",children:"⚠️ Enable DNS to edit model mappings"})]}),e.defaultModels?.length>0&&(0,l.jsx)("div",{className:"flex flex-col gap-2",children:e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-36 shrink-0 text-xs font-semibold text-text-main text-right",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:O[e.alias]||"",onChange:t=>z(e.alias,t.target.value),onBlur:t=>{var s,l;return s=e.alias,l=t.target.value,void K({...O,[s]:l})},placeholder:"provider/model-id",disabled:!o,className:`flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 ${!o?"opacity-50 cursor-not-allowed":""}`}),(0,l.jsx)("button",{onClick:()=>{P(e.alias),R(!0)},disabled:!m||!o,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 ${m&&o?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),O[e.alias]&&(0,l.jsx)("button",{onClick:()=>{z(e.alias,""),K({...O,[e.alias]:""})},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias))}),e.defaultModels?.length===0&&(0,l.jsx)("p",{className:"text-xs text-text-muted px-1",children:"Model mappings will be available soon."}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 items-start",children:[o?(0,l.jsxs)("button",{onClick:D,disabled:!n||g,className:"px-4 py-1.5 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-xs flex items-center gap-1.5 hover:bg-red-500/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop DNS"]}):(0,l.jsxs)("button",{onClick:D,disabled:!n||g,className:"px-4 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-xs flex items-center gap-1.5 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start DNS"]}),y&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs text-amber-500",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,l.jsx)("span",{children:y})]})]})]})]}),v&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,l.jsxs)("div",{className:"bg-surface border border-border rounded-xl p-6 w-full max-w-sm flex flex-col gap-4 shadow-xl",children:[(0,l.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Required to modify /etc/hosts and flush DNS cache"})]}),(0,l.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:k,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"!==e.key||g||H()}}),A&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,l.jsx)("span",{children:A})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,l.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{w(!1),C(""),E(null)},disabled:g,children:"Cancel"}),(0,l.jsx)(r.$n,{variant:"primary",size:"sm",onClick:H,loading:g,children:"Confirm"})]})]})}),(0,l.jsx)(r.rq,{isOpen:I,onClose:()=>R(!1),onSelect:e=>{if(!T||e.isPlaceholder)return;let t={...O,[T]:e.value};M(t),K(t)},selectedModel:T?O[T]:null,activeProviders:x,modelAliases:p,title:`Select model for ${T}`})]})}var v=s(99568),w=s.n(v);function k({tool:e}){return(0,l.jsx)(w(),{href:"/dashboard/mitm",className:"block",children:(0,l.jsx)(r.Zp,{padding:"sm",className:"overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded-full",children:"MITM"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"chevron_right"})]})})})}},45727:e=>{e.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},97990:(e,t,s)=>{s.d(t,{dM:()=>a,wn:()=>l});let l={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6","gemini-3-flash","gpt-oss-120b-medium","gemini-3-pro-high","gemini-3-pro-low"],defaultModels:[{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro Low",alias:"gemini-3.1-pro-low"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium",alias:"gpt-oss-120b-medium"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-4o-mini","claude-haiku-4.5","gpt-4o","gpt-5-mini"],defaultModels:[{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"q.us-east-1.amazonaws.com",defaultModels:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"}]}},a={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-6"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-6"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Cline Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → OpenAI Compatible"},{step:3,title:"Base URL",value:"{{baseUrl}}/v1",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Kilo Code Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → OpenAI Compatible"},{step:3,title:"Base URL",value:"{{baseUrl}}/v1",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
17
+ `}])})]})}var h=s(96459);function g({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:o,apiKeys:d,activeProviders:c=[],cloudEnabled:x=!1,tunnelEnabled:m=!1}){let[p,u]=(0,a.useState)(null),[f,y]=(0,a.useState)(!1),[b,j]=(0,a.useState)(""),[N,v]=(0,a.useState)(()=>d?.length>0?d[0].key:""),w=e=>{let t=N&&N.trim()?N:x?"your-api-key":"sk_9router",s=o||"http://localhost:20128",l=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,l).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,b||"provider/model-id")},{copy:k}=(0,h.C)(),C=async(e,t)=>{await k(w(e),`toolcard-${t}`),u(t),setTimeout(()=>u(null),2e3)},S=c.length>0,_=()=>(!t.requiresExternalUrl||!!x||!!m)&&(!t.requiresCloud||!!x);return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,l.jsx)(i.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):t.icon?(0,l.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,l.jsx)(i.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,l.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[t.notes&&0!==t.notes.length?(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&(x||m))return null;let s="warning"===e.type,a="cloudCheck"===e.type&&!x&&!m,r="bg-blue-500/10 border-blue-500/30",i="text-blue-600 dark:text-blue-400",n="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",i="text-yellow-600 dark:text-yellow-400",n="text-yellow-500",o="warning"):a&&(r="bg-red-500/10 border-red-500/30",i="text-red-600 dark:text-red-400",n="text-red-500",o="error"),(0,l.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,l.jsx)("span",{className:`material-symbols-outlined text-lg ${n}`,children:o}),(0,l.jsx)("p",{className:`text-sm ${i}`,children:e.text})]},t)})}):null,_()&&t.guideSteps.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[(0,l.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,l.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,l.jsx)("div",{className:"mt-2 flex items-center gap-2",children:d&&d.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("select",{value:N,onChange:e=>v(e.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,l.jsx)("button",{onClick:()=>C(N,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===p?"check":"content_copy"})})]}):(0,l.jsx)("span",{className:"text-sm text-text-muted",children:x?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===e.type&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("input",{type:"text",value:b,onChange:e=>j(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>y(!0),disabled:!S,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${S?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>C(b,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===p?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>j(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:w(e.value)}),e.copyable&&(0,l.jsx)("button",{onClick:()=>C(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:p===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),_()&&t.codeBlock&&(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,l.jsxs)("button",{onClick:()=>C(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===p?"check":"content_copy"}),"codeblock"===p?"Copied!":"Copy"]})]}),(0,l.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,l.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:w(t.codeBlock.code)})})]})]}):(0,l.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,l.jsx)(r.rq,{isOpen:f,onClose:()=>y(!1),onSelect:e=>{j(e.value)},selectedModel:b,activeProviders:c,title:"Select Model"})]})}function f({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:x}){let m,p,u,h,g,[y,b]=(0,a.useState)(x||null),[j,N]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(!1),[S,_]=(0,a.useState)(null),[A,E]=(0,a.useState)(!1),[O,M]=(0,a.useState)(""),[I,R]=(0,a.useState)(""),[T,P]=(0,a.useState)(""),[$,L]=(0,a.useState)(!1),[U,K]=(0,a.useState)(!1),[z,D]=(0,a.useState)({}),[F,H]=(0,a.useState)(!1),[B,q]=(0,a.useState)(""),[W,G]=(0,a.useState)([]),[J,Z]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!O&&M(o[0].key)},[o,O]),(0,a.useEffect)(()=>{x&&b(x)},[x]),(0,a.useEffect)(()=>{t&&!y&&(Q(),Y()),t&&Y()},[t]),(0,a.useEffect)(()=>{y?.opencode?.models&&G(y.opencode.models),y?.opencode?.activeModel&&Z(y.opencode.activeModel),y?.config?.agent?.explorer?.model?.startsWith("9router/")&&P(y.config.agent.explorer.model.replace("9router/",""))},[y]);let Y=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&D(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},V=(()=>{if(!y?.installed)return null;if(!y.config)return"not_configured";let e=y.config?.provider?.["9router"]?.options?.baseURL||"",t=e.includes("localhost")||e.includes("127.0.0.1");return y.has9Router&&(t||e.includes(n))?"configured":y.has9Router?"other":"not_configured"})(),X=()=>{let e=B||n;return e.endsWith("/v1")?e:`${e}/v1`},Q=async()=>{N(!0);try{let e=await fetch("/api/cli-tools/opencode-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{N(!1)}},ee=async()=>{w(!0),_(null);try{let e=O&&O.trim()||c?O:"sk_9router",t=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:e,models:W,activeModel:""===J?"":J||W[0],subagentModel:T})}),s=await t.json();t.ok?(_({type:"success",text:"Settings applied successfully!"}),Q()):_({type:"error",text:s.error||"Failed to apply settings"})}catch(e){_({type:"error",text:e.message})}finally{w(!1)}},et=async()=>{C(!0),_(null);try{let e=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),t=await e.json();e.ok?(_({type:"success",text:"Settings reset successfully!"}),R(""),P(""),G([]),Z(""),Q()):_({type:"error",text:t.error||"Failed to reset settings"})}catch(e){_({type:"error",text:e.message})}finally{C(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/opencode.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===V&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===V&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===V&&(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!j&&y&&!y.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>H(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>E(!A),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:A?"expand_less":"help"}),A?"Hide":"How to Install"]})]})]}),A&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,l.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g opencode-ai"})]}),(0,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!j&&y?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.config?.provider?.["9router"]?.options?.baseURL&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:y.config.provider["9router"].options.baseURL})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:B||`${n}/v1`,onChange:e=>q(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),B&&B!==`${n}/v1`&&(0,l.jsx)("button",{onClick:()=>q(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),o.length>0?(0,l.jsx)("select",{value:O,onChange:e=>M(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:o.map(e=>(0,l.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,l.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:c?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===W.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):W.map(e=>(0,l.jsxs)("span",{onClick:async()=>{if(e===J)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(Z(""),Q())}catch(e){console.log("Error clearing active model:",e)}else Z(e)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${e===J?"bg-primary/10 text-primary border border-primary":"bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border"}`,title:e===J?"Click to clear active model":"Click to set as active",children:[e===J&&(0,l.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),e,(0,l.jsx)("button",{onClick:async t=>{t.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(e)}`,{method:"DELETE"})).ok){let t=W.filter(t=>t!==e);G(t),J===e&&Z(""),Q()}}catch(e){console.log("Error removing model:",e)}},className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("button",{onClick:()=>L(!0),disabled:!d?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:W.length>0&&J?(0,l.jsxs)(l.Fragment,{children:["Active: ",(0,l.jsx)("span",{className:"text-primary",children:J})]}):W.length>0?(0,l.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Subagent Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:T,onChange:e=>P(e.target.value),placeholder:I||"provider/model-id (defaults to main model)",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>K(!0),disabled:!d?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),T&&(0,l.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),S&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===S.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===S.type?"check_circle":"error"}),(0,l.jsx)("span",{children:S.text})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ee,disabled:0===W.length,loading:v,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:et,disabled:!y.has9Router,loading:k,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>H(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:$,onClose:()=>L(!1),onSelect:e=>{!W.includes(e.value)&&(G([...W,e.value]),J||Z(e.value)),L(!1)},selectedModel:null,activeProviders:d,modelAliases:z,title:"Add Model for OpenCode"}),(0,l.jsx)(r.rq,{isOpen:U,onClose:()=>K(!1),onSelect:e=>{P(e.value),K(!1)},selectedModel:T,activeProviders:d,modelAliases:z,title:"Select Subagent Model for OpenCode"}),(0,l.jsx)(r.uR,{isOpen:F,onClose:()=>H(!1),title:"OpenCode - Manual Configuration",configs:(m=O&&O.trim()?O:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",p=W.length>0?W:["provider/model-id"],u=J||W[0]||p[0],h=T||u,g={},p.forEach(e=>{g[e]={name:e}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:X(),apiKey:m},models:g}},model:`9router/${u}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${h}`}}},null,2)}])})]})}let y="http://localhost:20128";function b({apiKeys:e,cloudEnabled:t,onStatusChange:s}){let[i,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),[c,x]=(0,a.useState)(!1),[m,p]=(0,a.useState)(""),[u,h]=(0,a.useState)(""),[g,f]=(0,a.useState)(null),[j,N]=(0,a.useState)(null),[v,w]=(0,a.useState)(null),[k,C]=(0,a.useState)(y),S="u">typeof navigator&&navigator.userAgent?.includes("Windows"),_=i?.isAdmin!==!1;(0,a.useEffect)(()=>{e?.length>0&&!u&&h(e[0].key)},[e,u]),(0,a.useEffect)(()=>{A()},[]);let A=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();n(t),t.mitmRouterBaseUrl&&C(t.mitmRouterBaseUrl),s?.(t)}}catch{n({running:!1,certExists:!1,dnsStatus:{}})}},E=e=>{w(null),S||i?.hasCachedPassword?O(e,""):(f(e),x(!0),N(null))},O=async(s,l)=>{d(!0),w(null);try{let a;if("trust-cert"===s)a=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"trust-cert",sudoPassword:l})});else if("start"===s){let s=u?.trim()||(e?.length>0?e[0].key:null)||(t?null:"sk_9router");a=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,sudoPassword:l,mitmRouterBaseUrl:k.trim()||y})})}else a=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:l})});if(!a.ok){let e=await a.json().catch(()=>({}));w(e.error||`Failed to ${s} MITM server`);return}x(!1),p(""),await A()}catch(e){w(e.message||"Network error")}finally{d(!1),f(null)}},M=()=>{m.trim()?O(g,m):N("Sudo password is required")},I=i?.running;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Zp,{padding:"sm",className:"border-primary/20 bg-primary/5",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"security"}),(0,l.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"MITM Server"}),I?(0,l.jsx)(r.Ex,{variant:"success",size:"sm",children:"Running"}):(0,l.jsx)(r.Ex,{variant:"default",size:"sm",children:"Stopped"})]}),(0,l.jsx)("div",{className:"flex items-center gap-1 text-xs text-text-muted","data-i18n-skip":"true",children:[{label:"Cert",ok:i?.certExists},{label:"Trusted",ok:i?.certTrusted},{label:"Server",ok:I}].map(({label:e,ok:t})=>(0,l.jsxs)("span",{className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded ${t?"text-green-600":"text-text-muted"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:t?"check_circle":"cancel"}),e]},e))})]}),(0,l.jsxs)("div",{className:"px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2",children:[(0,l.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Purpose:"})," Use Antigravity IDE & GitHub Copilot → with ANY provider/model from 9Router"]}),(0,l.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → 9Router → response to Antigravity/Copilot"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"9Router Base URL"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:y,disabled:I,className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]}),!I&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",list:"mitm-api-keys",value:u,onChange:e=>h(e.target.value),placeholder:t?"Enter or pick API key":"sk_9router (default)",className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50"}),e?.length>0&&(0,l.jsx)("datalist",{id:"mitm-api-keys",children:e.map(e=>(0,l.jsx)("option",{value:e.key,children:e.name||e.key},e.id))})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap","data-i18n-skip":"true",children:[i?.certExists&&!i?.certTrusted&&(0,l.jsxs)("button",{onClick:()=>E("trust-cert"),disabled:o,className:"px-4 py-1.5 rounded-lg bg-yellow-500/10 border border-yellow-500/30 text-yellow-600 font-medium text-xs flex items-center gap-1.5 hover:bg-yellow-500/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"verified_user"}),"Trust Cert"]}),I?(0,l.jsxs)("button",{onClick:()=>E("stop"),disabled:o,className:"px-4 py-1.5 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-xs flex items-center gap-1.5 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop Server"]}):(0,l.jsxs)("button",{onClick:()=>E("start"),disabled:o||S&&!_,className:"px-4 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-xs flex items-center gap-1.5 hover:bg-primary/20 transition-colors disabled:opacity-50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start Server"]}),I&&(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Enable DNS per tool below to activate interception"})]}),v&&(0,l.jsxs)("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5 shrink-0",children:"error"}),(0,l.jsx)("span",{children:v})]}),S&&!_&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 border border-red-500/20",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"shield_lock"}),(0,l.jsx)("span",{children:"Administrator required — restart 9Router as Administrator to use MITM"})]})]})}),c&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,l.jsxs)("div",{className:"bg-surface border border-border rounded-xl p-6 w-full max-w-sm flex flex-col gap-4 shadow-xl",children:[(0,l.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and server startup"})]}),(0,l.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:m,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"!==e.key||o||M()}}),j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,l.jsx)("span",{children:j})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,l.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{x(!1),p(""),N(null)},disabled:o,children:"Cancel"}),(0,l.jsx)(r.$n,{variant:"primary",size:"sm",onClick:M,loading:o,children:"Confirm"})]})]})})]})}var j=s(45727);function N({tool:e,isExpanded:t,onToggle:s,serverRunning:n,dnsActive:o,hasCachedPassword:d,apiKeys:c,activeProviders:x,hasActiveProviders:m,modelAliases:p={},cloudEnabled:u,onDnsChange:h}){let[g,f]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null),[v,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(""),[S,_]=(0,a.useState)(null),[A,E]=(0,a.useState)(null),[O,M]=(0,a.useState)({}),[I,R]=(0,a.useState)(!1),[T,P]=(0,a.useState)(null),$=j.TOOL_HOSTS[e.id]??[],L="u">typeof navigator&&navigator.userAgent?.includes("Windows");(0,a.useEffect)(()=>{t&&U()},[t]);let U=async()=>{try{let t=await fetch(`/api/cli-tools/antigravity-mitm/alias?tool=${e.id}`);if(t.ok){let e=await t.json();Object.keys(e.aliases||{}).length>0&&M(e.aliases)}}catch{}},K=(0,a.useCallback)(async t=>{try{await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:e.id,mappings:t})})}catch{}},[e.id]),z=(e,t)=>{M(s=>({...s,[e]:t}))},D=()=>{if(!n)return;let e=o?"disable":"enable";L||d?F(e,""):(_(e),w(!0),E(null))},F=async(t,s)=>{f(!0),b(null);try{let l=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:e.id,action:t,sudoPassword:s})}),a=await l.json();if(!l.ok)throw Error(a.error||"Failed to toggle DNS");"enable"===t&&b(`Restart ${e.name} to apply changes`),w(!1),C(""),h?.(a)}catch{}finally{f(!1),_(null)}},H=()=>{k.trim()?F(S,k):E("Sudo password is required")};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),n?o?(0,l.jsx)(r.Ex,{variant:"success",size:"sm",children:"Active"}):(0,l.jsx)(r.Ex,{variant:"warning",size:"sm",children:"DNS off"}):(0,l.jsx)(r.Ex,{variant:"default",size:"sm",children:"Server off"})]}),(0,l.jsxs)("p",{className:"text-xs text-text-muted",children:["Intercept ",e.name," requests via MITM proxy"]})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[$.length>0&&(0,l.jsxs)("div",{className:"mt-2 rounded-md border border-border bg-surface/50 px-2 py-1.5",children:[(0,l.jsx)("p",{className:"text-[10px] font-medium tracking-wide text-text-main/80 mb-1",children:"Edit hosts file manually to add the following entries:"}),(0,l.jsx)("ul",{className:"list-none space-y-0.5 font-mono text-[10px] text-text-muted break-all",children:$.map(e=>(0,l.jsxs)("li",{children:["127.0.0.1 ",e]},e))})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted px-1",children:[(0,l.jsxs)("p",{children:["Toggle DNS to redirect ",e.name," traffic through 9Router via MITM."]}),!o&&(0,l.jsx)("p",{className:"text-amber-600 text-[10px] mt-1",children:"⚠️ Enable DNS to edit model mappings"})]}),e.defaultModels?.length>0&&(0,l.jsx)("div",{className:"flex flex-col gap-2",children:e.defaultModels.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-36 shrink-0 text-xs font-semibold text-text-main text-right",children:e.name}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:O[e.alias]||"",onChange:t=>z(e.alias,t.target.value),onBlur:t=>{var s,l;return s=e.alias,l=t.target.value,void K({...O,[s]:l})},placeholder:"provider/model-id",disabled:!o,className:`flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 ${!o?"opacity-50 cursor-not-allowed":""}`}),(0,l.jsx)("button",{onClick:()=>{P(e.alias),R(!0)},disabled:!m||!o,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 ${m&&o?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),O[e.alias]&&(0,l.jsx)("button",{onClick:()=>{z(e.alias,""),K({...O,[e.alias]:""})},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias))}),e.defaultModels?.length===0&&(0,l.jsx)("p",{className:"text-xs text-text-muted px-1",children:"Model mappings will be available soon."}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 items-start",children:[o?(0,l.jsxs)("button",{onClick:D,disabled:!n||g,className:"px-4 py-1.5 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-xs flex items-center gap-1.5 hover:bg-red-500/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop DNS"]}):(0,l.jsxs)("button",{onClick:D,disabled:!n||g,className:"px-4 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-xs flex items-center gap-1.5 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start DNS"]}),y&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs text-amber-500",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,l.jsx)("span",{children:y})]})]})]})]}),v&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,l.jsxs)("div",{className:"bg-surface border border-border rounded-xl p-6 w-full max-w-sm flex flex-col gap-4 shadow-xl",children:[(0,l.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Required to modify /etc/hosts and flush DNS cache"})]}),(0,l.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:k,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"!==e.key||g||H()}}),A&&(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,l.jsx)("span",{children:A})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,l.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{w(!1),C(""),E(null)},disabled:g,children:"Cancel"}),(0,l.jsx)(r.$n,{variant:"primary",size:"sm",onClick:H,loading:g,children:"Confirm"})]})]})}),(0,l.jsx)(r.rq,{isOpen:I,onClose:()=>R(!1),onSelect:e=>{if(!T||e.isPlaceholder)return;let t={...O,[T]:e.value};M(t),K(t)},selectedModel:T?O[T]:null,activeProviders:x,modelAliases:p,title:`Select model for ${T}`})]})}var v=s(99568),w=s.n(v);function k({tool:e}){return(0,l.jsx)(w(),{href:"/dashboard/mitm",className:"block",children:(0,l.jsx)(r.Zp,{padding:"sm",className:"overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,l.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded-full",children:"MITM"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"chevron_right"})]})})})}},45727:e=>{e.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},97990:(e,t,s)=>{s.d(t,{dM:()=>a,wn:()=>l});let l={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6","gemini-3-flash","gpt-oss-120b-medium","gemini-3-pro-high","gemini-3-pro-low"],defaultModels:[{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro Low",alias:"gemini-3.1-pro-low"},{id:"gemini-3-flash",name:"Gemini 3 Flash / Default",alias:"gemini-3-flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium",alias:"gpt-oss-120b-medium"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-4o-mini","claude-haiku-4.5","gpt-4o","gpt-5-mini"],defaultModels:[{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"q.us-east-1.amazonaws.com",defaultModels:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"}]}},a={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-6"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-6"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Cline Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → OpenAI Compatible"},{step:3,title:"Base URL",value:"{{baseUrl}}/v1",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Kilo Code Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → OpenAI Compatible"},{step:3,title:"Base URL",value:"{{baseUrl}}/v1",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
18
18
  "apiBase": "{{baseUrl}}",
19
19
  "title": "{{model}}",
20
20
  "model": "{{model}}",
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[505],{36698:(e,a,i)=>{i.d(a,{pp:()=>m,jY:()=>d});let t={alloy:{id:"alloy",name:"Alloy"},ash:{id:"ash",name:"Ash"},ballad:{id:"ballad",name:"Ballad"},cedar:{id:"cedar",name:"Cedar"},coral:{id:"coral",name:"Coral"},echo:{id:"echo",name:"Echo"},fable:{id:"fable",name:"Fable"},marin:{id:"marin",name:"Marin"},nova:{id:"nova",name:"Nova"},onyx:{id:"onyx",name:"Onyx"},sage:{id:"sage",name:"Sage"},shimmer:{id:"shimmer",name:"Shimmer"},verse:{id:"verse",name:"Verse"}},n=(...e)=>e.map(e=>({...t[e],type:"tts"})),o=n("alloy","ash","coral","echo","fable","nova","onyx","sage","shimmer"),s=n("alloy","ash","ballad","cedar","coral","echo","fable","marin","nova","onyx","sage","shimmer","verse"),r={openai:{models:[{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"tts-1",name:"TTS-1",type:"tts"}],voices:{"gpt-4o-mini-tts":s,"tts-1":o,"tts-1-hd":o},allVoices:s},openrouter:{models:[{id:"openai/gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"openai/tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"openai/tts-1",name:"TTS-1",type:"tts"}],voices:{"openai/gpt-4o-mini-tts":s,"openai/tts-1":o,"openai/tts-1-hd":o},allVoices:s},elevenlabs:{models:[{id:"eleven_flash_v2_5",name:"Flash v2.5 (Fastest)",type:"tts"},{id:"eleven_turbo_v2_5",name:"Turbo v2.5 (Fast)",type:"tts"},{id:"eleven_multilingual_v2",name:"Multilingual v2 (Quality)",type:"tts"},{id:"eleven_monolingual_v1",name:"Monolingual v1 (English)",type:"tts"}]},"edge-tts":{defaults:[{id:"en-US-AriaNeural",name:"Aria (en-US)",type:"tts"},{id:"en-US-GuyNeural",name:"Guy (en-US)",type:"tts"},{id:"en-GB-SoniaNeural",name:"Sonia (en-GB)",type:"tts"},{id:"vi-VN-HoaiMyNeural",name:"Hoai My (vi-VN)",type:"tts"},{id:"vi-VN-NamMinhNeural",name:"Nam Minh (vi-VN)",type:"tts"},{id:"zh-CN-XiaoxiaoNeural",name:"Xiaoxiao (zh-CN)",type:"tts"},{id:"zh-CN-YunxiNeural",name:"Yunxi (zh-CN)",type:"tts"},{id:"fr-FR-DeniseNeural",name:"Denise (fr-FR)",type:"tts"},{id:"de-DE-KatjaNeural",name:"Katja (de-DE)",type:"tts"},{id:"ja-JP-NanamiNeural",name:"Nanami (ja-JP)",type:"tts"},{id:"ko-KR-SunHiNeural",name:"SunHi (ko-KR)",type:"tts"}]},"local-device":{defaults:[{id:"default",name:"System Default Voice",type:"tts"}]},"google-tts":{defaults:[{id:"af",name:"Afrikaans",type:"tts"},{id:"ar",name:"Arabic",type:"tts"},{id:"bg",name:"Bulgarian",type:"tts"},{id:"bn",name:"Bengali",type:"tts"},{id:"bs",name:"Bosnian",type:"tts"},{id:"ca",name:"Catalan",type:"tts"},{id:"cs",name:"Czech",type:"tts"},{id:"cy",name:"Welsh",type:"tts"},{id:"da",name:"Danish",type:"tts"},{id:"de",name:"German",type:"tts"},{id:"el",name:"Greek",type:"tts"},{id:"en",name:"English",type:"tts"},{id:"eo",name:"Esperanto",type:"tts"},{id:"es",name:"Spanish",type:"tts"},{id:"et",name:"Estonian",type:"tts"},{id:"fi",name:"Finnish",type:"tts"},{id:"fr",name:"French",type:"tts"},{id:"gu",name:"Gujarati",type:"tts"},{id:"hi",name:"Hindi",type:"tts"},{id:"hr",name:"Croatian",type:"tts"},{id:"hu",name:"Hungarian",type:"tts"},{id:"hy",name:"Armenian",type:"tts"},{id:"id",name:"Indonesian",type:"tts"},{id:"is",name:"Icelandic",type:"tts"},{id:"it",name:"Italian",type:"tts"},{id:"ja",name:"Japanese",type:"tts"},{id:"jw",name:"Javanese",type:"tts"},{id:"km",name:"Khmer",type:"tts"},{id:"kn",name:"Kannada",type:"tts"},{id:"ko",name:"Korean",type:"tts"},{id:"la",name:"Latin",type:"tts"},{id:"lv",name:"Latvian",type:"tts"},{id:"mk",name:"Macedonian",type:"tts"},{id:"ml",name:"Malayalam",type:"tts"},{id:"mr",name:"Marathi",type:"tts"},{id:"my",name:"Myanmar (Burmese)",type:"tts"},{id:"ne",name:"Nepali",type:"tts"},{id:"nl",name:"Dutch",type:"tts"},{id:"no",name:"Norwegian",type:"tts"},{id:"pl",name:"Polish",type:"tts"},{id:"pt",name:"Portuguese",type:"tts"},{id:"ro",name:"Romanian",type:"tts"},{id:"ru",name:"Russian",type:"tts"},{id:"si",name:"Sinhala",type:"tts"},{id:"sk",name:"Slovak",type:"tts"},{id:"sq",name:"Albanian",type:"tts"},{id:"sr",name:"Serbian",type:"tts"},{id:"su",name:"Sundanese",type:"tts"},{id:"sv",name:"Swedish",type:"tts"},{id:"sw",name:"Swahili",type:"tts"},{id:"ta",name:"Tamil",type:"tts"},{id:"te",name:"Telugu",type:"tts"},{id:"th",name:"Thai",type:"tts"},{id:"tl",name:"Filipino",type:"tts"},{id:"tr",name:"Turkish",type:"tts"},{id:"uk",name:"Ukrainian",type:"tts"},{id:"ur",name:"Urdu",type:"tts"},{id:"vi",name:"Vietnamese",type:"tts"},{id:"zh-CN",name:"Chinese (Simplified)",type:"tts"},{id:"zh-TW",name:"Chinese (Traditional)",type:"tts"}]}};function d(e,a){let i=r[e];return i?.voices&&(i.voices[a]||i.allVoices)||null}function m(){let e={};for(let[a,i]of Object.entries(r))i.models&&(e[`${a}-tts-models`]=i.models),i.allVoices&&(e[`${a}-tts-voices`]=i.allVoices),i.defaults&&(e[a]=i.defaults);return e["openai-tts-voices"]=r.openai.allVoices,e["openrouter-tts-voices"]=r.openrouter.allVoices,e}},43202:(e,a,i)=>{i.d(a,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>n,MA:()=>t.MA,UY:()=>d,Nu:()=>o,zN:()=>t.zN,B2:()=>r,h0:()=>s});var t=i(82495);i(69633);let n={name:"9Router proxy",description:"AI Infrastructure Management",version:"0.4.11"},o={changelogUrl:"https://raw.githubusercontent.com/decolua/9router/refs/heads/master/CHANGELOG.md"},s={npmPackageName:"9router",installCmd:"npm i -g 9router",exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:3e3,waitForExitMaxMs:15e3,waitForExitCheckMs:500,appPort:20128},r={storageKey:"theme",defaultTheme:"system"},d={maxLines:200,pollIntervalMs:1e3}},55348:(e,a,i)=>{i.d(a,{CL:()=>o,QC:()=>s,Xn:()=>n,YZ:()=>t});let t=["en","vi","zh-CN","zh-TW","ja","pt-BR","pt-PT","ko","es","de","fr","he","ar","ru","pl","cs","nl","tr","uk","tl","id","th","hi","bn","ur","ro","sv","it","el","hu","fi","da","no"],n="en",o="locale";function s(e){return"zh"===e||"zh-CN"===e?"zh-CN":"en"===e?"en":"vi"===e?"vi":"zh-TW"===e?"zh-TW":"ja"===e?"ja":"pt-BR"===e?"pt-BR":"pt-PT"===e?"pt-PT":"ko"===e?"ko":"es"===e?"es":"de"===e?"de":"fr"===e?"fr":"he"===e?"he":"ar"===e?"ar":"ru"===e?"ru":"pl"===e?"pl":"cs"===e?"cs":"nl"===e?"nl":"tr"===e?"tr":"uk"===e?"uk":"tl"===e?"tl":"id"===e?"id":"th"===e?"th":"hi"===e?"hi":"bn"===e?"bn":"ur"===e?"ur":"ro"===e?"ro":"sv"===e?"sv":"it"===e?"it":"el"===e?"el":"hu"===e?"hu":"fi"===e?"fi":"da"===e?"da":"no"===e?"no":n}},69633:(e,a,i)=>{i.d(a,{KC:()=>t.KC,Xg:()=>t.Xg});var t=i(94718);Object.entries(i(82495).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(t.vq).flatMap(([e,a])=>a.map(a=>({provider:e,model:a.id,name:a.name})))},82495:(e,a,i)=>{i.d(a,{DI:()=>c,IS:()=>t,JH:()=>l,MA:()=>b,Q2:()=>g,br:()=>d,fg:()=>r,gC:()=>u,gb:()=>h,mq:()=>p,nJ:()=>n,o5:()=>x,rj:()=>m,s9:()=>o,wG:()=>v,wb:()=>f,zN:()=>s,zt:()=>y});let t={kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981",deprecated:!0,deprecationNotice:"Qwen OAuth free tier was discontinued by Alibaba on 2026-04-15. New connections will not work.",serviceKinds:["llm","tts","stt"],ttsConfig:{baseUrl:"http://localhost:8000/v1/audio/speech",authType:"none",authHeader:"none",format:"openai",models:[{id:"qwen3-tts",name:"Qwen3 TTS"}]}},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationNotice:"Gemini CLI is designed exclusively for Gemini CLI. Using it with other tools (OpenClaw, Claude, Codex...) may result in account restrictions or bans."},iflow:{id:"iflow",alias:"if",name:"iFlow AI",icon:"water_drop",color:"#6366F1"},opencode:{id:"opencode",alias:"oc",name:"OpenCode Free",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0,passthroughModels:!0,modelsFetcher:{url:"https://opencode.ai/zen/v1/models",type:"opencode-free"}}},n={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",website:"https://openrouter.ai",notice:{text:"Free tier: 27+ free models, no credit card needed, 200 req/day. After $10 credit: 1,000 req/day.",apiKeyUrl:"https://openrouter.ai/settings/keys"},modelsFetcher:{url:"https://openrouter.ai/api/v1/models",type:"openrouter-free"},passthroughModels:!0,serviceKinds:["llm","embedding","tts","imageToText"],embeddingConfig:{baseUrl:"https://openrouter.ai/api/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"openai/text-embedding-3-small",name:"Text Embedding 3 Small (OpenRouter)",dimensions:1536},{id:"openai/text-embedding-3-large",name:"Text Embedding 3 Large (OpenRouter)",dimensions:3072},{id:"openai/text-embedding-ada-002",name:"Text Embedding Ada 002 (OpenRouter)",dimensions:1536}]}},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim",notice:{text:"Free access for NVIDIA Developer Program members (prototyping & testing).",apiKeyUrl:"https://build.nvidia.com/settings/api-keys"},serviceKinds:["llm","tts","embedding","stt"],ttsConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"nvidia-tts",models:[{id:"fastpitch",name:"FastPitch"},{id:"tacotron2",name:"Tacotron2"}]},embeddingConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",dimensions:1024}]}},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",notice:{text:"Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo \xb7 Max $100/mo.",apiKeyUrl:"https://ollama.com/settings/keys"}},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai",notice:{text:"New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.",apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",website:"https://ai.google.dev",serviceKinds:["llm","embedding","image","imageToText","webSearch"],searchViaChat:{defaultModel:"gemini-2.5-flash",pricingUrl:"https://ai.google.dev/pricing",freeTier:"Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio."},embeddingConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",models:[{id:"text-embedding-004",name:"Text Embedding 004",dimensions:768},{id:"embedding-001",name:"Embedding 001",dimensions:768}]}},byteplus:{id:"byteplus",alias:"bpm",name:"BytePlus ModelArk",icon:"cloud",color:"#2563EB",textIcon:"BP",website:"https://console.byteplus.com/ark",notice:{text:"Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.",apiKeyUrl:"https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey"},serviceKinds:["llm"]}},o={extended:{options:["auto","on","off"],defaultMode:"auto",defaultBudgetTokens:1e4},effort:{options:["auto","none","low","medium","high"],defaultMode:"auto"}},s={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B",deprecated:!0,deprecationNotice:"AG is designed exclusively for Antigravity IDE. Using it with other tools (OpenClaw, Claude, Codex...) may result in account restrictions or bans."},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6",thinkingConfig:o.effort,serviceKinds:["llm","image"],kindNotice:{image:"Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation."}},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333",serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://models.github.ai/inference/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",dimensions:3072}]}},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC"},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL"}},r={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn"},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn"},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn",serviceKinds:["llm","webSearch"],searchViaChat:{defaultModel:"kimi-k2.5",pricingUrl:"https://platform.moonshot.ai/docs/pricing/chat"}},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com",serviceKinds:["llm","image","imageToText","webSearch"],searchViaChat:{defaultModel:"MiniMax-M2.7",pricingUrl:"https://www.minimaxi.com/document/price"}},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com"},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl",icon:"cloud",color:"#FF6A00",textIcon:"ALi"},"volcengine-ark":{id:"volcengine-ark",alias:"ark",name:"Volcengine Ark",icon:"cloud",color:"#1677FF",textIcon:"ARK",website:"https://ark.cn-beijing.volces.com"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",serviceKinds:["llm","embedding","tts","image","imageToText","webSearch"],thinkingConfig:o.effort,searchViaChat:{defaultModel:"gpt-4o-mini",pricingUrl:"https://openai.com/api/pricing"},ttsConfig:{baseUrl:"https://api.openai.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"tts-1",name:"TTS-1"},{id:"tts-1-hd",name:"TTS-1 HD"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},embeddingConfig:{baseUrl:"https://api.openai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",dimensions:3072},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",dimensions:1536}]}},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",serviceKinds:["llm","imageToText"]},"opencode-go":{id:"opencode-go",alias:"ocg",name:"OpenCode Go",icon:"terminal",color:"#E87040",textIcon:"OC",website:"https://opencode.ai/auth",notice:{text:"OpenCode Go subscription: $5/mo (then $10/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.",apiKeyUrl:"https://opencode.ai/auth"}},azure:{id:"azure",alias:"azure",name:"Azure OpenAI",icon:"cloud",color:"#0078D4",textIcon:"AZ",website:"https://azure.microsoft.com/en-us/products/ai-services/openai-service",hasProviderSpecificData:!0},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com"},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",serviceKinds:["llm","imageToText"]},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",serviceKinds:["llm","imageToText","webSearch"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"}},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai",serviceKinds:["llm","imageToText","embedding"],embeddingConfig:{baseUrl:"https://api.mistral.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"mistral-embed",name:"Mistral Embed",dimensions:1024}]}},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai",serviceKinds:["llm","webSearch"],searchConfig:{baseUrl:"https://api.perplexity.ai/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.together.xyz/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",dimensions:1024},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",dimensions:768}]}},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai",serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.fireworks.ai/inference/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",dimensions:768}]}},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai"},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com"},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com",serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.tokenfactory.nebius.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",dimensions:4096}]}},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com"},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz",serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.hyperbolic.xyz/v1/audio/generation",authType:"apikey",authHeader:"bearer",format:"hyperbolic",models:[{id:"melo-tts",name:"Melo TTS"}]}},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",notice:{text:"$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).",apiKeyUrl:"https://console.deepgram.com/api-keys"},serviceKinds:["stt","imageToText","tts"],ttsConfig:{baseUrl:"https://api.deepgram.com/v1/speak",authType:"apikey",authHeader:"token",format:"deepgram",models:[]}},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",serviceKinds:["stt"]},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana",icon:"image",color:"#FFD700",textIcon:"NB",website:"https://nanobananaapi.ai",serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.elevenlabs.io/v1/text-to-speech",authType:"apikey",authHeader:"xi-api-key",format:"elevenlabs",models:[{id:"eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]}},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.cartesia.ai/tts/bytes",authType:"apikey",authHeader:"x-api-key",format:"cartesia",models:[{id:"sonic-2",name:"Sonic 2"},{id:"sonic-3",name:"Sonic 3"}]}},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.play.ht/api/v2/tts/stream",authType:"apikey",authHeader:"playht",format:"playht",models:[{id:"PlayDialog",name:"PlayDialog"},{id:"Play3.0-mini",name:"Play 3.0 Mini"}]}},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"local-device",authType:"none",authHeader:"none",format:"local-device",models:[]}},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"google-tts",authType:"none",authHeader:"none",format:"google-tts",models:[]}},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"edge-tts",authType:"none",authHeader:"none",format:"edge-tts",models:[]}},coqui:{id:"coqui",alias:"coqui",name:"Coqui TTS",icon:"record_voice_over",color:"#10B981",textIcon:"CQ",website:"https://github.com/coqui-ai/TTS",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5002/api/tts",authType:"none",authHeader:"none",format:"coqui",models:[{id:"tts_models/en/ljspeech/tacotron2-DDC",name:"Tacotron2 DDC (LJSpeech)"}]}},tortoise:{id:"tortoise",alias:"tortoise",name:"Tortoise TTS",icon:"record_voice_over",color:"#7C3AED",textIcon:"TT",website:"https://github.com/neonbjb/tortoise-tts",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5000/api/tts",authType:"none",authHeader:"none",format:"tortoise",models:[{id:"tortoise-v2",name:"Tortoise v2"}]}},inworld:{id:"inworld",alias:"inworld",name:"Inworld TTS",icon:"record_voice_over",color:"#FF6B6B",textIcon:"IW",website:"https://inworld.ai",notice:{text:"Free tier: 40 minutes/month TTS. Paid: TTS-1.5 Mini $0.01/min ($15/1M chars), TTS-1.5 Max $0.025/min ($30/1M chars). 270+ voices, 15 languages.",apiKeyUrl:"https://platform.inworld.ai/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.inworld.ai/tts/v1/voice",authType:"apikey",authHeader:"basic",format:"inworld",models:[{id:"inworld-tts-1.5-mini",name:"Inworld TTS 1.5 Mini ($0.01/min)"},{id:"inworld-tts-1.5-max",name:"Inworld TTS 1.5 Max ($0.025/min)"}]}},"voyage-ai":{id:"voyage-ai",alias:"voyage",name:"Voyage AI",icon:"data_array",color:"#0EA5E9",textIcon:"VG",website:"https://www.voyageai.com",notice:{apiKeyUrl:"https://dash.voyageai.com/api-keys"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.voyageai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"voyage-3-large",name:"Voyage 3 Large",dimensions:1024},{id:"voyage-3.5",name:"Voyage 3.5",dimensions:1024},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",dimensions:1024},{id:"voyage-code-3",name:"Voyage Code 3",dimensions:1024},{id:"voyage-finance-2",name:"Voyage Finance 2",dimensions:1024},{id:"voyage-law-2",name:"Voyage Law 2",dimensions:1024},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",dimensions:1024}]}},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",serviceKinds:["image"]},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI",serviceKinds:["image"]},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",serviceKinds:["image","imageToText","tts"],hiddenKinds:["tts"],ttsConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-tts",models:[{id:"facebook/mms-tts-eng",name:"MMS TTS English"},{id:"microsoft/speecht5_tts",name:"SpeechT5 TTS"}]}},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"smart_toy",color:"#5B5FEF",textIcon:"BB",website:"https://blackbox.ai",serviceKinds:["llm"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai"},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com"},"vertex-partner":{id:"vertex-partner",alias:"vxp",name:"Vertex Partner",icon:"cloud",color:"#34A853",textIcon:"VP",website:"https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models"},tavily:{id:"tavily",alias:"tavily",name:"Tavily",icon:"search",color:"#5B21B6",textIcon:"TV",website:"https://tavily.com",notice:{apiKeyUrl:"https://app.tavily.com/home"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.tavily.com/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.tavily.com/extract",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,formats:["markdown","text"],maxCharacters:1e5,timeoutMs:15e3}},"brave-search":{id:"brave-search",alias:"brave",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",notice:{apiKeyUrl:"https://api-dashboard.search.brave.com/app/keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.search.brave.com/res/v1",method:"GET",authType:"apikey",authHeader:"x-subscription-token",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},serper:{id:"serper",alias:"serper",name:"Serper",icon:"search",color:"#4F46E5",textIcon:"SP",website:"https://serper.dev",notice:{apiKeyUrl:"https://serper.dev/api-key"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://google.serper.dev",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:2500,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},exa:{id:"exa",alias:"exa",name:"Exa",icon:"manage_search",color:"#2563EB",textIcon:"EX",website:"https://exa.ai",notice:{apiKeyUrl:"https://dashboard.exa.ai/api-keys"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.exa.ai/search",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.007,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.exa.ai/contents",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:1e3,formats:["text","markdown"],maxCharacters:1e5,timeoutMs:15e3}},searxng:{id:"searxng",alias:"searxng",name:"SearXNG",icon:"saved_search",color:"#3B82F6",textIcon:"SX",website:"https://docs.searxng.org",serviceKinds:["webSearch"],noAuth:!0,searchConfig:{baseUrl:"http://localhost:8888/search",method:"GET",authType:"none",authHeader:"none",costPerQuery:0,freeMonthlyQuota:999999,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:18e4}},"google-pse":{id:"google-pse",alias:"gpse",name:"Google PSE",icon:"search",color:"#4285F4",textIcon:"GP",website:"https://programmablesearchengine.google.com",notice:{apiKeyUrl:"https://programmablesearchengine.google.com/controlpanel/create"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.googleapis.com/customsearch/v1",method:"GET",authType:"apikey",authHeader:"key",costPerQuery:.005,freeMonthlyQuota:3e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:10,timeoutMs:1e4,cacheTTLMs:3e5}},linkup:{id:"linkup",alias:"linkup",name:"Linkup",icon:"link",color:"#0EA5E9",textIcon:"LK",website:"https://linkup.so",notice:{apiKeyUrl:"https://app.linkup.so/api-keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.linkup.so/v1/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:3e5}},searchapi:{id:"searchapi",alias:"searchapi",name:"SearchAPI",icon:"search",color:"#0EA5A4",textIcon:"SA",website:"https://www.searchapi.io",notice:{apiKeyUrl:"https://www.searchapi.io/dashboard"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.searchapi.io/api/v1/search",method:"GET",authType:"apikey",authHeader:"api_key",costPerQuery:.004,freeMonthlyQuota:100,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},youcom:{id:"youcom",alias:"youcom",name:"You.com Search",icon:"search",color:"#7C3AED",textIcon:"YC",website:"https://you.com",notice:{apiKeyUrl:"https://api.you.com"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://ydc-index.io/v1/search",method:"GET",authType:"apikey",authHeader:"x-api-key",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},firecrawl:{id:"firecrawl",alias:"firecrawl",name:"Firecrawl",icon:"local_fire_department",color:"#F59E0B",textIcon:"FC",website:"https://firecrawl.dev",notice:{apiKeyUrl:"https://www.firecrawl.dev/app/api-keys"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://api.firecrawl.dev/v1/scrape",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.002,freeMonthlyQuota:500,formats:["markdown","html","text"],maxCharacters:2e5,timeoutMs:3e4}},"jina-reader":{id:"jina-reader",alias:"jina",name:"Jina Reader",icon:"menu_book",color:"#000000",textIcon:"JR",website:"https://jina.ai/reader",notice:{apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://r.jina.ai",method:"GET",authType:"apikey",authHeader:"bearer",costPerQuery:0,freeMonthlyQuota:1e6,formats:["markdown","text","html"],maxCharacters:2e5,timeoutMs:3e4}}},d={"grok-web":{id:"grok-web",alias:"gw",name:"Grok Web (Subscription)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"GW",website:"https://grok.com",authType:"cookie",authHint:"Paste your sso= cookie value from grok.com",passthroughModels:!0,serviceKinds:["llm"]},"perplexity-web":{id:"perplexity-web",alias:"pw",name:"Perplexity Web (Pro/Max)",icon:"search",color:"#20808D",textIcon:"PW",website:"https://www.perplexity.ai",authType:"cookie",authHint:"Paste your __Secure-next-auth.session-token cookie value from perplexity.ai",serviceKinds:["llm"]}},m=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Text to Image",icon:"brush",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"imageToText",label:"Image to Text",icon:"image_search",endpoint:{method:"POST",path:"/v1/images/understanding"}},{id:"tts",label:"Text To Speech",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"STT",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"webSearch",label:"Web Search",icon:"travel_explore",endpoint:{method:"POST",path:"/v1/search"}},{id:"webFetch",label:"Web Fetch",icon:"language",endpoint:{method:"POST",path:"/v1/web/fetch"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],l="openai-compatible-",c="anthropic-compatible-";function p(e){return"string"==typeof e&&e.startsWith(l)}function h(e){return"string"==typeof e&&e.startsWith(c)}function u(e){return"string"==typeof e&&e.startsWith("custom-embedding-")}let g={...t,...n,...s,...r,...d},b={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"},cookie:{id:"cookie",name:"Browser Cookie",icon:"cookie"}};function y(e){for(let a of Object.values(g))if(a.alias===e||a.id===e)return a;return null}function v(e){let a=g[e];return a?.alias||e}function x(e){return Object.values(g).filter(a=>!(!(a.serviceKinds??["llm"]).includes(e)||a.hidden||a.hiddenKinds?.includes(e)))}Object.values(g).reduce((e,a)=>(e[a.alias]=a.id,e),{}),Object.values(g).reduce((e,a)=>(e[a.id]=a.alias,e),{});let f=["claude","antigravity","kiro","github","codex","kimi-coding","ollama"]},83789:(e,a,i)=>{i.d(a,{A:()=>r});var t=i(2074),n=i(11472),o=i(43202);function s(e){let a=document.documentElement,i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===e?i:e)?a.classList.add("dark"):a.classList.remove("dark")}let r=(0,t.v)((0,n.Zr)((e,a)=>({theme:o.B2.defaultTheme,setTheme:a=>{e({theme:a}),s(a)},toggleTheme:()=>{let i="dark"===a().theme?"light":"dark";e({theme:i}),s(i)},initTheme:()=>{s(a().theme)}}),{name:o.B2.storageKey}))},84502:(e,a,i)=>{i.d(a,{FE:()=>p,Tl:()=>m,wn:()=>h});var t=i(55348);let n={},o=t.Xn,s=[];function r(){if("u"<typeof document)return t.Xn;let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${t.CL}=`)),a=e?decodeURIComponent(e.split("=")[1]):t.Xn;return(0,t.QC)(a)}async function d(e){if("en"===e){n={};return}try{let a=await fetch(`/i18n/literals/${e}.json`);n=await a.json()}catch(e){console.error("Failed to load translations:",e),n={}}}function m(e){if(!e||"string"!=typeof e)return e;let a=e.trim();return a&&"en"!==o&&n[a]||e}function l(e){if(!e.nodeValue||!e.nodeValue.trim())return;let a=e.parentElement;if(!a)return;let i=a;for(;i;){if(i.hasAttribute&&i.hasAttribute("data-i18n-skip"))return;i=i.parentElement}if(["script","style","code","pre","colgroup","table","thead","tbody","tfoot","tr","select","datalist","optgroup"].includes(a.tagName?.toLowerCase()))return;e._originalText||(e._originalText=e.nodeValue);let t=m(e._originalText);t!==e.nodeValue&&(e.nodeValue=t)}function c(e){let a;if(!e)return;let i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),t=[];for(;a=i.nextNode();)t.push(a);t.forEach(l)}async function p(){o=r(),await d(o),c(document.body),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE?c(e):e.nodeType===Node.TEXT_NODE&&l(e)})})}).observe(document.body,{childList:!0,subtree:!0})}async function h(){o=r(),await d(o),s.forEach(e=>e()),c(document.body)}},94718:(e,a,i)=>{i.d(a,{Xg:()=>l,vq:()=>d,KC:()=>c});var t=i(390),n=i(89651);let o={"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,interleaved-thinking-2025-05-14"},s="https://api.kimi.com/coding/v1/messages",r={claude:{baseUrl:"https://api.anthropic.com/v1/messages",format:"claude",headers:{"Anthropic-Version":"2023-06-01","Anthropic-Beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28","Anthropic-Dangerous-Direct-Browser-Access":"true","User-Agent":"claude-cli/2.1.92 (external, sdk-cli)","X-App":"cli","X-Stainless-Helper-Method":"stream","X-Stainless-Retry-Count":"0","X-Stainless-Runtime-Version":"v24.14.0","X-Stainless-Package-Version":"0.80.0","X-Stainless-Runtime":"node","X-Stainless-Lang":"js","X-Stainless-Arch":function(){switch((0,t.arch)()){case"x64":return"x64";case"arm64":return"arm64";case"ia32":return"x86";default:return`other::${(0,t.arch)()}`}}(),"X-Stainless-Os":function(){switch((0,t.platform)()){case"darwin":return"MacOS";case"win32":return"Windows";case"linux":return"Linux";case"freebsd":return"FreeBSD";default:return`Other::${(0,t.platform)()}`}}(),"X-Stainless-Timeout":"600"},clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",tokenUrl:"https://api.anthropic.com/v1/oauth/token"},gemini:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",format:"gemini",clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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"},"gemini-cli":{baseUrl:"https://cloudcode-pa.googleapis.com/v1internal",format:"gemini-cli",clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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"},codex:{baseUrl:"https://chatgpt.com/backend-api/codex/responses",format:"openai-responses",headers:{originator:"codex-cli","User-Agent":"codex-cli/1.0.18 (macOS; arm64)"},clientId:"app_EMoamEEZ73f0CkXaXp7hrann",tokenUrl:"https://auth.openai.com/oauth/token"},qwen:{baseUrl:"https://portal.qwen.ai/v1/chat/completions",format:"openai",clientId:"f0304373b74a44d2b584a3fb70ca9e56",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",authUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code"},iflow:{baseUrl:"https://apis.iflow.cn/v1/chat/completions",format:"openai",headers:{"User-Agent":"iFlow-Cli"},clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",tokenUrl:"https://iflow.cn/oauth/token",authUrl:"https://iflow.cn/oauth"},qoder:{baseUrl:"https://api.qoder.com/v1/chat/completions",format:"openai",headers:{"User-Agent":"Qoder-Cli"},clientId:n.env.QODER_OAUTH_CLIENT_ID||"10009311001",clientSecret:n.env.QODER_OAUTH_CLIENT_SECRET||"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",tokenUrl:"https://api.qoder.com/oauth/token",authUrl:"https://qoder.com/oauth/authorize"},antigravity:{baseUrls:["https://daily-cloudcode-pa.googleapis.com","https://daily-cloudcode-pa.sandbox.googleapis.com"],format:"antigravity",headers:{"User-Agent":`antigravity/1.107.0 ${(0,t.platform)()}/${(0,t.arch)()}`},clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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"},openrouter:{baseUrl:"https://openrouter.ai/api/v1/chat/completions",format:"openai",headers:{"HTTP-Referer":"https://endpoint-proxy.local","X-Title":"Endpoint Proxy"}},openai:{baseUrl:"https://api.openai.com/v1/chat/completions",format:"openai"},glm:{baseUrl:"https://api.z.ai/api/anthropic/v1/messages",format:"claude",headers:{...o}},"glm-cn":{baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",format:"openai",headers:{}},kimi:{baseUrl:s,format:"claude",headers:{...o}},minimax:{baseUrl:"https://api.minimax.io/anthropic/v1/messages",format:"claude",headers:{...o}},"minimax-cn":{baseUrl:"https://api.minimaxi.com/anthropic/v1/messages",format:"claude",headers:{...o}},alicode:{baseUrl:"https://coding.dashscope.aliyuncs.com/v1/chat/completions",format:"openai",headers:{}},"alicode-intl":{baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions",format:"openai",headers:{}},"volcengine-ark":{baseUrl:"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",format:"openai",headers:{}},byteplus:{baseUrl:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",format:"openai",headers:{}},github:{baseUrl:"https://api.githubcopilot.com/chat/completions",responsesUrl:"https://api.githubcopilot.com/responses",format:"openai",headers:{"copilot-integration-id":"vscode-chat","editor-version":"vscode/1.110.0","editor-plugin-version":"copilot-chat/0.38.0","user-agent":"GitHubCopilotChat/0.38.0","openai-intent":"conversation-panel","x-github-api-version":"2025-04-01","x-vscode-user-agent-library-version":"electron-fetch","X-Initiator":"user",Accept:"application/json","Content-Type":"application/json"},clientId:"Iv1.b507a08c87ecfe98"},kiro:{baseUrl:"https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",format:"kiro",retry:{429:2},headers:{"Content-Type":"application/json",Accept:"application/vnd.amazon.eventstream","X-Amz-Target":"AmazonCodeWhispererStreamingService.GenerateAssistantResponse","User-Agent":"AWS-SDK-JS/3.0.0 kiro-ide/1.0.0","X-Amz-User-Agent":"aws-sdk-js/3.0.0 kiro-ide/1.0.0"},tokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authUrl:"https://prod.us-east-1.auth.desktop.kiro.dev"},cursor:{baseUrl:"https://api2.cursor.sh",chatPath:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",format:"cursor",headers:{"connect-accept-encoding":"gzip","connect-protocol-version":"1","Content-Type":"application/connect+proto","User-Agent":"connect-es/1.6.1"},clientVersion:"3.1.0"},"kimi-coding":{baseUrl:s,format:"claude",headers:{...o},clientId:"17e5f671-d194-4dfb-9706-5516cb48c098",tokenUrl:"https://auth.kimi.com/api/oauth/token",refreshUrl:"https://auth.kimi.com/api/oauth/token"},kilocode:{baseUrl:"https://api.kilo.ai/api/openrouter/chat/completions",format:"openai",headers:{}},opencode:{baseUrl:"http://localhost:4096/v1/chat/completions",format:"openai",headers:{}},cline:{baseUrl:"https://api.cline.bot/api/v1/chat/completions",format:"openai",headers:{"HTTP-Referer":"https://cline.bot","X-Title":"Cline"},tokenUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},nvidia:{baseUrl:"https://integrate.api.nvidia.com/v1/chat/completions",format:"openai"},anthropic:{baseUrl:"https://api.anthropic.com/v1/messages",format:"claude",headers:{...o}},deepseek:{baseUrl:"https://api.deepseek.com/chat/completions",format:"openai"},groq:{baseUrl:"https://api.groq.com/openai/v1/chat/completions",format:"openai"},xai:{baseUrl:"https://api.x.ai/v1/chat/completions",format:"openai"},mistral:{baseUrl:"https://api.mistral.ai/v1/chat/completions",format:"openai"},perplexity:{baseUrl:"https://api.perplexity.ai/chat/completions",format:"openai"},together:{baseUrl:"https://api.together.xyz/v1/chat/completions",format:"openai"},fireworks:{baseUrl:"https://api.fireworks.ai/inference/v1/chat/completions",format:"openai"},cerebras:{baseUrl:"https://api.cerebras.ai/v1/chat/completions",format:"openai"},cohere:{baseUrl:"https://api.cohere.ai/v1/chat/completions",format:"openai"},nebius:{baseUrl:"https://api.studio.nebius.ai/v1/chat/completions",format:"openai"},siliconflow:{baseUrl:"https://api.siliconflow.cn/v1/chat/completions",format:"openai"},hyperbolic:{baseUrl:"https://api.hyperbolic.xyz/v1/chat/completions",format:"openai"},deepgram:{baseUrl:"https://api.deepgram.com/v1/listen",format:"openai"},assemblyai:{baseUrl:"https://api.assemblyai.com/v1/audio/transcriptions",format:"openai"},nanobanana:{baseUrl:"https://api.nanobananaapi.ai/v1/chat/completions",format:"openai"},chutes:{baseUrl:"https://llm.chutes.ai/v1/chat/completions",format:"openai"},ollama:{baseUrl:"https://ollama.com/api/chat",format:"ollama"},"ollama-local":{baseUrl:"http://localhost:11434/api/chat",format:"ollama"},vertex:{baseUrl:"https://aiplatform.googleapis.com",format:"vertex"},"vertex-partner":{baseUrl:"https://aiplatform.googleapis.com",format:"openai"},gitlab:{baseUrl:"https://gitlab.com/api/v4/chat/completions",format:"openai"},codebuddy:{baseUrl:"https://copilot.tencent.com/v1/chat/completions",format:"openai"},opencode:{baseUrl:"https://opencode.ai",format:"openai",headers:{"x-opencode-client":"desktop"},noAuth:!0},"opencode-go":{baseUrl:"https://opencode.ai/zen/go/v1/chat/completions",format:"openai",headers:{}},"grok-web":{baseUrl:"https://grok.com/rest/app-chat/conversations/new",format:"grok-web",authType:"cookie"},"perplexity-web":{baseUrl:"https://www.perplexity.ai/rest/sse/perplexity_ask",format:"perplexity-web",authType:"cookie"},azure:{baseUrl:"",format:"openai",headers:{}},"cloudflare-ai":{baseUrl:"https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions",format:"openai"}},d={cc:[{id:"claude-opus-4-7",name:"Claude Opus 4.7"},{id:"claude-opus-4-6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-5-20251101",name:"Claude 4.5 Opus"},{id:"claude-sonnet-4-5-20250929",name:"Claude 4.5 Sonnet"},{id:"claude-haiku-4-5-20251001",name:"Claude 4.5 Haiku"}],cx:[{id:"gpt-5.5",name:"GPT 5.5"},{id:"gpt-5.4",name:"GPT 5.4"},{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"},{id:"gpt-5.3-codex-xhigh",name:"GPT 5.3 Codex (xHigh)"},{id:"gpt-5.3-codex-high",name:"GPT 5.3 Codex (High)"},{id:"gpt-5.3-codex-low",name:"GPT 5.3 Codex (Low)"},{id:"gpt-5.3-codex-none",name:"GPT 5.3 Codex (None)"},{id:"gpt-5.3-codex-spark",name:"GPT 5.3 Codex Spark"},{id:"gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini"},{id:"gpt-5.1-codex-mini-high",name:"GPT 5.1 Codex Mini (High)"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.1-codex-max",name:"GPT 5.1 Codex Max"},{id:"gpt-5.1-codex",name:"GPT 5.1 Codex"},{id:"gpt-5.1",name:"GPT 5.1"},{id:"gpt-5-codex",name:"GPT 5 Codex"},{id:"gpt-5-codex-mini",name:"GPT 5 Codex Mini"},{id:"gpt-5.4-image",name:"GPT 5.4 Image",type:"image",capabilities:["text2img","edit"],params:["size","quality","background","image_detail","output_format"]},{id:"gpt-5.3-image",name:"GPT 5.3 Image",type:"image",capabilities:["text2img","edit"],params:["size","quality","background","image_detail","output_format"]},{id:"gpt-5.2-image",name:"GPT 5.2 Image",type:"image",capabilities:["text2img","edit"],params:["size","quality","background","image_detail","output_format"]}],gc:[{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"}],qw:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash"},{id:"vision-model",name:"Qwen3 Vision Model"},{id:"coder-model",name:"Qwen3.6 Coder Model"}],if:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-max",name:"Qwen3 Max"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus"},{id:"qwen3-max-preview",name:"Qwen3 Max Preview"},{id:"qwen3-235b",name:"Qwen3 235B A22B"},{id:"qwen3-235b-a22b-instruct",name:"Qwen3 235B A22B Instruct"},{id:"qwen3-235b-a22b-thinking-2507",name:"Qwen3 235B A22B Thinking"},{id:"qwen3-32b",name:"Qwen3 32B"},{id:"kimi-k2",name:"Kimi K2"},{id:"deepseek-v3.2",name:"DeepSeek V3.2 Exp"},{id:"deepseek-v3.1",name:"DeepSeek V3.1 Terminus"},{id:"deepseek-v3",name:"DeepSeek V3 671B"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"glm-4.7",name:"GLM 4.7"},{id:"iflow-rome-30ba3b",name:"iFlow ROME"}],ag:[{id:"gemini-3.1-pro-high",name:"Gemini 3 Pro High"},{id:"gemini-3.1-pro-low",name:"Gemini 3 Pro Low"},{id:"gemini-3-flash",name:"Gemini 3 Flash",thinking:!1},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium"}],gh:[{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o mini"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"gpt-5.4",name:"GPT-5.4"},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.5",name:"Claude Opus 4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"claude-opus-4.6",name:"Claude Opus 4.6"},{id:"claude-opus-4.7",name:"Claude Opus 4.7"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"oswe-vscode-prime",name:"Raptor Mini"},{id:"goldeneye-free-auto",name:"GoldenEye"},{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",type:"embedding"},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",type:"embedding"}],kr:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",strip:["image","audio"]},{id:"qwen3-coder-next",name:"Qwen3 Coder Next",strip:["image","audio"]},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"}],cu:[{id:"default",name:"Auto (Server Picks)"},{id:"claude-4.5-opus-high-thinking",name:"Claude 4.5 Opus High Thinking"},{id:"claude-4.5-opus-high",name:"Claude 4.5 Opus High"},{id:"claude-4.5-sonnet-thinking",name:"Claude 4.5 Sonnet Thinking"},{id:"claude-4.5-sonnet",name:"Claude 4.5 Sonnet"},{id:"claude-4.5-haiku",name:"Claude 4.5 Haiku"},{id:"claude-4.5-opus",name:"Claude 4.5 Opus"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"claude-4.6-opus-max",name:"Claude 4.6 Opus Max"},{id:"claude-4.6-sonnet-medium-thinking",name:"Claude 4.6 Sonnet Medium Thinking"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"}],kmc:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],kc:[{id:"anthropic/claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"anthropic/claude-opus-4-20250514",name:"Claude Opus 4"},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"openai/gpt-4.1",name:"GPT-4.1"},{id:"openai/o3",name:"o3"},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat"},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner"}],"opencode-go":[{id:"kimi-k2.6",name:"Kimi K2.6"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5.1",name:"GLM 5.1"},{id:"glm-5",name:"GLM 5"},{id:"qwen3.5-plus",name:"Qwen 3.5 Plus"},{id:"qwen3.6-plus",name:"Qwen 3.6 Plus"},{id:"mimo-v2-pro",name:"MiMo V2 Pro"},{id:"mimo-v2-omni",name:"MiMo V2 Omni"},{id:"minimax-m2.7",name:"MiniMax M2.7",targetFormat:"claude"},{id:"minimax-m2.5",name:"MiniMax M2.5",targetFormat:"claude"}],oc:[],cl:[{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7"},{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"anthropic/claude-opus-4.6",name:"Claude Opus 4.6"},{id:"openai/gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"openai/gpt-5.4",name:"GPT-5.4"},{id:"google/gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"google/gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"kwaipilot/kat-coder-pro",name:"KAT Coder Pro"}],openai:[{id:"gpt-5.4",name:"GPT-5.4"},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 Nano"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-nano",name:"GPT-5 Nano"},{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o Mini"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-4.1-mini",name:"GPT-4.1 Mini"},{id:"gpt-4.1-nano",name:"GPT-4.1 Nano"},{id:"o3",name:"O3"},{id:"o3-mini",name:"O3 Mini"},{id:"o3-pro",name:"O3 Pro"},{id:"o4-mini",name:"O4 Mini"},{id:"o1",name:"O1"},{id:"o1-mini",name:"O1 Mini"},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",type:"embedding"},{id:"text-embedding-3-small",name:"Text Embedding 3 Small",type:"embedding"},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",type:"embedding"},{id:"tts-1",name:"TTS-1",type:"tts"},{id:"tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"gpt-image-1",name:"GPT Image 1",type:"image",params:["n","size","quality","response_format"]},{id:"dall-e-3",name:"DALL-E 3",type:"image",params:["size","quality","style","response_format"]},{id:"dall-e-2",name:"DALL-E 2",type:"image",params:["n","size","response_format"]}],anthropic:[{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"claude-opus-4-20250514",name:"Claude Opus 4"},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet"}],gemini:[{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"},{id:"gemini-2.0-flash",name:"Gemini 2.0 Flash"},{id:"gemini-2.0-flash-lite",name:"Gemini 2.0 Flash Lite"},{id:"gemma-4-31b-it",name:"Gemma 4 31B IT"},{id:"gemini-embedding-2-preview",name:"Gemini Embedding 2 Preview",type:"embedding"},{id:"gemini-embedding-001",name:"Gemini Embedding 001",type:"embedding"},{id:"text-embedding-005",name:"Text Embedding 005",type:"embedding"},{id:"text-embedding-004",name:"Text Embedding 004 (Legacy)",type:"embedding"},{id:"gemini-3.1-flash-image-preview",name:"Gemini 3.1 Flash Image (Nano Banana 2)",type:"image",params:[]},{id:"gemini-3-pro-image-preview",name:"Gemini 3 Pro Image (Nano Banana Pro)",type:"image",params:[]},{id:"gemini-2.5-flash-image",name:"Gemini 2.5 Flash Image (Nano Banana)",type:"image",params:[]}],openrouter:[{id:"openai/text-embedding-3-large",name:"OpenAI Text Embedding 3 Large",type:"embedding"},{id:"openai/text-embedding-3-small",name:"OpenAI Text Embedding 3 Small",type:"embedding"},{id:"openai/text-embedding-ada-002",name:"OpenAI Text Embedding Ada 002",type:"embedding"},{id:"qwen/qwen3-embedding-8b",name:"Qwen3 Embedding 8B",type:"embedding"},{id:"perplexity/pplx-embed-v1-4b",name:"Perplexity Embed V1 4B",type:"embedding"},{id:"perplexity/pplx-embed-v1-0.6b",name:"Perplexity Embed V1 0.6B",type:"embedding"},{id:"nvidia/llama-nemotron-embed-vl-1b-v2:free",name:"NVIDIA Nemotron Embed VL 1B V2 (Free)",type:"embedding"},{id:"openai/gpt-4o-mini-tts",name:"GPT-4o Mini TTS",type:"tts"},{id:"openai/tts-1-hd",name:"TTS-1 HD",type:"tts"},{id:"openai/tts-1",name:"TTS-1",type:"tts"},{id:"openai/dall-e-3",name:"DALL-E 3 (via OpenRouter)",type:"image",params:["size","quality","style","response_format"]},{id:"openai/gpt-image-1",name:"GPT Image 1 (via OpenRouter)",type:"image",params:["n","size","quality","response_format"]},{id:"google/imagen-3.0-generate-002",name:"Imagen 3 (via OpenRouter)",type:"image",params:["n","size"]},{id:"black-forest-labs/FLUX.1-schnell",name:"FLUX.1 Schnell (via OpenRouter)",type:"image",params:["n","size"]}],glm:[{id:"glm-5.1",name:"GLM 5.1"},{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6v",name:"GLM 4.6V (Vision)"}],"glm-cn":[{id:"glm-5.1",name:"GLM 5.1"},{id:"glm-5",name:"GLM 5"},{id:"glm-4.7",name:"GLM-4.7"},{id:"glm-4.6",name:"GLM-4.6"},{id:"glm-4.5-air",name:"GLM-4.5-Air"}],kimi:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],minimax:[{id:"MiniMax-M2.7",name:"MiniMax M2.7"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"},{id:"minimax-image-01",name:"MiniMax Image 01",type:"image",params:["n","size","response_format"]}],blackbox:[{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o mini"},{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-opus-4.6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Legacy)"},{id:"claude-opus-4-6",name:"Claude Opus 4.6 (Legacy)"},{id:"deepseek-chat",name:"DeepSeek Chat"},{id:"deepseek-v3-671b",name:"DeepSeek V3 671B"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"o1",name:"OpenAI o1"},{id:"o3-mini",name:"OpenAI o3-mini"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-max",name:"Qwen3 Max"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus"}],"minimax-cn":[{id:"MiniMax-M2.7",name:"MiniMax M2.7"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"MiniMax-M2.1",name:"MiniMax M2.1"}],alicode:[{id:"qwen3.5-plus",name:"Qwen3.5 Plus"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"qwen3-max-2026-01-23",name:"Qwen3 Max"},{id:"qwen3-coder-next",name:"Qwen3 Coder Next"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"glm-4.7",name:"GLM 4.7"}],"alicode-intl":[{id:"qwen3.5-plus",name:"Qwen3.5 Plus"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"MiniMax-M2.5",name:"MiniMax M2.5"},{id:"qwen3-coder-next",name:"Qwen3 Coder Next"},{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"glm-4.7",name:"GLM 4.7"}],"volcengine-ark":[{id:"Doubao-Seed-2.0-Code",name:"Doubao-Seed-2.0-Code"},{id:"Doubao-Seed-2.0-pro",name:"Doubao-Seed-2.0-pro"},{id:"Doubao-Seed-2.0-lite",name:"Doubao-Seed-2.0-lite"},{id:"Doubao-Seed-Code",name:"Doubao-Seed-Code"},{id:"GLM-5.1",name:"GLM-5.1"},{id:"MiniMax-M2.7",name:"MiniMax-M2.7"},{id:"Kimi-K2.6",name:"Kimi-K2.6"},{id:"MiniMax-M2.5",name:"MiniMax-M2.5"},{id:"Kimi-K2.5",name:"Kimi-K2.5"},{id:"GLM-4.7",name:"GLM-4.7"},{id:"DeepSeek-V3.2",name:"DeepSeek-V3.2"}],"cloudflare-ai":[{id:"@cf/moonshotai/kimi-k2.6",name:"Kimi K2.6"},{id:"@cf/zai-org/glm-4.7-flash",name:"GLM 4.7 Flash"}],byteplus:[{id:"seed-2-0-pro-260328",name:"Seed 2.0 Pro"},{id:"seed-2-0-code-preview-260328",name:"Seed 2.0 Code Preview"},{id:"seed-2-0-mini-260215",name:"Seed 2.0 Mini"},{id:"seed-2-0-lite-260228",name:"Seed 2.0 Lite"},{id:"kimi-k2-thinking-251104",name:"Kimi K2 Thinking"},{id:"glm-4-7-251222",name:"GLM 4.7"},{id:"gpt-oss-120b-250805",name:"GPT-OSS-120B"}],deepseek:[{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash"},{id:"deepseek-chat",name:"DeepSeek V3.2 Chat"},{id:"deepseek-reasoner",name:"DeepSeek V3.2 Reasoner"}],groq:[{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B"},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick"},{id:"qwen/qwen3-32b",name:"Qwen3 32B"},{id:"openai/gpt-oss-120b",name:"GPT-OSS 120B"}],xai:[{id:"grok-4",name:"Grok 4"},{id:"grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning"},{id:"grok-code-fast-1",name:"Grok Code Fast"},{id:"grok-3",name:"Grok 3"}],mistral:[{id:"mistral-large-latest",name:"Mistral Large 3"},{id:"codestral-latest",name:"Codestral"},{id:"mistral-medium-latest",name:"Mistral Medium 3"},{id:"mistral-embed",name:"Mistral Embed",type:"embedding"}],perplexity:[{id:"sonar-pro",name:"Sonar Pro"},{id:"sonar",name:"Sonar"}],together:[{id:"meta-llama/Llama-3.3-70B-Instruct-Turbo",name:"Llama 3.3 70B Turbo"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B",name:"Qwen3 235B"},{id:"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",name:"Llama 4 Maverick"},{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",type:"embedding"},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",type:"embedding"}],fireworks:[{id:"accounts/fireworks/models/deepseek-v3p1",name:"DeepSeek V3.1"},{id:"accounts/fireworks/models/llama-v3p3-70b-instruct",name:"Llama 3.3 70B"},{id:"accounts/fireworks/models/qwen3-235b-a22b",name:"Qwen3 235B"},{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",type:"embedding"}],cerebras:[{id:"gpt-oss-120b",name:"GPT OSS 120B"},{id:"zai-glm-4.7",name:"ZAI GLM 4.7"},{id:"llama-3.3-70b",name:"Llama 3.3 70B"},{id:"llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout"},{id:"qwen-3-235b-a22b-instruct-2507",name:"Qwen3 235B A22B"},{id:"qwen-3-32b",name:"Qwen3 32B"}],cohere:[{id:"command-r-plus-08-2024",name:"Command R+ (Aug 2024)"},{id:"command-r-08-2024",name:"Command R (Aug 2024)"},{id:"command-a-03-2025",name:"Command A (Mar 2025)"}],nvidia:[{id:"moonshotai/kimi-k2.5",name:"Kimi K2.5"},{id:"z-ai/glm4.7",name:"GLM 4.7"},{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",type:"embedding"}],nebius:[{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B Instruct"},{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",type:"embedding"}],"voyage-ai":[{id:"voyage-3-large",name:"Voyage 3 Large",type:"embedding"},{id:"voyage-3.5",name:"Voyage 3.5",type:"embedding"},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",type:"embedding"},{id:"voyage-code-3",name:"Voyage Code 3",type:"embedding"},{id:"voyage-finance-2",name:"Voyage Finance 2",type:"embedding"},{id:"voyage-law-2",name:"Voyage Law 2",type:"embedding"},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",type:"embedding"}],siliconflow:[{id:"deepseek-ai/DeepSeek-V3.2",name:"DeepSeek V3.2"},{id:"deepseek-ai/DeepSeek-V3.1",name:"DeepSeek V3.1"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"Qwen/Qwen3-235B-A22B-Instruct-2507",name:"Qwen3 235B"},{id:"Qwen/Qwen3-Coder-480B-A35B-Instruct",name:"Qwen3 Coder 480B"},{id:"Qwen/Qwen3-32B",name:"Qwen3 32B"},{id:"moonshotai/Kimi-K2.5",name:"Kimi K2.5"},{id:"zai-org/GLM-4.7",name:"GLM 4.7"},{id:"openai/gpt-oss-120b",name:"GPT OSS 120B"},{id:"baidu/ERNIE-4.5-300B-A47B",name:"ERNIE 4.5 300B"}],hyperbolic:[{id:"Qwen/QwQ-32B",name:"QwQ 32B"},{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek R1"},{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek V3"},{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama 3.3 70B"},{id:"meta-llama/Llama-3.2-3B-Instruct",name:"Llama 3.2 3B"},{id:"Qwen/Qwen2.5-72B-Instruct",name:"Qwen 2.5 72B"},{id:"Qwen/Qwen2.5-Coder-32B-Instruct",name:"Qwen 2.5 Coder 32B"},{id:"NousResearch/Hermes-3-Llama-3.1-70B",name:"Hermes 3 70B"}],ollama:[{id:"gpt-oss:120b",name:"GPT OSS 120B"},{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"glm-5",name:"GLM 5"},{id:"minimax-m2.5",name:"MiniMax M2.5"},{id:"glm-4.7-flash",name:"GLM 4.7 Flash"},{id:"qwen3.5",name:"Qwen3.5"}],vertex:[{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview"},{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"}],"vertex-partner":[{id:"deepseek-ai/deepseek-v3.2-maas",name:"DeepSeek V3.2 (Vertex)"},{id:"qwen/qwen3-next-80b-a3b-thinking-maas",name:"Qwen3 Next 80B Thinking (Vertex)"},{id:"qwen/qwen3-next-80b-a3b-instruct-maas",name:"Qwen3 Next 80B Instruct (Vertex)"},{id:"zai-org/glm-5-maas",name:"GLM-5 (Vertex)"}],"grok-web":[{id:"grok-3",name:"Grok 3"},{id:"grok-3-mini",name:"Grok 3 Mini (Thinking)"},{id:"grok-3-thinking",name:"Grok 3 Thinking"},{id:"grok-4",name:"Grok 4"},{id:"grok-4-mini",name:"Grok 4 Mini (Thinking)"},{id:"grok-4-thinking",name:"Grok 4 Thinking"},{id:"grok-4-heavy",name:"Grok 4 Heavy (SuperGrok)"},{id:"grok-4.1-mini",name:"Grok 4.1 Mini (Thinking)"},{id:"grok-4.1-fast",name:"Grok 4.1 Fast"},{id:"grok-4.1-expert",name:"Grok 4.1 Expert"},{id:"grok-4.1-thinking",name:"Grok 4.1 Thinking"},{id:"grok-4.2",name:"Grok 4.2 (4.20 Beta)"}],"perplexity-web":[{id:"pplx-auto",name:"Perplexity Auto (Free)"},{id:"pplx-sonar",name:"Perplexity Sonar"},{id:"pplx-gpt",name:"GPT-5.4 (via Perplexity)"},{id:"pplx-gemini",name:"Gemini 3.1 Pro (via Perplexity)"},{id:"pplx-sonnet",name:"Claude Sonnet 4.6 (via Perplexity)"},{id:"pplx-opus",name:"Claude Opus 4.6 (via Perplexity)"},{id:"pplx-nemotron",name:"Nemotron 3 Super (via Perplexity)"}],...(0,i(36698).pp)(),nanobanana:[{id:"nanobanana-flash",name:"NanoBanana Flash",type:"image",params:["n","size"]},{id:"nanobanana-pro",name:"NanoBanana Pro",type:"image",params:["n","size"]}],sdwebui:[{id:"stable-diffusion-v1-5",name:"Stable Diffusion v1.5",type:"image",params:["n","size"]},{id:"sdxl-base-1.0",name:"SDXL Base 1.0",type:"image",params:["n","size"]}],comfyui:[{id:"flux-dev",name:"FLUX Dev",type:"image",params:["n","size"]},{id:"sdxl",name:"SDXL",type:"image",params:["n","size"]}],huggingface:[{id:"black-forest-labs/FLUX.1-schnell",name:"FLUX.1 Schnell",type:"image",params:[]},{id:"stabilityai/stable-diffusion-xl-base-1.0",name:"SDXL Base 1.0",type:"image",params:[]}]},m={claude:"cc",codex:"cx","gemini-cli":"gc",qwen:"qw",iflow:"if",antigravity:"ag",github:"gh",kiro:"kr",cursor:"cu","kimi-coding":"kmc",kilocode:"kc",cline:"cl",opencode:"oc",vertex:"vertex","vertex-partner":"vertex-partner"},l=Object.fromEntries(Object.keys(r).map(e=>[e,m[e]||e]));function c(e){return d[l[e]||e]||[]}},98814:(e,a,i)=>{i.d(a,{ThemeProvider:()=>s});var t=i(73365),n=i(1521),o=i(83789);function s({children:e}){let{initTheme:a}=(0,o.A)();return(0,n.useEffect)(()=>{a()},[a]),(0,t.jsx)(t.Fragment,{children:e})}}}]);
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8035],{64795:(e,t,s)=>{"use strict";s.d(t,{default:()=>m});var a=s(73365),l=s(1521),r=s(86447),n=s.n(r),i=s(74156),o=s(96459);let c=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],d=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"}];function m({machineId:e}){let[t,s]=(0,l.useState)([]),[r,n]=(0,l.useState)(!0),[b,g]=(0,l.useState)(!1),[y,f]=(0,l.useState)(""),[j,k]=(0,l.useState)(null),[w,v]=(0,l.useState)(!1),[N,C]=(0,l.useState)(!0),[S,T]=(0,l.useState)(!0),[_,P]=(0,l.useState)(!1),[E,$]=(0,l.useState)(!0),[A,U]=(0,l.useState)(!1),[D,O]=(0,l.useState)("full"),[F,I]=(0,l.useState)(!0),[L,W]=(0,l.useState)(!1),[R,q]=(0,l.useState)(""),[K,J]=(0,l.useState)(""),[M,z]=(0,l.useState)(!1),[H,Z]=(0,l.useState)(""),[B,Q]=(0,l.useState)(null),[V,G]=(0,l.useState)(!1),[X,Y]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(""),[el,er]=(0,l.useState)(!1),[en,ei]=(0,l.useState)(""),[eo,ec]=(0,l.useState)(null),[ed,em]=(0,l.useState)(null),[ex,eh]=(0,l.useState)(!1),[eu,ep]=(0,l.useState)([]),[eb,eg]=(0,l.useState)(""),[ey,ef]=(0,l.useState)(!1),[ej,ek]=(0,l.useState)(!1),[ew,ev]=(0,l.useState)(!1),eN=(0,l.useRef)(null),[eC,eS]=(0,l.useState)(new Set),{copied:eT,copy:e_}=(0,o.C)();(0,l.useEffect)(()=>{eN.current&&(eN.current.scrollTop=eN.current.scrollHeight)},[eu]),(0,l.useEffect)(()=>{eD(),eP()},[]);let eP=async()=>{I(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status")]);if(e.ok){let t=await e.json();v(t.requireApiKey||!1),C(!1!==t.requireLogin),T(t.hasPassword||!1),P(t.tunnelDashboardAccess||!1),$(!1!==t.rtkEnabled),U(!!t.cavemanEnabled),O(t.cavemanLevel||"full")}if(t.ok){let e=await t.json(),s=e.tunnel?.enabled||!1,a=e.tunnel?.tunnelUrl||"",l=e.tunnel?.publicUrl||"";q(a),J(l);let r=e.tailscale?.enabled||!1,n=e.tailscale?.tunnelUrl||"";if(ea(n),r&&n){er(!0),ei("Checking Tailscale...");let e=`${n}/api/health`;try{let t=await fetch(e,{mode:"no-cors",cache:"no-store"});if(t.ok||"opaque"===t.type)et(!0);else{let e=await eR(n);et(e),e||ec({type:"warning",message:"Tailscale not reachable."})}}catch{let e=await eR(n);et(e),e||ec({type:"warning",message:"Tailscale not reachable."})}finally{er(!1),ei("")}}else et(r);if(s&&(l||a)){let e=`${l||a}/api/health`;try{(await fetch(e,{cache:"no-store"})).ok?W(!0):eO(l||a)}catch{eO(l||a)}}else W(s)}}catch(e){console.log("Error loading settings:",e)}finally{I(!1)}},eE=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&P(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},e$=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&v(e)}catch(e){console.log("Error updating requireApiKey:",e)}},eA=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&$(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},eU=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},eD=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},eO=async e=>{z(!0),Z("Waiting for tunnel ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<3e5;){await new Promise(e=>setTimeout(e,2e3));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return W(!0),z(!1),Z(""),!0}catch{}if((Date.now()-s)%1e4<2e3)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return Q({type:"error",message:"Tunnel process stopped unexpectedly."}),z(!1),Z(""),!1}}catch{}}return Q({type:"error",message:"Tunnel created but not reachable. Please try again."}),z(!1),Z(""),!1},eF=async()=>{G(!1),z(!0),Q(null),Z("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?Z(`Downloading cloudflared... ${s.download.progress}%`):e&&Z("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void Q({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.publicUrl||s.tunnelUrl;if(!a)return void Q({type:"error",message:"No tunnel URL returned"});q(s.tunnelUrl||""),J(s.publicUrl||""),await eO(a)}catch(e){Q({type:"error",message:e.message})}finally{e=!1,z(!1),Z("")}},eI=async()=>{z(!0),Q(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(W(!1),q(""),J(""),Y(!1),Q({type:"success",message:"Tunnel disabled"})):Q({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){Q({type:"error",message:e.message})}finally{z(!1)}},eL=async()=>{em(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return em(t.installed),t}}catch{}return em(!1),{installed:!1}},eW=async()=>{eh(!0),ec(null),ep([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eb})});eg("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let r=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=r.pop()||"",r)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)ep(e=>[...e.slice(-50),a.message]);else if("done"===s){em(!0),eh(!1);return}else"error"===s&&ec({type:"error",message:a.error||"Install failed"})}}}catch(e){ec({type:"error",message:e.message})}finally{eh(!1)}},eR=async e=>{ei("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<3e5;){await new Promise(e=>setTimeout(e,2e3));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},eq=async e=>{let t=e||null;ek(!1),ef(!0),er(!0),ec(null),ei("Connecting...");try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),s=await e.json();if(e.ok&&s.success){t&&t.close(),ea(s.tunnelUrl||""),await eR(s.tunnelUrl)?(et(!0),ec(null)):(et(!0),ec({type:"warning",message:"Connected but not reachable yet."}));return}if(s.needsLogin&&s.authUrl){t?t.location.href=s.authUrl:window.open(s.authUrl,"tailscale_auth","width=600,height=700"),ei("Waiting for login...");for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){ei("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),s=await e.json();e.ok&&s.success?(t&&t.close(),ea(s.tunnelUrl||""),await eR(s.tunnelUrl)?(et(!0),ec(null)):(et(!0),ec({type:"warning",message:"Connected but not reachable yet."}))):s.funnelNotEnabled&&s.enableUrl?await eK(s.enableUrl,t):ec({type:"error",message:s.error||"Failed to start funnel"});return}}catch{}}ec({type:"error",message:"Login timed out. Please try again."});return}if(s.funnelNotEnabled&&s.enableUrl)return void await eK(s.enableUrl,t);t&&t.close(),ec({type:"error",message:s.error||"Failed to connect"})}catch(e){t&&t.close(),ec({type:"error",message:e.message})}finally{er(!1),ef(!1),ei("")}},eK=async(e,t)=>{t?t.location.href=e:window.open(e,"tailscale_auth","width=600,height=700"),ei("Enable Funnel in browser, waiting...");for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),s=await e.json();if(e.ok&&s.success){t&&t.close(),ea(s.tunnelUrl||""),await eR(s.tunnelUrl)?(et(!0),ec(null)):(et(!0),ec({type:"warning",message:"Connected but not reachable yet."}));return}if(s.funnelNotEnabled)continue;if(s.error)return void ec({type:"error",message:s.error})}catch{}}ec({type:"error",message:"Timed out waiting for Funnel to be enabled."})},eJ=async()=>{er(!0),ec(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(et(!1),ea(""),ev(!1),ec({type:"success",message:"Tailscale disabled"})):ec({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){ec({type:"error",message:e.message})}finally{er(!1)}},eM=async()=>{ec(null),ep([]),ek(!0),await eL()},ez=async()=>{if(y.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:y})}),t=await e.json();e.ok&&(k(t.key),await eD(),f(""),g(!1))}catch(e){console.log("Error creating key:",e)}},eH=async e=>{if(confirm("Delete this API key?"))try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),eS(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}},eZ=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[eB,eQ]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{eQ(`${window.location.origin}/v1`)},[]),r)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"API Endpoint"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(x,{label:"Local",url:eB,copyId:"local_url",copied:eT,onCopy:e_}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[68px] text-center ${L?"bg-orange-100 dark:bg-orange-900/30 text-orange-600 dark:text-orange-400":"bg-sidebar text-text-muted"}`,children:"Tunnel"}),L&&!M?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${K||R}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>e_(`${K||R}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===eT?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>Y(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):M?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),H||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{z(!1),Z("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):B?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),B.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>G(!0),children:"Enable"})]}):F?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>I(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{w?G(!0):Q({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600 text-white!",children:"Enable"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[68px] text-center ${ee?"bg-purple-100 dark:bg-purple-900/30 text-purple-600 dark:text-purple-400":"bg-sidebar text-text-muted"}`,children:"Tailscale"}),ee&&!el?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${es}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>e_(`${es}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===eT?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>ev(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):el||ey?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),en||"Connecting..."]}),(0,a.jsx)("button",{onClick:()=>{er(!1),ef(!1),ei("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eo?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eo.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:eM,children:"Enable"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:eM,className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"})]})]}),(L||ee)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!w&&(0,a.jsx)(p,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!N||!S)&&(0,a.jsx)(p,{message:N?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:N?"Change password":"Enable",href:"/dashboard/profile"}})]}),(L||ee)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(i.lM,{checked:_,onChange:()=>eE(!_)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(u,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(i.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Token Saver"})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border",children:[(0,a.jsxs)("div",{className:"pr-4",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Auto-compress tool output (git diff/grep/ls/tree/logs) before sending to LLM (60-90% fewer input tokens on common dev commands). Disable if you see issues."})]}),(0,a.jsx)(i.lM,{checked:E,onChange:()=>eA(!E)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4",children:[(0,a.jsxs)("div",{className:"pr-4",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Inject a terse-style instruction into the system prompt so the LLM replies shorter (~65% fewer output tokens on average, up to 87%). Code, errors and warnings stay exact."})]}),(0,a.jsx)(i.lM,{checked:A,onChange:()=>{var e;U(e=!A),eU({cavemanEnabled:e})}})]}),A&&(0,a.jsx)("div",{className:"mt-3 flex items-center gap-2",children:d.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;O(t=e.id),eU({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${D===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-black/5 dark:hover:bg-white/5"}`,title:e.desc,children:e.label},e.id))})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"API Keys"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>g(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(i.lM,{checked:w,onChange:()=>e$(!w)})]}),0===t.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>g(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:eC.has(e.id)?e.key:(t=e.key)?t.length>8?t.slice(0,8)+"...":t:""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void eS(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-0 group-hover:opacity-100 transition-all",title:eC.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eC.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>e_(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-0 group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eT===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?confirm(`Pause API key "${e.name}"?
2
+
3
+ This key will stop working immediately but can be resumed later.`)&&eZ(e.id,t):eZ(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>eH(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-0 group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:b,title:"Create API Key",onClose:()=>{g(!1),f("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:y,onChange:e=>f(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ez,fullWidth:!0,disabled:!y.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{g(!1),f("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!j,title:"API Key Created",onClose:()=>k(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:j||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===eT?"check":"content_copy",onClick:()=>e_(j,"created_key"),children:"created_key"===eT?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>k(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:V,title:"Enable Tunnel",onClose:()=>G(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:eF,fullWidth:!0,className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600 text-white!",children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>G(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:X,title:"Disable Tunnel",onClose:()=>!M&&Y(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:eI,fullWidth:!0,disabled:M,className:"bg-red-500! hover:bg-red-600! text-white!",children:M?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>Y(!1),variant:"ghost",fullWidth:!0,disabled:M,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:ej,title:"Tailscale Funnel",onClose:()=>{ex||(ek(!1),eg(""),ec(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ed&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===ed&&!ex&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:eW,fullWidth:!0,className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>ek(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ex&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eu.length>0&&(0,a.jsx)("div",{ref:eN,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eu.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===ed&&!ex&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>{let e=window.open("","tailscale_auth","width=600,height=700");e&&e.document.write("<p style='font-family:sans-serif;text-align:center;margin-top:40px'>Connecting to Tailscale...</p>"),eq(e)},fullWidth:!0,className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>ek(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eo&&(0,a.jsx)(h,{status:eo})]})}),(0,a.jsx)(i.aF,{isOpen:ew,title:"Disable Tailscale",onClose:()=>!el&&ev(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:eJ,fullWidth:!0,disabled:el,className:"bg-red-500! hover:bg-red-600! text-white!",children:el?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>ev(!1),variant:"ghost",fullWidth:!0,disabled:el,children:"Cancel"})]})]})})]})}function x({label:e,url:t,copyId:s,copied:l,onCopy:r,badge:n,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[68px] text-center ${"CF"===n?"bg-orange-100 dark:bg-orange-900/30 text-orange-600 dark:text-orange-400":"TS"===n?"bg-purple-100 dark:bg-purple-900/30 text-purple-600 dark:text-purple-400":"bg-sidebar text-text-muted"}`,children:e}),(0,a.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>r(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),o]})}function h({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function u({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function p({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}m.propTypes={machineId:n().string.isRequired}},78035:(e,t,s)=>{Promise.resolve().then(s.bind(s,64795))}}]);