9router 0.3.28 → 0.3.29

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 (473) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +42 -41
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/routes-manifest.json +6 -0
  5. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/_global-error.html +2 -2
  20. package/app/.next/server/app/_global-error.rsc +1 -1
  21. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  22. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  23. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  24. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  25. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  26. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  27. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/app/.next/server/app/_not-found.html +1 -1
  29. package/app/.next/server/app/_not-found.rsc +3 -3
  30. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  31. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  32. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  33. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  34. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  35. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  36. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  40. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  43. package/app/.next/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/api/models/route.js +1 -1
  58. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  61. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  62. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  64. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  65. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  75. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  80. package/app/.next/server/app/api/providers/route.js +1 -1
  81. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  83. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  85. package/app/.next/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  87. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  88. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  89. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  90. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  91. package/app/.next/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  92. package/app/.next/server/app/api/translator/console-logs/stream/route.js +1 -1
  93. package/app/.next/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  95. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  96. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  98. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  99. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  101. package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  102. package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  103. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  104. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  105. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  106. package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  107. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  108. package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  109. package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  110. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  111. package/app/.next/server/app/api/usage/stats/route.js +1 -0
  112. package/app/.next/server/app/api/usage/stats/route.js.nft.json +1 -0
  113. package/app/.next/server/app/api/usage/stats/route_client-reference-manifest.js +1 -0
  114. package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  115. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  116. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  117. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  118. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  119. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  120. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  121. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  122. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  123. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  124. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  125. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  126. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  127. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  128. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  129. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  130. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  131. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  132. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  133. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  134. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  135. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  136. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  137. package/app/.next/server/app/api/version/route.js +1 -1
  138. package/app/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
  139. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  140. package/app/.next/server/app/callback.html +1 -1
  141. package/app/.next/server/app/callback.rsc +3 -3
  142. package/app/.next/server/app/callback.segments/_full.segment.rsc +3 -3
  143. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  144. package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
  145. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  146. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  147. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  148. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  149. package/app/.next/server/app/dashboard/cli-tools.rsc +5 -5
  150. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  151. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  152. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  153. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  154. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  155. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  156. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  157. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  158. package/app/.next/server/app/dashboard/combos.html +1 -1
  159. package/app/.next/server/app/dashboard/combos.rsc +5 -5
  160. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  161. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  162. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  163. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  164. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  165. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  166. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  167. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  168. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  169. package/app/.next/server/app/dashboard/endpoint.rsc +5 -5
  170. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  171. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  172. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  173. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  174. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  175. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  176. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  177. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  178. package/app/.next/server/app/dashboard/profile.html +1 -1
  179. package/app/.next/server/app/dashboard/profile.rsc +5 -5
  180. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  181. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  182. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  183. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  184. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  185. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  186. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  187. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  188. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  189. package/app/.next/server/app/dashboard/providers/new.rsc +5 -5
  190. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  191. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  192. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  193. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  194. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  195. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  196. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  197. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  198. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  199. package/app/.next/server/app/dashboard/providers.html +1 -1
  200. package/app/.next/server/app/dashboard/providers.rsc +5 -5
  201. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  202. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  203. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  204. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  205. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  206. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  207. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  208. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  209. package/app/.next/server/app/dashboard/quota.html +1 -1
  210. package/app/.next/server/app/dashboard/quota.rsc +4 -4
  211. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +1 -1
  212. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  213. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  214. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  215. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
  216. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  217. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  218. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  219. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  220. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  221. package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
  222. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  223. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  224. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  225. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  226. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  227. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  228. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  229. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  230. package/app/.next/server/app/dashboard/translator.html +1 -1
  231. package/app/.next/server/app/dashboard/translator.rsc +5 -5
  232. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  233. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  234. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  235. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  236. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  237. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  238. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  239. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  240. package/app/.next/server/app/dashboard/usage.html +1 -1
  241. package/app/.next/server/app/dashboard/usage.rsc +5 -5
  242. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  243. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  244. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  245. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  246. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  247. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  248. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  249. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  250. package/app/.next/server/app/dashboard.html +1 -1
  251. package/app/.next/server/app/dashboard.rsc +5 -5
  252. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  253. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  254. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  255. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
  256. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  257. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +3 -3
  258. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  259. package/app/.next/server/app/index.html +1 -1
  260. package/app/.next/server/app/index.rsc +3 -3
  261. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  262. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  263. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  264. package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
  265. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  266. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  267. package/app/.next/server/app/landing.html +1 -1
  268. package/app/.next/server/app/landing.rsc +3 -3
  269. package/app/.next/server/app/landing.segments/_full.segment.rsc +3 -3
  270. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  271. package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
  272. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  273. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  274. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  275. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  276. package/app/.next/server/app/login.html +1 -1
  277. package/app/.next/server/app/login.rsc +4 -4
  278. package/app/.next/server/app/login.segments/_full.segment.rsc +4 -4
  279. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  280. package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
  281. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  282. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  283. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  284. package/app/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  285. package/app/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  286. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  287. package/app/.next/server/app-paths-manifest.json +42 -41
  288. package/app/.next/server/chunks/1238.js +1 -1
  289. package/app/.next/server/chunks/1424.js +1 -1
  290. package/app/.next/server/chunks/2280.js +1 -1
  291. package/app/.next/server/chunks/3245.js +1 -1
  292. package/app/.next/server/chunks/412.js +1 -1
  293. package/app/.next/server/chunks/4841.js +12 -0
  294. package/app/.next/server/chunks/4989.js +2 -2
  295. package/app/.next/server/chunks/6182.js +5 -5
  296. package/app/.next/server/chunks/7647.js +1 -1
  297. package/app/.next/server/chunks/8756.js +1 -1
  298. package/app/.next/server/chunks/8895.js +2 -2
  299. package/app/.next/server/pages/404.html +1 -1
  300. package/app/.next/server/pages/500.html +2 -2
  301. package/app/.next/server/server-reference-manifest.js +1 -1
  302. package/app/.next/server/server-reference-manifest.json +1 -1
  303. package/app/.next/static/3zOZ19iwThxWJSFLWgyzs/_buildManifest.js +1 -0
  304. package/app/.next/static/chunks/{5497-9aeee36152b1d579.js → 5497-cb22fa6d2bb73c4a.js} +2 -2
  305. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-4cc436d49f7e7638.js → page-2fbd60d069c77b8f.js} +1 -1
  306. package/app/.next/static/chunks/app/_global-error/{page-dc114b2367afe467.js → page-6094e45f32dd5e2c.js} +1 -1
  307. package/app/.next/static/chunks/app/api/auth/login/{route-dc114b2367afe467.js → route-6094e45f32dd5e2c.js} +1 -1
  308. package/app/.next/static/chunks/app/api/auth/logout/{route-dc114b2367afe467.js → route-6094e45f32dd5e2c.js} +1 -1
  309. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/{route-dc114b2367afe467.js → route-6094e45f32dd5e2c.js} +1 -1
  310. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-6094e45f32dd5e2c.js +1 -0
  311. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-6094e45f32dd5e2c.js +1 -0
  312. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-6094e45f32dd5e2c.js +1 -0
  313. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-6094e45f32dd5e2c.js +1 -0
  314. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-6094e45f32dd5e2c.js +1 -0
  315. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-6094e45f32dd5e2c.js +1 -0
  316. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-6094e45f32dd5e2c.js +1 -0
  317. package/app/.next/static/chunks/app/api/cloud/auth/route-6094e45f32dd5e2c.js +1 -0
  318. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-6094e45f32dd5e2c.js +1 -0
  319. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-6094e45f32dd5e2c.js +1 -0
  320. package/app/.next/static/chunks/app/api/cloud/models/alias/route-6094e45f32dd5e2c.js +1 -0
  321. package/app/.next/static/chunks/app/api/combos/[id]/route-6094e45f32dd5e2c.js +1 -0
  322. package/app/.next/static/chunks/app/api/combos/route-6094e45f32dd5e2c.js +1 -0
  323. package/app/.next/static/chunks/app/api/init/route-6094e45f32dd5e2c.js +1 -0
  324. package/app/.next/static/chunks/app/api/keys/[id]/route-6094e45f32dd5e2c.js +1 -0
  325. package/app/.next/static/chunks/app/api/keys/route-6094e45f32dd5e2c.js +1 -0
  326. package/app/.next/static/chunks/app/api/models/alias/route-6094e45f32dd5e2c.js +1 -0
  327. package/app/.next/static/chunks/app/api/models/route-6094e45f32dd5e2c.js +1 -0
  328. package/app/.next/static/chunks/app/api/models/test/route-6094e45f32dd5e2c.js +1 -0
  329. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-6094e45f32dd5e2c.js +1 -0
  330. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-6094e45f32dd5e2c.js +1 -0
  331. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-6094e45f32dd5e2c.js +1 -0
  332. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-6094e45f32dd5e2c.js +1 -0
  333. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-6094e45f32dd5e2c.js +1 -0
  334. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-6094e45f32dd5e2c.js +1 -0
  335. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-6094e45f32dd5e2c.js +1 -0
  336. package/app/.next/static/chunks/app/api/pricing/route-6094e45f32dd5e2c.js +1 -0
  337. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-6094e45f32dd5e2c.js +1 -0
  338. package/app/.next/static/chunks/app/api/provider-nodes/route-6094e45f32dd5e2c.js +1 -0
  339. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-6094e45f32dd5e2c.js +1 -0
  340. package/app/.next/static/chunks/app/api/providers/[id]/models/route-6094e45f32dd5e2c.js +1 -0
  341. package/app/.next/static/chunks/app/api/providers/[id]/route-6094e45f32dd5e2c.js +1 -0
  342. package/app/.next/static/chunks/app/api/providers/[id]/test/route-6094e45f32dd5e2c.js +1 -0
  343. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-6094e45f32dd5e2c.js +1 -0
  344. package/app/.next/static/chunks/app/api/providers/client/route-6094e45f32dd5e2c.js +1 -0
  345. package/app/.next/static/chunks/app/api/providers/route-6094e45f32dd5e2c.js +1 -0
  346. package/app/.next/static/chunks/app/api/providers/test-batch/route-6094e45f32dd5e2c.js +1 -0
  347. package/app/.next/static/chunks/app/api/providers/validate/route-6094e45f32dd5e2c.js +1 -0
  348. package/app/.next/static/chunks/app/api/settings/database/route-6094e45f32dd5e2c.js +1 -0
  349. package/app/.next/static/chunks/app/api/settings/proxy-test/route-6094e45f32dd5e2c.js +1 -0
  350. package/app/.next/static/chunks/app/api/settings/require-login/route-6094e45f32dd5e2c.js +1 -0
  351. package/app/.next/static/chunks/app/api/settings/route-6094e45f32dd5e2c.js +1 -0
  352. package/app/.next/static/chunks/app/api/shutdown/route-6094e45f32dd5e2c.js +1 -0
  353. package/app/.next/static/chunks/app/api/tags/route-6094e45f32dd5e2c.js +1 -0
  354. package/app/.next/static/chunks/app/api/translator/console-logs/route-6094e45f32dd5e2c.js +1 -0
  355. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-6094e45f32dd5e2c.js +1 -0
  356. package/app/.next/static/chunks/app/api/translator/load/route-6094e45f32dd5e2c.js +1 -0
  357. package/app/.next/static/chunks/app/api/translator/save/route-6094e45f32dd5e2c.js +1 -0
  358. package/app/.next/static/chunks/app/api/translator/send/route-6094e45f32dd5e2c.js +1 -0
  359. package/app/.next/static/chunks/app/api/translator/translate/route-6094e45f32dd5e2c.js +1 -0
  360. package/app/.next/static/chunks/app/api/tunnel/disable/route-6094e45f32dd5e2c.js +1 -0
  361. package/app/.next/static/chunks/app/api/tunnel/enable/route-6094e45f32dd5e2c.js +1 -0
  362. package/app/.next/static/chunks/app/api/tunnel/status/route-6094e45f32dd5e2c.js +1 -0
  363. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-6094e45f32dd5e2c.js +1 -0
  364. package/app/.next/static/chunks/app/api/usage/chart/route-6094e45f32dd5e2c.js +1 -0
  365. package/app/.next/static/chunks/app/api/usage/history/route-6094e45f32dd5e2c.js +1 -0
  366. package/app/.next/static/chunks/app/api/usage/providers/route-6094e45f32dd5e2c.js +1 -0
  367. package/app/.next/static/chunks/app/api/usage/request-details/route-6094e45f32dd5e2c.js +1 -0
  368. package/app/.next/static/chunks/app/api/usage/request-logs/route-6094e45f32dd5e2c.js +1 -0
  369. package/app/.next/static/chunks/app/api/usage/stats/route-6094e45f32dd5e2c.js +1 -0
  370. package/app/.next/static/chunks/app/api/usage/stream/route-6094e45f32dd5e2c.js +1 -0
  371. package/app/.next/static/chunks/app/api/v1/api/chat/route-6094e45f32dd5e2c.js +1 -0
  372. package/app/.next/static/chunks/app/api/v1/chat/completions/route-6094e45f32dd5e2c.js +1 -0
  373. package/app/.next/static/chunks/app/api/v1/embeddings/route-6094e45f32dd5e2c.js +1 -0
  374. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-6094e45f32dd5e2c.js +1 -0
  375. package/app/.next/static/chunks/app/api/v1/messages/route-6094e45f32dd5e2c.js +1 -0
  376. package/app/.next/static/chunks/app/api/v1/models/route-6094e45f32dd5e2c.js +1 -0
  377. package/app/.next/static/chunks/app/api/v1/responses/route-6094e45f32dd5e2c.js +1 -0
  378. package/app/.next/static/chunks/app/api/v1/route-6094e45f32dd5e2c.js +1 -0
  379. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-6094e45f32dd5e2c.js +1 -0
  380. package/app/.next/static/chunks/app/api/v1beta/models/route-6094e45f32dd5e2c.js +1 -0
  381. package/app/.next/static/chunks/app/api/version/route-6094e45f32dd5e2c.js +1 -0
  382. package/app/.next/static/chunks/app/{layout-cbe799ec784651ca.js → layout-75a17c7e6aea5a13.js} +1 -1
  383. package/app/.next/static/chunks/app/manifest.webmanifest/route-6094e45f32dd5e2c.js +1 -0
  384. package/app/.next/static/chunks/app/page-6094e45f32dd5e2c.js +1 -0
  385. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-6094e45f32dd5e2c.js +1 -0
  386. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-6094e45f32dd5e2c.js +1 -0
  387. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-6094e45f32dd5e2c.js +1 -0
  388. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6094e45f32dd5e2c.js +1 -0
  389. package/app/.next/static/css/{544a28fc50711a49.css → 62123907b7f6e3ce.css} +1 -1
  390. package/app/package.json +1 -1
  391. package/app/src/mitm/cert/install.js +4 -3
  392. package/app/src/mitm/manager.js +45 -22
  393. package/package.json +1 -1
  394. package/app/.next/server/chunks/3110.js +0 -12
  395. package/app/.next/static/7sCSr7yWSqEyoyOGqrYLA/_buildManifest.js +0 -1
  396. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-dc114b2367afe467.js +0 -1
  397. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-dc114b2367afe467.js +0 -1
  398. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-dc114b2367afe467.js +0 -1
  399. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-dc114b2367afe467.js +0 -1
  400. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-dc114b2367afe467.js +0 -1
  401. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-dc114b2367afe467.js +0 -1
  402. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-dc114b2367afe467.js +0 -1
  403. package/app/.next/static/chunks/app/api/cloud/auth/route-dc114b2367afe467.js +0 -1
  404. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-dc114b2367afe467.js +0 -1
  405. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-dc114b2367afe467.js +0 -1
  406. package/app/.next/static/chunks/app/api/cloud/models/alias/route-dc114b2367afe467.js +0 -1
  407. package/app/.next/static/chunks/app/api/combos/[id]/route-dc114b2367afe467.js +0 -1
  408. package/app/.next/static/chunks/app/api/combos/route-dc114b2367afe467.js +0 -1
  409. package/app/.next/static/chunks/app/api/init/route-dc114b2367afe467.js +0 -1
  410. package/app/.next/static/chunks/app/api/keys/[id]/route-dc114b2367afe467.js +0 -1
  411. package/app/.next/static/chunks/app/api/keys/route-dc114b2367afe467.js +0 -1
  412. package/app/.next/static/chunks/app/api/models/alias/route-dc114b2367afe467.js +0 -1
  413. package/app/.next/static/chunks/app/api/models/route-dc114b2367afe467.js +0 -1
  414. package/app/.next/static/chunks/app/api/models/test/route-dc114b2367afe467.js +0 -1
  415. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-dc114b2367afe467.js +0 -1
  416. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-dc114b2367afe467.js +0 -1
  417. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-dc114b2367afe467.js +0 -1
  418. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-dc114b2367afe467.js +0 -1
  419. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-dc114b2367afe467.js +0 -1
  420. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-dc114b2367afe467.js +0 -1
  421. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-dc114b2367afe467.js +0 -1
  422. package/app/.next/static/chunks/app/api/pricing/route-dc114b2367afe467.js +0 -1
  423. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-dc114b2367afe467.js +0 -1
  424. package/app/.next/static/chunks/app/api/provider-nodes/route-dc114b2367afe467.js +0 -1
  425. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-dc114b2367afe467.js +0 -1
  426. package/app/.next/static/chunks/app/api/providers/[id]/models/route-dc114b2367afe467.js +0 -1
  427. package/app/.next/static/chunks/app/api/providers/[id]/route-dc114b2367afe467.js +0 -1
  428. package/app/.next/static/chunks/app/api/providers/[id]/test/route-dc114b2367afe467.js +0 -1
  429. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-dc114b2367afe467.js +0 -1
  430. package/app/.next/static/chunks/app/api/providers/client/route-dc114b2367afe467.js +0 -1
  431. package/app/.next/static/chunks/app/api/providers/route-dc114b2367afe467.js +0 -1
  432. package/app/.next/static/chunks/app/api/providers/test-batch/route-dc114b2367afe467.js +0 -1
  433. package/app/.next/static/chunks/app/api/providers/validate/route-dc114b2367afe467.js +0 -1
  434. package/app/.next/static/chunks/app/api/settings/database/route-dc114b2367afe467.js +0 -1
  435. package/app/.next/static/chunks/app/api/settings/proxy-test/route-dc114b2367afe467.js +0 -1
  436. package/app/.next/static/chunks/app/api/settings/require-login/route-dc114b2367afe467.js +0 -1
  437. package/app/.next/static/chunks/app/api/settings/route-dc114b2367afe467.js +0 -1
  438. package/app/.next/static/chunks/app/api/shutdown/route-dc114b2367afe467.js +0 -1
  439. package/app/.next/static/chunks/app/api/tags/route-dc114b2367afe467.js +0 -1
  440. package/app/.next/static/chunks/app/api/translator/console-logs/route-dc114b2367afe467.js +0 -1
  441. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-dc114b2367afe467.js +0 -1
  442. package/app/.next/static/chunks/app/api/translator/load/route-dc114b2367afe467.js +0 -1
  443. package/app/.next/static/chunks/app/api/translator/save/route-dc114b2367afe467.js +0 -1
  444. package/app/.next/static/chunks/app/api/translator/send/route-dc114b2367afe467.js +0 -1
  445. package/app/.next/static/chunks/app/api/translator/translate/route-dc114b2367afe467.js +0 -1
  446. package/app/.next/static/chunks/app/api/tunnel/disable/route-dc114b2367afe467.js +0 -1
  447. package/app/.next/static/chunks/app/api/tunnel/enable/route-dc114b2367afe467.js +0 -1
  448. package/app/.next/static/chunks/app/api/tunnel/status/route-dc114b2367afe467.js +0 -1
  449. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-dc114b2367afe467.js +0 -1
  450. package/app/.next/static/chunks/app/api/usage/chart/route-dc114b2367afe467.js +0 -1
  451. package/app/.next/static/chunks/app/api/usage/history/route-dc114b2367afe467.js +0 -1
  452. package/app/.next/static/chunks/app/api/usage/providers/route-dc114b2367afe467.js +0 -1
  453. package/app/.next/static/chunks/app/api/usage/request-details/route-dc114b2367afe467.js +0 -1
  454. package/app/.next/static/chunks/app/api/usage/request-logs/route-dc114b2367afe467.js +0 -1
  455. package/app/.next/static/chunks/app/api/usage/stream/route-dc114b2367afe467.js +0 -1
  456. package/app/.next/static/chunks/app/api/v1/api/chat/route-dc114b2367afe467.js +0 -1
  457. package/app/.next/static/chunks/app/api/v1/chat/completions/route-dc114b2367afe467.js +0 -1
  458. package/app/.next/static/chunks/app/api/v1/embeddings/route-dc114b2367afe467.js +0 -1
  459. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-dc114b2367afe467.js +0 -1
  460. package/app/.next/static/chunks/app/api/v1/messages/route-dc114b2367afe467.js +0 -1
  461. package/app/.next/static/chunks/app/api/v1/models/route-dc114b2367afe467.js +0 -1
  462. package/app/.next/static/chunks/app/api/v1/responses/route-dc114b2367afe467.js +0 -1
  463. package/app/.next/static/chunks/app/api/v1/route-dc114b2367afe467.js +0 -1
  464. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-dc114b2367afe467.js +0 -1
  465. package/app/.next/static/chunks/app/api/v1beta/models/route-dc114b2367afe467.js +0 -1
  466. package/app/.next/static/chunks/app/api/version/route-dc114b2367afe467.js +0 -1
  467. package/app/.next/static/chunks/app/manifest.webmanifest/route-dc114b2367afe467.js +0 -1
  468. package/app/.next/static/chunks/app/page-dc114b2367afe467.js +0 -1
  469. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-dc114b2367afe467.js +0 -1
  470. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-dc114b2367afe467.js +0 -1
  471. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-dc114b2367afe467.js +0 -1
  472. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-dc114b2367afe467.js +0 -1
  473. /package/app/.next/static/{7sCSr7yWSqEyoyOGqrYLA → 3zOZ19iwThxWJSFLWgyzs}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- 7sCSr7yWSqEyoyOGqrYLA
1
+ 3zOZ19iwThxWJSFLWgyzs
@@ -3,73 +3,73 @@
3
3
  "/_global-error/page": "/_global-error",
4
4
  "/api/auth/logout/route": "/api/auth/logout",
5
5
  "/api/auth/login/route": "/api/auth/login",
6
- "/api/cli-tools/claude-settings/route": "/api/cli-tools/claude-settings",
7
6
  "/api/cli-tools/antigravity-mitm/alias/route": "/api/cli-tools/antigravity-mitm/alias",
8
7
  "/api/cli-tools/copilot-settings/route": "/api/cli-tools/copilot-settings",
9
- "/api/cli-tools/droid-settings/route": "/api/cli-tools/droid-settings",
10
8
  "/api/cli-tools/codex-settings/route": "/api/cli-tools/codex-settings",
11
- "/api/cli-tools/opencode-settings/route": "/api/cli-tools/opencode-settings",
9
+ "/api/cli-tools/claude-settings/route": "/api/cli-tools/claude-settings",
10
+ "/api/cli-tools/droid-settings/route": "/api/cli-tools/droid-settings",
11
+ "/api/cli-tools/openclaw-settings/route": "/api/cli-tools/openclaw-settings",
12
12
  "/api/cloud/auth/route": "/api/cloud/auth",
13
- "/api/cloud/model/resolve/route": "/api/cloud/model/resolve",
14
- "/api/combos/route": "/api/combos",
15
- "/api/cloud/models/alias/route": "/api/cloud/models/alias",
16
13
  "/api/combos/[id]/route": "/api/combos/[id]",
14
+ "/api/cloud/model/resolve/route": "/api/cloud/model/resolve",
17
15
  "/api/init/route": "/api/init",
18
- "/api/cli-tools/openclaw-settings/route": "/api/cli-tools/openclaw-settings",
19
- "/api/cloud/credentials/update/route": "/api/cloud/credentials/update",
20
16
  "/api/keys/[id]/route": "/api/keys/[id]",
21
17
  "/api/keys/route": "/api/keys",
22
- "/api/models/route": "/api/models",
23
- "/api/models/test/route": "/api/models/test",
24
- "/api/oauth/cursor/import/route": "/api/oauth/cursor/import",
18
+ "/api/models/alias/route": "/api/models/alias",
25
19
  "/api/oauth/[provider]/[action]/route": "/api/oauth/[provider]/[action]",
20
+ "/api/models/test/route": "/api/models/test",
21
+ "/api/models/route": "/api/models",
26
22
  "/api/oauth/cursor/auto-import/route": "/api/oauth/cursor/auto-import",
27
23
  "/api/oauth/kiro/import/route": "/api/oauth/kiro/import",
28
- "/api/models/alias/route": "/api/models/alias",
29
- "/api/pricing/route": "/api/pricing",
24
+ "/api/combos/route": "/api/combos",
25
+ "/api/oauth/cursor/import/route": "/api/oauth/cursor/import",
30
26
  "/api/oauth/kiro/auto-import/route": "/api/oauth/kiro/auto-import",
31
- "/api/oauth/kiro/social-authorize/route": "/api/oauth/kiro/social-authorize",
32
27
  "/api/oauth/kiro/social-exchange/route": "/api/oauth/kiro/social-exchange",
33
- "/api/provider-nodes/[id]/route": "/api/provider-nodes/[id]",
28
+ "/api/pricing/route": "/api/pricing",
29
+ "/api/oauth/kiro/social-authorize/route": "/api/oauth/kiro/social-authorize",
34
30
  "/api/providers/[id]/route": "/api/providers/[id]",
35
- "/api/provider-nodes/validate/route": "/api/provider-nodes/validate",
36
- "/api/providers/[id]/test/route": "/api/providers/[id]/test",
31
+ "/api/provider-nodes/[id]/route": "/api/provider-nodes/[id]",
37
32
  "/api/providers/[id]/models/route": "/api/providers/[id]/models",
38
- "/api/providers/test-batch/route": "/api/providers/test-batch",
39
33
  "/api/providers/[id]/test-models/route": "/api/providers/[id]/test-models",
40
- "/api/providers/client/route": "/api/providers/client",
34
+ "/api/provider-nodes/validate/route": "/api/provider-nodes/validate",
35
+ "/api/providers/[id]/test/route": "/api/providers/[id]/test",
41
36
  "/api/providers/route": "/api/providers",
37
+ "/api/cli-tools/opencode-settings/route": "/api/cli-tools/opencode-settings",
42
38
  "/api/providers/validate/route": "/api/providers/validate",
43
- "/api/tags/route": "/api/tags",
39
+ "/api/providers/test-batch/route": "/api/providers/test-batch",
44
40
  "/api/settings/require-login/route": "/api/settings/require-login",
45
- "/api/shutdown/route": "/api/shutdown",
46
41
  "/api/translator/console-logs/route": "/api/translator/console-logs",
42
+ "/api/shutdown/route": "/api/shutdown",
43
+ "/api/translator/save/route": "/api/translator/save",
47
44
  "/api/translator/load/route": "/api/translator/load",
48
- "/api/tunnel/disable/route": "/api/tunnel/disable",
49
- "/api/translator/translate/route": "/api/translator/translate",
50
- "/api/translator/send/route": "/api/translator/send",
51
- "/api/tunnel/status/route": "/api/tunnel/status",
52
45
  "/api/tunnel/enable/route": "/api/tunnel/enable",
46
+ "/api/cloud/credentials/update/route": "/api/cloud/credentials/update",
47
+ "/api/translator/send/route": "/api/translator/send",
48
+ "/api/tunnel/disable/route": "/api/tunnel/disable",
53
49
  "/api/usage/history/route": "/api/usage/history",
50
+ "/api/tunnel/status/route": "/api/tunnel/status",
54
51
  "/api/usage/logs/route": "/api/usage/logs",
55
52
  "/api/usage/chart/route": "/api/usage/chart",
53
+ "/api/usage/providers/route": "/api/usage/providers",
54
+ "/api/translator/translate/route": "/api/translator/translate",
55
+ "/api/tags/route": "/api/tags",
56
56
  "/api/usage/request-details/route": "/api/usage/request-details",
57
- "/api/usage/request-logs/route": "/api/usage/request-logs",
58
57
  "/api/v1/api/chat/route": "/api/v1/api/chat",
59
- "/api/usage/providers/route": "/api/usage/providers",
58
+ "/api/usage/request-logs/route": "/api/usage/request-logs",
60
59
  "/api/v1/chat/completions/route": "/api/v1/chat/completions",
61
60
  "/api/v1/messages/count_tokens/route": "/api/v1/messages/count_tokens",
61
+ "/api/v1/messages/route": "/api/v1/messages",
62
62
  "/api/v1/embeddings/route": "/api/v1/embeddings",
63
- "/api/v1/models/route": "/api/v1/models",
64
63
  "/api/v1/responses/route": "/api/v1/responses",
65
- "/api/v1beta/models/[...path]/route": "/api/v1beta/models/[...path]",
66
- "/api/version/route": "/api/version",
67
- "/api/v1beta/models/route": "/api/v1beta/models",
68
64
  "/api/v1/route": "/api/v1",
69
- "/manifest.webmanifest/route": "/manifest.webmanifest",
65
+ "/api/cloud/models/alias/route": "/api/cloud/models/alias",
66
+ "/api/providers/client/route": "/api/providers/client",
67
+ "/api/v1beta/models/route": "/api/v1beta/models",
70
68
  "/favicon.ico/route": "/favicon.ico",
71
- "/api/translator/save/route": "/api/translator/save",
72
- "/api/v1/messages/route": "/api/v1/messages",
69
+ "/api/v1/models/route": "/api/v1/models",
70
+ "/api/v1beta/models/[...path]/route": "/api/v1beta/models/[...path]",
71
+ "/manifest.webmanifest/route": "/manifest.webmanifest",
72
+ "/api/version/route": "/api/version",
73
73
  "/api/cli-tools/antigravity-mitm/route": "/api/cli-tools/antigravity-mitm",
74
74
  "/api/provider-nodes/route": "/api/provider-nodes",
75
75
  "/api/settings/database/route": "/api/settings/database",
@@ -78,21 +78,22 @@
78
78
  "/api/translator/console-logs/stream/route": "/api/translator/console-logs/stream",
79
79
  "/api/usage/[connectionId]/route": "/api/usage/[connectionId]",
80
80
  "/api/usage/stream/route": "/api/usage/stream",
81
- "/dashboard/settings/pricing/page": "/dashboard/settings/pricing",
81
+ "/api/usage/stats/route": "/api/usage/stats",
82
82
  "/callback/page": "/callback",
83
- "/landing/page": "/landing",
83
+ "/dashboard/settings/pricing/page": "/dashboard/settings/pricing",
84
84
  "/login/page": "/login",
85
85
  "/page": "/",
86
+ "/landing/page": "/landing",
86
87
  "/(dashboard)/dashboard/cli-tools/page": "/dashboard/cli-tools",
87
88
  "/(dashboard)/dashboard/endpoint/page": "/dashboard/endpoint",
88
- "/(dashboard)/dashboard/translator/page": "/dashboard/translator",
89
- "/(dashboard)/dashboard/usage/page": "/dashboard/usage",
89
+ "/(dashboard)/dashboard/providers/[id]/page": "/dashboard/providers/[id]",
90
90
  "/(dashboard)/dashboard/quota/page": "/dashboard/quota",
91
- "/(dashboard)/dashboard/combos/page": "/dashboard/combos",
91
+ "/(dashboard)/dashboard/usage/page": "/dashboard/usage",
92
92
  "/(dashboard)/dashboard/page": "/dashboard",
93
93
  "/(dashboard)/dashboard/providers/new/page": "/dashboard/providers/new",
94
- "/(dashboard)/dashboard/providers/[id]/page": "/dashboard/providers/[id]",
95
- "/(dashboard)/dashboard/console-log/page": "/dashboard/console-log",
94
+ "/(dashboard)/dashboard/translator/page": "/dashboard/translator",
95
+ "/(dashboard)/dashboard/combos/page": "/dashboard/combos",
96
96
  "/(dashboard)/dashboard/profile/page": "/dashboard/profile",
97
+ "/(dashboard)/dashboard/console-log/page": "/dashboard/console-log",
97
98
  "/(dashboard)/dashboard/providers/page": "/dashboard/providers"
98
99
  }
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "devFiles": [],
6
6
  "lowPriorityFiles": [
7
- "static/7sCSr7yWSqEyoyOGqrYLA/_buildManifest.js",
8
- "static/7sCSr7yWSqEyoyOGqrYLA/_ssgManifest.js"
7
+ "static/3zOZ19iwThxWJSFLWgyzs/_buildManifest.js",
8
+ "static/3zOZ19iwThxWJSFLWgyzs/_ssgManifest.js"
9
9
  ],
10
10
  "rootMainFiles": [
11
11
  "static/chunks/webpack-25c43999146c934e.js",
@@ -480,6 +480,12 @@
480
480
  "routeKeys": {},
481
481
  "namedRegex": "^/api/usage/request\\-logs(?:/)?$"
482
482
  },
483
+ {
484
+ "page": "/api/usage/stats",
485
+ "regex": "^/api/usage/stats(?:/)?$",
486
+ "routeKeys": {},
487
+ "namedRegex": "^/api/usage/stats(?:/)?$"
488
+ },
483
489
  {
484
490
  "page": "/api/usage/stream",
485
491
  "regex": "^/api/usage/stream(?:/)?$",
@@ -13,4 +13,4 @@ model_provider = "9router"
13
13
  name = "9Router"
14
14
  base_url = "${O()}"
15
15
  wire_api = "responses"
16
- `},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:o},null,2)}])})]})}let m=process.env.NEXT_PUBLIC_CLOUD_URL;function n({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l,initialStatus:n}){let o,p,q,r,[s,t]=(0,e.useState)(n||null),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)("");(0,e.useRef)(!1);let O=(()=>{if(!s?.installed)return null;let a=s.settings?.customModels?.find(a=>"custom:9Router-0"===a.id);if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=l&&m&&a.baseUrl?.startsWith(m),d=g&&a.baseUrl?.startsWith(g);return b||c||d?"configured":"other"})(),P=async()=>{v(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();t(b)}catch(a){t({installed:!1,error:a.message})}finally{v(!1)}},Q=()=>{let a=M||g;return a.endsWith("/v1")?a:`${a}/v1`},R=async()=>{x(!0),B(null);try{let a=C?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:Q(),apiKey:a,model:E})}),c=await b.json();b.ok?(B({type:"success",text:"Settings applied successfully!"}),P()):B({type:"error",text:c.error||"Failed to apply settings"})}catch(a){B({type:"error",text:a.message})}finally{x(!1)}},S=async()=>{z(!0),B(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(B({type:"success",text:"Settings reset successfully!"}),F(""),D(""),P()):B({type:"error",text:b.error||"Failed to reset settings"})}catch(a){B({type:"error",text:a.message})}finally{z(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===O&&(0,d.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"===O&&(0,d.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"===O&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!u&&s&&!s.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Factory Droid CLI to use this feature."})]})]}),!u&&s?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[s?.settings?.customModels?.find(a=>"custom:9Router-0"===a.id)?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:s.settings.customModels.find(a=>"custom:9Router-0"===a.id).baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(o=M||g).endsWith("/v1")?o:`${o}/v1`,onChange:a=>N(a.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"}),M&&M!==g&&(0,d.jsx)("button",{onClick:()=>N(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:C,onChange:a=>D(a.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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>H(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),E&&(0,d.jsx)("button",{onClick:()=>F(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),A&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,d.jsx)("span",{children:A.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:R,disabled:!E,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:S,disabled:!s?.has9Router,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{F(a.value),H(!1)},selectedModel:E,activeProviders:k,modelAliases:I,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:K,onClose:()=>L(!1),title:"Factory Droid - Manual Configuration",configs:(p=C&&C.trim()?C:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",q={customModels:[{model:E||"provider/model-id",id:"custom:9Router-0",index:0,baseUrl:Q(),apiKey:p,displayName:E||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},r="u">typeof navigator&&navigator.platform,[{filename:r?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(q,null,2)}])})]})}function o({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l,initialStatus:m}){let n,o,[p,q]=(0,e.useState)(m||null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)({}),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)("");(0,e.useRef)(!1);let L=(()=>{if(!p?.installed)return null;let a=p.settings?.models?.providers?.["9router"];if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1")||a.baseUrl?.includes("0.0.0.0"),c=g&&a.baseUrl?.startsWith(g);return b||c?"configured":"other"})(),M=async()=>{s(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();q(b)}catch(a){q({installed:!1,error:a.message})}finally{s(!1)}},N=()=>{let a=J||"http://127.0.0.1:20128";return a.endsWith("/v1")?a:`${a}/v1`},O=async()=>{u(!0),y(null);try{let a=z?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:N(),apiKey:a,model:B})}),c=await b.json();b.ok?(y({type:"success",text:"Settings applied successfully!"}),M()):y({type:"error",text:c.error||"Failed to apply settings"})}catch(a){y({type:"error",text:a.message})}finally{u(!1)}},P=async()=>{w(!0),y(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(y({type:"success",text:"Settings reset successfully!"}),C(""),A(""),M()):y({type:"error",text:b.error||"Failed to reset settings"})}catch(a){y({type:"error",text:a.message})}finally{w(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===L&&(0,d.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"===L&&(0,d.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"===L&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[r&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!r&&p&&!p.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Open Claw CLI to use this feature."})]})]}),!r&&p?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[p?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:p.settings.models.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(n=J||"http://127.0.0.1:20128").endsWith("/v1")?n:`${n}/v1`,onChange:a=>K(a.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"}),J&&J!==g&&(0,d.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:z,onChange:a=>A(a.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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:B,onChange:a=>C(a.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>E(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),B&&(0,d.jsx)("button",{onClick:()=>C(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),x&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===x.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===x.type?"check_circle":"error"}),(0,d.jsx)("span",{children:x.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:O,disabled:!B,loading:t,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:P,disabled:!p?.has9Router,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>I(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:D,onClose:()=>E(!1),onSelect:a=>{C(a.value),E(!1)},selectedModel:B,activeProviders:k,modelAliases:F,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:H,onClose:()=>I(!1),title:"Open Claw - Manual Configuration",configs:(o=z&&z.trim()?z:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${B||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:N(),apiKey:o,api:"openai-completions",models:[{id:B||"provider/model-id",name:(B||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}function p({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1,tunnelEnabled:m=!1}){let[n,o]=(0,e.useState)(null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(()=>j?.length>0?j[0].key:""),v=a=>{let b=t&&t.trim()?t:l?"your-api-key":"sk_9router",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,r||"provider/model-id")},w=async(a,b)=>{await navigator.clipboard.writeText(v(a)),o(b),setTimeout(()=>o(null),2e3)},x=k.length>0,y=()=>(!b.requiresExternalUrl||!!l||!!m)&&(!b.requiresCloud||!!l);return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:g,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:b.image?(0,d.jsx)(i.default,{src:b.image,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}}):b.icon?(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:b.color},children:b.icon}):(0,d.jsx)(i.default,{src:`/providers/${a}.png`,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:b.name}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:b.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:b.guideSteps?(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((a,b)=>{if("cloudCheck"===a.type&&(l||m))return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l&&!m,f="bg-blue-500/10 border-blue-500/30",g="text-blue-600 dark:text-blue-400",h="text-blue-500",i="info";return c?(f="bg-yellow-500/10 border-yellow-500/30",g="text-yellow-600 dark:text-yellow-400",h="text-yellow-500",i="warning"):e&&(f="bg-red-500/10 border-red-500/30",g="text-red-600 dark:text-red-400",h="text-red-500",i="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${f}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${h}`,children:i}),(0,d.jsx)("p",{className:`text-sm ${g}`,children:a.text})]},b)})}):null,y()&&b.guideSteps.map(a=>(0,d.jsxs)("div",{className:"flex items-start gap-4",children:[(0,d.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:b.color},children:a.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:a.title}),a.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a.desc}),"apiKeySelector"===a.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:t,onChange:a=>u(a.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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>w(t,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===n?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:l?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===a.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:r,onChange:a=>s(a.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,d.jsx)("button",{onClick:()=>q(!0),disabled:!x,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${x?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>w(r,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===n?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>s(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),a.value&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:v(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>w(a.value,`${a.step}-${a.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:n===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),y()&&b.codeBlock&&(0,d.jsxs)("div",{className:"mt-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:b.codeBlock.language}),(0,d.jsxs)("button",{onClick:()=>w(b.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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===n?"check":"content_copy"}),"codeblock"===n?"Copied!":"Copy"]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,d.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:v(b.codeBlock.code)})})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:p,onClose:()=>q(!1),onSelect:a=>{s(a.value)},selectedModel:r,activeProviders:k,title:"Select Model"})]})}function q({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,hasActiveProviders:k,cloudEnabled:l,initialStatus:m}){let[n,o]=(0,e.useState)(m||null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(""),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)({}),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(null),F=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();o(b)}}catch(a){console.log("Error fetching status:",a),o({running:!1})}},G="u">typeof navigator&&navigator.userAgent?.includes("Windows"),H=async a=>{q(!0),y(null);try{let b=v?.trim()||(h?.length>0?h[0].key:null)||(l?null:"sk_9router"),c=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:b,sudoPassword:a})}),d=await c.json();c.ok?(y({type:"success",text:"MITM started"}),s(!1),u(""),F()):y({type:"error",text:d.error||"Failed to start"})}catch(a){y({type:"error",text:a.message})}finally{q(!1)}},I=async a=>{q(!0),y(null);try{let b=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:a})}),c=await b.json();b.ok?(y({type:"success",text:"MITM stopped"}),s(!1),u(""),F()):y({type:"error",text:c.error||"Failed to stop"})}catch(a){y({type:"error",text:a.message})}finally{q(!1)}},J=()=>{t.trim()?n?.running?I(t):H(t):y({type:"error",text:"Sudo password is required"})},K=(a,b)=>{A(c=>({...c,[a]:b}))},L=async()=>{q(!0),y(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:z})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to save mappings")}y({type:"success",text:"Mappings saved!"})}catch(a){y({type:"error",text:a.message})}finally{q(!1)}},M=n?.running;return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/antigravity.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),M?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-3",children:[{label:"DNS",ok:n?.dnsConfigured},{label:"Cert",ok:n?.certExists},{label:"Server",ok:n?.running}].map(({label:a,ok:b})=>(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[14px] ${b?"text-green-500":"text-text-muted"}`,children:b?"check_circle":"radio_button_unchecked"}),(0,d.jsx)("span",{className:`text-xs ${b?"text-green-500":"text-text-muted"}`,children:a})]},a))}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:M?(0,d.jsxs)("button",{onClick:()=>{G||n?.hasCachedPassword?I(""):(s(!0),y(null))},disabled:p,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,d.jsxs)("button",{onClick:()=>{G||n?.hasCachedPassword?H(""):(s(!0),y(null))},disabled:p||!k,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),x?.type==="error"&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:x.text})]}),M&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:v,onChange:a=>w(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:z[a.alias]||"",onChange:b=>K(a.alias,b.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>{E(a.alias),C(!0)},disabled:!k,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),z[a.alias]&&(0,d.jsx)("button",{onClick:()=>K(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:L,disabled:p||0===Object.keys(z).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!M&&G&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-yellow-500/10 text-yellow-600 border border-yellow-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,d.jsx)("span",{children:"Windows: Run terminal (9Router) as Administrator to enable MITM"})]}),!M&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through 9Router."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,d.jsxs)("span",{children:["2. Redirects ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," → localhost"]}),(0,d.jsx)("span",{children:"3. Maps Antigravity models to any provider via 9Router"})]})]})]}),(0,d.jsx)(f.aF,{isOpen:r,onClose:()=>{s(!1),u(""),y(null)},title:"Sudo Password Required",size:"sm",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:t,onChange:a=>u(a.target.value),onKeyDown:a=>{"Enter"!==a.key||p||J()}}),x&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===x.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===x.type?"check_circle":"error"}),(0,d.jsx)("span",{children:x.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{s(!1),u(""),y(null)},disabled:p,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:J,loading:p,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:B,onClose:()=>C(!1),onSelect:a=>{D&&A(b=>({...b,[D]:a.value}))},selectedModel:D?z[D]:null,activeProviders:j,title:`Select model for ${D}`})]})}function r({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,cloudEnabled:k,initialStatus:l}){let m,[n,o]=(0,e.useState)(l||null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)({}),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(""),L=(()=>{if(!n?.installed)return null;if(!n.config)return"not_configured";let a=n.config?.provider?.["9router"]?.options?.baseURL||"",b=a.includes("localhost")||a.includes("127.0.0.1");return n.has9Router&&(b||a.includes(g))?"configured":n.has9Router?"other":"not_configured"})(),M=()=>{let a=J||g;return a.endsWith("/v1")?a:`${a}/v1`},N=async()=>{q(!0);try{let a=await fetch("/api/cli-tools/opencode-settings"),b=await a.json();o(b)}catch(a){o({installed:!1,error:a.message})}finally{q(!1)}},O=async()=>{s(!0),w(null);try{let a=z&&z.trim()||k?z:"sk_9router",b=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:M(),apiKey:a,model:B})}),c=await b.json();b.ok?(w({type:"success",text:"Settings applied successfully!"}),N()):w({type:"error",text:c.error||"Failed to apply settings"})}catch(a){w({type:"error",text:a.message})}finally{s(!1)}},P=async()=>{u(!0),w(null);try{let a=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),b=await a.json();a.ok?(w({type:"success",text:"Settings reset successfully!"}),C(""),N()):w({type:"error",text:b.error||"Failed to reset settings"})}catch(a){w({type:"error",text:a.message})}finally{u(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/opencode.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===L&&(0,d.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"===L&&(0,d.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"===L&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[p&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!p&&n&&!n.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install OpenCode CLI to use auto-apply feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>y(!x),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:x?"expand_less":"help"}),x?"Hide":"How to Install"]})]}),x&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,d.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,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!p&&n?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[n?.config?.provider?.["9router"]?.options?.baseURL&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:n.config.provider["9router"].options.baseURL})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:J||`${g}/v1`,onChange:a=>K(a.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"}),J&&J!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:z,onChange:a=>A(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:B,onChange:a=>C(a.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>E(!0),disabled:!j?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),B&&(0,d.jsx)("button",{onClick:()=>C(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),v&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===v.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===v.type?"check_circle":"error"}),(0,d.jsx)("span",{children:v.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:O,disabled:!B,loading:r,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:P,disabled:!n.has9Router,loading:t,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>I(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:D,onClose:()=>E(!1),onSelect:a=>{C(a.value),E(!1)},selectedModel:B,activeProviders:j,modelAliases:F,title:"Select Model for OpenCode"}),(0,d.jsx)(f.uR,{isOpen:H,onClose:()=>I(!1),title:"OpenCode - Manual Configuration",configs:(m=z&&z.trim()?z:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:M(),apiKey:m},models:{[B||"provider/model-id"]:{name:B||"provider/model-id"}}}},model:`9router/${B||"provider/model-id"}`},null,2)}])})]})}function s({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,cloudEnabled:k,initialStatus:l}){let m,n,[o,p]=(0,e.useState)(l||null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)({}),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)(!1),K=(()=>{if(!o)return null;if(!o.has9Router)return"not_configured";let a=o.currentUrl||"";return a.includes("localhost")||a.includes("127.0.0.1")||a.includes(g)?"configured":"other"})(),L=()=>g.endsWith("/v1")?g:`${g}/v1`,M=()=>{let a=E.trim();!a||G.includes(a)||(H(b=>[...b,a]),F(""))},N=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/copilot-settings"),b=await a.json();p(b)}catch(a){p({error:a.message})}finally{r(!1)}},O=async()=>{t(!0),x(null);try{let a=y&&y.trim()||k?y:"sk_9router",b=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:L(),apiKey:a,models:G})}),c=await b.json();b.ok?(x({type:"success",text:c.message||"Settings applied successfully!"}),N()):x({type:"error",text:c.error||"Failed to apply settings"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},P=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:"Settings reset successfully!"}),H([]),N()):x({type:"error",text:b.error||"Failed to reset settings"})}catch(a){x({type:"error",text:a.message})}finally{v(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/copilot.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===K&&(0,d.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"===K&&(0,d.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"===K&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[q&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Copilot config..."})]}),!q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("label",{className:"text-xs font-medium text-text-muted",children:"API Key"}),h.length>0?(0,d.jsx)("select",{value:y,onChange:a=>z(a.target.value),className:"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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["Models ",G.length>0&&(0,d.jsxs)("span",{className:"text-primary",children:["(",G.length," added)"]})]}),G.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-1 mb-1",children:G.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-bg-secondary rounded-lg border border-border",children:[(0,d.jsx)("span",{className:"flex-1 text-sm font-mono truncate",children:a}),(0,d.jsx)("button",{onClick:()=>H(b=>b.filter(b=>b!==a)),className:"text-text-muted hover:text-red-500 transition-colors",title:"Remove",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),onKeyDown:a=>"Enter"===a.key&&M(),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,d.jsx)("button",{onClick:()=>J(!0),disabled:!j?.length,className:`px-3 py-2 rounded-lg border text-sm transition-colors shrink-0 ${j?.length?"bg-bg-secondary border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),(0,d.jsx)("button",{onClick:M,disabled:!E.trim(),className:"px-3 py-2 rounded-lg border text-sm bg-bg-secondary border-border hover:border-primary transition-colors shrink-0 disabled:opacity-50",title:"Add model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"})})]})]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:O,disabled:0===G.length,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:P,disabled:!o?.has9Router,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>D(!0),disabled:0===G.length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:I,onClose:()=>J(!1),onSelect:a=>{F(a.value),J(!1)},selectedModel:E,activeProviders:j,modelAliases:A,title:"Select Model for GitHub Copilot"}),(0,d.jsx)(f.uR,{isOpen:C,onClose:()=>D(!1),title:"GitHub Copilot - Manual Configuration",configs:(m=y&&y.trim()?y:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",n=L(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:m,models:G.map(a=>({id:a,name:a,url:`${n}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}let t=process.env.NEXT_PUBLIC_CLOUD_URL;function u({machineId:a}){let b,c,i,[j,m]=(0,e.useState)([]),[u,v]=(0,e.useState)(!0),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)({}),K=()=>j.filter(a=>!1!==a.isActive),L=(0,e.useCallback)((a,b,c)=>{z(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(u)return(0,d.jsx)("div",{className:"flex flex-col gap-6",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{})]})});let M=(b=K(),c=[],i=new Set,b.forEach(a=>{let b=h.Xg[a.provider]||a.provider;(0,h.KC)(a.provider).forEach(d=>{let e=`${b}/${d.id}`;i.has(e)||(i.add(e),c.push({value:e,label:`${b}/${d.id}`,provider:a.provider,alias:b,connectionName:a.name,modelId:d.id}))})}),c).length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[!M&&(0,d.jsx)(f.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:w===a,onToggle:()=>x(w===a?null:a),baseUrl:C&&E?E:A&&t?t:"http://localhost:20128",apiKeys:G};switch(a){case"claude":return(0,d.jsx)(k,{...c,activeProviders:K(),modelMappings:y[a]||{},onModelMappingChange:(b,c)=>L(a,b,c),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.claude},a);case"codex":return(0,d.jsx)(l,{...c,activeProviders:K(),cloudEnabled:A,initialStatus:I.codex},a);case"opencode":return(0,d.jsx)(r,{...c,activeProviders:K(),cloudEnabled:A,initialStatus:I.opencode},a);case"copilot":return(0,d.jsx)(s,{...c,activeProviders:K(),cloudEnabled:A,initialStatus:I.copilot},a);case"droid":return(0,d.jsx)(n,{...c,activeProviders:K(),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.droid},a);case"openclaw":return(0,d.jsx)(o,{...c,activeProviders:K(),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.openclaw},a);case"antigravity":return(0,d.jsx)(q,{...c,activeProviders:K(),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.antigravity},a);default:return(0,d.jsx)(p,{toolId:a,...c,activeProviders:K(),cloudEnabled:A,tunnelEnabled:C},a)}})(a,b))})]})}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79518:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js","default")},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87250:(a,b,c)=>{"use strict";c.d(b,{D1:()=>e});var d=c(54603);async function e(){return await (0,d.Xj)()}},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5270,2044,7471,3919,4822,6943,9718,3832,6182,9201,2280,412,1164],()=>b(b.s=55268));module.exports=c})();
16
+ `},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:o},null,2)}])})]})}let m=process.env.NEXT_PUBLIC_CLOUD_URL;function n({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l,initialStatus:n}){let o,p,q,r,[s,t]=(0,e.useState)(n||null),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)("");(0,e.useRef)(!1);let O=(()=>{if(!s?.installed)return null;let a=s.settings?.customModels?.find(a=>"custom:9Router-0"===a.id);if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=l&&m&&a.baseUrl?.startsWith(m),d=g&&a.baseUrl?.startsWith(g);return b||c||d?"configured":"other"})(),P=async()=>{v(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();t(b)}catch(a){t({installed:!1,error:a.message})}finally{v(!1)}},Q=()=>{let a=M||g;return a.endsWith("/v1")?a:`${a}/v1`},R=async()=>{x(!0),B(null);try{let a=C?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:Q(),apiKey:a,model:E})}),c=await b.json();b.ok?(B({type:"success",text:"Settings applied successfully!"}),P()):B({type:"error",text:c.error||"Failed to apply settings"})}catch(a){B({type:"error",text:a.message})}finally{x(!1)}},S=async()=>{z(!0),B(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(B({type:"success",text:"Settings reset successfully!"}),F(""),D(""),P()):B({type:"error",text:b.error||"Failed to reset settings"})}catch(a){B({type:"error",text:a.message})}finally{z(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===O&&(0,d.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"===O&&(0,d.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"===O&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!u&&s&&!s.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Factory Droid CLI to use this feature."})]})]}),!u&&s?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[s?.settings?.customModels?.find(a=>"custom:9Router-0"===a.id)?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:s.settings.customModels.find(a=>"custom:9Router-0"===a.id).baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(o=M||g).endsWith("/v1")?o:`${o}/v1`,onChange:a=>N(a.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"}),M&&M!==g&&(0,d.jsx)("button",{onClick:()=>N(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:C,onChange:a=>D(a.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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>H(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),E&&(0,d.jsx)("button",{onClick:()=>F(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),A&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,d.jsx)("span",{children:A.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:R,disabled:!E,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:S,disabled:!s?.has9Router,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{F(a.value),H(!1)},selectedModel:E,activeProviders:k,modelAliases:I,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:K,onClose:()=>L(!1),title:"Factory Droid - Manual Configuration",configs:(p=C&&C.trim()?C:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",q={customModels:[{model:E||"provider/model-id",id:"custom:9Router-0",index:0,baseUrl:Q(),apiKey:p,displayName:E||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},r="u">typeof navigator&&navigator.platform,[{filename:r?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(q,null,2)}])})]})}function o({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l,initialStatus:m}){let n,o,[p,q]=(0,e.useState)(m||null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)({}),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)("");(0,e.useRef)(!1);let L=(()=>{if(!p?.installed)return null;let a=p.settings?.models?.providers?.["9router"];if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1")||a.baseUrl?.includes("0.0.0.0"),c=g&&a.baseUrl?.startsWith(g);return b||c?"configured":"other"})(),M=async()=>{s(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();q(b)}catch(a){q({installed:!1,error:a.message})}finally{s(!1)}},N=()=>{let a=J||"http://127.0.0.1:20128";return a.endsWith("/v1")?a:`${a}/v1`},O=async()=>{u(!0),y(null);try{let a=z?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:N(),apiKey:a,model:B})}),c=await b.json();b.ok?(y({type:"success",text:"Settings applied successfully!"}),M()):y({type:"error",text:c.error||"Failed to apply settings"})}catch(a){y({type:"error",text:a.message})}finally{u(!1)}},P=async()=>{w(!0),y(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(y({type:"success",text:"Settings reset successfully!"}),C(""),A(""),M()):y({type:"error",text:b.error||"Failed to reset settings"})}catch(a){y({type:"error",text:a.message})}finally{w(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===L&&(0,d.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"===L&&(0,d.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"===L&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[r&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!r&&p&&!p.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Open Claw CLI to use this feature."})]})]}),!r&&p?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[p?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:p.settings.models.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(n=J||"http://127.0.0.1:20128").endsWith("/v1")?n:`${n}/v1`,onChange:a=>K(a.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"}),J&&J!==g&&(0,d.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:z,onChange:a=>A(a.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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:B,onChange:a=>C(a.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>E(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),B&&(0,d.jsx)("button",{onClick:()=>C(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),x&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===x.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===x.type?"check_circle":"error"}),(0,d.jsx)("span",{children:x.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:O,disabled:!B,loading:t,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:P,disabled:!p?.has9Router,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>I(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:D,onClose:()=>E(!1),onSelect:a=>{C(a.value),E(!1)},selectedModel:B,activeProviders:k,modelAliases:F,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:H,onClose:()=>I(!1),title:"Open Claw - Manual Configuration",configs:(o=z&&z.trim()?z:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${B||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:N(),apiKey:o,api:"openai-completions",models:[{id:B||"provider/model-id",name:(B||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}function p({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1,tunnelEnabled:m=!1}){let[n,o]=(0,e.useState)(null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(()=>j?.length>0?j[0].key:""),v=a=>{let b=t&&t.trim()?t:l?"your-api-key":"sk_9router",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,r||"provider/model-id")},w=async(a,b)=>{await navigator.clipboard.writeText(v(a)),o(b),setTimeout(()=>o(null),2e3)},x=k.length>0,y=()=>(!b.requiresExternalUrl||!!l||!!m)&&(!b.requiresCloud||!!l);return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:g,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:b.image?(0,d.jsx)(i.default,{src:b.image,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}}):b.icon?(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:b.color},children:b.icon}):(0,d.jsx)(i.default,{src:`/providers/${a}.png`,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:b.name}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:b.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:b.guideSteps?(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((a,b)=>{if("cloudCheck"===a.type&&(l||m))return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l&&!m,f="bg-blue-500/10 border-blue-500/30",g="text-blue-600 dark:text-blue-400",h="text-blue-500",i="info";return c?(f="bg-yellow-500/10 border-yellow-500/30",g="text-yellow-600 dark:text-yellow-400",h="text-yellow-500",i="warning"):e&&(f="bg-red-500/10 border-red-500/30",g="text-red-600 dark:text-red-400",h="text-red-500",i="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${f}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${h}`,children:i}),(0,d.jsx)("p",{className:`text-sm ${g}`,children:a.text})]},b)})}):null,y()&&b.guideSteps.map(a=>(0,d.jsxs)("div",{className:"flex items-start gap-4",children:[(0,d.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:b.color},children:a.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:a.title}),a.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a.desc}),"apiKeySelector"===a.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:t,onChange:a=>u(a.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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>w(t,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===n?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:l?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===a.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:r,onChange:a=>s(a.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,d.jsx)("button",{onClick:()=>q(!0),disabled:!x,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${x?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>w(r,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===n?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>s(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),a.value&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:v(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>w(a.value,`${a.step}-${a.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:n===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),y()&&b.codeBlock&&(0,d.jsxs)("div",{className:"mt-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:b.codeBlock.language}),(0,d.jsxs)("button",{onClick:()=>w(b.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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===n?"check":"content_copy"}),"codeblock"===n?"Copied!":"Copy"]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,d.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:v(b.codeBlock.code)})})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:p,onClose:()=>q(!1),onSelect:a=>{s(a.value)},selectedModel:r,activeProviders:k,title:"Select Model"})]})}function q({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,hasActiveProviders:k,cloudEnabled:l,initialStatus:m}){let[n,o]=(0,e.useState)(m||null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(""),[x,y]=(0,e.useState)(""),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)({}),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),H=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();o(b)}}catch(a){console.log("Error fetching status:",a),o({running:!1})}},I="u">typeof navigator&&navigator.userAgent?.includes("Windows"),J=async a=>{q(!0),A(null),s("cert");try{let b=x?.trim()||(h?.length>0?h[0].key:null)||(l?null:"sk_9router"),c=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:b,sudoPassword:a})}),d=await c.json();c.ok?(s(null),A({type:"success",text:"MITM started"}),u(!1),w(""),H()):(s(null),A({type:"error",text:d.error||"Failed to start"}))}catch(a){s(null),A({type:"error",text:a.message})}finally{q(!1)}},K=async a=>{q(!0),A(null);try{let b=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:a})}),c=await b.json();b.ok?(A({type:"success",text:"MITM stopped"}),u(!1),w(""),H()):A({type:"error",text:c.error||"Failed to stop"})}catch(a){A({type:"error",text:a.message})}finally{q(!1)}},L=()=>{v.trim()?n?.running?K(v):J(v):A({type:"error",text:"Sudo password is required"})},M=(a,b)=>{C(c=>({...c,[a]:b}))},N=async()=>{q(!0),A(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:B})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to save mappings")}A({type:"success",text:"Mappings saved!"})}catch(a){A({type:"error",text:a.message})}finally{q(!1)}},O=n?.running;return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/antigravity.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),O?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-1",children:[{key:"cert",label:"Cert",ok:n?.certExists},{key:"server",label:"Server",ok:n?.running},{key:"dns",label:"DNS",ok:n?.dnsConfigured}].map(({key:a,label:b,ok:c},e)=>{let f=r===a;return(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1 px-2 py-1 rounded-md",children:[f?(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary animate-spin",children:"progress_activity"}):(0,d.jsx)("span",{className:`material-symbols-outlined text-[14px] ${c?"text-green-500":"text-text-muted"}`,children:c?"check_circle":"radio_button_unchecked"}),(0,d.jsx)("span",{className:`text-xs font-medium ${f?"text-primary":c?"text-green-500":"text-text-muted"}`,children:b})]}),e<2&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"arrow_forward"})]},a)})}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:O?(0,d.jsxs)("button",{onClick:()=>{I||n?.hasCachedPassword?K(""):(u(!0),A(null))},disabled:p,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,d.jsxs)("button",{onClick:()=>{I||n?.hasCachedPassword?J(""):(u(!0),A(null))},disabled:p||!k,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),z?.type==="error"&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:z.text})]}),O&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:x,onChange:a=>y(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:B[a.alias]||"",onChange:b=>M(a.alias,b.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>{G(a.alias),E(!0)},disabled:!k,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),B[a.alias]&&(0,d.jsx)("button",{onClick:()=>M(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:N,disabled:p||0===Object.keys(B).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!O&&I&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-yellow-500/10 text-yellow-600 border border-yellow-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,d.jsx)("span",{children:"Windows: Run terminal (9Router) as Administrator to enable MITM"})]}),!O&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through 9Router."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,d.jsxs)("span",{children:["2. Redirects ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," → localhost"]}),(0,d.jsx)("span",{children:"3. Maps Antigravity models to any provider via 9Router"})]})]})]}),(0,d.jsx)(f.aF,{isOpen:t,onClose:()=>{u(!1),w(""),A(null)},title:"Sudo Password Required",size:"sm",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:v,onChange:a=>w(a.target.value),onKeyDown:a=>{"Enter"!==a.key||p||L()}}),z&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===z.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===z.type?"check_circle":"error"}),(0,d.jsx)("span",{children:z.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{u(!1),w(""),A(null)},disabled:p,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:L,loading:p,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:D,onClose:()=>E(!1),onSelect:a=>{F&&C(b=>({...b,[F]:a.value}))},selectedModel:F?B[F]:null,activeProviders:j,title:`Select model for ${F}`})]})}function r({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,cloudEnabled:k,initialStatus:l}){let m,[n,o]=(0,e.useState)(l||null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)({}),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(""),L=(()=>{if(!n?.installed)return null;if(!n.config)return"not_configured";let a=n.config?.provider?.["9router"]?.options?.baseURL||"",b=a.includes("localhost")||a.includes("127.0.0.1");return n.has9Router&&(b||a.includes(g))?"configured":n.has9Router?"other":"not_configured"})(),M=()=>{let a=J||g;return a.endsWith("/v1")?a:`${a}/v1`},N=async()=>{q(!0);try{let a=await fetch("/api/cli-tools/opencode-settings"),b=await a.json();o(b)}catch(a){o({installed:!1,error:a.message})}finally{q(!1)}},O=async()=>{s(!0),w(null);try{let a=z&&z.trim()||k?z:"sk_9router",b=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:M(),apiKey:a,model:B})}),c=await b.json();b.ok?(w({type:"success",text:"Settings applied successfully!"}),N()):w({type:"error",text:c.error||"Failed to apply settings"})}catch(a){w({type:"error",text:a.message})}finally{s(!1)}},P=async()=>{u(!0),w(null);try{let a=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),b=await a.json();a.ok?(w({type:"success",text:"Settings reset successfully!"}),C(""),N()):w({type:"error",text:b.error||"Failed to reset settings"})}catch(a){w({type:"error",text:a.message})}finally{u(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/opencode.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===L&&(0,d.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"===L&&(0,d.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"===L&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[p&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!p&&n&&!n.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install OpenCode CLI to use auto-apply feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>y(!x),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:x?"expand_less":"help"}),x?"Hide":"How to Install"]})]}),x&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,d.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,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!p&&n?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[n?.config?.provider?.["9router"]?.options?.baseURL&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:n.config.provider["9router"].options.baseURL})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:J||`${g}/v1`,onChange:a=>K(a.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"}),J&&J!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:z,onChange:a=>A(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:B,onChange:a=>C(a.target.value),placeholder:"provider/model-id",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,d.jsx)("button",{onClick:()=>E(!0),disabled:!j?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),B&&(0,d.jsx)("button",{onClick:()=>C(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),v&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===v.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===v.type?"check_circle":"error"}),(0,d.jsx)("span",{children:v.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:O,disabled:!B,loading:r,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:P,disabled:!n.has9Router,loading:t,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>I(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:D,onClose:()=>E(!1),onSelect:a=>{C(a.value),E(!1)},selectedModel:B,activeProviders:j,modelAliases:F,title:"Select Model for OpenCode"}),(0,d.jsx)(f.uR,{isOpen:H,onClose:()=>I(!1),title:"OpenCode - Manual Configuration",configs:(m=z&&z.trim()?z:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:M(),apiKey:m},models:{[B||"provider/model-id"]:{name:B||"provider/model-id"}}}},model:`9router/${B||"provider/model-id"}`},null,2)}])})]})}function s({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,cloudEnabled:k,initialStatus:l}){let m,n,[o,p]=(0,e.useState)(l||null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)({}),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)(!1),K=(()=>{if(!o)return null;if(!o.has9Router)return"not_configured";let a=o.currentUrl||"";return a.includes("localhost")||a.includes("127.0.0.1")||a.includes(g)?"configured":"other"})(),L=()=>g.endsWith("/v1")?g:`${g}/v1`,M=()=>{let a=E.trim();!a||G.includes(a)||(H(b=>[...b,a]),F(""))},N=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/copilot-settings"),b=await a.json();p(b)}catch(a){p({error:a.message})}finally{r(!1)}},O=async()=>{t(!0),x(null);try{let a=y&&y.trim()||k?y:"sk_9router",b=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:L(),apiKey:a,models:G})}),c=await b.json();b.ok?(x({type:"success",text:c.message||"Settings applied successfully!"}),N()):x({type:"error",text:c.error||"Failed to apply settings"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},P=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:"Settings reset successfully!"}),H([]),N()):x({type:"error",text:b.error||"Failed to reset settings"})}catch(a){x({type:"error",text:a.message})}finally{v(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/copilot.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===K&&(0,d.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"===K&&(0,d.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"===K&&(0,d.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,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[q&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Copilot config..."})]}),!q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("label",{className:"text-xs font-medium text-text-muted",children:"API Key"}),h.length>0?(0,d.jsx)("select",{value:y,onChange:a=>z(a.target.value),className:"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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["Models ",G.length>0&&(0,d.jsxs)("span",{className:"text-primary",children:["(",G.length," added)"]})]}),G.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-1 mb-1",children:G.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-bg-secondary rounded-lg border border-border",children:[(0,d.jsx)("span",{className:"flex-1 text-sm font-mono truncate",children:a}),(0,d.jsx)("button",{onClick:()=>H(b=>b.filter(b=>b!==a)),className:"text-text-muted hover:text-red-500 transition-colors",title:"Remove",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),onKeyDown:a=>"Enter"===a.key&&M(),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,d.jsx)("button",{onClick:()=>J(!0),disabled:!j?.length,className:`px-3 py-2 rounded-lg border text-sm transition-colors shrink-0 ${j?.length?"bg-bg-secondary border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),(0,d.jsx)("button",{onClick:M,disabled:!E.trim(),className:"px-3 py-2 rounded-lg border text-sm bg-bg-secondary border-border hover:border-primary transition-colors shrink-0 disabled:opacity-50",title:"Add model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"})})]})]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:O,disabled:0===G.length,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:P,disabled:!o?.has9Router,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>D(!0),disabled:0===G.length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:I,onClose:()=>J(!1),onSelect:a=>{F(a.value),J(!1)},selectedModel:E,activeProviders:j,modelAliases:A,title:"Select Model for GitHub Copilot"}),(0,d.jsx)(f.uR,{isOpen:C,onClose:()=>D(!1),title:"GitHub Copilot - Manual Configuration",configs:(m=y&&y.trim()?y:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",n=L(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:m,models:G.map(a=>({id:a,name:a,url:`${n}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}let t=process.env.NEXT_PUBLIC_CLOUD_URL;function u({machineId:a}){let b,c,i,[j,m]=(0,e.useState)([]),[u,v]=(0,e.useState)(!0),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)({}),K=()=>j.filter(a=>!1!==a.isActive),L=(0,e.useCallback)((a,b,c)=>{z(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(u)return(0,d.jsx)("div",{className:"flex flex-col gap-6",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{})]})});let M=(b=K(),c=[],i=new Set,b.forEach(a=>{let b=h.Xg[a.provider]||a.provider;(0,h.KC)(a.provider).forEach(d=>{let e=`${b}/${d.id}`;i.has(e)||(i.add(e),c.push({value:e,label:`${b}/${d.id}`,provider:a.provider,alias:b,connectionName:a.name,modelId:d.id}))})}),c).length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[!M&&(0,d.jsx)(f.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:w===a,onToggle:()=>x(w===a?null:a),baseUrl:C&&E?E:A&&t?t:"http://localhost:20128",apiKeys:G};switch(a){case"claude":return(0,d.jsx)(k,{...c,activeProviders:K(),modelMappings:y[a]||{},onModelMappingChange:(b,c)=>L(a,b,c),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.claude},a);case"codex":return(0,d.jsx)(l,{...c,activeProviders:K(),cloudEnabled:A,initialStatus:I.codex},a);case"opencode":return(0,d.jsx)(r,{...c,activeProviders:K(),cloudEnabled:A,initialStatus:I.opencode},a);case"copilot":return(0,d.jsx)(s,{...c,activeProviders:K(),cloudEnabled:A,initialStatus:I.copilot},a);case"droid":return(0,d.jsx)(n,{...c,activeProviders:K(),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.droid},a);case"openclaw":return(0,d.jsx)(o,{...c,activeProviders:K(),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.openclaw},a);case"antigravity":return(0,d.jsx)(q,{...c,activeProviders:K(),hasActiveProviders:M,cloudEnabled:A,initialStatus:I.antigravity},a);default:return(0,d.jsx)(p,{toolId:a,...c,activeProviders:K(),cloudEnabled:A,tunnelEnabled:C},a)}})(a,b))})]})}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79518:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js","default")},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87250:(a,b,c)=>{"use strict";c.d(b,{D1:()=>e});var d=c(54603);async function e(){return await (0,d.Xj)()}},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5270,2044,7471,3919,4822,6943,9718,3832,6182,9201,2280,412,1164],()=>b(b.s=55268));module.exports=c})();