zevairouter 1.1.60 → 1.1.62

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 (855) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +9 -9
  4. package/cli/app/.next-cli-build/build-manifest.json +3 -3
  5. package/cli/app/.next-cli-build/prerender-manifest.json +5 -5
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  77. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  78. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +2 -2
  79. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  80. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  81. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  82. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  91. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  93. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  94. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  95. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  97. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/cli/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  102. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  103. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  104. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  105. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  121. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  151. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  153. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  155. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  159. package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  161. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  163. package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  165. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
  167. package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  169. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  173. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  175. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  177. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  179. package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
  181. package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  183. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  185. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  187. package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/context/test/route.js +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +2 -2
  247. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +2 -2
  253. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/metrics/route.js +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +2 -2
  271. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  387. package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js.nft.json +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js.nft.json +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js +1 -1
  424. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
  425. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js +1 -1
  426. package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
  427. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  428. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  429. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
  430. package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
  431. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
  432. package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
  433. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
  434. package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
  435. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js +1 -1
  436. package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js.nft.json +1 -1
  437. package/cli/app/.next-cli-build/server/app/api/providers/route.js +2 -2
  438. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  439. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  440. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  441. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  442. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  443. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  444. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  445. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
  446. package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  447. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  448. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  449. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  450. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  451. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  452. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  453. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  454. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  455. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  456. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  457. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  458. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  459. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  460. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  461. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  462. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  463. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  464. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  465. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  466. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  467. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  468. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  469. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  470. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  471. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  472. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  473. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  474. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  475. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  476. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  477. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  478. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  479. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  480. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  481. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  482. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  483. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  484. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  485. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  486. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  487. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
  488. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  489. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
  490. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  491. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
  492. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  493. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +1 -1
  494. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  495. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +1 -1
  496. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  497. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +1 -1
  498. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  499. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +2 -2
  500. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  501. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +1 -1
  502. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  503. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  504. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  505. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  506. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  507. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  508. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  509. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  510. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  511. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  512. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  513. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  514. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  515. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  516. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  517. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  518. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  519. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  520. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  521. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  522. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  523. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  524. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  525. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  526. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  527. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  528. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  529. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  530. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  531. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  532. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  533. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  534. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  535. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  536. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  537. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  538. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  539. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  540. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  541. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  542. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  543. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  544. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  545. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +2 -2
  546. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
  547. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  548. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  549. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  550. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  551. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js +2 -2
  552. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
  553. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  554. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  555. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  556. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  557. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  558. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  559. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  560. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  561. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  562. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  563. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  564. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  565. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  566. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  567. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  568. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  569. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  570. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  571. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  572. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  573. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  574. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  575. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  576. package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  577. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  578. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  579. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  580. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  581. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  582. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  583. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  584. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  585. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  586. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  587. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +2 -2
  588. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  589. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  590. package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  591. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js +1 -1
  592. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
  593. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  594. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  595. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  596. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  597. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  598. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  599. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  600. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  601. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +2 -2
  602. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  603. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  604. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  605. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  606. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  607. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  608. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  609. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  610. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  611. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  612. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  613. package/cli/app/.next-cli-build/server/app/callback/page.js +1 -1
  614. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  615. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  616. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  617. package/cli/app/.next-cli-build/server/app/callback.rsc +5 -5
  618. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  619. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  620. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  621. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  622. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  623. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +5 -5
  624. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  625. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  626. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  627. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  628. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  629. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  630. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  631. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  632. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  633. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +5 -5
  634. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  635. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  636. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  637. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  638. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +5 -5
  639. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  640. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  641. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  642. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  643. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +5 -5
  644. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  645. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  646. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  647. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  648. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  649. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  650. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  651. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  652. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  653. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +5 -5
  654. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  655. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  656. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  657. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  658. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
  659. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  660. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  661. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  662. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
  663. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +7 -7
  664. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
  665. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  666. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  667. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  668. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +5 -5
  669. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  670. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  671. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  672. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  673. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +5 -5
  674. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  675. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  676. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  677. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  678. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +5 -5
  679. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  680. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  681. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  682. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  683. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
  684. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  685. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  686. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  687. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  688. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +5 -5
  689. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  690. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  691. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  692. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +5 -5
  693. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +5 -5
  694. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +5 -5
  695. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  696. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  697. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  698. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  699. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  700. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  701. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  702. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  703. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +5 -5
  704. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  705. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  706. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  707. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  708. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +5 -5
  709. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  710. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  711. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  712. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  713. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +5 -5
  714. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  715. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  716. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  717. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  718. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +5 -5
  719. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  720. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  721. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  722. package/cli/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  723. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  724. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  725. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  726. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  727. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  728. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  729. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  730. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  731. package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
  732. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  733. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  734. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  735. package/cli/app/.next-cli-build/server/app/landing.rsc +5 -5
  736. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  737. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  738. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  739. package/cli/app/.next-cli-build/server/app/login/page.js +1 -1
  740. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  741. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  742. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  743. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  744. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  745. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  746. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  747. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  748. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  749. package/cli/app/.next-cli-build/server/app/page.js +1 -1
  750. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  751. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  752. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js +2 -2
  753. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  754. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js +1 -1
  755. package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
  756. package/cli/app/.next-cli-build/server/app-paths-manifest.json +9 -9
  757. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  758. package/cli/app/.next-cli-build/server/chunks/1757.js +1 -1
  759. package/cli/app/.next-cli-build/server/chunks/1809.js +1 -0
  760. package/cli/app/.next-cli-build/server/chunks/3190.js +1 -1
  761. package/cli/app/.next-cli-build/server/chunks/3711.js +1 -0
  762. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  763. package/cli/app/.next-cli-build/server/chunks/4780.js +1 -1
  764. package/cli/app/.next-cli-build/server/chunks/5019.js +1 -1
  765. package/cli/app/.next-cli-build/server/chunks/5626.js +1 -1
  766. package/cli/app/.next-cli-build/server/chunks/5728.js +1 -1
  767. package/cli/app/.next-cli-build/server/chunks/5905.js +3 -3
  768. package/cli/app/.next-cli-build/server/chunks/{4721.js → 6133.js} +2 -2
  769. package/cli/app/.next-cli-build/server/chunks/7135.js +1 -1
  770. package/cli/app/.next-cli-build/server/chunks/7319.js +9 -9
  771. package/cli/app/.next-cli-build/server/chunks/7401.js +1 -1
  772. package/cli/app/.next-cli-build/server/chunks/7726.js +1 -1
  773. package/cli/app/.next-cli-build/server/chunks/7793.js +1 -1
  774. package/cli/app/.next-cli-build/server/chunks/8238.js +1 -1
  775. package/cli/app/.next-cli-build/server/chunks/8852.js +1 -0
  776. package/cli/app/.next-cli-build/server/chunks/8895.js +4 -4
  777. package/cli/app/.next-cli-build/server/chunks/9679.js +1 -1
  778. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  779. package/cli/app/.next-cli-build/server/middleware.js +8 -8
  780. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  781. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  782. package/cli/app/.next-cli-build/server/preview-props.json +3 -3
  783. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  784. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  785. package/cli/app/.next-cli-build/static/chunks/{620-2dbbacd7e6de3def.js → 620-8b24dc33f653e657.js} +1 -1
  786. package/cli/app/.next-cli-build/static/chunks/6202-e364f4d5fefadd3f.js +3 -0
  787. package/cli/app/.next-cli-build/static/chunks/{9126-449f231ec89e0c8b.js → 9041-70659da305d33949.js} +1 -1
  788. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/{page-71a382ed81559482.js → page-bd1157fec388ec95.js} +1 -1
  789. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-59b4e1d04b034922.js +1 -0
  790. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-25b44f613f1ad6ab.js +1 -0
  791. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-2b90c3377dc1b803.js +1 -0
  792. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b73e02cc2f278a1c.js +1 -0
  793. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-4d578c66f4f83c4b.js +1 -0
  794. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/context/{page-b80f4b05920eb3eb.js → page-e0feb2dcf297b1d3.js} +1 -1
  795. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-14ff4e34b3569e7d.js +1 -0
  796. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-f6d7c9ab2bbcaa0c.js → page-6822935d3352c990.js} +2 -2
  797. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-83103184cbba481f.js → page-6ebcd05a89f2c192.js} +1 -1
  798. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-739bdc9961949f1b.js → page-a4cb0e8fb5edb847.js} +1 -1
  799. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-ce6dece0a314f25b.js +1 -0
  800. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-291c6ac2c795f8c8.js → page-f2473ffe65aa2418.js} +1 -1
  801. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-fc2385100618cb11.js +1 -0
  802. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8345390557a29481.js +1 -0
  803. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-52350091b31c2ec1.js +1 -0
  804. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-7f6579c9e603c1c7.js → page-d9769ad72eaab7ff.js} +2 -2
  805. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-40562bf4cd105f0a.js → page-663d97e32ff4abb9.js} +1 -1
  806. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-542de72fb45553c1.js → page-9eddc754a0ed05c4.js} +1 -1
  807. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-6a803728f5920906.js → page-834c9924ad1adfea.js} +2 -2
  808. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-27b424c2fe11112c.js → page-3e98755c0114d653.js} +1 -1
  809. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-29126aa56241d330.js +1 -0
  810. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-3ed909159e70307f.js → page-aedd94cfeaef7612.js} +1 -1
  811. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-d401da171aaa05ac.js +1 -0
  812. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/terminal/{page-99f08859cae41572.js → page-f20641b18fe31018.js} +1 -1
  813. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-c70ac5f25262fb6f.js +1 -0
  814. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-a855862272bd37db.js +1 -0
  815. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-a205615e648f47a1.js → page-7ed7a9155f0550b3.js} +1 -1
  816. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-baca0356b5cacc31.js → layout-4cc7b6fd22e7992c.js} +1 -1
  817. package/cli/app/.next-cli-build/static/chunks/app/_not-found/page-2b9bf697de64adcf.js +1 -0
  818. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-de0023d65aebf11f.js +1 -0
  819. package/cli/app/.next-cli-build/static/chunks/app/callback/{page-b1ca389e20348cce.js → page-ba0d852b637994d3.js} +1 -1
  820. package/cli/app/.next-cli-build/static/chunks/app/landing/{page-4e2e956db07b7959.js → page-0a01ecaa2116b10b.js} +1 -1
  821. package/cli/app/.next-cli-build/static/chunks/app/layout-8a7a8baa77f1b488.js +1 -0
  822. package/cli/app/.next-cli-build/static/chunks/app/login/page-dda88ecbdba79a80.js +1 -0
  823. package/cli/app/.next-cli-build/static/chunks/{main-app-88e09177034d71e7.js → main-app-e20479f3b5d674b0.js} +1 -1
  824. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-db43f3befc51b654.js +1 -0
  825. package/cli/app/CHANGELOG.md +16 -0
  826. package/cli/app/package.json +1 -1
  827. package/cli/app/standalone_modules/next/dist/compiled/@next/font/dist/google/find-font-files-in-css.js +23 -0
  828. package/cli/app/standalone_modules/next/dist/compiled/@next/font/dist/google/loader.js +2 -2
  829. package/cli/package.json +1 -1
  830. package/package.json +1 -1
  831. package/cli/app/.next-cli-build/server/chunks/1384.js +0 -1
  832. package/cli/app/.next-cli-build/server/chunks/4039.js +0 -1
  833. package/cli/app/.next-cli-build/server/chunks/5469.js +0 -1
  834. package/cli/app/.next-cli-build/static/chunks/523-3899a7f5cde3f3e8.js +0 -3
  835. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-f7c8c91f9fb6de93.js +0 -1
  836. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-f5fc4b8a8801e804.js +0 -1
  837. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-bccb233dc48b2cf1.js +0 -1
  838. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a2bfbf57ba4e0369.js +0 -1
  839. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-58c9f8c35b7eaed8.js +0 -1
  840. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a1e30adbdbf2cafd.js +0 -1
  841. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-39062565f11d2c60.js +0 -1
  842. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-92cf3c5c13a0ea25.js +0 -1
  843. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-27ec8458a4c8bcb2.js +0 -1
  844. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-e629adca114de10a.js +0 -1
  845. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-a0e271ee32723312.js +0 -1
  846. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-608c603e6ece959c.js +0 -1
  847. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-b523fbffb64dcdae.js +0 -1
  848. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-511564f8398ceb23.js +0 -1
  849. package/cli/app/.next-cli-build/static/chunks/app/_not-found/page-499de2bdd91e139f.js +0 -1
  850. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-847859b983aaa314.js +0 -1
  851. package/cli/app/.next-cli-build/static/chunks/app/layout-f31fedc5a6f6c6a1.js +0 -1
  852. package/cli/app/.next-cli-build/static/chunks/app/login/page-764e655e11326b92.js +0 -1
  853. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-06f8cd887d9b83e5.js +0 -1
  854. /package/cli/app/.next-cli-build/static/{3-eQhzZSwRODZv8TdZa2x → p5nLDGqmrEZKLp2847bs8}/_buildManifest.js +0 -0
  855. /package/cli/app/.next-cli-build/static/{3-eQhzZSwRODZv8TdZa2x → p5nLDGqmrEZKLp2847bs8}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6202],{6202:(e,t,s)=>{Promise.resolve().then(s.bind(s,17907))},17907:(e,t,s)=>{"use strict";s.d(t,{default:()=>p});var a=s(95155),l=s(12115),n=s(14051),r=s.n(n),i=s(35497),o=s(11059),c=s(66430),d=s(40728);let m=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}];async function u(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(5e3)})).ok}catch{return!1}}async function x(...e){let t=e.filter(Boolean).map(u);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}function p({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)([]),[h,k]=(0,l.useState)(!0),[w,v]=(0,l.useState)(!1),[N,C]=(0,l.useState)(""),[S,$]=(0,l.useState)(null),[T,P]=(0,l.useState)(null),[I,_]=(0,l.useState)(null),[A,E]=(0,l.useState)(null),[O,R]=(0,l.useState)(null),[U,z]=(0,l.useState)(null),[D,F]=(0,l.useState)(null),[L,W]=(0,l.useState)(()=>new Set),[q,M]=(0,l.useState)(()=>({})),[K,B]=(0,l.useState)(!1),[J,H]=(0,l.useState)(!0),[V,Z]=(0,l.useState)(!0),[G,Q]=(0,l.useState)(!1),[Y,X]=(0,l.useState)(!0),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(!1),[el,en]=(0,l.useState)(""),[er,ei]=(0,l.useState)(""),[eo,ec]=(0,l.useState)(!1),[ed,em]=(0,l.useState)(""),[eu,ex]=(0,l.useState)(null),[ep,eh]=(0,l.useState)(!1),[ey,eb]=(0,l.useState)(!1),[eg,ef]=(0,l.useState)(!1),[ej,ek]=(0,l.useState)(!1),[ew,ev]=(0,l.useState)(""),[eN,eC]=(0,l.useState)(!1),[eS,e$]=(0,l.useState)(""),[eT,eP]=(0,l.useState)(null),[eI,e_]=(0,l.useState)(""),[eA,eE]=(0,l.useState)(""),[eO,eR]=(0,l.useState)(null),[eU,ez]=(0,l.useState)(!1),[eD,eF]=(0,l.useState)([]),[eL,eW]=(0,l.useState)(""),[eq,eM]=(0,l.useState)(!1),[eK,eB]=(0,l.useState)(!1),[eJ,eH]=(0,l.useState)(!1),eV=(0,l.useRef)(null),eZ=(0,l.useRef)(0),eG=(0,l.useRef)(0),eQ=(0,l.useRef)(0),eY=(0,l.useRef)(0),eX=(0,l.useRef)(!1),e0=(0,l.useRef)(!1),e1=(0,l.useRef)(!1),e5=(0,l.useRef)(!1),[e2,e4]=(0,l.useState)(!1),[e3,e8]=(0,l.useState)(!1),[e6,e7]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e7(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:e9,copy:te}=(0,o.C)(),tt=!J||!V,ts=J?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eV.current&&(eV.current.scrollTop=eV.current.scrollHeight)},[eD]),(0,l.useEffect)(()=>{to(),tn()},[]),(0,l.useEffect)(()=>{if(!(ee||eg))return;let e=!ee||es,t=!eg||ej,s=()=>{document.hidden||tl()};document.addEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||tl()},e&&t?3e4:5e3);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[ee,eg,es,ej]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(ee&&(el||er)){let e=await x(er,el);eX.current=e,e?(eQ.current=0,ea(!0),e1.current||(e1.current=!0,e4(!0))):(eQ.current+=1,eQ.current>=5&&ea(!1))}else eX.current=!1;if(eg&&ew){let e=await u(ew);e0.current=e,e?(eY.current=0,ek(!0),e5.current||(e5.current=!0,e8(!0))):(eY.current+=1,eY.current>=5&&ek(!1))}else e0.current=!1}};if(!(ee&&(el||er)||eg&&ew))return;e();let t=!eg||ej,s=setInterval(e,(!ee||es)&&t?6e4:1e4);return()=>clearInterval(s)},[ee,el,er,eg,ew,es,ej]);let ta=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=5&&a(!1))},[]),tl=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";en(a),ei(t.tunnel?.publicUrl||""),et(s),ta(null,eX,eQ,ea,e1,e4);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";ev(n),ef(l),ta(null,e0,eY,ek,e5,e8)}catch{}},tn=async()=>{X(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();B(t.requireApiKey||!1),H(!1!==t.requireLogin),Z(t.hasPassword||!1),Q(t.tunnelDashboardAccess||!1)}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";en(a),ei(e.tunnel?.publicUrl||""),et(s),ta(null,eX,eQ,ea,e1,e4);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";ev(n),ef(l),ta(null,e0,eY,ek,e5,e8)}}catch(e){console.log("Error loading settings:",e)}finally{X(!1)}},tr=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&Q(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},ti=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&B(e)}catch(e){console.log("Error updating requireApiKey:",e)}},to=async()=>{try{let[e,t]=await Promise.all([fetch("/api/keys"),(0,c.b7)("providers:list",d.t7)]),a=await e.json();e.ok&&s(a.keys||[]),r(t.connections||[])}catch(e){console.log("Error fetching data:",e)}finally{k(!1)}},tc=async(e,...t)=>{let s=()=>eZ.current===e;ec(!0),em("Waiting for tunnel ready...");let a=t.filter(Boolean).map(e=>`${e}/api/health`),l=Date.now();for(;Date.now()-l<3e5;){if(await new Promise(e=>setTimeout(e,2e3)),!s())return!1;let e=await Promise.any(a.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1);if(!s())return!1;if(e)return et(!0),ec(!1),em(""),!0;if((Date.now()-l)%1e4<2e3)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return ex({type:"error",message:"Tunnel process stopped unexpectedly."}),ec(!1),em(""),!1}}catch{}}return ex({type:"error",message:"Tunnel created but not reachable. Please try again."}),ec(!1),em(""),!1},td=async()=>{eh(!1);let e=eZ.current+1;eZ.current=e;let t=()=>eZ.current===e;ec(!0),ex(null),em("Creating tunnel...");let s=!0;(async()=>{for(;s&&t();){try{let e=await fetch("/api/tunnel/status");if(e.ok){let a=await e.json();a.download?.downloading?em(`Downloading cloudflared... ${a.download.progress}%`):s&&t()&&em("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let a=await fetch("/api/tunnel/enable",{method:"POST"});s=!1;let l=await a.json();if(!t())return;if(!a.ok)return void ex({type:"error",message:l.error||"Failed to enable tunnel"});let n=l.tunnelUrl;if(!n)return void ex({type:"error",message:"No tunnel URL returned"});en(n),ei(l.publicUrl||""),await tc(e,l.publicUrl,n)}catch(e){t()&&ex({type:"error",message:e.message})}finally{s=!1,t()&&(ec(!1),em(""))}},tm=async()=>{ec(!0),ex(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(et(!1),en(""),eb(!1),ex({type:"success",message:"Tunnel disabled"})):ex({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){ex({type:"error",message:e.message})}finally{ec(!1)}},tu=async()=>{eR(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eR(t.installed),t}}catch{}return eR(!1),{installed:!1}},tx=async()=>{ez(!0),eP(null),eF([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eL})});if(eW(""),!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||`Install failed (${e.status})`)}let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)eF(e=>[...e.slice(-50),a.message]);else if("done"===s){eR(!0),ez(!1),eB(!1),tb();return}else"error"===s&&eP({type:"error",message:a.error||"Install failed"})}}}catch(e){eP({type:"error",message:e.message})}finally{ez(!1)}},tp=async(e,t)=>{let s=()=>eG.current===e;e$("Waiting for Tailscale ready...");let a=`${t}/api/health`,l=Date.now();for(;Date.now()-l<3e5&&(await new Promise(e=>setTimeout(e,2e3)),s());)try{let e=await fetch(a,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}return!1},th=(e,t)=>{e_(e),eE(t)},ty=()=>{e_(""),eE("")},tb=async()=>{eB(!1);let e=eG.current+1;eG.current=e;let t=()=>eG.current===e;eM(!0),eC(!0),eP(null),e$("Connecting..."),ty();try{let s=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),a=await s.json();if(!t())return;if(s.ok&&a.success){ev(a.tunnelUrl||"");let s=await tp(e,a.tunnelUrl);if(!t())return;ef(!0),eP(s?null:{type:"warning",message:"Connected but not reachable yet."});return}if(a.needsLogin&&a.authUrl){th(a.authUrl,"Open Login Page"),e$('Login required — click "Open Login Page" to continue');for(let s=0;s<40;s++){if(await new Promise(e=>setTimeout(e,3e3)),!t())return;try{let s=await fetch("/api/tunnel/tailscale-check");if(s.ok&&(await s.json()).loggedIn){ty(),e$("Starting funnel...");let s=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),a=await s.json();if(!t())return;if(s.ok&&a.success){ev(a.tunnelUrl||"");let s=await tp(e,a.tunnelUrl);if(!t())return;ef(!0),eP(s?null:{type:"warning",message:"Connected but not reachable yet."})}else a.funnelNotEnabled&&a.enableUrl?await tg(e,a.enableUrl):eP({type:"error",message:a.error||"Failed to start funnel"});return}}catch{}}ty(),eP({type:"error",message:"Login timed out. Please try again."});return}if(a.funnelNotEnabled&&a.enableUrl)return void await tg(e,a.enableUrl);eP({type:"error",message:a.error||"Failed to connect"})}catch(e){t()&&eP({type:"error",message:e.message})}finally{t()&&(eC(!1),eM(!1),e$(""),ty())}},tg=async(e,t)=>{let s=()=>eG.current===e;th(t,"Open Funnel Settings"),e$('Click "Open Funnel Settings" to enable Funnel...');for(let t=0;t<40;t++){if(await new Promise(e=>setTimeout(e,3e3)),!s())return;try{let t=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),a=await t.json();if(!s())return;if(t.ok&&a.success){ty(),ev(a.tunnelUrl||"");let t=await tp(e,a.tunnelUrl);if(!s())return;ef(!0),eP(t?null:{type:"warning",message:"Connected but not reachable yet."});return}if(a.funnelNotEnabled)continue;if(a.error){ty(),eP({type:"error",message:a.error});return}}catch{}}ty(),eP({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tf=async()=>{eC(!0),eP(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(ef(!1),ev(""),eH(!1),eP({type:"success",message:"Tailscale disabled"})):eP({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eP({type:"error",message:e.message})}finally{eC(!1)}},tj=async()=>{eP(null),eF([]);let e=await tu();e?.installed&&e?.hasCachedPassword?tb():eB(!0)},tk=async e=>{if(e.preventDefault(),N.trim()&&!I){_("create"),E(null);try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:N})}),t=await e.json();if(!e.ok)throw Error(t.error||`Failed to create key (${e.status})`);$(t.key),t.id&&t.key&&M(e=>({...e,[t.id]:t.key})),await to(),C(""),v(!1),E({type:"success",message:"API key created"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}}},tw=async(e,t)=>{if(!I){_(`toggle:${e}`),E(null);try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(!a.ok)throw Error(`Failed to update key (${a.status})`);s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s)),E({type:"success",message:"API key updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}}},tv=async(e,t,a)=>{if(I)return;let l=""===a?0:Math.max(0,Number(a)||0),n="tokenLimit"===t||"usedTokens"===t?Math.floor(l):l;_(`budget:${e}`),E(null);try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:n})});if(!a.ok)throw Error(`Failed to update budget (${a.status})`);s(s=>s.map(s=>s.id===e?{...s,[t]:n}:s)),E({type:"success",message:"tokenLimit"===t?"Token limit updated":"usedTokens"===t?"Token usage reset":"Budget updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},tN=async()=>{if(!O||I)return;let{keyId:e,selected:t}=O,a=[...t];_(`connections:${e}`),E(null);try{let t=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedConnectionIds:a})}),l=await t.json().catch(()=>({}));if(!t.ok)throw Error(l.error||`Failed to update provider access (${t.status})`);s(t=>t.map(t=>t.id===e?{...t,allowedConnectionIds:a}:t)),R(null),E({type:"success",message:"Provider access updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},tC=async e=>{z({keyId:e.id,keyName:e.name,selected:new Set(e.allowedCombos||[]),combos:[],loading:!0});try{let t=await fetch("/api/combos",{cache:"no-store"}),s=t.ok?await t.json():{};z(t=>t?.keyId===e.id?{...t,combos:s.combos||[],loading:!1}:t)}catch{z(t=>t?.keyId===e.id?{...t,loading:!1}:t)}},tS=async()=>{if(!U||I)return;let{keyId:e,selected:t}=U,a=[...t];_(`combos:${e}`),E(null);try{let t=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedCombos:a})}),l=await t.json().catch(()=>({}));if(!t.ok)throw Error(l.error||`Failed to update combo access (${t.status})`);s(t=>t.map(t=>t.id===e?{...t,allowedCombos:a}:t)),z(null),E({type:"success",message:"Combo access updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},t$=async e=>{F({keyId:e.id,keyName:e.name,selected:[...e.allowedModels||[]],aliases:{},pickerOpen:!1});try{let t=await fetch("/api/models/alias",{cache:"no-store"}),s=t.ok?await t.json():{};F(t=>t?.keyId===e.id?{...t,aliases:s.aliases||{}}:t)}catch{}},tT=e=>{let t=(Array.isArray(e)?e:[e]).map(e=>"string"==typeof e?e.trim():"").filter(Boolean);0!==t.length&&F(e=>{if(!e)return e;let s=[...e.selected];for(let e of t)s.some(t=>t.toLowerCase()===e.toLowerCase())||s.push(e);return{...e,selected:s}})},tP=e=>{let t="string"==typeof e?e.trim().toLowerCase():"";t&&F(e=>e?{...e,selected:e.selected.filter(e=>e.toLowerCase()!==t)}:e)},tI=async()=>{if(!D||I)return;let{keyId:e,selected:t}=D;_(`models:${e}`),E(null);try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedModels:t})}),l=await a.json().catch(()=>({}));if(!a.ok)throw Error(l.error||`Failed to update model access (${a.status})`);s(s=>s.map(s=>s.id===e?{...s,allowedModels:t}:s)),F(null),E({type:"success",message:"Model access updated"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}},t_=async e=>{if(q[e])return q[e];let t=await fetch(`/api/keys/${e}?reveal=1`,{cache:"no-store"}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||`Failed to reveal key (${t.status})`);let a=s.key?.key||s.key;if("string"!=typeof a||!a)throw Error("Key secret is not available");return M(t=>({...t,[e]:a})),a},tA=async e=>{if(L.has(e))return void W(t=>{let s=new Set(t);return s.delete(e),s});try{await t_(e),W(t=>{let s=new Set(t);return s.add(e),s}),E(null)}catch(e){E({type:"error",message:e.message})}},tE=async e=>{try{let t=await t_(e);te(t,e),E(null)}catch(e){E({type:"error",message:e.message})}},[tO,tR]=(0,l.useState)("/v1");if((0,l.useEffect)(()=>{tR(`${window.location.origin}/v1`)},[]),h)return(0,a.jsxs)("div",{className:"flex flex-col gap-6 lg:gap-7",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]});let tU={local_url:"Local endpoint",tunnel_url:"Cloudflare Tunnel endpoint",ts_url:"Tailscale endpoint"}[e9]||"",tz=n.reduce((e,t)=>{let s=t.provider||"other";return e[s]||(e[s]=[]),e[s].push(t),e},{});return(0,a.jsxs)("div",{className:"flex flex-col gap-6 lg:gap-7",children:[(0,a.jsxs)(i.Zp,{padding:"none",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-t-[13px] border-b border-border-subtle bg-linear-to-r from-primary/[0.07] via-primary/[0.025] to-transparent px-4 py-4 sm:px-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined flex size-11 shrink-0 items-center justify-center rounded-xl bg-primary/12 text-[22px] text-primary ring-1 ring-primary/15",children:"terminal"}),(0,a.jsx)(i.w,{title:"API Endpoint",description:"Choose how local and remote clients connect to Zevai Router.",className:"flex-1"})]}),(0,a.jsxs)("div",{className:"p-4 sm:p-5",children:[(0,a.jsx)("div",{"aria-live":"polite",className:"sr-only",children:tU?`${tU}: Copied to clipboard`:""}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(b,{label:"Local",url:tO,copyId:"local_url",copied:e9,onCopy:te}),(0,a.jsx)(y,{icon:"cloud",label:"Tunnel",hint:"Cloudflare",tone:eo||Y?"busy":ee?es?"online":"warn":eu?.type==="error"?"error":"off",status:eo?"Starting":ee?es?"Online":"Reconnecting":Y?"Checking":"Off",children:ee&&!eo&&es?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{"aria-label":"Cloudflare Tunnel endpoint URL",value:`${er||el}/v1`,readOnly:!0,className:"min-w-0 flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>te(`${er||el}/v1`,"tunnel_url"),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-9 sm:rounded-lg","aria-label":"Copy Cloudflare Tunnel endpoint URL",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===e9?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eb(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ee||eo||es?eo?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ed||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{eZ.current+=1,ec(!1),em("")},className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eu?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eu.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",className:"min-h-11 shrink-0 sm:min-h-8",onClick:()=>eh(!0),children:"Enable"})]}):Y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>X(!1),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 text-sm text-text-muted",children:"Public HTTPS URL for remote clients."}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",className:"min-h-11 shrink-0 sm:min-h-8",onClick:()=>{tt?ex({type:"error",message:`Security required: ${ts}`}):K?eh(!0):ex({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e2?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>eb(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})}),(0,a.jsx)(y,{icon:"vpn_lock",label:"Tailscale",hint:"Private tailnet",tone:eN||eq?"busy":eg?ej?"online":"warn":eT?.type==="error"?"error":"off",status:eN||eq?"Connecting":eg?ej?"Online":"Reconnecting":"Off",children:eg&&!eN&&ej?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{"aria-label":"Tailscale endpoint URL",value:`${ew}/v1`,readOnly:!0,className:"min-w-0 flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>te(`${ew}/v1`,"ts_url"),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-9 sm:rounded-lg","aria-label":"Copy Tailscale endpoint URL",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===e9?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eH(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!eg||eN||ej?eN||eq?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eS||"Connecting..."]}),eI&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eI,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eA||"Open"}),(0,a.jsx)("button",{onClick:()=>{eG.current+=1,eC(!1),eM(!1),e$(""),ty()},className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eT?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eT.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",className:"min-h-11 shrink-0 sm:min-h-8",onClick:tj,children:"Enable"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"min-w-0 flex-1 text-sm text-text-muted",children:"Reach this router only from your tailnet devices."}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{tt?eP({type:"error",message:`Security required: ${ts}`}):tj()},className:"min-h-11 shrink-0 sm:min-h-8",children:"Enable"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-h-10 min-w-0 flex-1 items-center gap-2 rounded-lg border px-3 py-2 border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e3?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>eH(!0),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 sm:size-9 sm:rounded-lg",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})})]}),tt&&!ee&&!eg&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(j,{message:ts,action:{label:"Open settings",href:"/dashboard/profile"}})}),(ee||eg)&&(0,a.jsxs)("div",{className:"mt-4 overflow-hidden rounded-xl border border-border-subtle bg-surface-2/30",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle px-3.5 py-2.5 sm:px-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"shield"}),(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-[0.08em] text-text-muted",children:"Remote access"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 p-3 sm:p-4",children:[!K&&(0,a.jsx)(j,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!J||!V)&&(0,a.jsx)(j,{message:J?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:J?"Change password":"Enable",href:"/dashboard/profile"}}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-border-subtle bg-bg/60 px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(i.lM,{touchTarget:!0,label:"Allow dashboard access via tunnel",checked:G,onChange:()=>tr(!G)}),(0,a.jsx)(f,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]}),(0,a.jsx)("span",{className:`shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${G?"bg-amber-500/10 text-amber-600 dark:text-amber-400":"bg-surface-2 text-text-muted"}`,children:G?"Exposed":"API only"})]})]})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined flex size-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-[21px] text-primary ring-1 ring-primary/15",children:"vpn_key"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:"API Keys"}),(0,a.jsxs)("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-text-muted ring-1 ring-border-subtle",children:[t.length," ",1===t.length?"key":"keys"]})]}),(0,a.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Control authentication and spending per client."})]})]}),t.length>0&&(0,a.jsx)(i.$n,{icon:"add",onClick:()=>v(!0),className:"w-full sm:w-auto",children:"Create Key"})]}),A&&(0,a.jsx)(i.Gi,{tone:A.type,className:"mb-4",children:A.message}),(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-xl border border-primary/15 bg-primary/[0.045] p-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-surface text-[17px] text-primary ring-1 ring-border-subtle",children:"shield_lock"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:"Reject requests that do not include a valid client key."})]})]}),(0,a.jsx)("div",{className:"shrink-0 self-end sm:self-auto",children:(0,a.jsx)(i.lM,{touchTarget:!0,label:"Require API key",checked:K,onChange:()=>ti(!K)})})]}),e6&&!K&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(j,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsx)(i.pp,{icon:"vpn_key",title:"No API keys yet",description:"Create a key to authenticate clients and control their access.",action:(0,a.jsx)(i.$n,{icon:"add",onClick:()=>v(!0),children:"Create Key"})}):(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:t.map(e=>{var t,l;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-xl border border-border-subtle bg-surface-2/25 p-4 transition-[border-color,box-shadow,opacity] hover:border-primary/20 hover:shadow-[0_14px_28px_-26px_rgba(15,23,42,0.65)] ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1 min-w-0",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono truncate max-w-[min(100%,28rem)]",children:(t=e,L.has(t.id)&&q[t.id]?q[t.id]:t.maskedKey||((l=t.key)?l.length>8?l.slice(0,8)+"...":l:"")||"••••••••")}),(0,a.jsx)("button",{type:"button",onClick:()=>tA(e.id),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted opacity-100 transition-all hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-7 sm:rounded-lg sm:opacity-0 sm:group-hover:opacity-100",title:L.has(e.id)?"Hide key":"Show key","aria-label":L.has(e.id)?"Hide API key":"Show API key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:L.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{type:"button",onClick:()=>tE(e.id),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted opacity-100 transition-all hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-7 sm:rounded-lg sm:opacity-0 sm:group-hover:opacity-100",title:"Copy key","aria-label":"Copy API key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e9===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:["Daily $",(0,a.jsx)("input",{type:"number",min:"0",step:"0.01",disabled:I===`budget:${e.id}`,defaultValue:e.budgetDaily||0,onBlur:t=>tv(e.id,"budgetDaily",t.target.value),className:"w-16 rounded border border-border bg-surface px-1 py-0.5 text-[11px]",title:"Daily budget cap in USD (0 = unlimited)"},`daily-${e.budgetDaily||0}`)]}),(0,a.jsxs)("label",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:["Tokens",(0,a.jsx)("input",{type:"number",min:"0",step:"1",disabled:I===`budget:${e.id}`,defaultValue:e.tokenLimit||0,onBlur:t=>tv(e.id,"tokenLimit",t.target.value),className:"w-20 rounded border border-border bg-surface px-1 py-0.5 text-[11px]",title:"Lifetime token cap for this key (0 = unlimited)"},`tokens-${e.tokenLimit||0}`)]}),(Number(e.usedTokens)>0||Number(e.tokenLimit)>0)&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:[(Number(e.usedTokens)||0).toLocaleString()," used",Number(e.usedTokens)>0&&(0,a.jsx)("button",{type:"button",disabled:I===`budget:${e.id}`,onClick:()=>tv(e.id,"usedTokens",0),className:"ml-1 text-primary hover:underline disabled:opacity-50",children:"Reset"})]}),(0,a.jsxs)("label",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:["Monthly $",(0,a.jsx)("input",{type:"number",min:"0",step:"0.01",disabled:I===`budget:${e.id}`,defaultValue:e.budgetMonthly||0,onBlur:t=>tv(e.id,"budgetMonthly",t.target.value),className:"w-16 rounded border border-border bg-surface px-1 py-0.5 text-[11px]",title:"Monthly budget cap in USD (0 = unlimited)"},`monthly-${e.budgetMonthly||0}`)]}),(0,a.jsxs)("button",{type:"button",disabled:I===`connections:${e.id}`,onClick:()=>{R({keyId:e.id,keyName:e.name,selected:new Set(e.allowedConnectionIds||[])})},className:"inline-flex min-h-8 items-center gap-1.5 rounded-lg border border-border bg-surface px-2.5 py-1 text-[11px] font-medium text-text-muted transition-colors hover:border-primary/40 hover:text-primary disabled:opacity-50",title:"Restrict this API key to selected provider connections",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"account_tree"}),(e.allowedConnectionIds||[]).length>0?`${e.allowedConnectionIds.length} connection${1===e.allowedConnectionIds.length?"":"s"}`:"All connections"]}),(0,a.jsxs)("button",{type:"button",disabled:I===`combos:${e.id}`,onClick:()=>tC(e),className:"inline-flex min-h-8 items-center gap-1.5 rounded-lg border border-border bg-surface px-2.5 py-1 text-[11px] font-medium text-text-muted transition-colors hover:border-primary/40 hover:text-primary disabled:opacity-50",title:"Restrict this API key to selected combos",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"layers"}),(e.allowedCombos||[]).length>0?`${e.allowedCombos.length} combo${1===e.allowedCombos.length?"":"s"}`:"All combos"]}),(0,a.jsxs)("button",{type:"button",disabled:I===`models:${e.id}`,onClick:()=>t$(e),className:"inline-flex min-h-8 items-center gap-1.5 rounded-lg border border-border bg-surface px-2.5 py-1 text-[11px] font-medium text-text-muted transition-colors hover:border-primary/40 hover:text-primary disabled:opacity-50",title:"Restrict this API key to selected models",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"model_training"}),(e.allowedModels||[]).length>0?`${e.allowedModels.length} model${1===e.allowedModels.length?"":"s"}`:"All models"]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex size-11 items-center justify-center sm:size-auto",children:(0,a.jsx)(i.lM,{size:"sm",touchTarget:!0,disabled:I===`toggle:${e.id}`,checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?P({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
+
3
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{P(null),tw(e.id,t)}}):tw(e.id,t)},title:e.isActive?"Pause key":"Resume key"})}),(0,a.jsx)("button",{disabled:I===`delete:${e.id}`,onClick:()=>{var t;return t=e.id,void(!I&&P({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{P(null),_(`delete:${t}`),E(null);try{let e=await fetch(`/api/keys/${t}`,{method:"DELETE"});if(!e.ok)throw Error(`Failed to delete key (${e.status})`);s(e=>e.filter(e=>e.id!==t)),W(e=>{let s=new Set(e);return s.delete(t),s}),M(e=>{if(!(t in e))return e;let s={...e};return delete s[t],s}),E({type:"success",message:"API key deleted"})}catch(e){E({type:"error",message:e.message})}finally{_(null)}}}))},className:"flex size-11 items-center justify-center rounded-xl text-red-500 opacity-100 transition-all hover:bg-red-500/10 sm:size-9 sm:rounded-lg sm:opacity-0 sm:group-hover:opacity-100","aria-label":`Delete ${e.name}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:!!O,title:"Provider Access",onClose:()=>{I?.startsWith("connections:")||R(null)},children:O&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-primary/15 bg-primary/[0.045] p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:O.keyName}),(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Empty selection keeps the current unrestricted behavior. Once selected, routing, fallback, and combos can only use these connections."})]}),0===n.length?(0,a.jsx)("p",{className:"rounded-xl border border-dashed border-border p-5 text-center text-sm text-text-muted",children:"No provider connections are configured yet."}):(0,a.jsx)("div",{className:"max-h-[min(28rem,60vh)] space-y-3 overflow-y-auto pr-1",children:Object.entries(tz).map(([e,t])=>(0,a.jsxs)("div",{className:"rounded-xl border border-border-subtle bg-surface-2/25 p-3",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,a.jsx)("div",{className:"space-y-1.5",children:t.map(e=>{let t=O.selected.has(e.id),s=e.displayName||e.name||e.email||e.id;return(0,a.jsxs)("label",{className:"flex min-h-11 cursor-pointer items-center gap-3 rounded-lg px-2 py-1.5 transition-colors hover:bg-surface",children:[(0,a.jsx)("input",{type:"checkbox",checked:t,onChange:()=>{var t;return t=e.id,void R(e=>{if(!e)return e;let s=new Set(e.selected);return s.has(t)?s.delete(t):s.add(t),{...e,selected:s}})},className:"size-4 accent-primary"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate text-sm text-text-main",children:s}),(0,a.jsx)("span",{className:"block truncate font-mono text-[10px] text-text-muted",children:e.id})]}),!1===e.isActive&&(0,a.jsx)("span",{className:"rounded-full bg-orange-500/10 px-2 py-0.5 text-[10px] text-orange-500",children:"Paused"})]},e.id)})})]},e))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{fullWidth:!0,onClick:tN,disabled:I===`connections:${O.keyId}`,children:I===`connections:${O.keyId}`?"Saving...":"Save access"}),(0,a.jsx)(i.$n,{fullWidth:!0,variant:"ghost",disabled:I===`connections:${O.keyId}`,onClick:()=>R(null),children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!U,title:"Combo Access",onClose:()=>{I?.startsWith("combos:")||z(null)},children:U&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[U.keyName,": an empty selection keeps every combo available."]}),U.loading?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Loading combos..."}):0===U.combos.length?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No combos are configured yet."}):(0,a.jsx)("div",{className:"max-h-80 space-y-1.5 overflow-y-auto",children:U.combos.map(e=>(0,a.jsxs)("label",{className:"flex min-h-11 cursor-pointer items-center gap-3 rounded-lg px-2 py-1.5 hover:bg-surface",children:[(0,a.jsx)("input",{type:"checkbox",checked:U.selected.has(e.name),onChange:()=>{var t;return t=e.name,void z(e=>{if(!e)return e;let s=new Set(e.selected);return s.has(t)?s.delete(t):s.add(t),{...e,selected:s}})},className:"size-4 accent-primary"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name})]},e.id||e.name))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{fullWidth:!0,onClick:tS,disabled:I===`combos:${U.keyId}`,children:I===`combos:${U.keyId}`?"Saving...":"Save access"}),(0,a.jsx)(i.$n,{fullWidth:!0,variant:"ghost",onClick:()=>z(null),disabled:I===`combos:${U.keyId}`,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!D,title:"Model Access",onClose:()=>{I?.startsWith("models:")||F(null)},children:D&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[D.keyName,": an empty selection keeps every model available. A combo can run only when each of its models is allowed. Patterns such as ",(0,a.jsx)("span",{className:"font-mono",children:"oc/*"})," or ",(0,a.jsx)("span",{className:"font-mono",children:"!opus"})," are allowed. A deny-only list stays open except for those names."]}),0===D.selected.length?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No model restriction yet."}):(0,a.jsx)("div",{className:"flex max-h-48 flex-wrap gap-1.5 overflow-y-auto",children:D.selected.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>tP(e),className:"inline-flex items-center gap-1 rounded-lg border border-border bg-surface px-2 py-1 font-mono text-[11px] text-text-main",title:`Remove ${e}`,children:[(0,a.jsx)("span",{className:"max-w-52 truncate",children:e}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"close"})]},e))}),(0,a.jsxs)("form",{className:"flex gap-2",onSubmit:e=>{e.preventDefault();let t=e.currentTarget.elements.namedItem("modelPattern");tT(t&&"value"in t?String(t.value):""),t&&"value"in t&&(t.value="")},children:[(0,a.jsx)("input",{name:"modelPattern",placeholder:"oc/* or !opus",className:"min-w-0 flex-1 rounded border border-border bg-surface px-2 py-1.5 font-mono text-xs"}),(0,a.jsx)(i.$n,{type:"submit",variant:"secondary",children:"Add pattern"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{fullWidth:!0,variant:"secondary",onClick:()=>F(e=>e?{...e,pickerOpen:!0}:e),children:"Add model"}),(0,a.jsx)(i.$n,{fullWidth:!0,onClick:tI,disabled:I===`models:${D.keyId}`,children:I===`models:${D.keyId}`?"Saving...":"Save access"})]})]})}),D?.pickerOpen&&(0,a.jsx)(i.rq,{isOpen:!0,onClose:()=>F(e=>e?{...e,pickerOpen:!1}:e),onSelect:e=>tT(e?.value),onDeselect:e=>tP(e?.value),onSelectBatch:e=>tT(e.map(e=>e?.value)),onDeselectBatch:e=>e.forEach(e=>tP(e?.value)),activeProviders:n,modelAliases:D.aliases,title:`Models for ${D.keyName}`,addedModelValues:D.selected,includeCombos:!1,closeOnSelect:!1}),(0,a.jsx)(i.aF,{isOpen:w,title:"Create API Key",onClose:()=>{v(!1),C("")},children:(0,a.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:tk,children:[(0,a.jsx)(i.pd,{label:"Key Name",value:N,onChange:e=>C(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{type:"submit",fullWidth:!0,disabled:!N.trim()||"create"===I,children:"create"===I?"Creating...":"Create"}),(0,a.jsx)(i.$n,{type:"button",onClick:()=>{v(!1),C("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!S,title:"API Key Created",onClose:()=>$(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"Store this key securely. You can view or copy it later from the API Keys list."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:S||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===e9?"check":"content_copy",onClick:()=>te(S,"created_key"),children:"created_key"===e9?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>$(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:ep,title:"Enable Tunnel",onClose:()=>eh(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local ZevaiRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:m.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:td,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>eh(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:ey,title:"Disable Tunnel",onClose:()=>!eo&&eb(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tm,fullWidth:!0,disabled:eo,variant:"danger",children:eo?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eb(!1),variant:"ghost",fullWidth:!0,disabled:eo,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eK,title:"Tailscale Funnel",onClose:()=>{eU||(eB(!1),eW(""),eP(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eO&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eO&&!eU&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tx,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eB(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eU&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eD.length>0&&(0,a.jsx)("div",{ref:eV,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eD.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eO&&!eU&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tb(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eB(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eT&&(0,a.jsx)(g,{status:eT})]})}),(0,a.jsx)(i.aF,{isOpen:eJ,title:"Disable Tailscale",onClose:()=>!eN&&eH(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tf,fullWidth:!0,disabled:eN,variant:"danger",children:eN?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eH(!1),variant:"ghost",fullWidth:!0,disabled:eN,children:"Cancel"})]})]})}),(0,a.jsx)(i.uo,{isOpen:!!T,onClose:()=>P(null),onConfirm:T?.onConfirm,title:T?.title||"Confirm",message:T?.message,variant:"danger"})]})}let h={online:{dot:"bg-emerald-500",text:"text-emerald-600 dark:text-emerald-400",icon:"bg-primary/10 text-primary ring-primary/20"},busy:{dot:"bg-sky-500 animate-pulse",text:"text-sky-600 dark:text-sky-400",icon:"bg-sky-500/10 text-sky-600 ring-sky-500/20 dark:text-sky-400"},warn:{dot:"bg-amber-500 animate-pulse",text:"text-amber-600 dark:text-amber-400",icon:"bg-amber-500/10 text-amber-600 ring-amber-500/20 dark:text-amber-400"},error:{dot:"bg-red-500",text:"text-red-600 dark:text-red-400",icon:"bg-red-500/10 text-red-500 ring-red-500/20"},off:{dot:"bg-text-muted/40",text:"text-text-muted",icon:"bg-surface-2 text-text-muted ring-border-subtle"}};function y({icon:e,label:t,hint:s,status:l,tone:n="off",children:r}){let i=h[n]||h.off;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 rounded-xl border border-border-subtle bg-bg/55 p-3 transition-colors hover:border-primary/25 sm:flex-row sm:items-center sm:gap-4 sm:p-3.5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:w-[184px] sm:shrink-0",children:[(0,a.jsx)("span",{className:`material-symbols-outlined flex size-10 shrink-0 items-center justify-center rounded-lg text-[20px] ring-1 ${i.icon}`,children:e}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"text-sm font-semibold leading-tight text-text-main",children:t})}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 text-[11px] leading-tight",children:[(0,a.jsx)("span",{className:`size-1.5 shrink-0 rounded-full ${i.dot}`,"aria-hidden":"true"}),(0,a.jsx)("span",{className:`font-medium ${i.text}`,children:l}),s&&(0,a.jsxs)("span",{className:"truncate text-text-muted",children:["\xb7 ",s]})]})]})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:r})]})}function b({label:e,url:t,copyId:s,copied:l,onCopy:n,actions:r,icon:o="computer",hint:c="This machine",status:d="Online",tone:m="online"}){return(0,a.jsxs)(y,{icon:o,label:e,hint:c,status:d,tone:m,children:[(0,a.jsx)(i.pd,{"aria-label":`${e} endpoint URL`,value:t,readOnly:!0,className:"min-w-0 flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"flex size-11 shrink-0 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5 sm:size-9 sm:rounded-lg","aria-label":`Copy ${e} endpoint URL`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),r]})}function g({status:e,className:t=""}){return(0,a.jsx)(i.Gi,{tone:e.type,className:t,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function f({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute right-0 top-full z-50 mt-2 w-[min(16rem,calc(100vw-2rem))] rounded bg-gray-900 px-2.5 py-1.5 text-xs text-white opacity-0 shadow-lg transition-opacity group-hover:opacity-100 dark:bg-gray-800",children:e})]})}function j({message:e,action:t}){return(0,a.jsx)(i.Gi,{tone:"warning",action:t&&(0,a.jsx)("a",{href:t.href,className:"inline-flex min-h-11 shrink-0 items-center text-xs font-medium underline hover:opacity-80 sm:min-h-0",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label}),children:e})}p.propTypes={machineId:r().string.isRequired}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9126],{19126:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>C});var a=r(95155),s=r(12115),l=r(9233),n=r(91992),i=r(35497),o=r(28777),d=r(1791);let c="basic-chat.sessions",m="basic-chat.activeSessionId",u="basic-chat.activeProviderId",p="basic-chat.draft",x="basic-chat.temperature",h="basic-chat.systemPrompt",b=[],f=["Explain this project like I'm new","Write a concise PR description","Debug this error message","Summarize the key trade-offs"],g=new Set(["alicode","alicode-intl","anthropic","antigravity","assemblyai","byteplus","cerebras","chutes","claude","cline","clinepass","codex","cohere","deepseek","fireworks","gemini","gemini-cli","github","grok-cli","groq","hyperbolic","kimchi","kiro","mistral","nanobanana","nebius","nvidia","ollama","ollama-local","openai","openrouter","perplexity","perplexity-agent","qoder","qwen","siliconflow","together","vercel-ai-gateway","volcengine-ark","xai"]);function y(){if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID();let e="";for(let t=0;t<8;t+=1)e+=Math.floor(0xffffffff*Math.random()).toString(16).padStart(8,"0");return`chat_${Date.now()}_${e}`}function v(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(v).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function N(e){try{return JSON.stringify(e)}catch{return""}}function w(e=""){let t=v(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function j(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function S(e){let t=e?.provider||e?.id,r=t?d.Q2[t]:null;return r?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(t||"provider")}function I(e){return Array.from(e.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName))}async function k(e,t={},r=8e3){let a=new AbortController,s=setTimeout(()=>a.abort(),r);try{return await fetch(e,{...t,signal:a.signal})}finally{clearTimeout(s)}}async function A(e,t,r){if(!e.length)return[];let a=Array(e.length),s=0,l=Array.from({length:Math.min(t,e.length)},async()=>{for(;s<e.length;){let t=s;s+=1,a[t]=await r(e[t],t)}});return await Promise.all(l),a}function C(){let[e,t]=(0,s.useState)([]),[r,C]=(0,s.useState)(!0),[T,$]=(0,s.useState)(""),[M,D]=(0,s.useState)([]),[E,_]=(0,s.useState)(""),[O,R]=(0,s.useState)(""),[z,U]=(0,s.useState)(""),[q,L]=(0,s.useState)(""),[P,F]=(0,s.useState)([]),[J,B]=(0,s.useState)(!1),[H,W]=(0,s.useState)(""),[K,Y]=(0,s.useState)(""),[G,Q]=(0,s.useState)(!1),[V,Z]=(0,s.useState)(!1),[X,ee]=(0,s.useState)(""),[et,er]=(0,s.useState)(!1),[ea,es]=(0,s.useState)(!1),[el,en]=(0,s.useState)(""),[ei,eo]=(0,s.useState)(.7),[ed,ec]=(0,s.useState)(""),em=(0,s.useRef)(null),eu=(0,s.useRef)(null),ep=(0,s.useRef)(!1),ex=(0,s.useRef)(null),eh=(0,s.useRef)(null),eb=(0,s.useRef)(null),ef=(0,s.useRef)(null),eg=(0,s.useRef)(null),ey=(0,s.useRef)(null),ev=(0,s.useRef)(!1),eN=(0,s.useRef)({sessions:[],activeSessionId:"",activeProviderId:"",draft:""});(0,s.useEffect)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(c),[]),t=Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[],r=globalThis.localStorage.getItem(x),a=null===r?0/0:Number(r);D(t),_(globalThis.localStorage.getItem(m)||""),R(globalThis.localStorage.getItem(u)||""),L(globalThis.localStorage.getItem(p)||""),eo(Number.isFinite(a)?Math.min(2,Math.max(0,a)):.7),ec(globalThis.localStorage.getItem(h)||"")}catch{}finally{Q(!0)}},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){C(!0),$("");try{let r=await k("/api/providers",{cache:"no-store"},15e3),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),$("No providers connected yet."),C(!1));return}let l=new Map,n=[];for(let e of s){let t=e.provider||e.id,r=S(e),a=(0,d.mq)(t)?"openai-compatible":(0,d.gb)(t)?"anthropic-compatible":t;if(!l.has(t)){l.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=(0,o.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:S(e),source:"static"}:null).filter(Boolean);l.get(t).models.push(...s),0===s.length&&function(e){let t=e?.provider;return!!t&&(!!g.has(t)||!!e?.providerSpecificData?.baseUrl&&((0,d.mq)(t)||(0,d.gb)(t)))}(e)&&n.push(e)}let s=l.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e)}let i=I(l);e||(t(i),0===i.length?$("Loading live models…"):$(""),C(!1));let c=await A(n,6,async t=>{if(e)return{connection:t,models:[]};try{let e=await k(`/api/providers/${t.id}/models`,{cache:"no-store"},8e3),r=await e.json().catch(()=>({}));if(!e.ok)return{connection:t,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(e=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,d.mq)(t.provider)||(0,d.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:S(t),source:"live"}})(e,t)).filter(Boolean);return{connection:t,models:a}}catch{return{connection:t,models:[]}}});if(e)return;for(let e of c){let t=e.connection.provider||e.connection.id,r=l.get(t);r&&e.models?.length&&r.models.push(...e.models)}let m=I(l);e||(t(m),0===m.length?$("Providers connected but no models available."):$(""))}catch(r){e||($(v(r?.message)||"Failed to load providers/models."),t([]),C(!1))}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{ex.current&&!ex.current.contains(e.target)&&Z(!1),eh.current&&!eh.current.contains(e.target)&&er(!1),eb.current&&!eb.current.contains(e.target)&&es(!1)},t=e=>{"Escape"===e.key&&(Z(!1),ee(""),es(!1),er(!1))};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[]),(0,s.useEffect)(()=>{if(G)try{globalThis.localStorage.setItem(x,String(ei))}catch{}},[G,ei]),(0,s.useEffect)(()=>{if(G)try{globalThis.localStorage.setItem(h,ed)}catch{}},[G,ed]);let ew=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),ej=(0,s.useMemo)(()=>e.find(e=>e.providerId===O)||e[0]||null,[e,O]),eS=(0,s.useMemo)(()=>{if(z&&ew.has(z))return ew.get(z);if(E){let e=M.find(e=>e.id===E);if(e?.modelId&&ew.has(e.modelId))return ew.get(e.modelId)}return ej?.models?.[0]||null},[z,ew,ej,M,E]),eI=(0,s.useMemo)(()=>M.find(e=>e.id===E)||null,[M,E]),ek=eI?.messages||b,eA=(0,s.useMemo)(()=>[...M].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[M]),eC=!J&&!!eS&&(q.trim().length>0||P.length>0);(0,s.useEffect)(()=>{if(!G)return;if(eN.current={sessions:M,activeSessionId:E,activeProviderId:O,draft:q},null!==ey.current){ev.current=!0;return}ev.current=!1;let e=t=>{ey.current=globalThis.setTimeout(()=>{ey.current=null;let t=eN.current;try{let e=N(t.sessions);try{globalThis.localStorage.setItem(c,e)}catch(r){let e=t.sessions.map(e=>({...e,messages:(e.messages||[]).map(e=>Array.isArray(e.attachments)&&0!==e.attachments.length?{...e,attachments:e.attachments.map(({dataUrl:e,...t})=>({...t}))}:e)}));try{globalThis.localStorage.setItem(c,N(e))}catch{throw r}}globalThis.localStorage.setItem(m,t.activeSessionId),globalThis.localStorage.setItem(u,t.activeProviderId),globalThis.localStorage.setItem(p,t.draft)}catch{}ev.current&&(ev.current=!1,e(2e3))},t)};return e(J?2e3:400),()=>{if(null!==ey.current){globalThis.clearTimeout(ey.current),ey.current=null;let t=ev.current;ev.current=!1,t&&e(400)}}},[G,J,M,E,O,q]),(0,s.useEffect)(()=>{if(!G||r||ep.current||0===e.length)return;let t=e.find(e=>e.providerId===O)||e[0],a=z&&ew.has(z)?ew.get(z):t.models[0];if(M.length>0){let e=M.find(e=>e.id===E)||M[0],r=e?.modelId&&ew.has(e.modelId)?ew.get(e.modelId):a;ep.current=!0,_(e.id),R(r?.providerId||t.providerId),U(r?.id||a.id);return}let s={id:y(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};ep.current=!0,D([s]),_(s.id),R(t.providerId),U(a.id)},[G,r,e,ew,M,E,O,z]);let eT=(e,t)=>{D(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},e$=e=>e?{id:y(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,eM=()=>{if(!eS)return;let e=e$(eS);e&&(D(t=>[e,...t]),_(e.id),R(e.providerId),U(e.modelId),L(""),F([]),W(""),Y(""))},eD=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.allSettled(r.map(async e=>({id:y(),name:e.name,type:e.type,size:e.size,dataUrl:await j(e)}))),s=a.filter(e=>"fulfilled"===e.status).map(e=>e.value);if(s.length>0&&F(e=>[...e,...s]),s.length<r.length){let e=a.find(e=>"rejected"===e.status)?.reason;$(v(e?.message)?`Failed to read file: ${v(e.message)}`:"Failed to read one or more files.")}e.target.value=""},eE=(e,t)=>{let r=w(t);eT(e,e=>({...e,title:"New chat"===e.title?r:e.title,updatedAt:new Date().toISOString()}))};(0,s.useEffect)(()=>{let e;(e=ef.current)&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Math.round(.28*window.innerHeight))}px`)},[q]),(0,s.useEffect)(()=>{eg.current?.scrollIntoView({behavior:"smooth",block:"end"})},[ek,K,J]);let e_=async(e,t)=>{try{await navigator.clipboard.writeText(v(t)),en(e),setTimeout(()=>en(t=>t===e?"":t),1500)}catch{}},eO=async(e={})=>{let t=eS||ej?.models?.[0]||null;if(!t)return;let r=!0===e.regenerate;r&&J&&(eu.current?.abort(),eu.current=null,B(!1),W(""),Y(""));let a=E,s=M.find(e=>e.id===a),l="string"==typeof e.userText?e.userText:q.trim(),n=Array.isArray(e.attachments)?e.attachments:P;if(r){if(!s)return;let e=[...s.messages||[]];for(;e.length&&e[e.length-1]?.role==="assistant";)e.pop();let t=[...e].reverse().find(e=>"user"===e.role);if(!t)return;l=v(t.content).trim(),n=Array.isArray(t.attachments)?t.attachments:[],s={...s,messages:e},D(e=>e.map(e=>e.id===a?s:e))}if(!l&&(!n||0===n.length))return;if(!s){if(!(s=e$(t)))return;a=s.id,D(e=>[s,...e]),_(a)}let i=r?null:{id:y(),role:"user",content:l,attachments:(n||[]).map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},o=y(),d={id:o,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},c=[...r?[...s.messages||[]]:[...s.messages||[],i],d];D(e=>e.map(e=>e.id===a?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name,messages:c,updatedAt:new Date().toISOString(),title:"New chat"===e.title?w(l):e.title}:e)),!r&&(L(""),F([]),ef.current&&(ef.current.style.height="auto")),B(!0),W(o),Y(""),eu.current?.abort(),eu.current=new AbortController;let m=c.filter(e=>"assistant"!==e.role||e.id!==o).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=v(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content})),u=ed.trim(),p=u?[{role:"system",content:u},...m]:m;try{let e=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:t.requestModel||t.id,messages:p,stream:!0,temperature:ei}),signal:eu.current.signal});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(v(t.error||t.message||`Request failed (${e.status})`))}let r=e.body?.getReader();if(!r){let t=await e.json().catch(()=>({})),r=v(t?.choices?.[0]?.message?.content||t?.output_text||t?.error||t?.message||"");eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:r,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let s=new TextDecoder,n="",i="";for(;;){let{value:e,done:t}=await r.read();if(t)break;let l=(n+=s.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(n=l.pop()||"",l)){let t=e.trim();if(!t.startsWith("data:"))continue;let r=t.slice(5).trim();if(r&&"[DONE]"!==r)try{let e=JSON.parse(r),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(v).filter(Boolean)[0]||""}(e);if(!t)continue;i+=t,Y(i),eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:i,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:i||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),eE(a,l)}catch(e){if("AbortError"===e.name)eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:e.content||"Stopped",status:"stopped"}:e),updatedAt:new Date().toISOString()})),eE(a,l);else{let t=v(e?.message||e);eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()}))}}finally{B(!1),W(""),Y(""),eu.current=null}},eR=eS?eS.name:"Select model",ez=eS?`${eS.providerName||""} \xb7 ${eS.requestModel||eS.id}`.replace(/^ · /,""):"Connected providers only",eU=(0,s.useMemo)(()=>{let t=X.trim().toLowerCase();return t?e.map(e=>{let r=(e.providerName||"").toLowerCase().includes(t)||(e.providerId||"").toLowerCase().includes(t)?e.models:e.models.filter(e=>`${e.name||""} ${e.requestModel||""} ${e.id||""}`.toLowerCase().includes(t));return{...e,models:r}}).filter(e=>e.models.length>0):e},[e,X]);return(0,a.jsxs)("div",{className:"relative flex h-full min-h-0 min-w-0 flex-1 overflow-hidden bg-bg text-text-main",children:[(0,a.jsxs)("aside",{id:"playground-history",className:`${et?"flex":"hidden"} fixed inset-y-0 left-0 z-30 w-[min(85vw,260px)] shrink-0 flex-col border-r border-border-subtle bg-surface/95 backdrop-blur-xl lg:static lg:z-auto lg:flex lg:w-[260px] lg:bg-surface/60`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle p-3",children:[(0,a.jsxs)("button",{type:"button",onClick:eM,disabled:!eS,className:"flex h-9 flex-1 items-center justify-center gap-2 rounded-[10px] bg-primary text-sm font-semibold text-white transition hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"New chat"]}),(0,a.jsx)("button",{type:"button",className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted lg:hidden hover:bg-surface-2",onClick:()=>er(!1),"aria-label":"Close history",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsxs)("div",{ref:eh,className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:[(0,a.jsx)("p",{className:"px-2 py-2 text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Chats"}),0===eA.length?(0,a.jsx)("div",{className:"rounded-[10px] border border-dashed border-border px-3 py-6 text-center text-xs text-text-muted",children:"No conversations yet"}):(0,a.jsx)("div",{className:"space-y-0.5",children:eA.map(e=>{let t=e.id===E,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsxs)("button",{type:"button",onClick:()=>{var t;let r;t=e.id,(r=M.find(e=>e.id===t))&&(_(t),R(r.providerId||O),U(r.modelId||z),er(!1)),window.innerWidth<1024&&er(!1)},className:`group flex w-full items-start gap-2 rounded-[10px] px-2.5 py-2.5 text-left transition ${t?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 text-[16px] opacity-70",children:"chat_bubble"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-[13px] font-medium leading-snug",children:e.title||"New chat"}),(0,a.jsxs)("p",{className:"mt-0.5 truncate text-[11px] opacity-60",children:[v(r?.content)||"Empty"," \xb7"," ",function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)]})]})]},e.id)})})]}),(0,a.jsx)("div",{className:"border-t border-border-subtle p-3",children:(0,a.jsxs)("button",{type:"button",onClick:()=>{if(!E)return;let e=M.filter(e=>e.id!==E),t=e[0]||null;D(e),t?(_(t.id),R(t.providerId),U(t.modelId)):(_(""),R(""),U(""))},disabled:!E||0===M.length,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-[8px] text-xs font-medium text-text-muted transition hover:bg-surface-2 hover:text-danger disabled:opacity-40",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"}),"Delete current chat"]})})]}),(0,a.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border-subtle px-3 py-2 lg:hidden",children:[(0,a.jsx)("button",{type:"button",onClick:()=>er(!0),className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted hover:bg-surface-2","aria-label":"Open chats","aria-expanded":et,"aria-controls":"playground-history",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"history"})}),(0,a.jsxs)("div",{className:"min-w-0 text-center",children:[(0,a.jsx)("p",{className:"truncate text-sm font-semibold",children:eR}),(0,a.jsx)("p",{className:"truncate text-[11px] text-text-subtle",children:ez})]}),(0,a.jsx)("button",{type:"button",onClick:eM,disabled:!eS,className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted hover:bg-surface-2 disabled:opacity-40","aria-label":"New chat",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"edit_square"})})]}),T?(0,a.jsx)("div",{role:"alert",className:"mx-4 mt-3 rounded-[10px] border border-danger/25 bg-danger/10 px-3 py-2.5 text-sm text-danger",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),(0,a.jsx)("p",{children:T})]})}):null,(0,a.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:0===ek.length?(0,a.jsxs)("div",{className:"flex min-h-full flex-col items-center justify-center px-6 pb-36 pt-10 text-center",children:[(0,a.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-2xl border border-border bg-surface text-primary shadow-soft",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:"forum"})}),(0,a.jsx)("h2",{className:"text-[22px] font-semibold tracking-tight text-text-main",children:"How can I help?"}),(0,a.jsx)("p",{className:"mt-1.5 max-w-md text-[13px] leading-relaxed text-text-muted",children:"Pick a model below, then ask anything through your connected providers."}),(0,a.jsx)("div",{className:"mt-6 flex max-w-xl flex-wrap items-center justify-center gap-2",children:f.map(e=>(0,a.jsx)("button",{type:"button",disabled:!eS||r,onClick:()=>{L(e),requestAnimationFrame(()=>ef.current?.focus())},className:"rounded-full border border-border bg-surface px-3.5 py-2 text-left text-[12.5px] text-text-muted transition hover:border-primary/35 hover:bg-primary/5 hover:text-text-main disabled:opacity-40",children:e},e))}),r?(0,a.jsx)("p",{className:"mt-4 text-xs text-text-subtle",children:"Loading models…"}):null]}):(0,a.jsxs)("div",{className:"mx-auto w-full max-w-3xl px-4 py-6 lg:px-8",children:[ek.map((e,t)=>{let r="user"===e.role,s="assistant"===e.role,i=s&&e.id===H&&"streaming"===e.status,o=v(e.content)||(s?K:""),d="error"===e.status,c="stopped"===e.status,m=s&&t===ek.length-1&&"streaming"!==e.status;return(0,a.jsx)("div",{className:"group relative mb-1 border-b border-border-subtle/50 py-5 last:border-0",children:(0,a.jsxs)("div",{className:"flex gap-3.5",children:[(0,a.jsx)("div",{className:`flex size-7 shrink-0 items-center justify-center rounded-full text-[11px] font-bold ${r?"bg-primary text-white":"border border-border bg-surface-2 text-text-muted"}`,children:r?"Y":"AI"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"mb-1.5 text-[12px] font-semibold text-text-main",children:r?"You":eS?.name||"Assistant"}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid max-w-md grid-cols-2 gap-2 sm:grid-cols-3",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-lg border border-border",children:(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-24 w-full object-cover"})},e.id))}):null,s&&!d?(0,a.jsx)("div",{className:"playground-md text-[14.5px] leading-[1.7] text-text-main",dangerouslySetInnerHTML:{__html:function(e){let t=v(e);if(!t)return"";try{return n.A.sanitize(l.xI.parse(t))}catch{return t.replace(/</g,"&lt;").replace(/>/g,"&gt;")}}(o)||""}}):(0,a.jsx)("div",{className:`whitespace-pre-wrap break-words text-[14.5px] leading-[1.7] ${d?"text-danger":"text-text-main"}`,children:o}),s&&i?(0,a.jsx)("span",{className:"ml-0.5 inline-block animate-pulse text-primary",children:"▋"}):null,c?(0,a.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"Generation stopped"}):null,s&&o&&!i?(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-1 opacity-100 transition sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>e_(e.id,o),className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-text-muted hover:bg-surface-2 hover:text-text-main",title:"Copy",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:el===e.id?"check":"content_copy"}),el===e.id?"Copied":"Copy"]}),m&&!J?(0,a.jsxs)("button",{type:"button",onClick:()=>eO({regenerate:!0}),disabled:J,className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-text-muted hover:bg-surface-2 hover:text-text-main disabled:cursor-not-allowed disabled:opacity-50",title:"Regenerate",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"}),"Retry"]}):null]}):null]})]})},e.id)}),(0,a.jsx)("div",{ref:eg})]})}),(0,a.jsx)("div",{className:"shrink-0 border-t border-border-subtle bg-bg/90 backdrop-blur-xl",children:(0,a.jsxs)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-4 pt-3 lg:px-6",children:[P.length>0?(0,a.jsx)("div",{className:"mb-2 flex flex-wrap gap-2",children:P.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1.5",children:[(0,a.jsx)("span",{className:"max-w-[10rem] truncate text-xs text-text-muted",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void F(e=>e.filter(e=>e.id!==t))},className:"text-text-subtle hover:text-text-main","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},e.id))}):null,(0,a.jsxs)("div",{className:"rounded-2xl border border-border-subtle bg-surface-2/80 shadow-soft ring-1 ring-border-subtle focus-within:border-primary/50 focus-within:ring-primary/20 transition",children:[(0,a.jsx)("textarea",{ref:ef,"aria-label":"Message",value:q,onChange:e=>L(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),eC&&eO())},placeholder:eS?`Message ${eS.name}…`:"Select a model below to start chatting",rows:1,disabled:!eS||r,className:"max-h-[28vh] min-h-[52px] w-full resize-none overflow-y-auto bg-transparent px-4 pt-3.5 text-[15px] leading-6 text-text-main outline-none placeholder:text-text-subtle custom-scrollbar disabled:opacity-50"}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2.5 pb-2.5 pt-1",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>em.current?.click(),disabled:!eS||r,className:"inline-flex h-11 items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-[12px] font-medium text-text-main transition hover:border-primary/40 hover:bg-primary/10 hover:text-primary disabled:cursor-not-allowed disabled:opacity-40",title:"Upload image",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add_photo_alternate"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Image"})]}),(0,a.jsx)("input",{ref:em,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:eD}),(0,a.jsxs)("div",{ref:eb,className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>es(e=>!e),className:`inline-flex h-11 items-center gap-1.5 rounded-full border px-3 text-[12px] font-medium transition ${ea||ed.trim()||.7!==ei?"border-primary/40 bg-primary/10 text-primary":"border-border bg-surface text-text-main hover:border-primary/40 hover:bg-primary/10 hover:text-primary"}`,title:"Chat settings","aria-label":"Chat settings","aria-expanded":ea,"aria-controls":"playground-chat-settings",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"}),(0,a.jsx)("span",{className:"hidden sm:inline tabular-nums",children:ei.toFixed(1)})]}),ea?(0,a.jsxs)("div",{id:"playground-chat-settings",className:"absolute bottom-[calc(100%+8px)] left-0 z-40 w-[min(320px,calc(100vw-2rem))] space-y-3 rounded-xl border border-border bg-surface p-3 shadow-elevated",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1.5 flex items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Temperature"}),(0,a.jsx)("span",{className:"text-xs font-semibold tabular-nums text-text-main",children:ei.toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:0,max:2,step:.05,value:ei,onChange:e=>eo(Number(e.target.value)),className:"w-full accent-[var(--color-primary)]"}),(0,a.jsxs)("div",{className:"mt-1 flex justify-between text-[10px] text-text-subtle",children:[(0,a.jsx)("span",{children:"Precise"}),(0,a.jsx)("span",{children:"Creative"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"System prompt"}),(0,a.jsx)("textarea",{value:ed,onChange:e=>ec(e.target.value),rows:4,placeholder:"Optional instructions for the model…",className:"w-full resize-y rounded-lg border border-border bg-bg px-2.5 py-2 text-[12.5px] leading-5 text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40 custom-scrollbar"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>{eo(.7),ec("")},className:"text-[11px] font-medium text-text-muted hover:text-text-main",children:"Reset defaults"})]}):null]}),(0,a.jsxs)("div",{ref:ex,className:"relative min-w-0",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{Z(e=>{let t=!e;return t||ee(""),t})},disabled:r||0===e.length,"aria-label":`Choose model, currently ${eR}`,"aria-haspopup":"listbox","aria-expanded":V,"aria-controls":"playground-model-menu",className:"inline-flex h-11 max-w-[min(100vw-12rem,260px)] items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-left transition hover:border-primary/40 hover:bg-surface-2 disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary shrink-0",children:"smart_toy"}),(0,a.jsx)("span",{className:"min-w-0 truncate text-[12.5px] font-semibold text-text-main",children:r?"Loading…":eR}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-text-muted",children:V?"expand_less":"expand_more"})]}),V?(0,a.jsxs)("div",{id:"playground-model-menu",role:"listbox","aria-label":"Models",className:"absolute bottom-[calc(100%+8px)] left-0 z-40 w-[min(420px,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-surface shadow-elevated",children:[(0,a.jsxs)("div",{className:"border-b border-border-subtle px-3 py-2.5 space-y-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Models"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[e.length," providers \xb7 search by name"]})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[16px] text-text-subtle",children:"search"}),(0,a.jsx)("input",{type:"search",value:X,onChange:e=>ee(e.target.value),placeholder:"Search models…",autoFocus:!0,className:"w-full rounded-lg border border-border bg-bg py-1.5 pl-8 pr-3 text-[16px] text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40"})]})]}),(0,a.jsx)("div",{className:"max-h-[min(50vh,360px)] overflow-y-auto p-1.5 custom-scrollbar",children:0===eU.length?(0,a.jsxs)("p",{className:"px-3 py-6 text-center text-xs text-text-muted",children:["No models match “",X.trim(),"”"]}):eU.map(e=>(0,a.jsxs)("div",{className:"mb-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-1.5",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-subtle",children:e.providerName}),(0,a.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"space-y-0.5",children:e.models.map(e=>{let t=e.id===z;return(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":t,onClick:()=>{(e=>{let t=ew.get(e);if(!t)return;let r=M.find(e=>e.id===E);if(r&&r.messages.length>0){let e=e$(t);if(!e)return;D(t=>[e,...t]),_(e.id)}else if(r)D(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),_(r.id);else{let e=e$(t);if(!e)return;D(t=>[e,...t]),_(e.id)}R(t.providerId),U(t.id),Z(!1)})(e.id),ee("")},className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left transition ${t?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate text-[13px] font-medium",children:e.name}),(0,a.jsx)("span",{className:"block truncate text-[11px] opacity-60",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check"}):null]},e.id)})})]},e.providerId))})]}):null]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[J?(0,a.jsxs)("button",{type:"button",onClick:()=>{eu.current?.abort()},className:"inline-flex h-11 items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-[12px] font-semibold text-text-main transition hover:bg-surface-2",title:"Stop generating",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Stop"})]}):null,(0,a.jsxs)("button",{type:"button",onClick:eO,disabled:!eC,className:`inline-flex h-11 min-w-9 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] font-semibold transition ${eC?"bg-primary text-white shadow-[0_2px_12px_rgba(var(--brand-rgb),0.45)] hover:bg-primary-hover active:scale-[0.97]":"bg-surface-3 text-text-subtle cursor-not-allowed opacity-70"}`,title:"Send message",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] font-bold",children:"send"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Send"})]})]})]})]}),(0,a.jsx)("p",{className:"mt-2 text-center text-[11px] text-text-subtle",children:"Routed through ZevaiRouter \xb7 Enter to send \xb7 Shift+Enter for new line"})]})})]}),et?(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-20 bg-black/40 lg:hidden","aria-label":"Close history",onClick:()=>er(!1)}):null]})}l.xI.setOptions({gfm:!0,breaks:!0})}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9041],{39041:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>C});var a=r(95155),s=r(12115),l=r(9233),n=r(91992),i=r(35497),o=r(28777),d=r(1791);let c="basic-chat.sessions",m="basic-chat.activeSessionId",u="basic-chat.activeProviderId",p="basic-chat.draft",x="basic-chat.temperature",h="basic-chat.systemPrompt",b=[],f=["Explain this project like I'm new","Write a concise PR description","Debug this error message","Summarize the key trade-offs"],g=new Set(["alicode","alicode-intl","anthropic","antigravity","assemblyai","byteplus","cerebras","chutes","claude","cline","clinepass","codex","cohere","deepseek","fireworks","gemini","gemini-cli","github","grok-cli","groq","hyperbolic","kimchi","kiro","mistral","nanobanana","nebius","nvidia","ollama","ollama-local","openai","openrouter","perplexity","perplexity-agent","qoder","qwen","siliconflow","together","vercel-ai-gateway","volcengine-ark","xai"]);function y(){if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID();let e="";for(let t=0;t<8;t+=1)e+=Math.floor(0xffffffff*Math.random()).toString(16).padStart(8,"0");return`chat_${Date.now()}_${e}`}function v(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(v).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function N(e){try{return JSON.stringify(e)}catch{return""}}function w(e=""){let t=v(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function j(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function S(e){let t=e?.provider||e?.id,r=t?d.Q2[t]:null;return r?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(t||"provider")}function I(e){return Array.from(e.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName))}async function k(e,t={},r=8e3){let a=new AbortController,s=setTimeout(()=>a.abort(),r);try{return await fetch(e,{...t,signal:a.signal})}finally{clearTimeout(s)}}async function A(e,t,r){if(!e.length)return[];let a=Array(e.length),s=0,l=Array.from({length:Math.min(t,e.length)},async()=>{for(;s<e.length;){let t=s;s+=1,a[t]=await r(e[t],t)}});return await Promise.all(l),a}function C(){let[e,t]=(0,s.useState)([]),[r,C]=(0,s.useState)(!0),[T,$]=(0,s.useState)(""),[M,D]=(0,s.useState)([]),[E,_]=(0,s.useState)(""),[O,R]=(0,s.useState)(""),[z,U]=(0,s.useState)(""),[q,L]=(0,s.useState)(""),[P,F]=(0,s.useState)([]),[J,B]=(0,s.useState)(!1),[H,W]=(0,s.useState)(""),[K,Y]=(0,s.useState)(""),[G,Q]=(0,s.useState)(!1),[V,Z]=(0,s.useState)(!1),[X,ee]=(0,s.useState)(""),[et,er]=(0,s.useState)(!1),[ea,es]=(0,s.useState)(!1),[el,en]=(0,s.useState)(""),[ei,eo]=(0,s.useState)(.7),[ed,ec]=(0,s.useState)(""),em=(0,s.useRef)(null),eu=(0,s.useRef)(null),ep=(0,s.useRef)(!1),ex=(0,s.useRef)(null),eh=(0,s.useRef)(null),eb=(0,s.useRef)(null),ef=(0,s.useRef)(null),eg=(0,s.useRef)(null),ey=(0,s.useRef)(null),ev=(0,s.useRef)(!1),eN=(0,s.useRef)({sessions:[],activeSessionId:"",activeProviderId:"",draft:""});(0,s.useEffect)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(c),[]),t=Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[],r=globalThis.localStorage.getItem(x),a=null===r?0/0:Number(r);D(t),_(globalThis.localStorage.getItem(m)||""),R(globalThis.localStorage.getItem(u)||""),L(globalThis.localStorage.getItem(p)||""),eo(Number.isFinite(a)?Math.min(2,Math.max(0,a)):.7),ec(globalThis.localStorage.getItem(h)||"")}catch{}finally{Q(!0)}},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){C(!0),$("");try{let r=await k("/api/providers",{cache:"no-store"},15e3),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),$("No providers connected yet."),C(!1));return}let l=new Map,n=[];for(let e of s){let t=e.provider||e.id,r=S(e),a=(0,d.mq)(t)?"openai-compatible":(0,d.gb)(t)?"anthropic-compatible":t;if(!l.has(t)){l.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=(0,o.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:S(e),source:"static"}:null).filter(Boolean);l.get(t).models.push(...s),0===s.length&&function(e){let t=e?.provider;return!!t&&(!!g.has(t)||!!e?.providerSpecificData?.baseUrl&&((0,d.mq)(t)||(0,d.gb)(t)))}(e)&&n.push(e)}let s=l.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e)}let i=I(l);e||(t(i),0===i.length?$("Loading live models…"):$(""),C(!1));let c=await A(n,6,async t=>{if(e)return{connection:t,models:[]};try{let e=await k(`/api/providers/${t.id}/models`,{cache:"no-store"},8e3),r=await e.json().catch(()=>({}));if(!e.ok)return{connection:t,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(e=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,d.mq)(t.provider)||(0,d.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:S(t),source:"live"}})(e,t)).filter(Boolean);return{connection:t,models:a}}catch{return{connection:t,models:[]}}});if(e)return;for(let e of c){let t=e.connection.provider||e.connection.id,r=l.get(t);r&&e.models?.length&&r.models.push(...e.models)}let m=I(l);e||(t(m),0===m.length?$("Providers connected but no models available."):$(""))}catch(r){e||($(v(r?.message)||"Failed to load providers/models."),t([]),C(!1))}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{ex.current&&!ex.current.contains(e.target)&&Z(!1),eh.current&&!eh.current.contains(e.target)&&er(!1),eb.current&&!eb.current.contains(e.target)&&es(!1)},t=e=>{"Escape"===e.key&&(Z(!1),ee(""),es(!1),er(!1))};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[]),(0,s.useEffect)(()=>{if(G)try{globalThis.localStorage.setItem(x,String(ei))}catch{}},[G,ei]),(0,s.useEffect)(()=>{if(G)try{globalThis.localStorage.setItem(h,ed)}catch{}},[G,ed]);let ew=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),ej=(0,s.useMemo)(()=>e.find(e=>e.providerId===O)||e[0]||null,[e,O]),eS=(0,s.useMemo)(()=>{if(z&&ew.has(z))return ew.get(z);if(E){let e=M.find(e=>e.id===E);if(e?.modelId&&ew.has(e.modelId))return ew.get(e.modelId)}return ej?.models?.[0]||null},[z,ew,ej,M,E]),eI=(0,s.useMemo)(()=>M.find(e=>e.id===E)||null,[M,E]),ek=eI?.messages||b,eA=(0,s.useMemo)(()=>[...M].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[M]),eC=!J&&!!eS&&(q.trim().length>0||P.length>0);(0,s.useEffect)(()=>{if(!G)return;if(eN.current={sessions:M,activeSessionId:E,activeProviderId:O,draft:q},null!==ey.current){ev.current=!0;return}ev.current=!1;let e=t=>{ey.current=globalThis.setTimeout(()=>{ey.current=null;let t=eN.current;try{let e=N(t.sessions);try{globalThis.localStorage.setItem(c,e)}catch(r){let e=t.sessions.map(e=>({...e,messages:(e.messages||[]).map(e=>Array.isArray(e.attachments)&&0!==e.attachments.length?{...e,attachments:e.attachments.map(({dataUrl:e,...t})=>({...t}))}:e)}));try{globalThis.localStorage.setItem(c,N(e))}catch{throw r}}globalThis.localStorage.setItem(m,t.activeSessionId),globalThis.localStorage.setItem(u,t.activeProviderId),globalThis.localStorage.setItem(p,t.draft)}catch{}ev.current&&(ev.current=!1,e(2e3))},t)};return e(J?2e3:400),()=>{if(null!==ey.current){globalThis.clearTimeout(ey.current),ey.current=null;let t=ev.current;ev.current=!1,t&&e(400)}}},[G,J,M,E,O,q]),(0,s.useEffect)(()=>{if(!G||r||ep.current||0===e.length)return;let t=e.find(e=>e.providerId===O)||e[0],a=z&&ew.has(z)?ew.get(z):t.models[0];if(M.length>0){let e=M.find(e=>e.id===E)||M[0],r=e?.modelId&&ew.has(e.modelId)?ew.get(e.modelId):a;ep.current=!0,_(e.id),R(r?.providerId||t.providerId),U(r?.id||a.id);return}let s={id:y(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};ep.current=!0,D([s]),_(s.id),R(t.providerId),U(a.id)},[G,r,e,ew,M,E,O,z]);let eT=(e,t)=>{D(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},e$=e=>e?{id:y(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,eM=()=>{if(!eS)return;let e=e$(eS);e&&(D(t=>[e,...t]),_(e.id),R(e.providerId),U(e.modelId),L(""),F([]),W(""),Y(""))},eD=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.allSettled(r.map(async e=>({id:y(),name:e.name,type:e.type,size:e.size,dataUrl:await j(e)}))),s=a.filter(e=>"fulfilled"===e.status).map(e=>e.value);if(s.length>0&&F(e=>[...e,...s]),s.length<r.length){let e=a.find(e=>"rejected"===e.status)?.reason;$(v(e?.message)?`Failed to read file: ${v(e.message)}`:"Failed to read one or more files.")}e.target.value=""},eE=(e,t)=>{let r=w(t);eT(e,e=>({...e,title:"New chat"===e.title?r:e.title,updatedAt:new Date().toISOString()}))};(0,s.useEffect)(()=>{let e;(e=ef.current)&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Math.round(.28*window.innerHeight))}px`)},[q]),(0,s.useEffect)(()=>{eg.current?.scrollIntoView({behavior:"smooth",block:"end"})},[ek,K,J]);let e_=async(e,t)=>{try{await navigator.clipboard.writeText(v(t)),en(e),setTimeout(()=>en(t=>t===e?"":t),1500)}catch{}},eO=async(e={})=>{let t=eS||ej?.models?.[0]||null;if(!t)return;let r=!0===e.regenerate;r&&J&&(eu.current?.abort(),eu.current=null,B(!1),W(""),Y(""));let a=E,s=M.find(e=>e.id===a),l="string"==typeof e.userText?e.userText:q.trim(),n=Array.isArray(e.attachments)?e.attachments:P;if(r){if(!s)return;let e=[...s.messages||[]];for(;e.length&&e[e.length-1]?.role==="assistant";)e.pop();let t=[...e].reverse().find(e=>"user"===e.role);if(!t)return;l=v(t.content).trim(),n=Array.isArray(t.attachments)?t.attachments:[],s={...s,messages:e},D(e=>e.map(e=>e.id===a?s:e))}if(!l&&(!n||0===n.length))return;if(!s){if(!(s=e$(t)))return;a=s.id,D(e=>[s,...e]),_(a)}let i=r?null:{id:y(),role:"user",content:l,attachments:(n||[]).map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},o=y(),d={id:o,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},c=[...r?[...s.messages||[]]:[...s.messages||[],i],d];D(e=>e.map(e=>e.id===a?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name,messages:c,updatedAt:new Date().toISOString(),title:"New chat"===e.title?w(l):e.title}:e)),!r&&(L(""),F([]),ef.current&&(ef.current.style.height="auto")),B(!0),W(o),Y(""),eu.current?.abort(),eu.current=new AbortController;let m=c.filter(e=>"assistant"!==e.role||e.id!==o).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=v(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content})),u=ed.trim(),p=u?[{role:"system",content:u},...m]:m;try{let e=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:t.requestModel||t.id,messages:p,stream:!0,temperature:ei}),signal:eu.current.signal});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(v(t.error||t.message||`Request failed (${e.status})`))}let r=e.body?.getReader();if(!r){let t=await e.json().catch(()=>({})),r=v(t?.choices?.[0]?.message?.content||t?.output_text||t?.error||t?.message||"");eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:r,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let s=new TextDecoder,n="",i="";for(;;){let{value:e,done:t}=await r.read();if(t)break;let l=(n+=s.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(n=l.pop()||"",l)){let t=e.trim();if(!t.startsWith("data:"))continue;let r=t.slice(5).trim();if(r&&"[DONE]"!==r)try{let e=JSON.parse(r),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(v).filter(Boolean)[0]||""}(e);if(!t)continue;i+=t,Y(i),eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:i,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:i||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),eE(a,l)}catch(e){if("AbortError"===e.name)eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:e.content||"Stopped",status:"stopped"}:e),updatedAt:new Date().toISOString()})),eE(a,l);else{let t=v(e?.message||e);eT(a,e=>({...e,messages:e.messages.map(e=>e.id===o?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()}))}}finally{B(!1),W(""),Y(""),eu.current=null}},eR=eS?eS.name:"Select model",ez=eS?`${eS.providerName||""} \xb7 ${eS.requestModel||eS.id}`.replace(/^ · /,""):"Connected providers only",eU=(0,s.useMemo)(()=>{let t=X.trim().toLowerCase();return t?e.map(e=>{let r=(e.providerName||"").toLowerCase().includes(t)||(e.providerId||"").toLowerCase().includes(t)?e.models:e.models.filter(e=>`${e.name||""} ${e.requestModel||""} ${e.id||""}`.toLowerCase().includes(t));return{...e,models:r}}).filter(e=>e.models.length>0):e},[e,X]);return(0,a.jsxs)("div",{className:"relative flex h-full min-h-0 min-w-0 flex-1 overflow-hidden bg-bg text-text-main",children:[(0,a.jsxs)("aside",{id:"playground-history",className:`${et?"flex":"hidden"} fixed inset-y-0 left-0 z-30 w-[min(85vw,260px)] shrink-0 flex-col border-r border-border-subtle bg-surface/95 backdrop-blur-xl lg:static lg:z-auto lg:flex lg:w-[260px] lg:bg-surface/60`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle p-3",children:[(0,a.jsxs)("button",{type:"button",onClick:eM,disabled:!eS,className:"flex h-9 flex-1 items-center justify-center gap-2 rounded-[10px] bg-primary text-sm font-semibold text-white transition hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"New chat"]}),(0,a.jsx)("button",{type:"button",className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted lg:hidden hover:bg-surface-2",onClick:()=>er(!1),"aria-label":"Close history",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsxs)("div",{ref:eh,className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:[(0,a.jsx)("p",{className:"px-2 py-2 text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Chats"}),0===eA.length?(0,a.jsx)("div",{className:"rounded-[10px] border border-dashed border-border px-3 py-6 text-center text-xs text-text-muted",children:"No conversations yet"}):(0,a.jsx)("div",{className:"space-y-0.5",children:eA.map(e=>{let t=e.id===E,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsxs)("button",{type:"button",onClick:()=>{var t;let r;t=e.id,(r=M.find(e=>e.id===t))&&(_(t),R(r.providerId||O),U(r.modelId||z),er(!1)),window.innerWidth<1024&&er(!1)},className:`group flex w-full items-start gap-2 rounded-[10px] px-2.5 py-2.5 text-left transition ${t?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 text-[16px] opacity-70",children:"chat_bubble"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-[13px] font-medium leading-snug",children:e.title||"New chat"}),(0,a.jsxs)("p",{className:"mt-0.5 truncate text-[11px] opacity-60",children:[v(r?.content)||"Empty"," \xb7"," ",function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)]})]})]},e.id)})})]}),(0,a.jsx)("div",{className:"border-t border-border-subtle p-3",children:(0,a.jsxs)("button",{type:"button",onClick:()=>{if(!E)return;let e=M.filter(e=>e.id!==E),t=e[0]||null;D(e),t?(_(t.id),R(t.providerId),U(t.modelId)):(_(""),R(""),U(""))},disabled:!E||0===M.length,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-[8px] text-xs font-medium text-text-muted transition hover:bg-surface-2 hover:text-danger disabled:opacity-40",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"}),"Delete current chat"]})})]}),(0,a.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border-subtle px-3 py-2 lg:hidden",children:[(0,a.jsx)("button",{type:"button",onClick:()=>er(!0),className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted hover:bg-surface-2","aria-label":"Open chats","aria-expanded":et,"aria-controls":"playground-history",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"history"})}),(0,a.jsxs)("div",{className:"min-w-0 text-center",children:[(0,a.jsx)("p",{className:"truncate text-sm font-semibold",children:eR}),(0,a.jsx)("p",{className:"truncate text-[11px] text-text-subtle",children:ez})]}),(0,a.jsx)("button",{type:"button",onClick:eM,disabled:!eS,className:"flex size-11 items-center justify-center rounded-[10px] border border-border text-text-muted hover:bg-surface-2 disabled:opacity-40","aria-label":"New chat",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"edit_square"})})]}),T?(0,a.jsx)("div",{role:"alert",className:"mx-4 mt-3 rounded-[10px] border border-danger/25 bg-danger/10 px-3 py-2.5 text-sm text-danger",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),(0,a.jsx)("p",{children:T})]})}):null,(0,a.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:0===ek.length?(0,a.jsxs)("div",{className:"flex min-h-full flex-col items-center justify-center px-6 pb-36 pt-10 text-center",children:[(0,a.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-2xl border border-border bg-surface text-primary shadow-soft",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:"forum"})}),(0,a.jsx)("h2",{className:"text-[22px] font-semibold tracking-tight text-text-main",children:"How can I help?"}),(0,a.jsx)("p",{className:"mt-1.5 max-w-md text-[13px] leading-relaxed text-text-muted",children:"Pick a model below, then ask anything through your connected providers."}),(0,a.jsx)("div",{className:"mt-6 flex max-w-xl flex-wrap items-center justify-center gap-2",children:f.map(e=>(0,a.jsx)("button",{type:"button",disabled:!eS||r,onClick:()=>{L(e),requestAnimationFrame(()=>ef.current?.focus())},className:"rounded-full border border-border bg-surface px-3.5 py-2 text-left text-[12.5px] text-text-muted transition hover:border-primary/35 hover:bg-primary/5 hover:text-text-main disabled:opacity-40",children:e},e))}),r?(0,a.jsx)("p",{className:"mt-4 text-xs text-text-subtle",children:"Loading models…"}):null]}):(0,a.jsxs)("div",{className:"mx-auto w-full max-w-3xl px-4 py-6 lg:px-8",children:[ek.map((e,t)=>{let r="user"===e.role,s="assistant"===e.role,i=s&&e.id===H&&"streaming"===e.status,o=v(e.content)||(s?K:""),d="error"===e.status,c="stopped"===e.status,m=s&&t===ek.length-1&&"streaming"!==e.status;return(0,a.jsx)("div",{className:"group relative mb-1 border-b border-border-subtle/50 py-5 last:border-0",children:(0,a.jsxs)("div",{className:"flex gap-3.5",children:[(0,a.jsx)("div",{className:`flex size-7 shrink-0 items-center justify-center rounded-full text-[11px] font-bold ${r?"bg-primary text-white":"border border-border bg-surface-2 text-text-muted"}`,children:r?"Y":"AI"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"mb-1.5 text-[12px] font-semibold text-text-main",children:r?"You":eS?.name||"Assistant"}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid max-w-md grid-cols-2 gap-2 sm:grid-cols-3",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-lg border border-border",children:(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-24 w-full object-cover"})},e.id))}):null,s&&!d?(0,a.jsx)("div",{className:"playground-md text-[14.5px] leading-[1.7] text-text-main",dangerouslySetInnerHTML:{__html:function(e){let t=v(e);if(!t)return"";try{return n.A.sanitize(l.xI.parse(t))}catch{return t.replace(/</g,"&lt;").replace(/>/g,"&gt;")}}(o)||""}}):(0,a.jsx)("div",{className:`whitespace-pre-wrap break-words text-[14.5px] leading-[1.7] ${d?"text-danger":"text-text-main"}`,children:o}),s&&i?(0,a.jsx)("span",{className:"ml-0.5 inline-block animate-pulse text-primary",children:"▋"}):null,c?(0,a.jsx)("p",{className:"mt-2 text-xs text-text-muted",children:"Generation stopped"}):null,s&&o&&!i?(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-1 opacity-100 transition sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>e_(e.id,o),className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-text-muted hover:bg-surface-2 hover:text-text-main",title:"Copy",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:el===e.id?"check":"content_copy"}),el===e.id?"Copied":"Copy"]}),m&&!J?(0,a.jsxs)("button",{type:"button",onClick:()=>eO({regenerate:!0}),disabled:J,className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-text-muted hover:bg-surface-2 hover:text-text-main disabled:cursor-not-allowed disabled:opacity-50",title:"Regenerate",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"}),"Retry"]}):null]}):null]})]})},e.id)}),(0,a.jsx)("div",{ref:eg})]})}),(0,a.jsx)("div",{className:"shrink-0 border-t border-border-subtle bg-bg/90 backdrop-blur-xl",children:(0,a.jsxs)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-4 pt-3 lg:px-6",children:[P.length>0?(0,a.jsx)("div",{className:"mb-2 flex flex-wrap gap-2",children:P.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-border bg-surface px-3 py-1.5",children:[(0,a.jsx)("span",{className:"max-w-[10rem] truncate text-xs text-text-muted",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void F(e=>e.filter(e=>e.id!==t))},className:"text-text-subtle hover:text-text-main","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},e.id))}):null,(0,a.jsxs)("div",{className:"rounded-2xl border border-border-subtle bg-surface-2/80 shadow-soft ring-1 ring-border-subtle focus-within:border-primary/50 focus-within:ring-primary/20 transition",children:[(0,a.jsx)("textarea",{ref:ef,"aria-label":"Message",value:q,onChange:e=>L(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),eC&&eO())},placeholder:eS?`Message ${eS.name}…`:"Select a model below to start chatting",rows:1,disabled:!eS||r,className:"max-h-[28vh] min-h-[52px] w-full resize-none overflow-y-auto bg-transparent px-4 pt-3.5 text-[15px] leading-6 text-text-main outline-none placeholder:text-text-subtle custom-scrollbar disabled:opacity-50"}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-2.5 pb-2.5 pt-1",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>em.current?.click(),disabled:!eS||r,className:"inline-flex h-11 items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-[12px] font-medium text-text-main transition hover:border-primary/40 hover:bg-primary/10 hover:text-primary disabled:cursor-not-allowed disabled:opacity-40",title:"Upload image",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add_photo_alternate"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Image"})]}),(0,a.jsx)("input",{ref:em,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:eD}),(0,a.jsxs)("div",{ref:eb,className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>es(e=>!e),className:`inline-flex h-11 items-center gap-1.5 rounded-full border px-3 text-[12px] font-medium transition ${ea||ed.trim()||.7!==ei?"border-primary/40 bg-primary/10 text-primary":"border-border bg-surface text-text-main hover:border-primary/40 hover:bg-primary/10 hover:text-primary"}`,title:"Chat settings","aria-label":"Chat settings","aria-expanded":ea,"aria-controls":"playground-chat-settings",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"}),(0,a.jsx)("span",{className:"hidden sm:inline tabular-nums",children:ei.toFixed(1)})]}),ea?(0,a.jsxs)("div",{id:"playground-chat-settings",className:"absolute bottom-[calc(100%+8px)] left-0 z-40 w-[min(320px,calc(100vw-2rem))] space-y-3 rounded-xl border border-border bg-surface p-3 shadow-elevated",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1.5 flex items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Temperature"}),(0,a.jsx)("span",{className:"text-xs font-semibold tabular-nums text-text-main",children:ei.toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:0,max:2,step:.05,value:ei,onChange:e=>eo(Number(e.target.value)),className:"w-full accent-[var(--color-primary)]"}),(0,a.jsxs)("div",{className:"mt-1 flex justify-between text-[10px] text-text-subtle",children:[(0,a.jsx)("span",{children:"Precise"}),(0,a.jsx)("span",{children:"Creative"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"System prompt"}),(0,a.jsx)("textarea",{value:ed,onChange:e=>ec(e.target.value),rows:4,placeholder:"Optional instructions for the model…",className:"w-full resize-y rounded-lg border border-border bg-bg px-2.5 py-2 text-[12.5px] leading-5 text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40 custom-scrollbar"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>{eo(.7),ec("")},className:"text-[11px] font-medium text-text-muted hover:text-text-main",children:"Reset defaults"})]}):null]}),(0,a.jsxs)("div",{ref:ex,className:"relative min-w-0",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{Z(e=>{let t=!e;return t||ee(""),t})},disabled:r||0===e.length,"aria-label":`Choose model, currently ${eR}`,"aria-haspopup":"listbox","aria-expanded":V,"aria-controls":"playground-model-menu",className:"inline-flex h-11 max-w-[min(100vw-12rem,260px)] items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-left transition hover:border-primary/40 hover:bg-surface-2 disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary shrink-0",children:"smart_toy"}),(0,a.jsx)("span",{className:"min-w-0 truncate text-[12.5px] font-semibold text-text-main",children:r?"Loading…":eR}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[16px] text-text-muted",children:V?"expand_less":"expand_more"})]}),V?(0,a.jsxs)("div",{id:"playground-model-menu",role:"listbox","aria-label":"Models",className:"absolute bottom-[calc(100%+8px)] left-0 z-40 w-[min(420px,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-surface shadow-elevated",children:[(0,a.jsxs)("div",{className:"border-b border-border-subtle px-3 py-2.5 space-y-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-subtle",children:"Models"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[e.length," providers \xb7 search by name"]})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[16px] text-text-subtle",children:"search"}),(0,a.jsx)("input",{type:"search",value:X,onChange:e=>ee(e.target.value),placeholder:"Search models…",autoFocus:!0,className:"w-full rounded-lg border border-border bg-bg py-1.5 pl-8 pr-3 text-[16px] text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40"})]})]}),(0,a.jsx)("div",{className:"max-h-[min(50vh,360px)] overflow-y-auto p-1.5 custom-scrollbar",children:0===eU.length?(0,a.jsxs)("p",{className:"px-3 py-6 text-center text-xs text-text-muted",children:["No models match “",X.trim(),"”"]}):eU.map(e=>(0,a.jsxs)("div",{className:"mb-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-1.5",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-subtle",children:e.providerName}),(0,a.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"space-y-0.5",children:e.models.map(e=>{let t=e.id===z;return(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":t,onClick:()=>{(e=>{let t=ew.get(e);if(!t)return;let r=M.find(e=>e.id===E);if(r&&r.messages.length>0){let e=e$(t);if(!e)return;D(t=>[e,...t]),_(e.id)}else if(r)D(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),_(r.id);else{let e=e$(t);if(!e)return;D(t=>[e,...t]),_(e.id)}R(t.providerId),U(t.id),Z(!1)})(e.id),ee("")},className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left transition ${t?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate text-[13px] font-medium",children:e.name}),(0,a.jsx)("span",{className:"block truncate text-[11px] opacity-60",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check"}):null]},e.id)})})]},e.providerId))})]}):null]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[J?(0,a.jsxs)("button",{type:"button",onClick:()=>{eu.current?.abort()},className:"inline-flex h-11 items-center gap-1.5 rounded-full border border-border bg-surface px-3 text-[12px] font-semibold text-text-main transition hover:bg-surface-2",title:"Stop generating",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Stop"})]}):null,(0,a.jsxs)("button",{type:"button",onClick:eO,disabled:!eC,className:`inline-flex h-11 min-w-9 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] font-semibold transition ${eC?"bg-primary text-white shadow-[0_2px_12px_rgba(var(--brand-rgb),0.45)] hover:bg-primary-hover active:scale-[0.97]":"bg-surface-3 text-text-subtle cursor-not-allowed opacity-70"}`,title:"Send message",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] font-bold",children:"send"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Send"})]})]})]})]}),(0,a.jsx)("p",{className:"mt-2 text-center text-[11px] text-text-subtle",children:"Routed through ZevaiRouter \xb7 Enter to send \xb7 Shift+Enter for new line"})]})})]}),et?(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-20 bg-black/40 lg:hidden","aria-label":"Close history",onClick:()=>er(!1)}):null]})}l.xI.setOptions({gfm:!0,breaks:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{20975:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s(95155),o=s(12115),n=s(35497),i=s(1791);function a({id:e,icon:t,size:s=22}){let[n,i]=(0,o.useState)(!1);return n?(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",style:{fontSize:s},children:t}):(0,r.jsx)("img",{src:`/providers/${e}.png`,alt:"",width:s,height:s,className:"rounded object-contain",style:{width:s,height:s},onError:()=>i(!0)})}function l(e){return`${e} connection${1===e?"":"s"}`}function d({isOpen:e,onClose:t,onSuccess:s}){let[n,i]=(0,o.useState)(""),[a,l]=(0,o.useState)(!1),[c,x]=(0,o.useState)(null),m=async()=>{if(n.trim()){l(!0),x(null);try{let e=await fetch("/api/oauth/codebuddy/bulk-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:n})}),t=await e.json();x(t),t.success&&s?.()}catch(e){x({error:e.message})}finally{l(!1)}}};if(!e)return null;let p=null;if(c?.success){let e=[`Imported ${c.imported}/${c.total} tokens.`];if(c.failed&&e.push(`${c.failed} failed.`),c.formatCounts){let{"access-only":t,"with-refresh":s,"with-api-key":r}=c.formatCounts,o=[];r&&o.push(`${r} with API key`),s&&o.push(`${s} with refresh token`),t&&o.push(`${t} access-only`),o.length&&e.push(`(${o.join(", ")})`)}p=e.join(" ")}return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl border border-border bg-surface p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h3",{className:"mb-4 text-lg font-semibold text-text-main",children:"CodeBuddy OAuth Token Import"}),(0,r.jsx)("p",{className:"mb-2 text-xs text-text-muted",children:"Paste CodeBuddy OAuth tokens, one per line. Supports three formats:"}),(0,r.jsxs)("div",{className:"mb-3 space-y-2 rounded-lg bg-background/50 p-3 text-xs text-text-muted",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary leading-none",children:"check_circle"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded leading-none",children:"accessToken"}),(0,r.jsx)("span",{children:"— access token only (24h expiry)"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary leading-none",children:"check_circle"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded leading-none",children:"accessToken:refreshToken"}),(0,r.jsx)("span",{children:"— enables auto-refresh"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary leading-none",children:"check_circle"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded leading-none",children:"accessToken:refreshToken:apiKey"}),(0,r.jsx)("span",{children:"— 365-day access"})]})]})]}),(0,r.jsx)("textarea",{className:"mb-3 w-full rounded-lg border border-border bg-background p-3 font-mono text-xs text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none",rows:8,placeholder:"eyJhbGciOiJSUzI1NiIs...\neyJhbGciOiJSUzI1NiIs...:eyJhbGciOiJSUzI1NiIs...\neyJhbGciOiJSUzI1NiIs...:eyJhbGciOiJSUzI1NiIs...:ak_abc123...",value:n,onChange:e=>i(e.target.value),disabled:a}),c&&(0,r.jsx)("div",{className:"mb-3 rounded-lg p-3 text-xs "+(c.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:p||c.error||"Import failed"}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:t,className:"rounded-lg px-4 py-2 text-sm text-text-muted hover:bg-border/50",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:a||!n.trim(),className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 disabled:opacity-50",children:a?"Importing...":"Import Tokens"})]})]})})}function c({isOpen:e,onClose:t,onSuccess:s}){let[n,i]=(0,o.useState)(""),[a,l]=(0,o.useState)(!1),[d,x]=(0,o.useState)(null),m=async()=>{if(n.trim()){l(!0),x(null);try{let e=await fetch("/api/oauth/codebuddy-cn/bulk-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:n})}),t=await e.json();x(t),t.success&&s?.()}catch(e){x({error:e.message})}finally{l(!1)}}};if(!e)return null;let p=null;if(d?.success){let e=[`Imported ${d.imported}/${d.total} tokens.`];d.failed&&e.push(`${d.failed} failed.`),p=e.join(" ")}return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl border border-border bg-surface p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h3",{className:"mb-4 text-lg font-semibold text-text-main",children:"CodeBuddy CN OAuth Token Import"}),(0,r.jsx)("p",{className:"mb-2 text-xs text-text-muted",children:"Paste CodeBuddy CN OAuth tokens, one per line. Supports:"}),(0,r.jsxs)("div",{className:"mb-3 space-y-1 rounded-lg bg-background/50 p-3 text-xs text-text-muted",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken"})," — access token only"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken:refreshToken"})," — enables auto-refresh"]})]}),(0,r.jsx)("textarea",{className:"mb-3 w-full rounded-lg border border-border bg-background p-3 font-mono text-xs text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none",rows:8,placeholder:"eyJhbGciOiJSUzI1NiIs...\neyJhbGciOiJSUzI1NiIs...:eyJhbGciOiJSUzI1NiIs...",value:n,onChange:e=>i(e.target.value),disabled:a}),d&&(0,r.jsx)("div",{className:"mb-3 rounded-lg p-3 text-xs "+(d.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:p||d.error||"Import failed"}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:t,className:"rounded-lg px-4 py-2 text-sm text-text-muted hover:bg-border/50",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:a||!n.trim(),className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 disabled:opacity-50",children:a?"Importing...":"Import Tokens"})]})]})})}function x({isOpen:e,onClose:t,onSuccess:s}){let[n,i]=(0,o.useState)(""),[a,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(null),m=async()=>{if(n.trim()){l(!0),c(null);try{let e=await fetch("/api/oauth/grok-cli/bulk-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:n})}),t=await e.json();c(t),t.success&&s?.()}catch(e){c({error:e.message})}finally{l(!1)}}};if(!e)return null;let p=null;if(d?.success){let e=[`Imported ${d.imported}/${d.total} tokens.`];d.failed&&e.push(`${d.failed} failed.`),p=e.join(" ")}return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl border border-border bg-surface p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h3",{className:"mb-4 text-lg font-semibold text-text-main",children:"Grok CLI Token Import"}),(0,r.jsx)("p",{className:"mb-2 text-xs text-text-muted",children:"Paste xAI / Grok CLI tokens, one per line. Supports:"}),(0,r.jsxs)("div",{className:"mb-3 space-y-1 rounded-lg bg-background/50 p-3 text-xs text-text-muted",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"refreshToken"})," — refreshed immediately for a fresh access token"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken:refreshToken"})," — imported as-is (auto-refreshed if expired)"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken:refreshToken:email"})," — skips account email lookup"]})]}),(0,r.jsx)("textarea",{className:"mb-3 w-full rounded-lg border border-border bg-background p-3 font-mono text-xs text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none",rows:8,placeholder:"rt_xxx...\neyJhbGciOi...:rt_xxx...\neyJhbGciOi...:rt_xxx...:user@example.com",value:n,onChange:e=>i(e.target.value),disabled:a}),d&&(0,r.jsx)("div",{className:"mb-3 rounded-lg p-3 text-xs "+(d.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:p||d.error||"Import failed"}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:t,className:"rounded-lg px-4 py-2 text-sm text-text-muted hover:bg-border/50",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:a||!n.trim(),className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 disabled:opacity-50",children:a?"Importing...":"Import Tokens"})]})]})})}let m={"single-token":"Token import","bulk-token":"Bulk token import","bulk-account":"Bulk accounts","device-oauth":"Device login",social:"Social login",oauth:"OAuth login"},p=[{id:"kiro",label:"Kiro AI",icon:"psychology_alt",description:"Token import, bulk import, and social login automation.",supportedModes:["single-token","bulk-token","bulk-account","social"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(null),[d,c]=(0,o.useState)(null),x=e=>{c({...e,key:Date.now()}),i(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[{id:"bulk-account",title:"Auto Login Bulk",icon:"group_add",description:"Run bulk gmail|password automation with worker progress and manual assist.",action:()=>x({method:"import",importMode:"bulk-account"})},{id:"bulk-token",title:"Bulk Token",icon:"playlist_add",description:"Import many Kiro refresh tokens, one token per line.",action:()=>x({method:"import",importMode:"bulk-token"})},{id:"single-token",title:"Single Token",icon:"vpn_key",description:"Auto-detect or paste one Kiro refresh token.",action:()=>x({method:"import",importMode:"single-token"})},{id:"builder-id",title:"AWS Builder ID",icon:"shield",description:"Open the standard AWS Builder ID device login.",action:()=>x({method:"builder-id"})},{id:"idc",title:"AWS IDC",icon:"business",description:"Enter an IAM Identity Center start URL and region.",action:()=>x({method:"idc"})},{id:"google",title:"Google Login",icon:"account_circle",description:"Open Kiro social Google login with callback capture.",action:()=>x({method:"social",provider:"google"})}].map(e=>(0,r.jsxs)("button",{type:"button",onClick:e.action,className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:e.icon}),e.title]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:e.description})]},e.id))}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a?.jobId&&(0,r.jsxs)(n.Ex,{variant:"default",children:["Bulk job: ",a.status]}),a?.jobId&&(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"monitoring",onClick:()=>x({method:"import",importMode:"bulk-account"}),children:"Resume Bulk Progress"})]}),(0,r.jsx)(n.Mh,{isOpen:s,providerInfo:e,onSuccess:t,onRefresh:t,initialBulkJobId:a?.jobId||null,initialFlow:d,onBulkJobChange:l,onClose:()=>i(!1)})]})}},{id:"codebuddy",label:"CodeBuddy",icon:"smart_toy",description:"Bulk GSuite automation and browser OAuth polling login.",supportedModes:["bulk-account","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1),[c,x]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login + Generate Key"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk GSuite gmail|password login, create a CodeBuddy Access Key, and save it for model calls."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>x(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"playlist_add"}),"OAuth Token Import"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Paste OAuth tokens with optional refresh tokens and API keys for extended access."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open CodeBuddy browser login and poll until the OAuth token is saved."})]})]}),(0,r.jsx)(d,{isOpen:c,onClose:()=>x(!1),onSuccess:t}),(0,r.jsx)(n.Go,{isOpen:a,provider:"codebuddy",title:"CodeBuddy Bulk GSuite Login + Access Key",serviceName:"CodeBuddy",onSuccess:t,onClose:()=>l(!1)}),(0,r.jsx)(n.LF,{isOpen:s,provider:"codebuddy",providerInfo:e,onSuccess:()=>{t?.(),i(!1)},onClose:()=>i(!1)})]})}},{id:"codebuddy-cn",label:"CodeBuddy CN",icon:"smart_toy",description:"Phone-number auto-registration via 5sim SMS, token import, and device OAuth.",supportedModes:["bulk-account","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1),[d,x]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"smartphone"}),"Auto Register (Phone)"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Bulk auto-register CodeBuddy CN accounts using 5sim Hong Kong phone numbers. Includes device-code token capture."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"playlist_add"}),"OAuth Token Import"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Paste pre-obtained CodeBuddy CN OAuth tokens with optional refresh tokens."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>x(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open CodeBuddy CN browser login and poll until the OAuth token is saved."})]})]}),(0,r.jsx)(n.zE,{isOpen:s,onClose:()=>i(!1),onSuccess:t}),(0,r.jsx)(c,{isOpen:a,onClose:()=>l(!1),onSuccess:t}),(0,r.jsx)(n.LF,{isOpen:d,provider:"codebuddy-cn",providerInfo:e,onSuccess:()=>{t?.(),x(!1)},onClose:()=>x(!1)})]})}},{id:"qoder",label:"Qoder",icon:"code",description:"Bulk GSuite auto login via Google SSO and device flow.",supportedModes:["bulk-account","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login Bulk"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk gmail:password or gmail|password automation via Google SSO with Qoder device flow."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open Qoder device login in browser and poll until the token is saved."})]})]}),(0,r.jsx)(n.Go,{isOpen:s,provider:"qoder",title:"Qoder Bulk GSuite Auto Login",serviceName:"Qoder",onSuccess:t,onClose:()=>i(!1)}),(0,r.jsx)(n.LF,{isOpen:a,provider:"qoder",providerInfo:e,onSuccess:()=>{t?.(),l(!1)},onClose:()=>l(!1)})]})}},{id:"antigravity",label:"Antigravity",icon:"rocket_launch",description:"Bulk GSuite auto login via Google OAuth (authorization code).",supportedModes:["bulk-account","oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login Bulk"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk gmail:password or gmail|password automation via Google OAuth (authorization code) for Antigravity."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open Antigravity Google OAuth in browser and finish the consent manually."})]})]}),(0,r.jsx)(n.Go,{isOpen:s,provider:"antigravity",title:"Antigravity Bulk GSuite Auto Login",serviceName:"Antigravity",onSuccess:t,onClose:()=>i(!1)}),(0,r.jsx)(n.LF,{isOpen:a,provider:"antigravity",providerInfo:e,onSuccess:()=>{t?.(),l(!1)},onClose:()=>l(!1)})]})}},{id:"cloudflare-ai",label:"Cloudflare Workers AI",icon:"cloud",description:"Bulk Google login → Workers AI API token harvest for free-tier CF AI.",supportedModes:["bulk-account"],component:function({onRefresh:e}){let[t,s]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:(0,r.jsxs)("button",{type:"button",onClick:()=>s(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"cloud"}),"Bulk Workers AI Tokens"]}),(0,r.jsxs)("span",{className:"text-xs leading-relaxed text-text-muted",children:["Google login to Cloudflare dashboard → create Workers AI API token → save as"," ",(0,r.jsx)("code",{className:"text-[11px]",children:"cloudflare-ai"})," (accountId + token). Paste"," ",(0,r.jsx)("code",{className:"text-[11px]",children:"email:password"})," or ",(0,r.jsx)("code",{className:"text-[11px]",children:"email|password"}),". Uses headed ",(0,r.jsx)("strong",{children:"CloakBrowser"})," (sole automation engine) + residential proxy recommended."]})]})}),(0,r.jsx)(n.Go,{isOpen:t,provider:"cloudflare-ai",title:"Cloudflare Workers AI Bulk Token Harvest",serviceName:"Cloudflare Workers AI",accountsPlaceholder:"user@gmail.com:password\nuser2@gmail.com|password",onSuccess:e,onClose:()=>s(!1)})]})}},{id:"grok-cli",label:"Grok CLI",icon:"auto_awesome",description:"Bulk GSuite auto login via xAI device flow, token import, and device OAuth for Grok Build credits.",supportedModes:["bulk-account","bulk-token","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login Bulk"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk gmail:password or gmail|password automation via Google SSO on the xAI device login (Grok Build credits)."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"playlist_add"}),"Bulk Token Import"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Paste many xAI refresh tokens (or access:refresh pairs) — each line becomes a Grok CLI connection."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open xAI device login in browser, enter the code, and the token is saved automatically."})]})]}),(0,r.jsx)(n.Go,{isOpen:s,provider:"grok-cli",title:"Grok CLI Bulk GSuite Auto Login",serviceName:"Grok CLI",onSuccess:t,onClose:()=>i(!1)}),(0,r.jsx)(x,{isOpen:a,onClose:()=>l(!1),onSuccess:t}),(0,r.jsx)(n.LF,{isOpen:d,provider:"grok-cli",providerInfo:e,onSuccess:()=>{t?.(),c(!1)},onClose:()=>c(!1)})]})}}];function u(){let[e,t]=(0,o.useState)([]),[s,d]=(0,o.useState)(!0),[c,x]=(0,o.useState)(p[0].id),u=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/providers",{cache:"no-store"}),s=await e.json();e.ok&&t(s.connections||[])}catch(e){console.log("Error fetching automation connections:",e)}finally{d(!1)}},[]);(0,o.useEffect)(()=>{u()},[u]),(0,o.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("provider");p.some(t=>t.id===e)&&x(e)},[]);let h=p.find(e=>e.id===c)||p[0],b=i.IS[h.id]||{id:h.id,name:h.label},g=h.component,f=(0,o.useMemo)(()=>{let t={};for(let s of p)t[s.id]=e.filter(e=>e.provider===s.id).length;return t},[e]);return s?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:"Automation"})}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:p.map(e=>{let t=e.id===c;return(0,r.jsxs)("button",{type:"button",onClick:()=>x(e.id),className:`flex min-w-0 items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors ${t?"border-primary/50 bg-primary/10 text-primary":"border-border bg-surface text-text-main hover:border-primary/30 hover:bg-primary/5"}`,children:[(0,r.jsx)(a,{id:e.id,icon:e.icon,size:22}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsx)("span",{className:"block truncate text-sm font-semibold",children:e.label}),(0,r.jsx)("span",{className:"mt-0.5 block text-xs text-text-muted",children:l(f[e.id]||0)})]})]},e.id)})}),(0,r.jsx)(n.Zp,{children:(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(a,{id:h.id,icon:h.icon,size:22}),(0,r.jsx)("h2",{className:"text-lg font-semibold",children:h.label})]}),(0,r.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-text-muted",children:h.description}),(0,r.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:h.supportedModes.map(e=>(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:m[e]},e))})]}),(0,r.jsx)(n.Ex,{variant:"success",children:l(f[h.id]||0)})]}),(0,r.jsx)(g,{providerInfo:b,onRefresh:u})]})})]})}},98944:(e,t,s)=>{Promise.resolve().then(s.bind(s,20975))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=98944)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{20975:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s(95155),o=s(12115),n=s(35497),i=s(1791);function a({id:e,icon:t,size:s=22}){let[n,i]=(0,o.useState)(!1);return n?(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",style:{fontSize:s},children:t}):(0,r.jsx)("img",{src:`/providers/${e}.png`,alt:"",width:s,height:s,className:"rounded object-contain",style:{width:s,height:s},onError:()=>i(!0)})}function l(e){return`${e} connection${1===e?"":"s"}`}function d({isOpen:e,onClose:t,onSuccess:s}){let[n,i]=(0,o.useState)(""),[a,l]=(0,o.useState)(!1),[c,x]=(0,o.useState)(null),m=async()=>{if(n.trim()){l(!0),x(null);try{let e=await fetch("/api/oauth/codebuddy/bulk-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:n})}),t=await e.json();x(t),t.success&&s?.()}catch(e){x({error:e.message})}finally{l(!1)}}};if(!e)return null;let p=null;if(c?.success){let e=[`Imported ${c.imported}/${c.total} tokens.`];if(c.failed&&e.push(`${c.failed} failed.`),c.formatCounts){let{"access-only":t,"with-refresh":s,"with-api-key":r}=c.formatCounts,o=[];r&&o.push(`${r} with API key`),s&&o.push(`${s} with refresh token`),t&&o.push(`${t} access-only`),o.length&&e.push(`(${o.join(", ")})`)}p=e.join(" ")}return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl border border-border bg-surface p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h3",{className:"mb-4 text-lg font-semibold text-text-main",children:"CodeBuddy OAuth Token Import"}),(0,r.jsx)("p",{className:"mb-2 text-xs text-text-muted",children:"Paste CodeBuddy OAuth tokens, one per line. Supports three formats:"}),(0,r.jsxs)("div",{className:"mb-3 space-y-2 rounded-lg bg-background/50 p-3 text-xs text-text-muted",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary leading-none",children:"check_circle"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded leading-none",children:"accessToken"}),(0,r.jsx)("span",{children:"— access token only (24h expiry)"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary leading-none",children:"check_circle"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded leading-none",children:"accessToken:refreshToken"}),(0,r.jsx)("span",{children:"— enables auto-refresh"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary leading-none",children:"check_circle"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded leading-none",children:"accessToken:refreshToken:apiKey"}),(0,r.jsx)("span",{children:"— 365-day access"})]})]})]}),(0,r.jsx)("textarea",{className:"mb-3 w-full rounded-lg border border-border bg-background p-3 font-mono text-xs text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none",rows:8,placeholder:"eyJhbGciOiJSUzI1NiIs...\neyJhbGciOiJSUzI1NiIs...:eyJhbGciOiJSUzI1NiIs...\neyJhbGciOiJSUzI1NiIs...:eyJhbGciOiJSUzI1NiIs...:ak_abc123...",value:n,onChange:e=>i(e.target.value),disabled:a}),c&&(0,r.jsx)("div",{className:"mb-3 rounded-lg p-3 text-xs "+(c.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:p||c.error||"Import failed"}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:t,className:"rounded-lg px-4 py-2 text-sm text-text-muted hover:bg-border/50",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:a||!n.trim(),className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 disabled:opacity-50",children:a?"Importing...":"Import Tokens"})]})]})})}function c({isOpen:e,onClose:t,onSuccess:s}){let[n,i]=(0,o.useState)(""),[a,l]=(0,o.useState)(!1),[d,x]=(0,o.useState)(null),m=async()=>{if(n.trim()){l(!0),x(null);try{let e=await fetch("/api/oauth/codebuddy-cn/bulk-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:n})}),t=await e.json();x(t),t.success&&s?.()}catch(e){x({error:e.message})}finally{l(!1)}}};if(!e)return null;let p=null;if(d?.success){let e=[`Imported ${d.imported}/${d.total} tokens.`];d.failed&&e.push(`${d.failed} failed.`),p=e.join(" ")}return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl border border-border bg-surface p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h3",{className:"mb-4 text-lg font-semibold text-text-main",children:"CodeBuddy CN OAuth Token Import"}),(0,r.jsx)("p",{className:"mb-2 text-xs text-text-muted",children:"Paste CodeBuddy CN OAuth tokens, one per line. Supports:"}),(0,r.jsxs)("div",{className:"mb-3 space-y-1 rounded-lg bg-background/50 p-3 text-xs text-text-muted",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken"})," — access token only"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken:refreshToken"})," — enables auto-refresh"]})]}),(0,r.jsx)("textarea",{className:"mb-3 w-full rounded-lg border border-border bg-background p-3 font-mono text-xs text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none",rows:8,placeholder:"eyJhbGciOiJSUzI1NiIs...\neyJhbGciOiJSUzI1NiIs...:eyJhbGciOiJSUzI1NiIs...",value:n,onChange:e=>i(e.target.value),disabled:a}),d&&(0,r.jsx)("div",{className:"mb-3 rounded-lg p-3 text-xs "+(d.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:p||d.error||"Import failed"}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:t,className:"rounded-lg px-4 py-2 text-sm text-text-muted hover:bg-border/50",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:a||!n.trim(),className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 disabled:opacity-50",children:a?"Importing...":"Import Tokens"})]})]})})}function x({isOpen:e,onClose:t,onSuccess:s}){let[n,i]=(0,o.useState)(""),[a,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(null),m=async()=>{if(n.trim()){l(!0),c(null);try{let e=await fetch("/api/oauth/grok-cli/bulk-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:n})}),t=await e.json();c(t),t.success&&s?.()}catch(e){c({error:e.message})}finally{l(!1)}}};if(!e)return null;let p=null;if(d?.success){let e=[`Imported ${d.imported}/${d.total} tokens.`];d.failed&&e.push(`${d.failed} failed.`),p=e.join(" ")}return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl border border-border bg-surface p-6 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("h3",{className:"mb-4 text-lg font-semibold text-text-main",children:"Grok CLI Token Import"}),(0,r.jsx)("p",{className:"mb-2 text-xs text-text-muted",children:"Paste xAI / Grok CLI tokens, one per line. Supports:"}),(0,r.jsxs)("div",{className:"mb-3 space-y-1 rounded-lg bg-background/50 p-3 text-xs text-text-muted",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"refreshToken"})," — refreshed immediately for a fresh access token"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken:refreshToken"})," — imported as-is (auto-refreshed if expired)"]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("code",{className:"text-[10px] bg-border/50 px-1.5 py-0.5 rounded",children:"accessToken:refreshToken:email"})," — skips account email lookup"]})]}),(0,r.jsx)("textarea",{className:"mb-3 w-full rounded-lg border border-border bg-background p-3 font-mono text-xs text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none",rows:8,placeholder:"rt_xxx...\neyJhbGciOi...:rt_xxx...\neyJhbGciOi...:rt_xxx...:user@example.com",value:n,onChange:e=>i(e.target.value),disabled:a}),d&&(0,r.jsx)("div",{className:"mb-3 rounded-lg p-3 text-xs "+(d.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:p||d.error||"Import failed"}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:t,className:"rounded-lg px-4 py-2 text-sm text-text-muted hover:bg-border/50",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:a||!n.trim(),className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 disabled:opacity-50",children:a?"Importing...":"Import Tokens"})]})]})})}let m={"single-token":"Token import","bulk-token":"Bulk token import","bulk-account":"Bulk accounts","device-oauth":"Device login",social:"Social login",oauth:"OAuth login"},p=[{id:"kiro",label:"Kiro AI",icon:"psychology_alt",description:"Token import, bulk import, and social login automation.",supportedModes:["single-token","bulk-token","bulk-account","social"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(null),[d,c]=(0,o.useState)(null),x=e=>{c({...e,key:Date.now()}),i(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[{id:"bulk-account",title:"Auto Login Bulk",icon:"group_add",description:"Run bulk gmail|password automation with worker progress and manual assist.",action:()=>x({method:"import",importMode:"bulk-account"})},{id:"bulk-token",title:"Bulk Token",icon:"playlist_add",description:"Import many Kiro refresh tokens, one token per line.",action:()=>x({method:"import",importMode:"bulk-token"})},{id:"single-token",title:"Single Token",icon:"vpn_key",description:"Auto-detect or paste one Kiro refresh token.",action:()=>x({method:"import",importMode:"single-token"})},{id:"builder-id",title:"AWS Builder ID",icon:"shield",description:"Open the standard AWS Builder ID device login.",action:()=>x({method:"builder-id"})},{id:"idc",title:"AWS IDC",icon:"business",description:"Enter an IAM Identity Center start URL and region.",action:()=>x({method:"idc"})},{id:"google",title:"Google Login",icon:"account_circle",description:"Open Kiro social Google login with callback capture.",action:()=>x({method:"social",provider:"google"})}].map(e=>(0,r.jsxs)("button",{type:"button",onClick:e.action,className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:e.icon}),e.title]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:e.description})]},e.id))}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a?.jobId&&(0,r.jsxs)(n.Ex,{variant:"default",children:["Bulk job: ",a.status]}),a?.jobId&&(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"monitoring",onClick:()=>x({method:"import",importMode:"bulk-account"}),children:"Resume Bulk Progress"})]}),(0,r.jsx)(n.Mh,{isOpen:s,providerInfo:e,onSuccess:t,onRefresh:t,initialBulkJobId:a?.jobId||null,initialFlow:d,onBulkJobChange:l,onClose:()=>i(!1)})]})}},{id:"codebuddy",label:"CodeBuddy",icon:"smart_toy",description:"Bulk GSuite automation and browser OAuth polling login.",supportedModes:["bulk-account","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1),[c,x]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login + Generate Key"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk GSuite gmail|password login, create a CodeBuddy Access Key, and save it for model calls."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>x(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"playlist_add"}),"OAuth Token Import"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Paste OAuth tokens with optional refresh tokens and API keys for extended access."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open CodeBuddy browser login and poll until the OAuth token is saved."})]})]}),(0,r.jsx)(d,{isOpen:c,onClose:()=>x(!1),onSuccess:t}),(0,r.jsx)(n.Go,{isOpen:a,provider:"codebuddy",title:"CodeBuddy Bulk GSuite Login + Access Key",serviceName:"CodeBuddy",onSuccess:t,onClose:()=>l(!1)}),(0,r.jsx)(n.LF,{isOpen:s,provider:"codebuddy",providerInfo:e,onSuccess:()=>{t?.(),i(!1)},onClose:()=>i(!1)})]})}},{id:"codebuddy-cn",label:"CodeBuddy CN",icon:"smart_toy",description:"Phone-number auto-registration via 5sim SMS, token import, and device OAuth.",supportedModes:["bulk-account","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1),[d,x]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"smartphone"}),"Auto Register (Phone)"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Bulk auto-register CodeBuddy CN accounts using 5sim Hong Kong phone numbers. Includes device-code token capture."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"playlist_add"}),"OAuth Token Import"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Paste pre-obtained CodeBuddy CN OAuth tokens with optional refresh tokens."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>x(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open CodeBuddy CN browser login and poll until the OAuth token is saved."})]})]}),(0,r.jsx)(n.zE,{isOpen:s,onClose:()=>i(!1),onSuccess:t}),(0,r.jsx)(c,{isOpen:a,onClose:()=>l(!1),onSuccess:t}),(0,r.jsx)(n.LF,{isOpen:d,provider:"codebuddy-cn",providerInfo:e,onSuccess:()=>{t?.(),x(!1)},onClose:()=>x(!1)})]})}},{id:"qoder",label:"Qoder",icon:"code",description:"Bulk GSuite auto login via Google SSO and device flow.",supportedModes:["bulk-account","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login Bulk"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk gmail:password or gmail|password automation via Google SSO with Qoder device flow."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open Qoder device login in browser and poll until the token is saved."})]})]}),(0,r.jsx)(n.Go,{isOpen:s,provider:"qoder",title:"Qoder Bulk GSuite Auto Login",serviceName:"Qoder",onSuccess:t,onClose:()=>i(!1)}),(0,r.jsx)(n.LF,{isOpen:a,provider:"qoder",providerInfo:e,onSuccess:()=>{t?.(),l(!1)},onClose:()=>l(!1)})]})}},{id:"antigravity",label:"Antigravity",icon:"rocket_launch",description:"Bulk GSuite auto login via Google OAuth (authorization code).",supportedModes:["bulk-account","oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login Bulk"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk gmail:password or gmail|password automation via Google OAuth (authorization code) for Antigravity."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open Antigravity Google OAuth in browser and finish the consent manually."})]})]}),(0,r.jsx)(n.Go,{isOpen:s,provider:"antigravity",title:"Antigravity Bulk GSuite Auto Login",serviceName:"Antigravity",onSuccess:t,onClose:()=>i(!1)}),(0,r.jsx)(n.LF,{isOpen:a,provider:"antigravity",providerInfo:e,onSuccess:()=>{t?.(),l(!1)},onClose:()=>l(!1)})]})}},{id:"cloudflare-ai",label:"Cloudflare Workers AI",icon:"cloud",description:"Bulk Google login → Workers AI API token harvest for free-tier CF AI.",supportedModes:["bulk-account"],component:function({onRefresh:e}){let[t,s]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:(0,r.jsxs)("button",{type:"button",onClick:()=>s(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"cloud"}),"Bulk Workers AI Tokens"]}),(0,r.jsxs)("span",{className:"text-xs leading-relaxed text-text-muted",children:["Google login to Cloudflare dashboard → create Workers AI API token → save as"," ",(0,r.jsx)("code",{className:"text-[11px]",children:"cloudflare-ai"})," (accountId + token). Paste"," ",(0,r.jsx)("code",{className:"text-[11px]",children:"email:password"})," or ",(0,r.jsx)("code",{className:"text-[11px]",children:"email|password"}),". Uses headed ",(0,r.jsx)("strong",{children:"CloakBrowser"})," (sole automation engine) + residential proxy recommended."]})]})}),(0,r.jsx)(n.Go,{isOpen:t,provider:"cloudflare-ai",title:"Cloudflare Workers AI Bulk Token Harvest",serviceName:"Cloudflare Workers AI",accountsPlaceholder:"user@gmail.com:password\nuser2@gmail.com|password",onSuccess:e,onClose:()=>s(!1)})]})}},{id:"grok-cli",label:"Grok CLI",icon:"auto_awesome",description:"Bulk GSuite auto login via xAI device flow, token import, and device OAuth for Grok Build credits.",supportedModes:["bulk-account","bulk-token","device-oauth"],component:function({providerInfo:e,onRefresh:t}){let[s,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"group_add"}),"Auto Login Bulk"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Run bulk gmail:password or gmail|password automation via Google SSO on the xAI device login (Grok Build credits)."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>l(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"playlist_add"}),"Bulk Token Import"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Paste many xAI refresh tokens (or access:refresh pairs) — each line becomes a Grok CLI connection."})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"flex min-h-[112px] min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface px-4 py-3 text-left transition-colors hover:border-primary/40 hover:bg-primary/5",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"login"}),"Device OAuth Login"]}),(0,r.jsx)("span",{className:"text-xs leading-relaxed text-text-muted",children:"Open xAI device login in browser, enter the code, and the token is saved automatically."})]})]}),(0,r.jsx)(n.Go,{isOpen:s,provider:"grok-cli",title:"Grok CLI Bulk GSuite Auto Login",serviceName:"Grok CLI",onSuccess:t,onClose:()=>i(!1)}),(0,r.jsx)(x,{isOpen:a,onClose:()=>l(!1),onSuccess:t}),(0,r.jsx)(n.LF,{isOpen:d,provider:"grok-cli",providerInfo:e,onSuccess:()=>{t?.(),c(!1)},onClose:()=>c(!1)})]})}}];function u(){let[e,t]=(0,o.useState)([]),[s,d]=(0,o.useState)(!0),[c,x]=(0,o.useState)(p[0].id),u=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/providers",{cache:"no-store"}),s=await e.json();e.ok&&t(s.connections||[])}catch(e){console.log("Error fetching automation connections:",e)}finally{d(!1)}},[]);(0,o.useEffect)(()=>{u()},[u]),(0,o.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("provider");p.some(t=>t.id===e)&&x(e)},[]);let h=p.find(e=>e.id===c)||p[0],b=i.IS[h.id]||{id:h.id,name:h.label},g=h.component,f=(0,o.useMemo)(()=>{let t={};for(let s of p)t[s.id]=e.filter(e=>e.provider===s.id).length;return t},[e]);return s?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:"Automation"})}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:p.map(e=>{let t=e.id===c;return(0,r.jsxs)("button",{type:"button",onClick:()=>x(e.id),className:`flex min-w-0 items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors ${t?"border-primary/50 bg-primary/10 text-primary":"border-border bg-surface text-text-main hover:border-primary/30 hover:bg-primary/5"}`,children:[(0,r.jsx)(a,{id:e.id,icon:e.icon,size:22}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsx)("span",{className:"block truncate text-sm font-semibold",children:e.label}),(0,r.jsx)("span",{className:"mt-0.5 block text-xs text-text-muted",children:l(f[e.id]||0)})]})]},e.id)})}),(0,r.jsx)(n.Zp,{children:(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(a,{id:h.id,icon:h.icon,size:22}),(0,r.jsx)("h2",{className:"text-lg font-semibold",children:h.label})]}),(0,r.jsx)("span",{className:"mt-1 block text-xs leading-relaxed text-text-muted",children:h.description}),(0,r.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:h.supportedModes.map(e=>(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:m[e]},e))})]}),(0,r.jsx)(n.Ex,{variant:"success",children:l(f[h.id]||0)})]}),(0,r.jsx)(g,{providerInfo:b,onRefresh:u})]})})]})}},32955:(e,t,s)=>{Promise.resolve().then(s.bind(s,20975))}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,8441,3794,7358],()=>e(e.s=32955)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{},_=>{_.O(0,[2574,3862,3745,3416,9501,620,5497,9041,8441,3794,7358],()=>_(_.s=39041)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{56668:(e,t,s)=>{Promise.resolve().then(s.bind(s,85309))},85309:(e,t,s)=>{"use strict";s.d(t,{default:()=>h});var a=s(95155),l=s(12115),r=s(98500),i=s.n(r),o=s(35497),d=s(3534),n=s(28777),c=s(66430),u=s(40728),x=s(12252),v=s(40866);let m=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function h({toolId:e,machineId:t}){let s=d.dM[e],[r,p]=(0,l.useState)([]),[b,f]=(0,l.useState)(!0),[j,g]=(0,l.useState)({}),[E,P]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[N,y]=(0,l.useState)(""),[_,A]=(0,l.useState)(!1),[S,C]=(0,l.useState)(""),[U,L]=(0,l.useState)([]),[I,T]=(0,l.useState)(!1),M=(0,x.F)(r.some(e=>"kiro"===e.provider&&!1!==e.isActive));(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,s,a,l]=await Promise.all([(0,c.b7)("providers:list",u.t7),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/dashboard/cli-tools/keys",{cache:"no-store"})]);if(!e)return;if(401===s.status||401===a.status||401===l.status)return void T(!0);if(p(t.connections||[]),s.ok){let e=await s.json();P(e.cloudEnabled||!1)}if(a.ok){let e=await a.json();w(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),y(e.tunnel?.publicUrl||""),A(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),C(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();L(e.keys||[])}}catch(t){e&&t?.status===401&&T(!0),console.log("Error loading tool data:",t)}finally{e&&f(!1)}})(),()=>{e=!1}},[]);let O=()=>r.filter(e=>!1!==e.isActive),$=(0,l.useCallback)((e,t,s)=>{g(a=>a[e]?.[t]===s?a:{...a,[e]:{...a[e],[t]:s}})},[]);return s?(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,a.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:s.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s.description})]}),b?(0,a.jsx)(o.Qv,{}):I?(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500",children:"lock"}),(0,a.jsx)("p",{className:"flex-1 text-sm text-red-600",children:"Your session has expired — tool data, tunnel status, and API keys could not be loaded. Log in again before applying settings, otherwise the tool may be written with a fallback key."})]}),(0,a.jsx)("div",{className:"pl-9",children:(0,a.jsxs)("a",{href:"/login",className:"inline-flex items-center px-3 py-1.5 rounded-md border border-red-500/40 bg-red-500/20 text-red-700 dark:text-red-300 text-xs font-medium hover:bg-red-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1",children:"login"}),"Log in again"]})})]}):(()=>{let t,l,r,i=(t=O(),l=[],r=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;("kiro"===e.provider?M:(0,n.KC)(e.provider)).forEach(s=>{let a=`${t}/${s.id}`;r.has(a)||(r.add(a),l.push({value:a,label:`${t}/${s.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:s.id}))})}),l).length>0,o={tool:s,isExpanded:!0,onToggle:()=>{},baseUrl:k&&N?N:E&&m?m:window.location.origin,apiKeys:U,tunnelEnabled:k,tunnelPublicUrl:N,tailscaleEnabled:_,tailscaleUrl:S};switch(e){case"claude":return(0,a.jsx)(v.Tk,{...o,activeProviders:O(),modelMappings:j[e]||{},onModelMappingChange:(t,s)=>$(e,t,s),hasActiveProviders:i,cloudEnabled:E});case"codex":return(0,a.jsx)(v.Ah,{...o,activeProviders:O(),cloudEnabled:E});case"grok-build":return(0,a.jsx)(v.E_,{...o,activeProviders:O(),cloudEnabled:E});case"opencode":return(0,a.jsx)(v.qO,{...o,activeProviders:O(),cloudEnabled:E});case"cowork":return(0,a.jsx)(v.Q6,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E,cloudUrl:m,tunnelEnabled:k,tunnelPublicUrl:N,tailscaleEnabled:_,tailscaleUrl:S});case"droid":return(0,a.jsx)(v.ZM,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"openclaw":return(0,a.jsx)(v.yZ,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"hermes":return(0,a.jsx)(v.RF,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"copilot":return(0,a.jsx)(v.h1,{...o,activeProviders:O(),cloudEnabled:E});case"cline":return(0,a.jsx)(v.aG,{...o,activeProviders:O(),cloudEnabled:E});case"kilo":return(0,a.jsx)(v.c9,{...o,activeProviders:O(),cloudEnabled:E});case"deepseek-tui":return(0,a.jsx)(v.lF,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"jcode":return(0,a.jsx)(v.mW,{...o,activeProviders:O(),hasActiveProviders:i,cloudEnabled:E});case"omp":return(0,a.jsx)(v.v0,{...o,cloudEnabled:E});case"openbot":return(0,a.jsx)(v.aD,{...o});case"pi":case"crush":case"forge":case"smelt":case"codewhale":return(0,a.jsx)(v.WE,{...o,activeProviders:O(),cloudEnabled:E});default:return(0,a.jsx)(v.a7,{toolId:e,...o,activeProviders:O(),cloudEnabled:E,tunnelEnabled:k})}})()]}):(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,a.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,866,8441,3794,7358],()=>e(e.s=56668)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{1129:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),r=l(12115),a=l(35497),n=l(3534),i=l(40866),o=l(98500),d=l.n(o),c=l(5772);function x({toolId:e,tool:s,status:l}){let r=l?.error?{label:"Unavailable",cls:"bg-red-500/10 text-red-600 dark:text-red-400"}:l||s?.configType!=="guide"?l?l.installed?l.hasZevai?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"}:{label:"Guide",cls:"bg-blue-500/10 text-blue-600 dark:text-blue-400"};return(0,t.jsx)(d(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(a.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(c.A,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${r.cls}`,children:r.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,r.useState)(!0),[o,d]=(0,r.useState)({}),[c,u]=(0,r.useState)(null),g=(0,r.useRef)(null),b=(0,r.useCallback)(async e=>{try{let s=await fetch("/api/cli-tools/all-statuses",{signal:e});!e.aborted&&s.ok?(d(await s.json()),u(null)):e.aborted||u(`Failed to load tool statuses (HTTP ${s.status})`)}catch(s){"AbortError"!==s.name&&(console.log("Error fetching tool statuses:",s),e.aborted||u("Failed to load tool statuses. Check your connection and try again."))}finally{e.aborted||l(!1)}},[]),p=(0,r.useCallback)(()=>{g.current?.abort();let e=new AbortController;g.current=e,b(e.signal)},[b]);if((0,r.useEffect)(()=>{let e=window.setTimeout(p,0),s=()=>p();return window.addEventListener("focus",s),()=>{window.clearTimeout(e),g.current?.abort(),window.removeEventListener("focus",s)}},[p]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{}),(0,t.jsx)(a.Qv,{})]});let h=Object.entries(n.dM),f=Object.entries(n.wn);return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-600",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"error"}),(0,t.jsx)("span",{className:"flex-1",children:c}),(0,t.jsxs)("button",{type:"button",onClick:p,className:"inline-flex items-center gap-1 rounded-md border border-red-500/40 bg-red-500/20 px-2 py-1 font-medium text-red-700 hover:bg-red-500/30 dark:text-red-300",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"}),"Retry"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:h.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:o[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:f.map(([e,s])=>(0,t.jsx)(i.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[2574,3862,3745,3416,9501,620,5497,866,8441,3794,7358],()=>e(e.s=1129)),_N_E=e.O()}]);