@rsalmn/extremerouter 0.8.2 → 0.8.4

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 (1232) hide show
  1. package/README.md +89 -89
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +13 -9
  4. package/app/.next-cli-build/build-manifest.json +4 -4
  5. package/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/app/.next-cli-build/react-loadable-manifest.json +1 -13
  7. package/app/.next-cli-build/required-server-files.json +23 -23
  8. package/app/.next-cli-build/routes-manifest.json +24 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -0
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -0
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -0
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.rsc +7 -6
  109. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -6
  110. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -2
  115. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/alerts/test/route_client-reference-manifest.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/reset-password/route_client-reference-manifest.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  139. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/breaker/route_client-reference-manifest.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cache/route_client-reference-manifest.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  146. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  173. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  176. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  182. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  188. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  190. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  191. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  193. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  199. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  202. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/combos/validate-roles/route_client-reference-manifest.js +1 -1
  205. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  206. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/dashboard/stream/route_client-reference-manifest.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -1
  211. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -1
  214. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  215. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -1
  217. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/health/providers/route_client-reference-manifest.js +1 -1
  220. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  223. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  224. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/health/stream/route_client-reference-manifest.js +1 -1
  226. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  229. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  232. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  235. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  239. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  241. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  242. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  244. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  256. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  262. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  265. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  271. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  274. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/1min/import/route_client-reference-manifest.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  290. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -0
  302. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -0
  303. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route_client-reference-manifest.js +1 -0
  304. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -0
  305. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -0
  306. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route_client-reference-manifest.js +1 -0
  307. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -0
  308. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -0
  309. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route_client-reference-manifest.js +1 -0
  310. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -1
  313. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  316. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  319. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route_client-reference-manifest.js +1 -1
  322. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  325. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  328. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route_client-reference-manifest.js +1 -1
  331. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route_client-reference-manifest.js +1 -1
  334. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +38 -2
  335. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route_client-reference-manifest.js +1 -1
  337. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/oauth/zed/import/route_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  343. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  346. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  352. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route_client-reference-manifest.js +1 -1
  355. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route_client-reference-manifest.js +1 -1
  358. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route_client-reference-manifest.js +1 -1
  361. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route_client-reference-manifest.js +1 -1
  364. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  367. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route_client-reference-manifest.js +1 -1
  370. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route_client-reference-manifest.js +1 -1
  373. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route_client-reference-manifest.js +1 -1
  376. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  379. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  382. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  385. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route_client-reference-manifest.js +1 -1
  388. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route_client-reference-manifest.js +1 -1
  394. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  397. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  406. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  409. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  412. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  415. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  418. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  419. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -1
  421. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  422. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -1
  424. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  427. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  428. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
  430. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  431. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -1
  433. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  434. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -1
  436. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  439. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  445. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  448. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  451. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/swarm/active/route_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
  455. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/swarm/stream/route_client-reference-manifest.js +1 -1
  457. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  460. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  464. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  466. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  469. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  472. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  478. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  481. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  487. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
  490. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
  496. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  497. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  498. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
  499. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  500. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  503. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  505. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  506. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  508. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  509. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  510. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  511. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  512. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  513. package/app/.next-cli-build/server/app/api/usage/leaderboard/route_client-reference-manifest.js +1 -1
  514. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  515. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  517. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  518. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/api/usage/meta/route_client-reference-manifest.js +1 -1
  520. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  521. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  523. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  524. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  526. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  527. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  529. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  530. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/api/usage/retry-stats/route_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  533. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  534. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  535. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  536. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  538. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  539. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  540. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  542. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  544. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  545. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  546. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  547. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  548. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  550. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  551. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  552. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  553. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  554. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  556. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  557. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  558. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  559. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  560. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  561. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  562. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  563. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  564. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  565. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  566. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  567. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  568. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  569. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  570. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  571. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  572. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  573. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  574. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  575. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  577. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  578. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  579. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  580. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  581. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  582. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  583. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  584. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  586. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  587. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  588. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  589. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  590. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  591. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  592. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  593. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  594. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  595. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  596. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  598. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  599. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  600. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  601. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  602. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  603. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  604. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  605. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  606. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  607. package/app/.next-cli-build/server/app/callback.html +1 -1
  608. package/app/.next-cli-build/server/app/callback.rsc +8 -7
  609. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +8 -7
  610. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  612. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -2
  613. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  614. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  615. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  619. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -7
  620. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -7
  621. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -2
  624. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  625. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  629. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  630. package/app/.next-cli-build/server/app/index.html +1 -1
  631. package/app/.next-cli-build/server/app/index.rsc +7 -6
  632. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -6
  634. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  636. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -2
  637. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  638. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  639. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  640. package/app/.next-cli-build/server/app/landing.html +1 -1
  641. package/app/.next-cli-build/server/app/landing.rsc +8 -7
  642. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -7
  643. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  645. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -2
  646. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/login/page.js +2 -2
  649. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  650. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  651. package/app/.next-cli-build/server/app/login.html +1 -1
  652. package/app/.next-cli-build/server/app/login.rsc +8 -7
  653. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -7
  654. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  655. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  656. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -2
  657. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  658. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  660. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  661. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  662. package/app/.next-cli-build/server/app/page.js +2 -2
  663. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  664. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  665. package/app/.next-cli-build/server/app-paths-manifest.json +13 -9
  666. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  667. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  668. package/app/.next-cli-build/server/chunks/1429.js +1 -0
  669. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  670. package/app/.next-cli-build/server/chunks/212.js +1 -1
  671. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  672. package/app/.next-cli-build/server/chunks/2409.js +1 -0
  673. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  674. package/app/.next-cli-build/server/chunks/2742.js +1 -0
  675. package/app/.next-cli-build/server/chunks/319.js +3 -3
  676. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  677. package/app/.next-cli-build/server/chunks/3735.js +1 -1
  678. package/app/.next-cli-build/server/chunks/4046.js +1 -0
  679. package/app/.next-cli-build/server/chunks/412.js +2 -2
  680. package/app/.next-cli-build/server/chunks/5330.js +70 -68
  681. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  682. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  683. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  684. package/app/.next-cli-build/server/chunks/5852.js +1 -1
  685. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  686. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  687. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  688. package/app/.next-cli-build/server/chunks/{7152.js → 6482.js} +2 -2
  689. package/app/.next-cli-build/server/chunks/6560.js +1 -0
  690. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  691. package/app/.next-cli-build/server/chunks/7187.js +1 -1
  692. package/app/.next-cli-build/server/chunks/7218.js +1 -0
  693. package/app/.next-cli-build/server/chunks/7410.js +1 -0
  694. package/app/.next-cli-build/server/chunks/7566.js +3 -0
  695. package/app/.next-cli-build/server/chunks/7774.js +18 -18
  696. package/app/.next-cli-build/server/chunks/7872.js +1 -1
  697. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  698. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  699. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  700. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  701. package/app/.next-cli-build/server/chunks/8802.js +2 -0
  702. package/app/.next-cli-build/server/chunks/885.js +75 -0
  703. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  704. package/app/.next-cli-build/server/chunks/8955.js +16 -0
  705. package/app/.next-cli-build/server/chunks/9422.js +1 -1
  706. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  707. package/app/.next-cli-build/server/chunks/9703.js +1 -1
  708. package/app/.next-cli-build/server/chunks/9903.js +1 -1
  709. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  710. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  711. package/app/.next-cli-build/server/middleware.js +5 -5
  712. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  713. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  714. package/app/.next-cli-build/server/pages/404.html +1 -1
  715. package/app/.next-cli-build/server/pages/500.html +1 -1
  716. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  717. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  718. package/app/.next-cli-build/static/JRaGItQgERhBp83cHyRqE/_buildManifest.js +1 -0
  719. package/app/.next-cli-build/static/chunks/{1321-aa0d45362a7ebc08.js → 1321-a7bfb848c63bdbf7.js} +1 -1
  720. package/app/.next-cli-build/static/chunks/1992-7359483e85c66d42.js +1 -0
  721. package/app/.next-cli-build/static/chunks/5497-6eb58895074fec6d.js +7 -0
  722. package/app/.next-cli-build/static/chunks/705-35d16348285626c8.js +1 -0
  723. package/app/.next-cli-build/static/chunks/8105-49cec265df0de251.js +1 -0
  724. package/app/.next-cli-build/static/chunks/{8720-bbafc2ad7d186ebd.js → 8982-6d1803817450bcd4.js} +2 -2
  725. package/app/.next-cli-build/static/chunks/981-777b2911f938c030.js +3 -0
  726. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-920869c698a8b3cf.js → page-c263cd784e69e6f1.js} +1 -1
  727. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-75247ad22e97f7cc.js → page-ecd3a85a40e51c66.js} +1 -1
  728. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-3c3074cf3f61df46.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8b043b8296199edb.js → page-f7cdc992cb310077.js} +1 -1
  730. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b4a78d784383253c.js +3 -0
  731. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-959b3ee3c662de33.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/{page-ec1dc4e44702257d.js → page-133cf1aa2ce53c87.js} +1 -1
  734. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-b635b8b051acb5a5.js → page-7d472b122fb182f0.js} +10 -10
  735. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-83272baae17d38f1.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-a36b3b632d16f4cb.js → page-f36e5ac11783fd1e.js} +2 -2
  737. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-4069e1d40a3c70a6.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-e794909abbc7a09a.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-1d972fd3baee7474.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-2dae733c8e1582bf.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/{page-dc8e49b1fe778d9c.js → page-e7ba910803086460.js} +1 -1
  743. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-2e82495d63f499e9.js → page-6b500acebeff856b.js} +2 -2
  745. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-8965749fb7d0fac3.js → page-bcf9d97ab4dc20d9.js} +1 -1
  746. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5b11b61863963cad.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-843c810c0818ce1b.js → page-58d8d0fa5523ff95.js} +1 -1
  748. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c02ccb0fd35970d1.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-97c920b552343488.js → page-a8b151d5ae9004ea.js} +1 -1
  750. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d57c129c03c9cb36.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-a8af04fbd6293d2f.js → page-61d162d7a7f88a11.js} +1 -1
  753. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-bd421513fd2dc28a.js → page-483f01fd35d212f5.js} +1 -1
  754. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-0a63db83d5e05667.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/_global-error/page-158df2528a1edacc.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/_not-found/{page-732ac0fa56005849.js → page-0161671512f52984.js} +1 -1
  757. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-158df2528a1edacc.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-158df2528a1edacc.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-158df2528a1edacc.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-158df2528a1edacc.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-158df2528a1edacc.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-158df2528a1edacc.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-158df2528a1edacc.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-158df2528a1edacc.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/breaker/route-158df2528a1edacc.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/cache/route-158df2528a1edacc.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-158df2528a1edacc.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-158df2528a1edacc.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-158df2528a1edacc.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-158df2528a1edacc.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-158df2528a1edacc.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-158df2528a1edacc.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-158df2528a1edacc.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-158df2528a1edacc.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-158df2528a1edacc.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-158df2528a1edacc.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-158df2528a1edacc.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-158df2528a1edacc.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-158df2528a1edacc.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-158df2528a1edacc.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-158df2528a1edacc.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-158df2528a1edacc.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-158df2528a1edacc.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-158df2528a1edacc.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/combos/route-158df2528a1edacc.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-158df2528a1edacc.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-158df2528a1edacc.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-158df2528a1edacc.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-158df2528a1edacc.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-158df2528a1edacc.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-158df2528a1edacc.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/health/route-158df2528a1edacc.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-158df2528a1edacc.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/init/route-158df2528a1edacc.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-158df2528a1edacc.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/keys/route-158df2528a1edacc.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/locale/route-158df2528a1edacc.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-158df2528a1edacc.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-158df2528a1edacc.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-158df2528a1edacc.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-158df2528a1edacc.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-158df2528a1edacc.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-158df2528a1edacc.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-158df2528a1edacc.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-158df2528a1edacc.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-158df2528a1edacc.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-158df2528a1edacc.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-158df2528a1edacc.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/models/route-158df2528a1edacc.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/models/test/route-158df2528a1edacc.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-158df2528a1edacc.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-158df2528a1edacc.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-158df2528a1edacc.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-158df2528a1edacc.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-158df2528a1edacc.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-158df2528a1edacc.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-158df2528a1edacc.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-158df2528a1edacc.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-158df2528a1edacc.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-158df2528a1edacc.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-158df2528a1edacc.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-158df2528a1edacc.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-158df2528a1edacc.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-158df2528a1edacc.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-158df2528a1edacc.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-158df2528a1edacc.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-158df2528a1edacc.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-158df2528a1edacc.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-158df2528a1edacc.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-158df2528a1edacc.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-158df2528a1edacc.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/pricing/route-158df2528a1edacc.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-158df2528a1edacc.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-158df2528a1edacc.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-158df2528a1edacc.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-158df2528a1edacc.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-158df2528a1edacc.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-158df2528a1edacc.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-158df2528a1edacc.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-158df2528a1edacc.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-158df2528a1edacc.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-158df2528a1edacc.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-158df2528a1edacc.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-158df2528a1edacc.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-158df2528a1edacc.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-158df2528a1edacc.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-158df2528a1edacc.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-158df2528a1edacc.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-158df2528a1edacc.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-158df2528a1edacc.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-158df2528a1edacc.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/providers/route-158df2528a1edacc.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-158df2528a1edacc.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-158df2528a1edacc.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-158df2528a1edacc.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-158df2528a1edacc.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-158df2528a1edacc.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-158df2528a1edacc.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-158df2528a1edacc.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-158df2528a1edacc.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-158df2528a1edacc.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-158df2528a1edacc.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-158df2528a1edacc.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-158df2528a1edacc.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-158df2528a1edacc.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-158df2528a1edacc.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/settings/route-158df2528a1edacc.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-158df2528a1edacc.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-158df2528a1edacc.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-158df2528a1edacc.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/tags/route-158df2528a1edacc.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-158df2528a1edacc.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-158df2528a1edacc.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-158df2528a1edacc.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-158df2528a1edacc.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-158df2528a1edacc.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-158df2528a1edacc.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-158df2528a1edacc.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-158df2528a1edacc.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-158df2528a1edacc.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-158df2528a1edacc.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-158df2528a1edacc.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-158df2528a1edacc.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-158df2528a1edacc.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-158df2528a1edacc.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-158df2528a1edacc.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-158df2528a1edacc.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-158df2528a1edacc.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-158df2528a1edacc.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-158df2528a1edacc.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-158df2528a1edacc.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-158df2528a1edacc.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-158df2528a1edacc.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-158df2528a1edacc.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-158df2528a1edacc.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-158df2528a1edacc.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-158df2528a1edacc.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-158df2528a1edacc.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-158df2528a1edacc.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-158df2528a1edacc.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-158df2528a1edacc.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-158df2528a1edacc.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-158df2528a1edacc.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-158df2528a1edacc.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-158df2528a1edacc.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-158df2528a1edacc.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-158df2528a1edacc.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-158df2528a1edacc.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-158df2528a1edacc.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-158df2528a1edacc.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-158df2528a1edacc.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/v1/route-158df2528a1edacc.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-158df2528a1edacc.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-158df2528a1edacc.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-158df2528a1edacc.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-158df2528a1edacc.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/version/route-158df2528a1edacc.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-158df2528a1edacc.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/version/update/route-158df2528a1edacc.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/callback/{page-4e8ab9d9128acffb.js → page-20e990994d8da6d3.js} +1 -1
  921. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-d4eb2ba84eef2143.js → page-bb9f307074c5c23a.js} +1 -1
  922. package/app/.next-cli-build/static/chunks/app/landing/{page-ade86a48ca5749f4.js → page-468c5cb1d127c02a.js} +1 -1
  923. package/app/.next-cli-build/static/chunks/app/layout-10bff7b57a2a3c2c.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/login/page-32ab5d7c75651107.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-158df2528a1edacc.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/page-158df2528a1edacc.js +1 -0
  927. package/app/.next-cli-build/static/chunks/main-ab3c4d38db15f747.js +5 -0
  928. package/app/.next-cli-build/static/chunks/main-app-f661afc91c813cfe.js +1 -0
  929. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-158df2528a1edacc.js +1 -0
  930. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-158df2528a1edacc.js +1 -0
  931. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-8fecb2690f5e9ae2.js +1 -0
  932. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-158df2528a1edacc.js +1 -0
  933. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-158df2528a1edacc.js +1 -0
  934. package/app/.next-cli-build/static/chunks/webpack-c2bac8d80aa27536.js +1 -0
  935. package/app/.next-cli-build/static/css/d25230f8c6390408.css +1 -0
  936. package/app/custom-server.js +9 -0
  937. package/app/node_modules/nanoid/package.json +1 -1
  938. package/app/package.json +9 -6
  939. package/app/public/i18n/literals/ar.json +195 -195
  940. package/app/public/i18n/literals/bn.json +195 -195
  941. package/app/public/i18n/literals/cs.json +195 -195
  942. package/app/public/i18n/literals/da.json +195 -195
  943. package/app/public/i18n/literals/de.json +195 -195
  944. package/app/public/i18n/literals/el.json +195 -195
  945. package/app/public/i18n/literals/es.json +195 -195
  946. package/app/public/i18n/literals/fi.json +195 -195
  947. package/app/public/i18n/literals/fr.json +195 -195
  948. package/app/public/i18n/literals/he.json +195 -195
  949. package/app/public/i18n/literals/hi.json +195 -195
  950. package/app/public/i18n/literals/hu.json +195 -195
  951. package/app/public/i18n/literals/id.json +195 -195
  952. package/app/public/i18n/literals/it.json +195 -195
  953. package/app/public/i18n/literals/ja.json +195 -195
  954. package/app/public/i18n/literals/ko.json +195 -195
  955. package/app/public/i18n/literals/nl.json +195 -195
  956. package/app/public/i18n/literals/no.json +195 -195
  957. package/app/public/i18n/literals/pl.json +195 -195
  958. package/app/public/i18n/literals/pt-BR.json +195 -195
  959. package/app/public/i18n/literals/pt-PT.json +195 -195
  960. package/app/public/i18n/literals/ro.json +195 -195
  961. package/app/public/i18n/literals/ru.json +195 -195
  962. package/app/public/i18n/literals/sv.json +195 -195
  963. package/app/public/i18n/literals/th.json +195 -195
  964. package/app/public/i18n/literals/tl.json +195 -195
  965. package/app/public/i18n/literals/tr.json +195 -195
  966. package/app/public/i18n/literals/uk.json +195 -195
  967. package/app/public/i18n/literals/ur.json +195 -195
  968. package/app/public/i18n/literals/vi.json +195 -195
  969. package/app/public/i18n/literals/zh-CN.json +773 -773
  970. package/app/public/i18n/literals/zh-TW.json +195 -195
  971. package/app/public/providers/agnes-api.svg +6 -6
  972. package/app/public/providers/agnes-web.svg +6 -6
  973. package/app/public/providers/alibaba-cn.svg +11 -11
  974. package/app/public/providers/alibaba.svg +11 -11
  975. package/app/public/providers/bynara.svg +22 -22
  976. package/app/public/providers/codebuddy-intl.png +0 -0
  977. package/app/public/providers/devin.svg +5 -5
  978. package/app/public/providers/featherless.svg +8 -8
  979. package/app/public/providers/forge.svg +9 -9
  980. package/app/public/providers/freebuff-web.svg +6 -6
  981. package/app/public/providers/hcnsec.svg +10 -10
  982. package/app/public/providers/inferx.svg +8 -0
  983. package/app/public/providers/inxorastudio-web.svg +4 -4
  984. package/app/public/providers/inxorastudio.svg +4 -4
  985. package/app/public/providers/kimi-desktop.svg +9 -0
  986. package/app/public/providers/moonshot.svg +8 -8
  987. package/app/public/providers/novita.svg +6 -0
  988. package/app/public/providers/openvecta.svg +7 -7
  989. package/app/public/providers/perplexity-agent.svg +13 -13
  990. package/app/public/providers/qwen-cloud.svg +1 -1
  991. package/app/public/providers/qwencloud.svg +6 -6
  992. package/app/public/providers/stepfun.svg +53 -53
  993. package/app/public/providers/tokenrouter.svg +15 -15
  994. package/app/public/providers/workbuddy.png +0 -0
  995. package/app/public/providers/wp-studio.svg +11 -11
  996. package/app/public/providers/zed.svg +11 -11
  997. package/app/public/providers/zenmux-free.svg +9 -9
  998. package/app/server.js +1 -1
  999. package/app/src/lib/db/adapters/sqljsAdapter.js +115 -115
  1000. package/app/src/lib/db/migrate.js +286 -286
  1001. package/app/src/lib/network/pickProxyPoolId.js +38 -38
  1002. package/app/src/lib/updater/updater.js +235 -235
  1003. package/app/src/mitm/server.js +2 -2
  1004. package/cli.js +830 -830
  1005. package/package.json +66 -66
  1006. package/src/cli/api/client.js +556 -556
  1007. package/src/cli/menus/cliTools.js +618 -618
  1008. package/src/cli/terminalUI.js +121 -121
  1009. package/src/cli/tray/autostart.js +306 -306
  1010. package/src/cli/tray/tray.js +322 -322
  1011. package/src/cli/tray/tray.ps1 +130 -130
  1012. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  1013. package/app/.next-cli-build/server/chunks/1216.js +0 -3
  1014. package/app/.next-cli-build/server/chunks/2926.js +0 -75
  1015. package/app/.next-cli-build/server/chunks/4502.js +0 -16
  1016. package/app/.next-cli-build/server/chunks/4632.js +0 -1
  1017. package/app/.next-cli-build/server/chunks/541.js +0 -1
  1018. package/app/.next-cli-build/server/chunks/615.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/6316.js +0 -2
  1020. package/app/.next-cli-build/server/chunks/6686.js +0 -1
  1021. package/app/.next-cli-build/server/chunks/9140.js +0 -1
  1022. package/app/.next-cli-build/server/chunks/9630.js +0 -1
  1023. package/app/.next-cli-build/static/S-pbWChrUiCkwFyfx4Su3/_buildManifest.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/1696-bafe4b44a7a0439e.js +0 -3
  1025. package/app/.next-cli-build/static/chunks/1966.b8f83f7ba376c962.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/1992-b492aa3235a8c259.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/3899.3f761f7e3a944e8c.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/5497-b321fb89cc6d6e14.js +0 -7
  1029. package/app/.next-cli-build/static/chunks/705-b7d7b61f41806f0d.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/8105-204edc780a329497.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-cd77e53dbcd46b6c.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-dbf52954681b093c.js +0 -3
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-a8c4d8c681e19868.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-408845bd809806a6.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-d9958dfec1d2e28e.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-92a0799a23d869b3.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-a67cd1c5f77da355.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-262fa6911888d4f1.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-f644da989b8878c3.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-aa26b25a26b5dac8.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-96d3eb0dfde0711b.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9a44fa1600f3ff42.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-9739651f4f19cec6.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2f3b8761d7b32ec0.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-9144cc5f6a208199.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/_global-error/page-ab464cb25617d9dd.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-ab464cb25617d9dd.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ab464cb25617d9dd.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ab464cb25617d9dd.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ab464cb25617d9dd.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ab464cb25617d9dd.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ab464cb25617d9dd.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-ab464cb25617d9dd.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ab464cb25617d9dd.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/breaker/route-ab464cb25617d9dd.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cache/route-ab464cb25617d9dd.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ab464cb25617d9dd.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ab464cb25617d9dd.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ab464cb25617d9dd.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ab464cb25617d9dd.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ab464cb25617d9dd.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ab464cb25617d9dd.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ab464cb25617d9dd.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ab464cb25617d9dd.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ab464cb25617d9dd.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ab464cb25617d9dd.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ab464cb25617d9dd.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ab464cb25617d9dd.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ab464cb25617d9dd.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ab464cb25617d9dd.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ab464cb25617d9dd.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ab464cb25617d9dd.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ab464cb25617d9dd.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ab464cb25617d9dd.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/combos/route-ab464cb25617d9dd.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-ab464cb25617d9dd.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-ab464cb25617d9dd.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-ab464cb25617d9dd.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-ab464cb25617d9dd.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-ab464cb25617d9dd.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-ab464cb25617d9dd.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/health/route-ab464cb25617d9dd.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-ab464cb25617d9dd.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/init/route-ab464cb25617d9dd.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ab464cb25617d9dd.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/keys/route-ab464cb25617d9dd.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/locale/route-ab464cb25617d9dd.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ab464cb25617d9dd.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ab464cb25617d9dd.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ab464cb25617d9dd.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ab464cb25617d9dd.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ab464cb25617d9dd.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ab464cb25617d9dd.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ab464cb25617d9dd.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ab464cb25617d9dd.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ab464cb25617d9dd.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ab464cb25617d9dd.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ab464cb25617d9dd.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/models/route-ab464cb25617d9dd.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/models/test/route-ab464cb25617d9dd.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-ab464cb25617d9dd.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ab464cb25617d9dd.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-ab464cb25617d9dd.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ab464cb25617d9dd.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ab464cb25617d9dd.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ab464cb25617d9dd.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ab464cb25617d9dd.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ab464cb25617d9dd.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-ab464cb25617d9dd.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ab464cb25617d9dd.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ab464cb25617d9dd.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-ab464cb25617d9dd.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ab464cb25617d9dd.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ab464cb25617d9dd.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-ab464cb25617d9dd.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-ab464cb25617d9dd.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-ab464cb25617d9dd.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-ab464cb25617d9dd.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/pricing/route-ab464cb25617d9dd.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ab464cb25617d9dd.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ab464cb25617d9dd.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ab464cb25617d9dd.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-ab464cb25617d9dd.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-ab464cb25617d9dd.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-ab464cb25617d9dd.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-ab464cb25617d9dd.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ab464cb25617d9dd.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-ab464cb25617d9dd.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-ab464cb25617d9dd.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-ab464cb25617d9dd.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ab464cb25617d9dd.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ab464cb25617d9dd.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ab464cb25617d9dd.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-ab464cb25617d9dd.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-ab464cb25617d9dd.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-ab464cb25617d9dd.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ab464cb25617d9dd.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ab464cb25617d9dd.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/route-ab464cb25617d9dd.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ab464cb25617d9dd.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ab464cb25617d9dd.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ab464cb25617d9dd.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ab464cb25617d9dd.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ab464cb25617d9dd.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ab464cb25617d9dd.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ab464cb25617d9dd.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ab464cb25617d9dd.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ab464cb25617d9dd.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-ab464cb25617d9dd.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-ab464cb25617d9dd.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ab464cb25617d9dd.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ab464cb25617d9dd.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ab464cb25617d9dd.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/settings/route-ab464cb25617d9dd.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ab464cb25617d9dd.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-ab464cb25617d9dd.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-ab464cb25617d9dd.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/tags/route-ab464cb25617d9dd.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ab464cb25617d9dd.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ab464cb25617d9dd.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ab464cb25617d9dd.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ab464cb25617d9dd.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ab464cb25617d9dd.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ab464cb25617d9dd.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ab464cb25617d9dd.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ab464cb25617d9dd.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ab464cb25617d9dd.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ab464cb25617d9dd.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ab464cb25617d9dd.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ab464cb25617d9dd.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ab464cb25617d9dd.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-ab464cb25617d9dd.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ab464cb25617d9dd.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ab464cb25617d9dd.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ab464cb25617d9dd.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-ab464cb25617d9dd.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-ab464cb25617d9dd.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-ab464cb25617d9dd.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ab464cb25617d9dd.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ab464cb25617d9dd.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ab464cb25617d9dd.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-ab464cb25617d9dd.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ab464cb25617d9dd.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ab464cb25617d9dd.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ab464cb25617d9dd.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ab464cb25617d9dd.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ab464cb25617d9dd.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ab464cb25617d9dd.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ab464cb25617d9dd.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ab464cb25617d9dd.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ab464cb25617d9dd.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ab464cb25617d9dd.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ab464cb25617d9dd.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ab464cb25617d9dd.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ab464cb25617d9dd.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ab464cb25617d9dd.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ab464cb25617d9dd.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ab464cb25617d9dd.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/route-ab464cb25617d9dd.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ab464cb25617d9dd.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ab464cb25617d9dd.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ab464cb25617d9dd.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ab464cb25617d9dd.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/version/route-ab464cb25617d9dd.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ab464cb25617d9dd.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/version/update/route-ab464cb25617d9dd.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/layout-16b611f4f5717ccd.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/login/page-0831b035aa4c0f17.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ab464cb25617d9dd.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/page-ab464cb25617d9dd.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/main-28015457a328b97c.js +0 -5
  1212. package/app/.next-cli-build/static/chunks/main-app-705d8c306f358a5f.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ab464cb25617d9dd.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ab464cb25617d9dd.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-22e44aa316880902.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ab464cb25617d9dd.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ab464cb25617d9dd.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/webpack-a990cabb6976f421.js +0 -1
  1219. package/app/.next-cli-build/static/css/68d66160ca549ddc.css +0 -1
  1220. package/app/cli/.build-home/AppData/Local/npm-cache/_update-notifier-last-checked +0 -0
  1221. package/app/cli/.build-home/AppData/Roaming/extremerouter/.migrated-from +0 -1
  1222. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/schema-3-to-4-0.8.0-20260802-152036/data.sqlite +0 -0
  1223. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.8-to-0.7.9-0.7.9-20260729-181011/data.sqlite +0 -0
  1224. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.9-to-0.8.0-0.8.0-20260729-213634/data.sqlite +0 -0
  1225. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.8.0-to-0.8.1-0.8.1-20260802-152517/data.sqlite +0 -0
  1226. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite +0 -0
  1227. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  1228. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  1229. package/app/cli/.build-home/AppData/Roaming/extremerouter/jwt-secret +0 -1
  1230. package/app/cli/.build-home/AppData/Roaming/extremerouter/machine-id +0 -1
  1231. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +0 -7
  1232. /package/app/.next-cli-build/static/{S-pbWChrUiCkwFyfx4Su3 → JRaGItQgERhBp83cHyRqE}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{79595:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),o=a(35497),c=a(3534),n=a(28777),d=a(64137);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=c.dM[e],[r,v]=(0,l.useState)([]),[m,h]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),m?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;(0,n.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"kimchi":return(0,s.jsx)(d.GX,{...o});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[27,5772,8105,1321,705,5497,9622,8441,3794,7358],()=>e(e.s=79595)),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{49293:(e,t,a)=>{Promise.resolve().then(a.bind(a,85330))},85330:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>D});var s=a(95155),l=a(12115),r=a(73321),o=a(35497),n=a(11059);let i=/^[a-zA-Z0-9_.\-]+$/,c=[{value:"fallback",label:"Fallback",desc:"Try models in order, next on failure",icon:"layers"},{value:"round-robin",label:"Round Robin",desc:"Rotate models across requests",icon:"cached"},{value:"fusion",label:"Fusion",desc:"Parallel panel + judge synthesis",icon:"hub"},{value:"swarm",label:"Swarm",desc:"Hierarchical Manager→Staff→Workers",icon:"account_tree"},{value:"cascade",label:"Cascade",desc:"Escalate cheap→capable on low confidence",icon:"trending_up"}],d={fallback:{icon:"layers",color:"#3B82F6",badge:"info"},"round-robin":{icon:"cached",color:"#10B981",badge:"success"},fusion:{icon:"hub",color:"#8B5CF6",badge:"primary"},swarm:{icon:"account_tree",color:"#F59E0B",badge:"warning"},cascade:{icon:"trending_up",color:"#06B6D4",badge:"cyan"}};function m(e){return d[e]||d.fallback}function x(e){let t=c.find(t=>t.value===e);return t?.label||"Fallback"}let u=[{value:"all",label:"All"},{value:"fallback",label:"Fallback"},{value:"round-robin",label:"Round Robin"},{value:"fusion",label:"Fusion"},{value:"swarm",label:"Swarm"},{value:"cascade",label:"Cascade"}],p=[{value:"name",label:"Name"},{value:"models-desc",label:"Most Models"},{value:"models-asc",label:"Fewest Models"}];function h({combos:e,comboStrategies:t,activeProviders:a,onViewCombos:l,onCreate:r}){let n=e.length,i=function(e){let t=new Set;for(let a of e)for(let e of a.models||[])t.add(e);return t.size}(e),c=function(e,t){let a={fallback:0,"round-robin":0,fusion:0,swarm:0,cascade:0},s=new Set(["fallback","round-robin","fusion","swarm","cascade"]);for(let l of e){let e=t[l.name]?.fallbackStrategy||"fallback",r=s.has(e)?e:"fallback";a[r]=(a[r]||0)+1}return a}(e,t),d=Object.values(c).filter(e=>e>0).length,u=n>0?Math.round(e.reduce((e,t)=>e+(t.models?.length||0),0)/n*10)/10:0,p=Math.max(...Object.values(c),1);return(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[{label:"Total Combos",value:n,icon:"layers",color:"#3B82F6"},{label:"Unique Models",value:i,icon:"model_training",color:"#10B981"},{label:"Strategies Used",value:d,icon:"account_tree",color:"#8B5CF6"},{label:"Avg Models/Combo",value:u,icon:"analytics",color:"#F59E0B"}].map(e=>(0,s.jsx)(o.Zp,{padding:"sm",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:e.color},children:e.icon})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-mono text-lg font-bold text-text-main",children:e.value}),(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})},e.label))}),(0,s.jsxs)(o.Zp,{children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Strategy Distribution"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"How combos are distributed across routing strategies"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(c).map(([e,t])=>{let a=m(e),l=n>0?Math.round(t/n*100):0;return(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex w-28 items-center gap-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:a.color},children:a.icon}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:x(e)})]}),(0,s.jsx)("div",{className:"flex-1 overflow-hidden rounded-full bg-surface-2",children:(0,s.jsx)("div",{className:"h-2.5 rounded-full transition-all",style:{width:`${t/p*100}%`,backgroundColor:a.color}})}),(0,s.jsxs)("span",{className:"w-16 text-right font-mono text-xs text-text-muted",children:[t," (",l,"%)"]})]},e)})})]}),(0,s.jsxs)(o.Zp,{children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Combo Health"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Overview of each combo's status"})]}),(0,s.jsx)(o.$n,{size:"sm",variant:"ghost",icon:"list_alt",onClick:l,children:"View All"})]}),0===e.length?(0,s.jsxs)("div",{className:"py-6 text-center text-sm text-text-muted",children:["No combos yet. ",(0,s.jsx)("button",{onClick:r,className:"text-primary hover:underline",children:"Create one →"})]}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>{let l=t[e.name]?.fallbackStrategy||"fallback",r=m(l),n=(e.models||[]).filter(e=>{let t=e.split("/")[0];return a.some(e=>e.provider===t&&!1!==e.isActive)}).length,i=(e.models||[]).length,c=i>0?Math.round(n/i*100):0;return(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle px-3 py-2 hover:bg-sidebar/30",children:[(0,s.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded",style:{backgroundColor:`${r.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[15px]",style:{color:r.color},children:r.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("code",{className:"truncate font-mono text-xs font-medium",children:e.name}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,s.jsx)(o.Ex,{variant:r.badge,size:"sm",children:x(l)}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[i," models"]})]})]}),(0,s.jsxs)("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[(0,s.jsx)("div",{className:"w-20 overflow-hidden rounded-full bg-surface-2",children:(0,s.jsx)("div",{className:`h-1.5 rounded-full ${c>=80?"bg-success":c>=50?"bg-warning":"bg-danger"}`,style:{width:`${c}%`}})}),(0,s.jsxs)("span",{className:"w-8 text-right font-mono text-[10px] text-text-muted",children:[n,"/",i]})]})]},e.id)})})]})]})}var f=a(88105);let b=[{value:"auto",label:"Auto (provider default)"},{value:"off",label:"Off"},{value:"effort",label:"Effort (OpenAI-style)"},{value:"extended",label:"Extended (Claude-style)"}],g=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"max",label:"Max"}],v=[{key:"manager",label:"Manager",icon:"psychology"},{key:"staff",label:"Staff",icon:"badge"},{key:"audit",label:"Audit",icon:"fact_check"},{key:"worker",label:"Worker",icon:"group"}],y=[{key:"panel",label:"Panel",icon:"dashboard"},{key:"judge",label:"Judge",icon:"gavel"}];function j(e){let t=f.Q2[e]?.capabilities;return!t||!1!==t.toolUse&&!1!==t.fileAccess}function N(e){if(!e||"string"!=typeof e)return null;let t=e.indexOf("/");return t>=0?e.slice(0,t):e}function k(e,t){if(e){let t=N(e);return{blocked:!!t&&!j(t),provider:t}}let a=N(t&&t.length>0?t[0]:null);return{blocked:!!a&&!j(a),provider:a}}function w(e){return e.filter(e=>j(e.provider))}function C({combo:e,modelCaps:t={},activeProviders:a=[],copied:r,onCopy:n,onEdit:i,onDelete:d,strategy:u={},onSetStrategy:p}){let[h,f]=(0,l.useState)(!1),[j,N]=(0,l.useState)(!1),[S,M]=(0,l.useState)(null),$=Array.isArray(e?.models)?e.models:[],F=u.fallbackStrategy||"fallback",A=u.judgeModel||"",O="fusion"===F,E="swarm"===F,T=u.managerModel||"",P=u.staffModel||"",z=u.auditModel||"",_=m(F),D=u.thinking||{},R=D.type||"auto",W="auto"!==R&&"off"!==R,[B,J]=(0,l.useState)([]),H=e=>p({thinking:{...D,...e}}),q=(e,t)=>{let a={...D.roles||{}};null===t?delete a[e]:a[e]={...a[e]||{},...t},H({roles:a})},L=$.map(e=>({model:e,caps:t[e]||{}})),U=L.some(e=>{let t=e.caps.thinkingFormat;return!!e.caps.reasoning&&("openai"===t||"effort"===t||!t)}),Z=L.some(e=>{let t=e.caps.thinkingFormat;return!!e.caps.reasoning&&("claude-adaptive"===t||"claude"===t||"extended"===t)}),I=L.some(e=>!!e.caps.thinkingMaxEffort),G=L.filter(e=>!e.caps.reasoning&&void 0!==e.caps.reasoning),V="effort"===R?L.filter(e=>!0===e.caps.reasoning&&e.caps.thinkingFormat&&"openai"!==e.caps.thinkingFormat&&"effort"!==e.caps.thinkingFormat):"extended"===R?L.filter(e=>!0===e.caps.reasoning&&e.caps.thinkingFormat&&"claude-adaptive"!==e.caps.thinkingFormat&&"claude"!==e.caps.thinkingFormat&&"extended"!==e.caps.thinkingFormat):[];return(0,s.jsxs)(o.Zp,{padding:"sm",className:"group transition-all hover:border-primary/20",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("button",{className:"flex min-w-0 flex-1 items-start gap-3 text-left sm:items-center",onClick:()=>f(!h),children:[(0,s.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${_.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:_.color},children:_.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"truncate font-mono text-sm font-medium",children:e.name}),(0,s.jsx)(o.Ex,{variant:_.badge,size:"sm",children:x(F)}),W&&(0,s.jsxs)(o.Ex,{variant:"cyan",size:"sm",className:"flex items-center gap-0.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"psychology"}),"effort"===R?D.effort||"on":R]}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[$.length," models"]})]}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===$.length?(0,s.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):$.slice(0,3).map((e,a)=>(0,s.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,s.jsx)("span",{className:"truncate max-w-[120px]",children:e}),t[e]&&(0,s.jsx)(o.nh,{caps:t[e],size:11})]},a)),$.length>3&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",$.length-3," more"]})]})]}),(0,s.jsx)("span",{className:`shrink-0 text-text-muted transition-transform ${h?"rotate-180":""}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"expand_more"})})]}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,s.jsx)("div",{className:"w-full sm:w-[180px]",children:(0,s.jsx)(o.l6,{options:c,value:F,onChange:e=>p({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,s.jsxs)("button",{onClick:t=>{t.stopPropagation(),n(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,s.jsxs)("button",{onClick:i,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:d,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),h&&(0,s.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsxs)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:["Models (",$.length,")"]}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:$.map((e,a)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded px-2 py-1 bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-4 text-center",children:a+1}),(0,s.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:e}),t[e]&&(0,s.jsx)(o.nh,{caps:t[e],size:11})]},a))})]}),O&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Fusion Judge"}),(()=>{let{blocked:e,provider:t}=k(A,$);return(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{onClick:()=>N(!0),className:`inline-flex max-w-full items-center gap-1 rounded border border-dashed px-2 py-1 font-mono text-xs hover:bg-primary/5 ${e?"border-red-400 text-red-500 hover:border-red-500":"border-primary/40 text-primary hover:border-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"gavel"}),(0,s.jsx)("span",{className:"truncate",children:A||`Auto — ${$[0]||"first model"}`})]}),A&&(0,s.jsx)("button",{onClick:()=>p({judgeModel:""}),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Reset to Auto",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),e&&(0,s.jsx)("p",{className:"text-[10px] text-red-500",children:A?"⚠ Web cookie providers cannot serve as Judge (no tool use / file access)":`⚠ Auto-fallback to "${t}" (first combo model) — web cookie cannot serve as Judge`})]})})()]}),E&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Swarm Roles"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[[{key:"manager",label:"Manager",icon:"psychology",value:T,placeholder:`Auto — ${$[0]||"first"}`},{key:"staff",label:"Staff",icon:"badge",value:P,placeholder:"Same as Manager"},{key:"audit",label:"Audit",icon:"fact_check",value:z,placeholder:"Same as Staff"}].map(e=>{let{blocked:t,provider:a}=k(e.value,$);return(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text-muted w-16",children:e.label}),(0,s.jsxs)("button",{onClick:()=>M(e.key),className:`inline-flex max-w-full items-center gap-1 rounded border border-dashed px-2 py-0.5 font-mono text-[11px] hover:bg-primary/5 ${t?"border-red-400 text-red-500 hover:border-red-500":"border-primary/40 text-primary hover:border-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e.icon}),(0,s.jsx)("span",{className:"truncate",children:e.value||e.placeholder})]}),e.value&&(0,s.jsx)("button",{onClick:()=>p({[`${e.key}Model`]:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:`Reset ${e.label}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),t&&(0,s.jsx)("p",{className:"text-[10px] text-red-500 pl-[76px]",children:e.value?`⚠ Web cookie providers cannot serve as ${e.label} (no tool use / file access)`:`⚠ Auto-fallback to "${a}" (first combo model) — web cookie cannot serve as ${e.label}`})]},e.key)}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{className:"font-medium",children:"Workers"}),(0,s.jsxs)("span",{children:["= combo models (",$.length,")"]}),(0,s.jsx)("span",{className:"text-text-subtle",children:"\xb7"}),(0,s.jsx)("a",{href:"/dashboard/swarm",className:"text-primary hover:underline",children:"Telemetry →"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,s.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:u.autoScale?.enabled===!0,onChange:e=>p({autoScale:{...u.autoScale||{},enabled:e.target.checked}}),className:"rounded border-border accent-primary"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Auto-scale"})]}),u.autoScale?.enabled&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Min:"}),(0,s.jsx)("input",{type:"number",min:1,max:u.autoScale?.maxWorkers||8,value:u.autoScale?.minWorkers??1,onChange:e=>p({autoScale:{...u.autoScale||{},minWorkers:Number(e.target.value)||1}}),className:"w-10 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono text-center focus:outline-none focus:border-primary"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Max:"}),(0,s.jsx)("input",{type:"number",min:1,max:8,value:u.autoScale?.maxWorkers??$.length,onChange:e=>p({autoScale:{...u.autoScale||{},maxWorkers:Number(e.target.value)||1}}),className:"w-10 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono text-center focus:outline-none focus:border-primary"})]})]})]})]})]}),(0,s.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,s.jsx)("button",{onClick:()=>J(B.length>0?[]:(O?y:E?v:[]).map(e=>e.key)),className:"text-[10px] text-primary hover:underline",children:B.length>0?"Hide roles":`Role overrides${W?" ("+Object.keys(D.roles||{}).length+")":""}`})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Mode:"}),(0,s.jsx)("select",{value:R,onChange:e=>H({type:e.target.value}),className:"rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary",children:b.map(e=>{let t="auto"===e.value||"off"===e.value||"effort"===e.value&&U||"extended"===e.value&&Z;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})})]}),V.length>0&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),(0,s.jsxs)("span",{className:"text-[10px]",children:[R," not supported by ",V.map(e=>e.model.split("/").pop()).join(", ")]})]}),G.length>0&&"auto"!==R&&"off"!==R&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),(0,s.jsxs)("span",{className:"text-[10px]",children:["Thinking capability unknown for ",G.map(e=>e.model.split("/").pop()).join(", ")]})]}),"effort"===R&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Effort:"}),(0,s.jsx)("select",{value:D.effort||"high",onChange:e=>H({effort:e.target.value}),className:"rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary",children:g.map(e=>{let t="max"!==e.value||I;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})})]}),"extended"===R&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Budget:"}),(0,s.jsx)("input",{type:"number",min:1024,max:128e3,step:1024,value:D.budgetTokens||4096,onChange:e=>H({budgetTokens:Number(e.target.value)||4096}),className:"w-20 rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary"})]})]}),B.length>0&&W&&(0,s.jsxs)("div",{className:"mt-2 flex flex-col gap-1.5 pl-1",children:[(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Per-role overrides (leave as parent to inherit global)"}),(O?y:E?v:[]).map(e=>{let t,a=(t=e.key,D?.roles?.[t]);return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px] text-text-muted",children:e.icon}),(0,s.jsx)("span",{className:"text-[11px] font-medium text-text-muted w-12",children:e.label}),(0,s.jsxs)("select",{value:a?.type||"inherit",onChange:t=>q(e.key,"inherit"===t.target.value?null:{type:t.target.value}),className:"rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"inherit",children:"Inherit"}),(0,s.jsx)("option",{value:"off",children:"Off"}),(0,s.jsxs)("option",{value:"effort",disabled:!U,className:U?"":"text-text-muted",children:["Effort",U?"":" (not supported)"]}),(0,s.jsxs)("option",{value:"extended",disabled:!Z,className:Z?"":"text-text-muted",children:["Extended",Z?"":" (not supported)"]})]}),a?.type==="effort"&&(0,s.jsx)("select",{value:a.effort||"high",onChange:t=>q(e.key,{type:"effort",effort:t.target.value}),className:"rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary",children:g.map(e=>{let t="max"!==e.value||I;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})}),a?.type==="extended"&&(0,s.jsx)("input",{type:"number",min:1024,max:128e3,step:1024,value:a.budgetTokens||4096,onChange:t=>q(e.key,{type:"extended",budgetTokens:Number(t.target.value)||4096}),className:"w-16 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary"}),a&&(0,s.jsx)("button",{onClick:()=>q(e.key,null),className:"p-0.5 rounded text-text-muted hover:text-red-500",title:"Reset to inherit",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.key)})]})]}),(0,s.jsxs)("div",{className:"text-xs text-text-muted bg-black/[0.02] dark:bg-white/[0.02] rounded px-2 py-1.5",children:[(0,s.jsxs)("span",{className:"font-medium",children:[x(F),":"]})," ",c.find(e=>e.value===F)?.desc]})]}),(0,s.jsx)(o.rq,{isOpen:j,onClose:()=>N(!1),onSelect:e=>{p({judgeModel:e?.value||""}),N(!1)},activeProviders:w(a),title:"Select Judge Model",addedModelValues:A?[A]:[],closeOnSelect:!0}),S&&(0,s.jsx)(o.rq,{isOpen:!0,onClose:()=>M(null),onSelect:e=>{p({[`${S}Model`]:e?.value||""}),M(null)},activeProviders:w(a),title:`Select ${"manager"===S?"Manager":"staff"===S?"Staff":"Audit"} Model`,addedModelValues:"manager"===S?T?[T]:[]:"staff"===S?P?[P]:[]:z?[z]:[],closeOnSelect:!0})]})}function S({combos:e,modelCaps:t,activeProviders:a,comboStrategies:r,copied:n,copy:i,onEdit:c,onDelete:d,onSetStrategy:m,onCreate:x}){let[h,f]=(0,l.useState)(""),[b,g]=(0,l.useState)("all"),[v,y]=(0,l.useState)("name"),j=(0,l.useMemo)(()=>{var t;let a;return t=function(e,t,a,s){let l=e;if("all"!==a&&(l=l.filter(e=>(s[e.name]?.fallbackStrategy||"fallback")===a)),t.trim()){let e=t.trim().toLowerCase();l=l.filter(t=>t.name.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)))}return l}(e,h,b,r),a=[...t],"models-desc"===v?a.sort((e,t)=>(t.models?.length||0)-(e.models?.length||0)):"models-asc"===v?a.sort((e,t)=>(e.models?.length||0)-(t.models?.length||0)):a.sort((e,t)=>e.name.localeCompare(t.name)),a},[e,h,b,v,r]);return 0===e.length?(0,s.jsx)(o.pp,{icon:"layers",title:"No combos yet",description:"Create model combos with fallback, round-robin, fusion, or swarm strategies",actionText:"Create Combo",onAction:x}):(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(o.pd,{placeholder:"Search combos or models...",value:h,onChange:e=>f(e.target.value),className:"sm:max-w-xs"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:u.map(e=>(0,s.jsx)("button",{onClick:()=>g(e.value),className:`rounded-full px-2.5 py-1 text-xs font-medium transition-colors ${b===e.value?"bg-primary/15 text-primary ring-1 ring-primary/20":"bg-surface-2 text-text-muted hover:text-text-main"}`,children:e.label},e.value))}),(0,s.jsx)("select",{value:v,onChange:e=>y(e.target.value),className:"appearance-none rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:p.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:j.length===e.length?`${e.length} combo${1!==e.length?"s":""}`:`${j.length} of ${e.length} combos`}),0===j.length?(0,s.jsx)(o.Zp,{children:(0,s.jsxs)("div",{className:"py-8 text-center text-sm text-text-muted",children:['No combos match "',h,'" ',"all"!==b&&`with ${b} strategy`]})}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:j.map(e=>(0,s.jsx)(C,{combo:e,modelCaps:t,activeProviders:a,copied:n,onCopy:i,onEdit:()=>c(e),onDelete:()=>d(e.id),strategy:r[e.name]||{},onSetStrategy:t=>m(e.name,t)},e.id))})]})}let M=[{id:"always-on",name:"Always-On (5-Layer Fallback)",description:"Zero-downtime coding with 5 layers of fallback. Mix of subscription, cheap, and free tiers — if any model fails, the next picks up automatically.",icon:"shield",category:"reliability",strategy:"fallback",models:["claude-opus-4-7","gpt-5.4","glm-5.1","MiniMax-M2.7","claude-sonnet-4.5"],preferredProviders:{"claude-opus-4-7":"cc","gpt-5.4":"cx","glm-5.1":"glm","MiniMax-M2.7":"minimax","claude-sonnet-4.5":"kr"}},{id:"max-reasoning-swarm",name:"Max Reasoning Swarm",description:"Deep multi-agent analysis for complex coding tasks. Manager decomposes the problem, workers solve subtasks in parallel, audit reviews the result. Manager thinks at max effort.",icon:"psychology",category:"reasoning",strategy:"swarm",models:["claude-opus-4-7","gpt-5.4","glm-5.1","claude-sonnet-4.5"],preferredProviders:{"claude-opus-4-7":"cc","gpt-5.4":"cx","glm-5.1":"glm","claude-sonnet-4.5":"kr"},strategyConfig:{fallbackStrategy:"swarm",managerModel:"claude-opus-4-7",auditModel:"claude-sonnet-4.5",thinking:{type:"effort",effort:"high",roles:{manager:{type:"effort",effort:"max"},worker:{type:"effort",effort:"medium"},audit:{type:"effort",effort:"high"}}},autoScale:{enabled:!0,minWorkers:2,maxWorkers:4}}},{id:"flash-fusion",name:"Flash Fusion",description:"Two fast models answer in parallel, a judge picks the best result. Low latency with a quality check — great for everyday coding questions.",icon:"bolt",category:"balanced",strategy:"fusion",models:["gpt-5.4","MiniMax-M2.7"],preferredProviders:{"gpt-5.4":"cx","MiniMax-M2.7":"minimax"},strategyConfig:{fallbackStrategy:"fusion",thinking:{type:"effort",effort:"medium"}}},{id:"penny-pincher",name:"Penny-Pincher",description:"Ultra-low-cost daily driver built from cheap and free tiers. Thinking disabled to keep tokens minimal. Use for simple tasks where cost matters most.",icon:"savings",category:"budget",strategy:"fallback",models:["MiniMax-M2.7","glm-5.1","gpt-5.4"],preferredProviders:{"MiniMax-M2.7":"minimax","glm-5.1":"glm","gpt-5.4":"kr"},strategyConfig:{fallbackStrategy:"fallback",thinking:{type:"off"}}},{id:"bug-hunter",name:"Bug Hunter",description:"Three models independently diagnose the same bug, a strong judge picks the most likely root cause. High-precision debugging with thinking on.",icon:"bug_report",category:"debugging",strategy:"fusion",models:["gpt-5.4","glm-5.1","MiniMax-M2.7"],preferredProviders:{"gpt-5.4":"cx","glm-5.1":"glm","MiniMax-M2.7":"minimax"},strategyConfig:{fallbackStrategy:"fusion",thinking:{type:"effort",effort:"high"}}}];function $({combos:e,connections:t,modelIndex:a={},onApply:r}){let[n,i]=(0,l.useState)(null),c=new Set(t?.filter(e=>!1!==e.isActive).map(e=>e.provider)||[]),d=new Set((e||[]).map(e=>e.name)),u=e=>(e.models||[]).map(t=>{let s=t.indexOf("/"),l=s>0,r=l?t.slice(s+1):t,o=(l?t.slice(0,s):"")||(e.preferredProviders||{})[r]||"",n=o?(0,f.rs)(o):"",i=(a[r]||[]).map(e=>(0,f.rs)(e)).filter(e=>c.has(e));if(n&&i.includes(n)){let e=(0,f.wG)(n);return{ref:t,modelName:r,provider:n,providerAlias:e,full:`${e}/${r}`,available:!0}}if(i.length>0){let e=(0,f.wG)(i[0]);return{ref:t,modelName:r,provider:i[0],providerAlias:e,full:`${e}/${r}`,available:!0,resolvedFrom:o}}return{ref:t,modelName:r,provider:n||o,full:l?t:r,available:!1}}),p=async e=>{i(e.id);try{let t=u(e),a=t.filter(e=>e.available).map(e=>e.full),s=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,models:a,kind:null})});if(!s.ok){let e=await s.json();alert(e.error||"Failed to create combo from template");return}let l=await fetch("/api/settings").then(e=>e.json()).catch(()=>({})),o=e.strategyConfig?{...e.strategyConfig}:{fallbackStrategy:e.strategy},n=Object.fromEntries(t.map(e=>[e.modelName,e.full]));for(let e of["managerModel","staffModel","auditModel","judgeModel"]){let t=o[e];if(!t)continue;let a=t.indexOf("/"),s=a>0?t.slice(a+1):t;n[s]&&(o[e]=n[s])}let i={...l?.comboStrategies||{},[e.name]:o},c=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:i})});if(!c.ok){let e=await c.json().catch(()=>({}));alert(e.error||"Failed to apply template strategy");return}r&&r()}catch(e){alert("Failed to apply template: "+(e?.message||String(e)))}finally{i(null)}};return 0===M.length?(0,s.jsx)(o.pp,{icon:"dashboard_customize",title:"No templates available",description:"Combo templates will appear here when added."}):(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"mb-1",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Combo Templates"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"One-click prebuilt combos. Provider availability is checked automatically."})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:M.map(e=>{let t=u(e),a=t.filter(e=>e.available).length,l=t.length,r=d.has(e.name),i=m(e.strategy),c=a===l;return(0,s.jsxs)(o.Zp,{padding:"sm",className:"flex flex-col gap-3 hover:border-primary/20 transition-all",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${i.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:i.color},children:e.icon||i.icon})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.name}),(0,s.jsx)(o.Ex,{variant:i.badge,size:"sm",children:x(e.strategy)})]})]}),r&&(0,s.jsx)(o.Ex,{variant:"success",size:"sm",dot:!0,children:"Created"})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted leading-relaxed",children:e.description}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[t.slice(0,4).map((e,t)=>(0,s.jsxs)("code",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 font-mono text-[10px] ${e.available?"bg-black/5 text-text-muted dark:bg-white/5":"bg-red-500/10 text-red-500"}`,title:e.available?`Resolved to ${e.provider}`:`No connected provider has ${e.modelName}`,children:[(0,s.jsx)("span",{className:e.available?"text-success":"text-red-500",children:e.available?"✓":"✗"}),(0,s.jsx)("span",{className:"truncate max-w-[110px]",children:e.modelName}),e.available&&(0,s.jsx)("span",{className:"rounded bg-black/10 px-0.5 text-[9px] dark:bg-white/10",children:e.provider})]},t)),t.length>4&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",t.length-4," more"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>{let t=e.resolvedFrom?(0,f.rs)(e.resolvedFrom):"",a=e.available?`${e.provider}${e.resolvedFrom&&t!==e.provider?` (via ${e.resolvedFrom})`:""}`:`${e.provider||"?"} (missing)`,l=e.available;return(0,s.jsxs)("span",{className:`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[10px] font-medium ${l?"bg-success/10 text-success":"bg-surface-2 text-text-muted"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:l?"check_circle":"radio_button_unchecked"}),a]},e.ref)})}),(0,s.jsx)("div",{className:"mt-auto pt-1",children:(0,s.jsx)(o.$n,{size:"sm",fullWidth:!0,variant:r?"secondary":"primary",icon:n===e.id?"progress_activity":"add",disabled:r||n===e.id||!c,onClick:()=>p(e),children:n===e.id?"Creating...":r?"Already Created":c?"Apply Template":`Apply (${a}/${l} ready)`})})]},e.id)})})]})}var F=a(44923),A=a(87256),O=a(5020),E=a(39768);function T({id:e,index:t,model:a,isFirst:r,isLast:n,modelCaps:i,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:f,isDragging:b}=(0,A.gl)({id:e}),g={transform:E.Ks.Transform.toString(f),opacity:b?.5:1,zIndex:b?999:void 0},[v,y]=(0,l.useState)(!1),[j,N]=(0,l.useState)(a),k=()=>{let e=j.trim();e&&e!==a?c(e):N(a),y(!1)};return(0,s.jsxs)("div",{ref:h,style:g,className:`group flex min-w-0 items-center gap-2 rounded-lg border px-2.5 py-1.5 transition-all ${b?"border-primary/40 bg-panel shadow-md ring-1 ring-primary/20":"border-transparent bg-panel hover:border-border-subtle"}`,children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary",children:t+1}),(0,s.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none shrink-0 p-0.5 rounded text-text-muted/50 hover:text-text-main active:cursor-grabbing",title:"Drag to reorder",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,s.jsx)("circle",{cx:"9",cy:"4",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"4",r:"1.5"}),(0,s.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,s.jsx)("circle",{cx:"9",cy:"20",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"20",r:"1.5"})]})}),v?(0,s.jsx)("input",{autoFocus:!0,value:j,onChange:e=>N(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(N(a),y(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-panel px-1.5 py-0.5 font-mono text-xs text-text-main outline-none"}):(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 cursor-text rounded px-1 py-0.5 hover:bg-black/[0.03] dark:hover:bg-white/[0.03]",onClick:()=>y(!0),title:"Click to edit",children:[(0,s.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:a}),i?.[a]&&(0,s.jsx)(o.nh,{caps:i[a],size:11})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,s.jsx)("button",{onClick:d,disabled:r,className:`rounded p-1 transition-colors ${r?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:m,disabled:n,className:`rounded p-1 transition-colors ${n?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_downward"})})]}),(0,s.jsx)("button",{onClick:x,className:"shrink-0 rounded p-1 text-text-muted opacity-0 transition-all hover:bg-danger/10 hover:text-danger group-hover:opacity-100",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}function P({isOpen:e,combo:t,onClose:a,onSave:r,activeProviders:n,modelCaps:d={},kindFilter:m=null}){let[x,u]=(0,l.useState)(t?.name||""),[p,h]=(0,l.useState)(t?.models||[]),[f,b]=(0,l.useState)(!1),[g,v]=(0,l.useState)(!1),[y,j]=(0,l.useState)(""),[N,k]=(0,l.useState)({}),[w,C]=(0,l.useState)(e);(0,l.useEffect)(()=>{e&&!w&&(u(t?.name||""),h(Array.isArray(t?.models)?[...t.models]:[]),j(""),b(!1)),C(e)},[e,w,t]);let S=(0,F.FR)((0,F.MS)(F.AN,{activationConstraint:{distance:5}}),(0,F.MS)(F.uN,{coordinateGetter:A.JR})),M=p.map((e,t)=>({uid:`item-${t}`,model:e}));(0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let e=await fetch("/api/models/alias");if(!t&&e.ok){let t=await e.json();k(t.aliases||{})}}catch{}})(),()=>{t=!0}},[e]);let $=e=>e.trim()?i.test(e)?(j(""),!0):(j("Only letters, numbers, -, _ and . allowed"),!1):(j("Name is required"),!1),E=async()=>{$(x)&&(v(!0),await r({name:x.trim(),models:p}),v(!1))},z=!!t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.aF,{isOpen:e,onClose:a,title:z?"Edit Combo":"Create Combo",size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(o.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?$(t):j("")},placeholder:"my-combo",error:y}),(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Use this name as the model in your client:"}),x.trim()&&(0,s.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:x.trim()})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Models"}),p.length>0&&(0,s.jsxs)(o.Ex,{variant:"info",size:"sm",children:[p.length," model",1!==p.length?"s":""]})]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Drag to reorder priority"})]}),0===p.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg bg-surface-2/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-2xl mb-2",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Add models to build your combo"}),(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>b(!0),children:"Add First Model"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(F.Mp,{sensors:S,collisionDetection:F.fp,onDragEnd:e=>{let{active:t,over:a}=e;if(a&&t.id!==a.id){let e=M.findIndex(e=>e.uid===t.id),s=M.findIndex(e=>e.uid===a.id);-1!==e&&-1!==s&&h(t=>(0,A.be)(t,e,s))}},modifiers:[O.FN,O.gj],children:(0,s.jsx)(A.gB,{items:M.map(e=>e.uid),strategy:A._G,children:(0,s.jsx)("div",{className:"flex max-h-[45vh] min-w-0 flex-col gap-1 overflow-y-auto rounded-lg bg-surface-2/30 p-1.5",children:M.map(({uid:e,model:t},a)=>(0,s.jsx)(T,{id:e,index:a,model:t,modelCaps:d,isFirst:0===a,isLast:a===M.length-1,onEdit:e=>{let t=[...p];t[a]=e,h(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...p];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(a),onMoveDown:()=>(e=>{if(e===p.length-1)return;let t=[...p];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(a),onRemove:()=>{h(e=>e.filter((e,t)=>t!==a))}},e))})})}),(0,s.jsxs)("button",{onClick:()=>b(!0),className:"w-full mt-2 py-2 border border-dashed border-primary/30 rounded-lg text-xs text-primary font-medium hover:border-primary hover:bg-primary/5 transition-colors flex items-center justify-center gap-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]})]}),p.length>=2&&(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"lightbulb"}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Strategy Tips"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:c.map(e=>(0,s.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] mt-0.5 text-primary/60",children:e.icon}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-medium text-text-main",children:e.label})," — ",e.desc]})]},e.value))}),(0,s.jsx)("p",{className:"mt-1.5 text-[10px] text-text-muted",children:"Set strategy after creating the combo from the Combos tab."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,s.jsx)(o.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(o.$n,{onClick:E,fullWidth:!0,size:"sm",icon:z?"save":"add",disabled:!x.trim()||!!y||g,children:g?"Saving...":z?"Save Changes":"Create Combo"})]})]})}),(0,s.jsx)(o.rq,{isOpen:f,onClose:()=>b(!1),onSelect:e=>{h(t=>t.includes(e.value)?t:[...t,e.value])},onDeselect:e=>{h(t=>t.filter(t=>t!==e.value))},activeProviders:n,modelAliases:N,title:"Add Model to Combo",kindFilter:m,addedModelValues:p,closeOnSelect:!1})]})}let z=[{value:"overview",label:"Overview"},{value:"combos",label:"Combos"},{value:"templates",label:"Templates"}];function _(){let e=(0,r.useRouter)(),t=(0,r.useSearchParams)().get("tab")||"overview",[a,i]=(0,l.useState)([]),[c,d]=(0,l.useState)(!0),[m,x]=(0,l.useState)(!1),[u,p]=(0,l.useState)(null),[f,b]=(0,l.useState)([]),[g,v]=(0,l.useState)({}),[y,j]=(0,l.useState)({}),[N,k]=(0,l.useState)({}),[w,C]=(0,l.useState)(null),{copied:M,copy:F}=(0,n.C)(),A=(0,l.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),l=await e.json(),r=await t.json(),o=a.ok?await a.json():{};if(e.ok&&i((l.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&b(r.connections||[]),s.ok){let e=await s.json(),t={},a={};for(let s of e.models||[]){s.caps&&(t[s.fullModel]=s.caps);let e=(s.fullModel||"").split("/").slice(1).join("/");e&&s.provider&&(a[e]||(a[e]=[]),a[e].includes(s.provider)||a[e].push(s.provider))}j(t),k(a)}v(o.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{d(!1)}},[]);(0,l.useEffect)(()=>{A()},[A]);let O=t=>e.push(`/dashboard/combos?tab=${t}`),E=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await A(),x(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},T=async(e,t)=>{try{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok)await A(),p(null);else{let e=await a.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},_=async(e,t)=>{try{let s=g[e]||{},l={...s,...t},r=l.fallbackStrategy,o=new Set(["fallbackStrategy","thinking","autoScale",...{fusion:["judgeModel","fusionTuning"],swarm:["managerModel","staffModel","auditModel","workerCount","swarmTuning","enableTelemetry"],cascade:["cascade"],fallback:[],"round-robin":[]}[r]||[]]),n={};for(let[e,t]of Object.entries(l))o.has(e)&&(n[e]=t);let i=Object.keys(s).some(e=>"fallbackStrategy"!==e&&null!=s[e]&&""!==s[e]),c=Object.keys(n).some(e=>"fallbackStrategy"!==e),d="fallback"===n.fallbackStrategy&&i&&!c;if(!d&&("swarm"===n.fallbackStrategy||"fusion"===n.fallbackStrategy)){let t=a.find(t=>t.name===e),s=t?.models||[];try{let e=await fetch("/api/combos/validate-roles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({strategy:n.fallbackStrategy,managerModel:n.managerModel,staffModel:n.staffModel,auditModel:n.auditModel,judgeModel:n.judgeModel,panel:s})});if(e.ok){let t=await e.json();if(!t.valid&&Array.isArray(t.violations)&&t.violations.length>0){let e=t.violations.map(e=>`${e.role}: ${e.reason}`).join("\n");alert(`Cannot save strategy — invalid role models:
2
-
3
- ${e}`);return}}}catch{}}await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:{[e]:d?null:n}})}),v(t=>{let a={...t};return d?delete a[e]:a[e]=n,a})}catch(e){console.log("Error updating combo strategy:",e)}};return c?(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(o.Qv,{}),(0,s.jsx)(o.Qv,{})]}):(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,s.jsx)(o.zY,{title:"Combos",description:"Group models under one name, then pick a strategy per combo",icon:"layers",actions:(0,s.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>x(!0),className:"whitespace-nowrap",children:"Create Combo"})}),(0,s.jsx)(o.Iz,{options:z,value:t,onChange:O}),"overview"===t&&(0,s.jsx)(h,{combos:a,comboStrategies:g,activeProviders:f,onViewCombos:()=>O("combos"),onCreate:()=>x(!0)}),"combos"===t&&(0,s.jsx)(S,{combos:a,modelCaps:y,activeProviders:f,comboStrategies:g,copied:M,copy:F,onEdit:p,onDelete:e=>{C({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{C(null);try{let t=await fetch(`/api/combos/${e}`,{method:"DELETE"});if(t.ok)i(t=>t.filter(t=>t.id!==e));else{let e=await t.json().catch(()=>({}));alert(e.error||`Failed to delete combo (${t.status})`)}}catch(e){console.log("Error deleting combo:",e),alert("Failed to delete combo — network error")}}})},onSetStrategy:_,onCreate:()=>x(!0)}),"templates"===t&&(0,s.jsx)($,{combos:a,connections:f,modelIndex:N,onApply:A}),(0,s.jsx)(P,{isOpen:m,onClose:()=>x(!1),onSave:E,activeProviders:f,modelCaps:y},"create"),(0,s.jsx)(P,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>T(u.id,e),activeProviders:f,modelCaps:y},u?.id||"new"),(0,s.jsx)(o.uo,{isOpen:!!w,onClose:()=>C(null),onConfirm:w?.onConfirm,title:w?.title||"Confirm",message:w?.message,variant:"danger"})]})}function D(){return(0,s.jsx)(l.Suspense,{fallback:(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"}),(0,s.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"})]}),children:(0,s.jsx)(_,{})})}}},e=>{e.O(0,[27,7055,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=49293)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{44493:(e,s,t)=>{"use strict";t.d(s,{default:()=>o});var l=t(95155),n=t(12115),r=t(35497),a=t(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,s]=(0,n.useState)([]),[t,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),d=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let t=JSON.parse(e.data);"init"===t.type?s(t.logs.slice(-a.UY.maxLines)):"line"===t.type?s(e=>{let s=[...e,t.line];return s.length>a.UY.maxLines?s.slice(-a.UY.maxLines):s}):"lines"===t.type?s(e=>{let s=[...e,...t.lines];return s.length>a.UY.maxLines?s.slice(-a.UY.maxLines):s}):"clear"===t.type&&s([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(r.zY,{title:"Console",description:"Live server logs",icon:"monitor",actions:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("span",{className:`flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium ${t?"bg-success/12 text-success":"bg-danger/12 text-danger"}`,children:[(0,l.jsx)("span",{className:`size-1.5 rounded-full ${t?"bg-success":"bg-danger"}`}),t?"Live":"Disconnected"]}),(0,l.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:d,children:"Clear"})]})}),(0,l.jsx)(r.Zp,{padding:"none",children:(0,l.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,l.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,l.jsx)("div",{className:"space-y-0.5",children:e.map((e,s)=>{let t,n;return(0,l.jsx)("div",{children:(n=c[(t=e.match(/\[(\w+)\]/g))?t[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,l.jsx)("span",{className:n,children:e}))},s)})})})})]})}},47926:(e,s,t)=>{Promise.resolve().then(t.bind(t,44493))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=47926)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[27,8105,1321,705,5497,1696,8441,3794,7358],()=>_(_.s=81696)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var i=t(95155),a=t(73321),r=t(98500),n=t.n(r),o=t(12115),l=t(35497),c=t(57250),d=t(88105),m=t(8247);let x=new Set([]),h={image:"image-combo",tts:"tts-combo"};function p(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function u({provider:e,kind:s,connections:t,isCustom:a,onToggle:r}){let o=d.Q2[e.id],x=!!o?.noAuth,h=t.filter(s=>s.provider===e.id),f=h.filter(e=>{let s=p(e);return"active"===s||"success"===s}).length,b=h.filter(e=>{let s=p(e);return"error"===s||"expired"===s||"unavailable"===s}).length,g=h.length,j=g>0&&h.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),x?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[f>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[f," Connected"]}),b>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===f&&0===b&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),r&&r(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function f({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,i.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:(0,m.k)(t),alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b(){let{kind:e}=(0,a.useParams)(),s=(0,a.useRouter)(),[t,r]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[m,p]=(0,o.useState)([]),[b,g]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let j=d.rj.find(s=>s.id===e),v="embedding"===e,N=x.has(e);if((0,o.useEffect)(()=>{j&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>r(e.connections||[])).catch(()=>{}),v&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>p(e.combos||[])).catch(()=>{}))},[v,N,j]),!j)return(0,a.notFound)();let k=(0,d.o5)(e),y=m.filter(s=>s.kind===e),w=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),C=[...k,...w],E=async(e,s)=>{let i=t.filter(s=>s.provider===e);r(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},$=async()=>{let t=h[e]||`${e}-combo`,i=t,a=1,r=new Set(m.map(e=>e.name));for(;r.has(i);)i=`${t}-${a++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,i.jsx)(l.zY,{title:j?.label||e,description:`Manage your ${j?.label||e} providers`,icon:j?.icon||"perm_media",actions:(v||N)&&(0,i.jsxs)(i.Fragment,{children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:$,children:"Create Combo"}),v&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>g(!0),children:"Add Custom Embedding"})]})}),N&&y.length>0&&(0,i.jsx)(f,{combos:y}),0===C.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:j.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[k.map(s=>(0,i.jsx)(u,{provider:s,kind:e,connections:t,onToggle:E},s.id)),w.map(s=>(0,i.jsx)(u,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:E},s.id))]}),v&&(0,i.jsx)(l.x0,{isOpen:b,onClose:()=>g(!1),onCreated:e=>{c(s=>[...s,e]),g(!1)}})]})}},42349:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=42349)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),c=t(73321),o=t(35497),n=t(57250),d=t(88105),m=t(8247);function x(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function h({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,c=t.filter(s=>s.provider===e.id),p=c.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,b=c.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,u=c.length,f=u>0&&c.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===u?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[p>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[p," Connected"]}),b>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===p&&0===b&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[u," Added"]})]})})]})]})})})}function p({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:(0,m.k)(t),alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:c}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:c,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function u(){let e=(0,c.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),n=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{n()},[]);let m=(0,d.o5)("webSearch"),x=(0,d.o5)("webFetch"),h=a.filter(e=>"webSearch"===e.kind),p=a.filter(e=>"webFetch"===e.kind),u=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let c=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(c.ok){let s=await c.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await c.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(o.zY,{title:"Web Fetch & Search",description:"Web search and web fetch providers",icon:"travel_explore"}),(0,r.jsx)(b,{title:"Web Search",icon:"search",kind:"webSearch",providers:m,connections:s,combos:h,onCreateCombo:()=>u("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(b,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:x,connections:s,combos:p,onCreateCombo:()=>u("webFetch")})]})}},84147:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=84147)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{19924:(e,t,s)=>{Promise.resolve().then(s.bind(s,23879))},23879:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),i=s(12115),n=s(3534),r=s(28777),o=s(88105),l=s(64137),c=s(54960);function d(){let[e,t]=(0,i.useState)([]),[s,d]=(0,i.useState)([]),[u,h]=(0,i.useState)({}),[p,f]=(0,i.useState)(!1),[g,w]=(0,i.useState)(null),[x,y]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{v(),m(),S(),b()},[]);let v=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let s=await e.json();t(s.connections||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();d(t.keys||[])}}catch{}},S=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();h(t.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();f(t.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsx)(c.default,{title:"MITM Proxy",description:"Intercept selected IDE traffic through the gateway",icon:"security"}),(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-panel border border-warning/30 bg-warning/10 px-3 py-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-warning",children:"warning"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-warning",children:"MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(l.tA,{apiKeys:s,cloudEnabled:p,onStatusChange:y}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,t])=>(0,a.jsx)(l.kn,{tool:t,isExpanded:g===e,onToggle:()=>w(g===e?null:e),serverRunning:x.running,dnsActive:x.dnsStatus?.[e]||!1,hasCachedPassword:x.hasCachedPassword||!1,needsSudoPassword:!1!==x.needsSudoPassword,isWin:!0===x.isWin,apiKeys:s,activeProviders:j(),hasActiveProviders:j().some(e=>(0,r.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:u,cloudEnabled:p,onDnsChange:e=>y(t=>({...t,dnsStatus:e.dnsStatus??t.dnsStatus}))},e))})]})}}},e=>{e.O(0,[27,5772,8105,1321,705,5497,9622,8441,3794,7358],()=>e(e.s=19924)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{54645:(e,t,s)=>{"use strict";s.d(t,{default:()=>F});var a=s(95155),r=s(12115),l=s(35497),n=s(14051),i=s.n(n);let c=e=>{let t=Number(e||0);return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()},o=[{key:"rtk",label:"RTK",icon:"compress",color:"text-primary"},{key:"headroom",label:"Headroom",icon:"air",color:"text-info"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"text-secondary"},{key:"cache",label:"Cache",icon:"cached",color:"text-success"},{key:"caveman",label:"Caveman",icon:"short_text",color:"text-warning"},{key:"ponytail",label:"Ponytail",icon:"notes",color:"text-accent"}];function d({breakdown:e}){let t=o.map(t=>({...t,value:e?.[t.key]||0})).filter(e=>e.value>0);return 0===t.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No per-mechanism data yet."}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:t.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[11px] font-medium",title:`${e.label}: ${e.value.toLocaleString()} tokens saved`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[12px] ${e.color}`,children:e.icon}),(0,a.jsx)("span",{className:"text-text-muted",children:e.label}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:c(e.value)})]},e.key))})}let x=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"All token savers",expandable:!0},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function m({data:e}){let[t,s]=(0,r.useState)(!1);if(!e)return null;let l={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:x.map(r=>{let n=r.expandable&&t;return(0,a.jsxs)("div",{className:`flex flex-col gap-2 rounded-panel border bg-panel p-5 shadow-[var(--shadow-soft)] ${r.expandable?"cursor-pointer transition-colors hover:border-primary/30":"border-border-subtle"} ${n?"border-primary/30":"border-border-subtle"}`,onClick:r.expandable?()=>s(e=>!e):void 0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[r.color]}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:r.icon})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)("span",{className:"text-2xl font-bold text-text-main",children:c(l[r.key])})}),r.expandable&&(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-180":""}`,children:"expand_more"})]}),(0,a.jsx)("div",{className:"text-sm font-medium text-text-main",children:r.label}),(0,a.jsx)("div",{className:"text-xs text-text-muted",children:r.sub}),n&&"tokensSaved"===r.key&&(0,a.jsxs)("div",{className:"mt-2 border-t border-border-subtle pt-2",children:[(0,a.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Breakdown by mechanism"}),(0,a.jsx)(d,{breakdown:e.tokensSavedByMechanism}),e.semanticCacheHits>0&&(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] align-middle text-success",children:"bolt"})," ",e.semanticCacheHits.toLocaleString()," cache hits served from Semantic Cache"]})]})]},r.key)})})}m.propTypes={data:i().object};var p=s(84588);function u(e){return 0===e?"$0.00":e>=1e3?`$${(e/1e3).toFixed(1)}K`:e>=1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}let h=[{key:"rtk",label:"RTK",icon:"compress",color:"#3B82F6"},{key:"headroom",label:"Headroom",icon:"expand_less",color:"#10B981"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"#8B5CF6"},{key:"cache",label:"Cache",icon:"cached",color:"#F59E0B"},{key:"caveman",label:"Caveman",icon:"short_text",color:"#EF4444"},{key:"ponytail",label:"Ponytail",icon:"code",color:"#EC4899"}];function b({data:e}){let[t,s]=(0,r.useState)(!1),l=e?.costSavedLifetime||0,n=e?.costSavedByMechanism||{},i=e?.tokensSavedLifetime||0,c=e?.totalCost||0;return(0,a.jsxs)(p.default,{padding:"md",className:"relative overflow-hidden",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-emerald-500/5 to-transparent"}),(0,a.jsxs)("div",{className:"relative flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-emerald-500/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] text-emerald-500",children:"payments"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:"Total Dollar Savings"}),(0,a.jsx)("p",{className:"text-3xl font-bold text-emerald-500",children:u(l)}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:[i.toLocaleString()," tokens saved across all mechanisms"]})]})]}),(0,a.jsxs)("div",{className:"hidden flex-col items-end gap-1 sm:flex",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-surface-2 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Without ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-red-500 line-through opacity-70",children:u(c+l)})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-emerald-500/10 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:"With ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-emerald-500",children:u(c)})]})]})]}),(0,a.jsxs)("button",{onClick:()=>s(e=>!e),className:"relative mt-3 flex w-full items-center justify-between rounded-lg bg-surface-2/50 px-3 py-2 text-left transition-colors hover:bg-surface-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Savings by mechanism"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted transition-transform",style:{transform:t?"rotate(180deg)":"none"},children:"expand_more"})]}),t&&(0,a.jsx)("div",{className:"relative mt-2 grid grid-cols-2 gap-2 sm:grid-cols-3",children:h.map(e=>{let t=n[e.key]||0,s=l>0?t/l*100:0;return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle px-2.5 py-2",children:[(0,a.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-md",style:{backgroundColor:`${e.color}15`},children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:e.color},children:e.icon})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-xs font-medium text-text-primary",children:e.label}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[u(t)," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",s.toFixed(0),"%)"]})]})]})]},e.key)})})]})}var f=s(98500),y=s.n(f),g=s(57250),j=s(8247);function v(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}let N=[{value:"24h",label:"24h"},{value:"7d",label:"7d"},{value:"30d",label:"30d"}],k=[{key:"requests",label:"Requests",sortable:!0},{key:"totalTokens",label:"Tokens",sortable:!0},{key:"avgTtft",label:"TTFT",sortable:!0},{key:"p95Latency",label:"P95",sortable:!0},{key:"successRate",label:"Success",sortable:!0},{key:"cost",label:"Cost",sortable:!0}];function w(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[n,i]=(0,r.useState)("7d"),[c,o]=(0,r.useState)("requests"),[d,x]=(0,r.useState)("desc");(0,r.useEffect)(()=>{let e=!1;return l(!0),fetch(`/api/usage/leaderboard?period=${n}`).then(e=>e.json()).then(s=>{e||s.error||t(s.leaderboard||[])}).catch(()=>{}).finally(()=>{e||l(!1)}),()=>{e=!0}},[n]);let m=(0,r.useMemo)(()=>{let t=[...e];return t.sort((e,t)=>{let s=e[c]??-1,a=t[c]??-1;return"desc"===d?a-s:s-a}),t},[e,c,d]);return(0,a.jsx)(p.default,{title:"Provider Leaderboard",subtitle:"Performance ranking by requests, latency, and cost",icon:"leaderboard",padding:"none",action:(0,a.jsx)("div",{className:"flex items-center gap-1",children:N.map(e=>(0,a.jsx)("button",{onClick:()=>i(e.value),className:`rounded-md px-2 py-1 text-xs font-medium transition-colors ${n===e.value?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2"}`,children:e.label},e.value))}),children:s?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,a.jsx)("span",{className:"text-sm",children:"Loading leaderboard..."})]}):0===m.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] opacity-20",children:"leaderboard"}),(0,a.jsx)("span",{className:"text-sm",children:"No usage data for this period"})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[640px] text-left",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-surface-2/50",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-[10px] font-medium uppercase tracking-wide text-text-muted",children:"Provider"}),k.map(e=>(0,a.jsxs)("th",{onClick:()=>{var t;return e.sortable&&void(c===(t=e.key)?x(e=>"desc"===e?"asc":"desc"):(o(t),x("desc")))},className:`px-3 py-2 text-[10px] font-medium uppercase tracking-wide ${e.sortable?"cursor-pointer select-none hover:text-text-primary":""} ${c===e.key?"text-primary":"text-text-muted"}`,children:[e.label,c===e.key&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-0.5 inline text-[12px] align-middle",children:"desc"===d?"arrow_downward":"arrow_upward"})]},e.key))]})}),(0,a.jsx)("tbody",{children:m.map((e,t)=>{var s,r;let l=e.successRate>=95?"text-emerald-500":e.successRate>=80?"text-amber-500":"text-red-500";return(0,a.jsxs)("tr",{className:"border-b border-border-subtle transition-colors hover:bg-surface-2/30",children:[(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsxs)(y(),{href:`/dashboard/providers/${e.provider}`,className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-text-muted w-4",children:t+1}),(0,a.jsx)("div",{className:"flex size-6 shrink-0 items-center justify-center rounded",children:(0,a.jsx)(g.A,{src:(0,j.k)(e.provider),alt:e.provider,size:24,className:"object-contain rounded",fallbackText:e.provider?.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-primary",children:e.displayName})]})}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-primary",children:e.requests.toLocaleString()}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:(s=e.totalTokens)>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:String(s)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:v(e.avgTtft)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:v(e.p95Latency)}),(0,a.jsxs)("td",{className:`px-3 py-2.5 text-xs font-medium tabular-nums ${l}`,children:[e.successRate.toFixed(1),"%"]}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:null==(r=e.cost)||0===r?"$0.00":r<.01?`$${r.toFixed(4)}`:`$${r.toFixed(2)}`})]},e.provider)})})]})})})}let $=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"pxpipeEnabled",name:"Pxpipe",icon:"image_search"},{key:"semanticCacheEnabled",name:"Semantic Cache",icon:"cached"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function S({settings:e}){return e?(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:$.map(t=>{let s=!!e[t.key];return(0,a.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${s?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${s?"text-success":"text-text-muted"}`,children:t.icon}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:t.name}),(0,a.jsx)(l.Ex,{variant:s?"success":"default",size:"sm",dot:!0,children:s?"Active":"Off"})]},t.key)})}):null}S.propTypes={settings:i().object};let C=e=>{let t=Number(e||0);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()};function T({providers:e}){return e&&0!==e.length?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:e.map(e=>{let t=e.color||"#6b7280",s=t.length>7?t:t+"15";return(0,a.jsxs)(y(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:s},children:(0,a.jsx)(g.A,{src:(0,j.k)(e.id),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"font-medium",children:[C(e.requests)," requests"]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:[C(e.tokens)," tokens"]})]}):e.connected?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,a.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,a.jsx)(l.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function F(){let[e,t]=(0,r.useState)(null),[s,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||t(e)}).catch(()=>{}).finally(()=>n(!1))},[]),s)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(m,{data:e}),(0,a.jsx)(b,{data:e}),(0,a.jsx)(l.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,a.jsx)(S,{settings:e?.tokenSaverSettings})}),(0,a.jsx)(l.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,a.jsx)(T,{providers:e?.freeProviders||[]})}),(0,a.jsx)(w,{})]})}T.propTypes={providers:i().arrayOf(i().shape({id:i().string,name:i().string,icon:i().string,color:i().string,requests:i().number,tokens:i().number}))}},73411:(e,t,s)=>{Promise.resolve().then(s.bind(s,54645))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=73411)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[27,8105,1321,705,5497,1696,8441,3794,7358],()=>_(_.s=81696)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,u]=(0,r.useState)("en"),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,L]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)({open:!1,mode:"",password:""}),$=(0,r.useRef)(null),[E,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,J]=(0,r.useState)(""),[_,H]=(0,r.useState)({type:"",message:""}),[K,Z]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)({type:"",message:""}),[Y,G]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[h]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),J(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{G(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});L(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{L(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eh=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Z(!0),H({type:"",message:""}),Q({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),J(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{Z(!1)}},ej=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void Q({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),Q({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void Q({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;Q({type:"success",message:e})}else Q({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){Q({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),T({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),T({type:"success",message:"Database backup downloaded"})}catch(e){T({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=$.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),T({type:"success",message:"Database imported successfully"})}catch(e){T({type:"error",message:e.message||"Invalid backup file"})}finally{$.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;M({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>M({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&($.current=t,T({type:"",message:""}),M({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||K,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:E.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:E.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>J(e.target.value),disabled:v||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||K})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:K,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),W.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===W.type?"text-red-500":"text-green-500"}`,children:W.message}),_.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===_.type?"text-red-500":"text-green-500"}`,children:_.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eh(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eu("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:h,onClose:e=>{b(!1),u(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>M({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>M({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:R,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>M(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}},79797:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=79797)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{42418:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>O});var r=a(95155),s=a(12115),l=a(35497),i=a(90620),o=a(88105),n=a(65921),c=a(38003),d=a(67098),p=a(98500),m=a.n(p),u=a(57250),x=a(31474),h=a(8247);function f({providerId:e,provider:t,stats:a,onToggle:s,onTest:i,isNoAuth:n=!1,comingSoon:c=!1,isNew:d=!1,testing:p=!1}){let y=e.startsWith(o.JH),g=e.startsWith(o.DI),{connected:b,error:v,errorCode:j,allDisabled:N}=a,k=(0,h.k)(e,t.apiType),C=a.total>0,w=C&&s&&!c;return(0,r.jsxs)("div",{className:(0,x.cn)("group relative flex flex-col overflow-hidden rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",c&&"opacity-70"),children:[(0,r.jsxs)(m(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-col gap-2 px-3 pb-2 pt-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${t.color?.length>7?t.color.slice(0,7):t.color}15`},children:(0,r.jsx)(u.A,{src:k,alt:t.name,size:32,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id?.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("h3",{className:"flex items-center gap-1.5 text-sm font-semibold leading-tight text-text-main",children:[(0,r.jsx)("span",{className:"truncate",children:t.name}),d&&(0,r.jsx)("span",{className:"inline-flex shrink-0 items-center rounded-full bg-primary/12 px-1.5 py-0.5 text-[10px] font-bold text-primary ring-1 ring-primary/20",children:"NEW"})]}),C?(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:b>0?`${b} active`:`${a.total} connection${a.total>1?"s":""}`}):n?(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:"No key needed"}):(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:"Not connected"})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[N?(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):n&&0===b&&0===v?(0,r.jsx)(l.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):b>0?(0,r.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[b," Connected"]}):null,v>0&&(0,r.jsx)(l.Ex,{variant:"error",size:"sm",dot:!0,children:j?`${v} Error (${j})`:`${v} Error`}),c&&(0,r.jsx)(l.Ex,{variant:"warning",size:"sm",children:(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),"Soon"]})}),y&&(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),g&&(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:"Messages"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 border-t border-border-subtle px-3 py-2",children:[C&&i&&(0,r.jsx)(l.m_,{text:p?"Testing...":"Test provider",children:(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),i(e)},disabled:p,className:"flex h-7 w-7 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:opacity-50","aria-label":"Test provider",children:(0,r.jsx)("span",{className:(0,x.cn)("material-symbols-outlined text-[16px]",p&&"animate-spin"),children:p?"progress_activity":"bolt"})})}),(0,r.jsx)(l.m_,{text:"Configure",children:(0,r.jsx)(m(),{href:`/dashboard/providers/${e}`,onClick:e=>e.stopPropagation(),className:"flex h-7 w-7 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-primary","aria-label":"Configure provider",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"settings"})})}),(0,r.jsx)("div",{className:"flex-1"}),w&&(0,r.jsx)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation(),s(!!N)},className:"opacity-80 sm:opacity-50 sm:group-hover:opacity-100",children:(0,r.jsx)(l.lM,{size:"sm",checked:!N,onChange:()=>{}})})]})]})}let y=[{key:"total",label:"Total",icon:"dns",color:"#3B82F6"},{key:"connected",label:"Connected",icon:"link",color:"#10B981"},{key:"errors",label:"Errors",icon:"error",color:"#E11D48"},{key:"ready",label:"Ready",icon:"bolt",color:"#F59E0B"}];function g({counts:e,activeFilter:t,onFilter:a}){return(0,r.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:y.map(s=>{let i=e[s.key]||0,o=t===s.key,n="errors"===s.key&&i>0;return(0,r.jsx)(l.Zp,{padding:"sm",className:`flex items-center gap-3 transition-all ${n?"cursor-pointer hover:border-primary/35 hover:bg-panel-elev":""} ${o?"border-primary/35 bg-primary/5":""}`,children:n?(0,r.jsx)("button",{type:"button",onClick:()=>a(o?"all":s.key),className:"flex w-full items-center gap-3 text-left","aria-label":`Filter by ${s.label.toLowerCase()}`,children:(0,r.jsx)(b,{kpi:s,value:i})}):(0,r.jsx)(b,{kpi:s,value:i})},s.key)})})}function b({kpi:e,value:t}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",style:{color:e.color},children:e.icon})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"font-mono text-2xl font-bold leading-none text-text-main",children:t}),(0,r.jsx)("div",{className:"mt-1 text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})}let v=[{value:"all",label:"All"},{value:"connected",label:"Connected"},{value:"errors",label:"Errors"},{value:"oauth",label:"OAuth"},{value:"apikey",label:"API Key"},{value:"free",label:"Free"},{value:"cookie",label:"Cookie"},{value:"custom",label:"Custom"}],j=[{value:"priority",label:"Priority"},{value:"name",label:"Name"},{value:"connections",label:"Connections"}];function N({filter:e,onFilter:t,sortBy:a,onSort:s,counts:l={},total:i,isSearching:o}){return(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:v.map(a=>{let s=l[a.value],n=void 0!==s&&s!==i&&"all"!==a.value;if(!o&&0===s&&"all"!==a.value)return null;let c=e===a.value;return(0,r.jsxs)("button",{type:"button",onClick:()=>t(a.value),className:(0,x.cn)("flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium transition-colors",c?"border-primary/30 bg-primary/5 text-primary":"border-border bg-black/[0.02] text-text-primary hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10"),"aria-pressed":c,children:[a.label,n&&(0,r.jsx)("span",{className:(0,x.cn)("rounded-full px-1.5 py-0.5 text-[10px] font-bold tabular-nums",c?"bg-primary/15 text-primary":"bg-black/5 text-text-muted dark:bg-white/10"),children:s})]},a.value)})}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted",children:"sort"}),(0,r.jsx)("select",{value:a,onChange:e=>s(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort providers",children:j.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})}var k=a(14051),C=a.n(k);let w={oauth:"OAuth",free:"Free",apikey:"API Key",cookie:"Cookies",compatible:"Custom",provider:"Provider",all:"All"};function A({results:e}){if(e.error&&!e.results)return(0,r.jsxs)("div",{className:"py-6 text-center",children:[(0,r.jsx)("span",{className:"material-symbols-outlined mb-2 block text-[32px] text-danger",children:"error"}),(0,r.jsx)("p",{className:"text-sm text-danger",children:e.error})]});let{summary:t,mode:a}=e,s=e.results||[],l=w[a]||a;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,r.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-2 text-xs sm:gap-3",children:[(0,r.jsxs)("span",{className:"text-text-muted",children:[l," Test"]}),(0,r.jsxs)("span",{className:"rounded bg-success/15 px-2 py-0.5 font-medium text-success",children:[t.passed," passed"]}),t.failed>0&&(0,r.jsxs)("span",{className:"rounded bg-danger/15 px-2 py-0.5 font-medium text-danger",children:[t.failed," failed"]}),(0,r.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),s.map((e,t)=>(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-surface-2 px-3 py-2 text-xs sm:flex-nowrap",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-success":"text-danger"}`,children:e.valid?"check_circle":"error"}),(0,r.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,r.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,r.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,r.jsxs)("span",{className:"shrink-0 font-mono tabular-nums text-text-muted",children:[e.latencyMs,"ms"]}),(0,r.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold uppercase ${e.valid?"bg-success/15 text-success":"bg-danger/15 text-danger"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===s.length&&(0,r.jsx)("div",{className:"py-4 text-center text-sm text-text-muted",children:"No active connections found for this group."})]})}A.propTypes={results:C().shape({mode:C().string,results:C().array,summary:C().shape({total:C().number,passed:C().number,failed:C().number}),error:C().string}).isRequired};let T={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},S=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function I({variant:e,isOpen:t,onClose:a,onCreated:i}){let o=T[e],n=()=>({name:"",prefix:"",...o.hasApiType?{apiType:"chat"}:{},baseUrl:o.defaultBaseUrl}),[c,d]=(0,s.useState)(n),[p,m]=(0,s.useState)(!1),[u,x]=(0,s.useState)(""),[h,f]=(0,s.useState)(""),[y,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null);(0,s.useEffect)(()=>{o.hasApiType?d(e=>({...e,baseUrl:o.defaultBaseUrl})):t&&(v(null),x(""),f(""))},[o.hasApiType?c.apiType:t]);let j=async()=>{if(c.name.trim()&&c.prefix.trim()&&c.baseUrl.trim()){m(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.name,prefix:c.prefix,...o.hasApiType?{apiType:c.apiType}:{},baseUrl:c.baseUrl,type:o.type})}),t=await e.json();e.ok&&(i(t.node),d(n()),x(""),v(null))}catch(e){console.log(`Error creating ${o.errorLabel} node:`,e)}finally{m(!1)}}},N=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:c.baseUrl,apiKey:u,type:o.type,modelId:h.trim()||void 0})}),t=await e.json();v(t)}catch{v({valid:!1,error:"Network error"})}finally{g(!1)}};return(0,r.jsx)(l.aF,{isOpen:t,title:o.title,onClose:a,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(l.pd,{label:"Name",value:c.name,onChange:e=>d({...c,name:e.target.value}),placeholder:o.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,r.jsx)(l.pd,{label:"Prefix",value:c.prefix,onChange:e=>d({...c,prefix:e.target.value}),placeholder:o.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),o.hasApiType&&(0,r.jsx)(l.l6,{label:"API Type",options:S,value:c.apiType,onChange:e=>d({...c,apiType:e.target.value})}),(0,r.jsx)(l.pd,{label:"Base URL",value:c.baseUrl,onChange:e=>d({...c,baseUrl:e.target.value}),placeholder:o.defaultBaseUrl,hint:o.baseUrlHint}),(0,r.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:u,onChange:e=>x(e.target.value)}),(0,r.jsx)(l.pd,{label:"Model ID (optional)",value:h,onChange:e=>f(e.target.value),placeholder:o.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(l.$n,{onClick:N,disabled:!u||y||!c.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:y?"Checking...":"Check"}),(()=>{if(!b)return null;let{valid:e,error:t,method:a}=b;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Ex,{variant:"success",children:"Valid"}),"chat"===a&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(l.$n,{onClick:j,fullWidth:!0,disabled:!c.name.trim()||!c.prefix.trim()||!c.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,r.jsx)(l.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function O(){let e,[t,a]=(0,s.useState)([]),[p,m]=(0,s.useState)([]),[u,x]=(0,s.useState)(!0),{isNew:h,markSeen:y}=(0,d.P)("providers"),[b,v]=(0,s.useState)("all"),[j,k]=(0,s.useState)("priority"),[C,w]=(0,s.useState)(!1),[T,S]=(0,s.useState)(!1),[O,P]=(0,s.useState)(null),[$,U]=(0,s.useState)(null),E=(0,s.useRef)(!1),R=(0,n.i)(),_=(0,c.C)(e=>e.query),z=(0,c.C)(e=>e.register),D=(0,c.C)(e=>e.unregister),L=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&a(t.connections||[])}catch{}},[]);(0,s.useEffect)(()=>(z("Search providers..."),()=>D()),[z,D]),(0,s.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),r=await e.json(),s=await t.json();e.ok&&a(r.connections||[]),t.ok&&m(s.nodes||[])}catch{}x(!1)})()},[]);let F=!!_.trim(),M=(e=_.trim().toLowerCase(),(t,a="",r="")=>!e||t.toLowerCase().includes(e)||a.toLowerCase().includes(e)||r.toLowerCase().includes(e)),q=(e,a)=>{let r=Array.isArray(a)?a:[a],s=t.filter(t=>t.provider===e&&r.includes(t.authType)),l=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},i=s.filter(e=>{let t=l(e);return"active"===t||"success"===t}).length,o=s.filter(e=>{let t=l(e);return"error"===t||"failed"===t}),n=o.length,c=o[0],d=c?Object.entries(c).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now())?"COOLDOWN":c.errorCode||null:null,p=c?.lastErrorAt?function(e){if(!e)return null;let t=new Date(e),a=Math.floor((new Date().getTime()-t.getTime())/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;let r=Math.floor(a/60);if(r<24)return`${r}h ago`;let s=Math.floor(r/24);return s<7?`${s}d ago`:t.toLocaleDateString()}(c.lastErrorAt):null,m=s.length>0&&s.every(e=>!1===e.isActive);return{connected:i,error:n,total:s.length,errorCode:d,errorTime:p,allDisabled:m}},B=(0,s.useCallback)((e,t,r)=>{let s=Array.isArray(t)?t:[t],l=t=>t.provider===e&&s.includes(t.authType);a(e=>(Promise.allSettled(e.filter(l).map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})}))),e.map(e=>l(e)?{...e,isActive:r}:e)))},[]),W=(0,s.useCallback)(async(e,t=null)=>{if(!E.current){E.current=!0,P("provider"===e?t:e),U(null);try{let a=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),r=await a.json();if(U(r),r.summary){let{passed:e,failed:t,total:a}=r.summary;0===t?R.success(`All ${a} tests passed`):R.warning(`${e}/${a} passed, ${t} failed`)}L()}catch{U({error:"Test request failed"}),R.error("Provider test failed")}finally{P(null),E.current=!1}}},[R,L]),J=(0,s.useMemo)(()=>{let e=[];for(let t of p){let a=t.id,r=t.name||("anthropic-compatible"===t.type?"Anthropic Compatible":"OpenAI Compatible");M(r,a)&&e.push({id:a,name:r,color:"anthropic-compatible"===t.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===t.type?"AC":"OC",apiType:t.apiType,category:"custom",priority:999,authTypes:"apikey",stats:q(a,"apikey"),isNew:h(a),isNoAuth:!1,comingSoon:!1})}for(let[t,a]of Object.entries(i.zN)){if(a.hidden||!M(a.name,a.id,a.alias))continue;let r=a?.hasOAuth===!1?"apikey":"oauth";e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"oauth",priority:a.priority??100,authTypes:r,stats:q(t,r),isNew:h(t),isNoAuth:!1,comingSoon:!!a.comingSoon})}for(let[t,a]of Object.entries(o.IS)){if(a.hidden||!M(a.name,a.id,a.alias))continue;let r="kiro"===t?["oauth","apikey","api_key"]:"oauth";e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"free",priority:a.priority??200,authTypes:r,stats:q(t,r),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon})}for(let[t,a]of Object.entries(o.nJ))!a.hidden&&M(a.name,a.id,a.alias)&&e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"free",priority:a.priority??210,authTypes:"apikey",stats:q(t,"apikey"),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon});for(let[t,a]of Object.entries(i.fg))!a.hidden&&(a.serviceKinds??["llm"]).includes("llm")&&M(a.name,a.id,a.alias)&&e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"apikey",priority:a.priority??300,authTypes:"apikey",stats:q(t,"apikey"),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon});for(let[t,a]of Object.entries(o.br))!a.hidden&&M(a.name,a.id,a.alias)&&e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"cookie",priority:a.priority??400,authTypes:"cookie",stats:q(t,"cookie"),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon});return e},[p,t,_,h]),K=(0,s.useMemo)(()=>{let e=0,t=0,a=0;for(let r of J)r.stats.connected>0&&e++,r.stats.error>0&&t++,r.isNoAuth&&0===r.stats.connected&&0===r.stats.error&&a++,!r.isNoAuth&&0===r.stats.connected&&0===r.stats.error&&0===r.stats.total&&a++;return{total:J.length,connected:e,errors:t,ready:a}},[J]),H=(0,s.useMemo)(()=>{let e={all:J.length,connected:0,errors:0,oauth:0,apikey:0,free:0,cookie:0,custom:0};for(let t of J)t.stats.connected>0&&e.connected++,t.stats.error>0&&e.errors++,e[t.category]++;return e},[J]),Q=(0,s.useMemo)(()=>{let e=J;"all"!==b&&(e="connected"===b?e.filter(e=>e.stats.connected>0):"errors"===b?e.filter(e=>e.stats.error>0):e.filter(e=>e.category===b));let t=[...e];return"name"===j?t.sort((e,t)=>(e.name||"").localeCompare(t.name||"")):"connections"===j?t.sort((e,t)=>{let a=e.stats.connected>0?0:1,r=t.stats.connected>0?0:1;return a!==r?a-r:(t.stats.total||0)-(e.stats.total||0)||(e.name||"").localeCompare(t.name||"")}):t.sort((e,t)=>{let a=e.stats.total>0?0:1,r=t.stats.total>0?0:1;return a!==r?a-r:e.priority!==t.priority?e.priority-t.priority:(e.name||"").localeCompare(t.name||"")}),t},[J,b,j]);if(u)return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(l.Qv,{}),(0,r.jsx)(l.Qv,{})]});let V=F&&0===Q.length,Y=!F&&0===J.length;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,r.jsx)(l.zY,{title:"Providers",description:"Connect, configure, and manage AI providers",icon:"dns",actions:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{size:"sm",variant:"outline",icon:"add",onClick:()=>S(!0),children:"Anthropic"}),(0,r.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>w(!0),children:"OpenAI"})]})}),(0,r.jsx)(g,{counts:K,activeFilter:b,onFilter:v}),K.connected>0&&(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(l.$n,{size:"sm",variant:"outline",icon:"all"===O?"progress_activity":"bolt",onClick:()=>W("all"),disabled:!!O,className:"all"===O?"animate-pulse":"",children:"all"===O?"Testing All...":"Test All Providers"})}),!Y&&(0,r.jsx)(N,{filter:b,onFilter:v,sortBy:j,onSort:k,counts:H,total:J.length,isSearching:F}),V&&(0,r.jsx)(l.pp,{icon:"search_off",title:`No providers match "${_}"`,description:"Try a different search term or clear the filters."}),Y&&(0,r.jsx)(l.pp,{icon:"cloud_off",title:"No providers yet",description:"Add your first provider to start routing requests."}),Q.length>0&&(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:Q.map(e=>(0,r.jsx)(f,{providerId:e.id,provider:e,stats:e.stats,isNoAuth:e.isNoAuth,comingSoon:e.comingSoon,isNew:e.isNew,testing:O===e.id,onToggle:t=>B(e.id,e.authTypes,t),onTest:e=>W("provider",e)},e.id))}),$&&(0,r.jsx)(l.aF,{isOpen:!!$,onClose:()=>U(null),title:"Provider Test Results",size:"md",children:(0,r.jsx)(A,{results:$})}),(0,r.jsx)(I,{variant:"openai",isOpen:C,onClose:()=>w(!1),onCreated:e=>{m(t=>[...t,e]),w(!1)}}),(0,r.jsx)(I,{variant:"anthropic",isOpen:T,onClose:()=>S(!1),onCreated:e=>{m(t=>[...t,e]),S(!1)}})]})}I.propTypes={variant:C().oneOf(["openai","anthropic"]).isRequired,isOpen:C().bool.isRequired,onClose:C().func.isRequired,onCreated:C().func.isRequired}},86296:(e,t,a)=>{Promise.resolve().then(a.bind(a,42418))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=86296)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{17566:(e,t,r)=>{"use strict";r.d(t,{default:()=>O});var a=r(95155),s=r(12115),i=r(57250),n=r(8247),l=r(70778);let o="quotaCacheData",d="quotaAutoRefresh",c=[10,20,50,100],u=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],m=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function x(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function h(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function p(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function b(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function g(e,t){return await e(t)}function f(){try{let e=window.localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function y(e,t){try{let r=f();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(o,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function v(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function j({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1}){let[n,l]=(0,s.useState)(1),o=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):v(e?.used,e?.total)})),[e]),d=(0,s.useMemo)(()=>"remaining-asc"===r?[...o].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...o].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):o,[o,r]),c=Math.max(1,Math.ceil(d.length/10));if((0,s.useEffect)(()=>{l(1)},[r,e]),(0,s.useEffect)(()=>{l(e=>Math.min(e,c))},[c]),!e||0===e.length)return null;let u=d.slice((n-1)*10,10*n),m=0===d.length?0:(n-1)*10+1,x=Math.min(10*n,d.length),h=t?"py-1 px-1.5":"py-2 px-3",p=t?"text-[11px]":"text-sm",b=t?"text-[11px]":"text-sm",g=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[d.length," quota",d.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:u.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},i=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),n=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let i="";i=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt),l=!1!==e.recurring?`in ${i}`:`expires in ${i}`;return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${h} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${p} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${h} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${h} w-[25%]`,children:"-"!==i||n?t?(0,a.jsx)("div",{className:`${b} text-text-primary font-medium truncate`,title:n||"",children:"-"!==i?l:n}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==i&&(0,a.jsx)("div",{className:`${b} text-text-primary font-medium`,children:l}),n&&(0,a.jsx)("div",{className:`${g} text-text-muted`,children:n})]}):(0,a.jsx)("div",{className:`${b} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),c>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",m,"-",x," of ",d.length]}),(0,a.jsxs)("span",{children:["Page ",n," / ",c]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.max(1,e-1)),disabled:1===n,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.min(c,e+1)),disabled:n===c,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var w=r(98542),N=r(97677),k=r(54960),C=r(84588),S=r(35497),A=r(88105),$=r(11059);let P={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},q={claude:"claudeAutoPing",codex:"codexAutoPing"},E={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function D(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function T(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}function M(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function O(){let{copied:e,copy:t}=(0,$.C)(),[r,O]=(0,s.useState)([]),[I,_]=(0,s.useState)({}),[F,L]=(0,s.useState)({}),[z,R]=(0,s.useState)({}),[U,J]=(0,s.useState)(!0),[K,G]=(0,s.useState)({claude:{},codex:{}}),[H,B]=(0,s.useState)(null),[V,W]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(60),[ee,et]=(0,s.useState)(!0),[er,ea]=(0,s.useState)(null),[es,ei]=(0,s.useState)(null),[en,el]=(0,s.useState)(null),[eo,ed]=(0,s.useState)(null),[ec,eu]=(0,s.useState)(null),[em,ex]=(0,s.useState)(!1),[eh,ep]=(0,s.useState)(null),[eb,eg]=(0,s.useState)([]),[ef,ey]=(0,s.useState)("all"),[ev,ej]=(0,s.useState)([]),[ew,eN]=(0,s.useState)("all"),[ek,eC]=(0,s.useState)("default"),[eS,eA]=(0,s.useState)(!1),[e$,eP]=(0,s.useState)(!1),[eq,eE]=(0,s.useState)(!1),[eD,eT]=(0,s.useState)(1),[eM,eO]=(0,s.useState)(20),[eI,e_]=(0,s.useState)(String(20)),[eF,eL]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ez,eR]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eU=(0,s.useRef)(null),eJ=(0,s.useRef)(null),eK=(0,s.useRef)(0),eG=(0,s.useCallback)(async(e=eD)=>{try{var t,r;let a=new URLSearchParams({page:String(e),pageSize:String(eM),accountStatus:ew,sort:"priority"});"all"!==ef&&a.set("provider",ef);let s=await fetch(`/api/providers/client?${a.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let i=await s.json(),n=i.connections||[],l=(t=i.pagination,t||{page:1,pageSize:eM,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,n.length);return O(n),ej(i.providerOptions||[]),eL(l),eR(o),eT((r=i.pagination,r?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),O([]),ej([]),eL({page:1,pageSize:eM,total:0,totalPages:1}),eR({eligibleConnections:0,providerFilteredConnections:0}),[]}},[ew,eS,eD,eM,ef]),eH=(0,s.useCallback)(async(e,t)=>{L(t=>({...t,[e]:!0})),R(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};_(t=>({...t,[e]:r})),y(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s=a??{},i={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring})});break;case"xai":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,recurring:!1,unlimited:!0});break;case"tokenrouter":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"cline":case"clinepass":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remainingPercentage,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"infron":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"grok-web":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"kimchi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,unit:t.unit,recurring:!1!==t.recurring,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,unlimited:!0})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,l.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:a};_(t=>({...t,[e]:i})),y(e,i)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),R(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{L(t=>({...t,[e]:!1}))}},[]),eB=(0,s.useCallback)(async(e,t)=>{await eH(e,t),B(new Date)},[eH]),eV=(0,s.useCallback)(async(e,t)=>{if("codex"===t&&!en){el(e),R(t=>({...t,[e]:null}));try{let r=await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset Codex limit");await eH(e,t),B(new Date)}catch(t){R(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{el(null)}}},[eH,en]),eW=(0,s.useCallback)(async e=>{eu({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),eu({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){eu({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),eQ=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){ea(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){_(t=>{let r={...t};return delete r[e],r}),L(t=>{let r={...t};return delete r[e],r}),R(t=>{let r={...t};return delete r[e],r});try{let t=f();t[e]&&(delete t[e],window.localStorage.setItem(o,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await g(eG,eD)}}catch(e){console.error("Error deleting connection:",e)}finally{ea(null)}}},[eG,eD]),eY=(0,s.useCallback)(async(e,t)=>{ei(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(_(e=>({...e})),await g(eG,eD))}catch(e){console.error("Error updating connection status:",e)}finally{ei(null)}},[eG,eD]),eX=(0,s.useCallback)(async e=>{if(!eh?.id)return;let t=eh.id,r=eh.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eG(),ex(!1),ep(null),A.wb.includes(r)&&await eH(t,r))}catch(e){console.error("Error saving connection:",e)}},[eh,eG,eH]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&eg(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eZ=(0,s.useCallback)(async(e=!1)=>{if(Q)return;Y(!0),Z(60);let t=eK.current+=1,r=Math.round(3);try{let a=await eG(eD);L(p(a)),R(e=>b(e,a)),_(e=>b(e,a)),await Promise.all(a.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eH(e.id,e.provider))),B(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{Y(!1)}},[Q,eG,eH,eD]);(0,s.useEffect)(()=>{(async()=>{et(!0);let e=await eG(eD);et(!1),L(p(e)),R(t=>b(t,e)),_(t=>b(t,e)),await Promise.all(e.map(e=>eH(e.id,e.provider))),B(new Date)})()},[eG,eH,eD]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(d);J(null===e||"true"===e),W(!0)},[]),(0,s.useEffect)(()=>{V&&window.localStorage.setItem(d,String(U))},[U,V]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>G({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}})).catch(()=>{})},[]);let e0=(0,s.useCallback)(async(e,t,r)=>{let a=q[t];if(!a)return;let s={...K[t]||{},[e]:r};G({...K,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:s};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{G(K)}},[K]);(0,s.useEffect)(()=>{if(!V||!U){eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null);return}return eU.current=setInterval(()=>{eZ()},6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3),()=>{eU.current&&clearInterval(eU.current),eJ.current&&clearInterval(eJ.current)}},[U,eZ,V]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(eU.current&&(clearInterval(eU.current),eU.current=null),eJ.current&&(clearInterval(eJ.current),eJ.current=null)):U&&V&&(eU.current=setInterval(()=>eZ(),6e4),eJ.current=setInterval(()=>{Z(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[U,eZ,V]);let e1=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),i=h(r,t),n="remaining-asc"===s?a-i:i-a;return 0!==n?n:(x(e)||"").localeCompare(x(r)||"")});if(!r)return e;let i=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=i(e)-i(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(x(e)||"").localeCompare(x(t)||"")})})(r,I,eS,ef,ek),[r,I,eS,ef,ek]),e2=e=>{let t=I[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=v(e.used,e.total))},e5=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eq){eE(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await g(eG,eD)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eE(!1)}}},[eq,eG,eD]),e3="all"===ef?"All providers":ef,e8=ez.eligibleConnections>0,e4=e1.length>0,e6=ez.eligibleConnections?ez.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ef?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===ew?"turned off":"active"===ew?"active":"matching"} accounts found for ${ef}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},e7=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(eF),e9=!c.includes(eM);return ee||e8?ee||e4?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(k.default,{title:"Quota",description:"Capacity, resets, and account availability",icon:"data_usage"}),(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eP(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":e$,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ef?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(i.A,{src:(0,n.k)(ef),alt:ef,size:18,className:"size-[18px] rounded object-contain",fallbackText:ef.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:e3})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),e$&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eP(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-border bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==ef&&eT(1),ey("all"),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ef?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ef&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:ev.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{ef!==e&&eT(1),ey(e),eP(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ef===e?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)(i.A,{src:(0,n.k)(e),alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),ef===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:ew,onChange:e=>{let t=e.target.value;ew!==t&&eT(1),eN(t)},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===ef&&(0,a.jsx)("select",{value:ek,onChange:e=>eC(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:m.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>eA(e=>!e),"aria-pressed":eS,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eS?"border-amber-500/40 bg-warning/10 text-warning":"border-border text-text-primary hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>(e.isActive??!0)&&e2(e)).map(e=>e.id),!1)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-danger transition-colors hover:bg-danger/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e5(e1.filter(e=>!(e.isActive??!0)&&!e2(e)).map(e=>e.id),!0)},disabled:eq,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>J(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5",title:U?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${U?"text-primary":"text-text-muted"}`,children:U?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),U&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",X,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eZ(!0),disabled:Q,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${Q?"animate-spin":""}`,children:"refresh"})})]})}),eS&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-warning/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e1.map(r=>{let s,l,o,d=I[r.id],c=F[r.id],u=z[r.id],m=!1===r.isActive,h="codex"===r.provider,p=Number.isFinite(l="number"==typeof(s=d?.raw?.resetCredits?.availableCount)?s:Number(s))?Math.max(0,l):0,b=en===r.id,g=er===r.id||es===r.id||b;return(0,a.jsxs)(C.default,{padding:"none",className:`min-w-0 ${m?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-border",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(i.A,{src:(0,n.k)(r.provider),alt:r.provider,size:32,className:"object-contain",fallbackText:r.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:r.provider}),x(r)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:x(r)}):null,D(r)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:D(r)}):null,"kiro"===r.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(o=r.providerSpecificData?.authMethod)&&P[o]?P[o]:"api_key"===r.authType?"API Key":"OAuth"}),T(r)&&(0,a.jsx)("span",{className:"rounded-full bg-info/10 px-2 py-0.5 text-[10px] font-semibold text-info",children:T(r)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${m?"bg-surface-2 text-text-muted":"active"===r.testStatus||"success"===r.testStatus?"bg-green-500/10 text-success":"error"===r.testStatus||"expired"===r.testStatus||"unavailable"===r.testStatus?"bg-red-500/10 text-danger":"bg-surface-2 text-text-muted"}`,children:m?"disabled":r.testStatus||"unknown"}),r.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>t(r.providerSpecificData.profileArn,r.id),title:r.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===r.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:r.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.default,{text:p>0?`Use one Codex reset credit. Available: ${p}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>ed({connection:r,resetCreditCount:p}),disabled:p<=0||c||g,"aria-label":p>0?`Use one Codex reset credit. ${p} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${p>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-border bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${b?"animate-spin":""}`,children:b?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:p})]})}),(0,a.jsx)(N.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>eW(r),disabled:c||g,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),q[r.provider]&&"oauth"===r.authType&&(0,a.jsx)(N.default,{text:E[r.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>e0(r.id,r.provider,K[r.provider]?.[r.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:hover:bg-surface-3 ${K[r.provider]?.[r.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(N.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>eB(r.id,r.provider),disabled:c||g,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${c?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(N.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>{ep(r),ex(!0)},disabled:g,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(N.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>eQ(r.id),disabled:g,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-danger/10 text-danger transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${er===r.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:r.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(w.default,{size:"sm",checked:r.isActive??!0,disabled:g,onChange:e=>eY(r.id,e)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:c?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):u?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:u})]}):d?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d.message})}):(0,a.jsx)(j,{quotas:d?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===r.provider&&"default"!==ek})})]},r.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:e7}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:e9?"custom":String(eM),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eT(1),eO(r),e_(String(r)))},className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[c.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eI,onChange:e=>e_(e.target.value),onBlur:()=>{let e=Number.parseInt(eI,10);if(!Number.isFinite(e))return void e_(String(eM));let t=Math.min(500,Math.max(1,e));eT(1),eO(t),e_(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eI,10);if(!Number.isFinite(t))return void e_(String(eM));let r=Math.min(500,Math.max(1,t));eT(1),eO(r),e_(String(r))},className:"h-8 w-20 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eF.page," / ",eF.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eT(1),disabled:eF.page<=1||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.max(1,e-1)),disabled:eF.page<=1||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(e=>Math.min(eF.totalPages,e+1)),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eT(eF.totalPages),disabled:eF.page>=eF.totalPages||ee||Q,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(S.uo,{isOpen:!!eo,onClose:()=>{en||ed(null)},onConfirm:async()=>{let e=eo?.connection;e&&(await eV(e.id,e.provider),ed(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${x(eo?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${eo?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!en}),ec&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-surface dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:x(ec.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:()=>eu(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-surface",children:ec.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):ec.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:ec.error}):ec.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[ec.data.credits.length," reset credit",1===ec.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[ec.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:ec.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-border-subtle",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:M(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:M(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),s=r%24;return a>0?`${a}d ${s}h`:`${s}h`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"No reset credit details returned for this account."})})]})}),(0,a.jsx)(S.wI,{isOpen:em,connection:eh,proxyPools:eb,onSave:eX,onClose:()=>{ex(!1),ep(null)}})]}):(0,a.jsx)(C.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:e6.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:e6.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:e6.description})]})}):(0,a.jsx)(C.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}},67471:(e,t,r)=>{Promise.resolve().then(r.bind(r,17566)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=67471)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3054],{31474:(e,s,t)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}t.d(s,{cn:()=>r})},54677:(e,s,t)=>{"use strict";t.d(s,{default:()=>m});var r=t(95155),a=t(12115),n=t(56061),i=t(99312),l=t(31474);let d={gatekeeper:{label:"Gatekeeper",icon:"fork_right",desc:"Classifies request complexity"},manager:{label:"Manager",icon:"psychology",desc:"Decomposes into subtasks"},workers:{label:"Workers",icon:"group_work",desc:"Parallel specialist execution"},audit:{label:"Staff Audit",icon:"fact_check",desc:"Reviews worker outputs"},synthesis:{label:"Synthesis",icon:"auto_awesome",desc:"Final cohesive answer"}},c=["gatekeeper","manager","workers","audit","synthesis"];function o(e){return"done"===e?"success":"running"===e?"info":"error"===e?"error":"default"}function u(e){return"done"===e?"Done":"running"===e?"Running":"error"===e?"Error":"Pending"}function x(e){return e||0===e?e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`:"—"}function m(){let[e,s]=(0,a.useState)([]),[t,d]=(0,a.useState)(!1),c=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=new EventSource("/api/swarm/stream");return c.current=e,e.onopen=()=>d(!0),e.onerror=()=>d(!1),e.onmessage=e=>{try{let t=JSON.parse(e.data);s(e=>"snapshot"===t.type&&Array.isArray(t.runs)?t.runs:t.runId?e.map(e=>{if(e.runId!==t.runId)return e;let s={...e,stages:{...e.stages}};if("workers"===t.stage&&void 0!==t.worker){let e=[...s.stages.workers?.workers||[]];e[t.worker]&&(e[t.worker]={...e[t.worker],status:t.status,model:t.model??e[t.worker].model}),s.stages.workers={...s.stages.workers,workers:e}}else t.stage&&(s.stages[t.stage]={...s.stages[t.stage],status:t.status,durationMs:t.durationMs??s.stages[t.stage]?.durationMs,model:t.model??s.stages[t.stage]?.model,verdict:t.verdict??s.stages[t.stage]?.verdict,strategy:t.strategy??s.stages[t.stage]?.strategy});return"swarm:complete"===t.type?(s.status="done",s.totalDurationMs=t.totalDurationMs):"swarm:error"===t.type&&(s.status="error",s.error=t.error),s}):e)}catch{}},()=>{e.close(),c.current=null}},[]);let o=e.filter(e=>"running"===e.status),u=e.filter(e=>"running"!==e.status);return(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:(0,l.cn)("size-2 rounded-full",t?"bg-success animate-pulse":"bg-danger")}),t?"Live":"Reconnecting…"]}),o.length>0&&(0,r.jsxs)(n.default,{variant:"info",dot:!0,children:[o.length," active run",o.length>1?"s":""]})]}),0===e.length?(0,r.jsx)(i.default,{icon:"hub",title:"No swarm runs yet",description:"Hierarchical Swarm runs will appear here in real time. Send a request to a combo with the 'Hierarchical Swarm' strategy to see the pipeline in action."}):(0,r.jsxs)(r.Fragment,{children:[o.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Active"}),o.map(e=>(0,r.jsx)(g,{run:e,expanded:!0},e.runId))]}),u.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Recent"}),u.slice(0,10).map(e=>(0,r.jsx)(g,{run:e},e.runId))]})]})]})}function g({run:e,expanded:s=!1}){let t=c.map(s=>[s,e.stages?.[s]]);return(0,r.jsxs)("div",{className:(0,l.cn)("rounded-panel border bg-panel shadow-[var(--shadow-soft)]","error"===e.status?"border-danger/30":"border-border-subtle"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-border-subtle px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)(n.default,{variant:o(e.status),dot:!0,size:"sm",children:u(e.status)}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"truncate font-mono text-sm font-medium text-text-main",children:e.comboName||"swarm"}),(0,r.jsx)("div",{className:"truncate text-xs text-text-muted",children:function(e){if(!e)return"—";let s=Date.now()-e;return s<5e3?"just now":s<6e4?`${Math.floor(s/1e3)}s ago`:s<36e5?`${Math.floor(s/6e4)}m ago`:new Date(e).toLocaleTimeString()}(e.startedAt)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-3 text-xs text-text-muted",children:[e.totalDurationMs&&(0,r.jsx)("span",{className:"font-mono",children:x(e.totalDurationMs)}),null!=e.workerCount&&e.workerCount>0&&(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"group_work"}),e.workerCount]})]})]}),e.promptPreview&&(0,r.jsx)("div",{className:"border-b border-border-subtle px-4 py-2",children:(0,r.jsx)("p",{className:"truncate text-xs text-text-muted",children:e.promptPreview})}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-px bg-border-subtle sm:grid-cols-5",children:t.map(([e,s])=>{let t=d[e];o(s?.status);let a=s?.status==="running";return(0,r.jsxs)("div",{className:(0,l.cn)("bg-panel p-3 transition-colors",a&&"bg-primary/5"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:(0,l.cn)("material-symbols-outlined text-[16px]",s?.status==="done"&&"text-success",s?.status==="running"&&"text-info",s?.status==="error"&&"text-danger",(!s?.status||s?.status==="pending")&&"text-text-subtle"),children:a?"progress_activity":t.icon}),(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:t.label})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:(0,l.cn)("size-1.5 rounded-full",s?.status==="done"&&"bg-success",s?.status==="running"&&"bg-info animate-pulse",s?.status==="error"&&"bg-danger",(!s?.status||s?.status==="pending")&&"bg-text-subtle")}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted",children:s?.durationMs?x(s.durationMs):u(s?.status)})]}),s?.verdict&&(0,r.jsx)("div",{className:"mt-1 text-[10px] uppercase tracking-wide text-text-subtle",children:s.verdict})]},e)})}),s&&e.stages?.workers?.workers?.length>0&&(0,r.jsxs)("div",{className:"border-t border-border-subtle px-4 py-3",children:[(0,r.jsx)("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Workers"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.stages.workers.workers.map((e,s)=>(0,r.jsxs)("div",{className:(0,l.cn)("flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-xs","done"===e.status?"border-success/30 bg-success/5":"running"===e.status?"border-info/30 bg-info/5":"error"===e.status?"border-danger/30 bg-danger/5":"border-border-subtle bg-surface-2"),children:[(0,r.jsxs)("span",{className:"font-mono text-text-subtle",children:["#",s+1]}),(0,r.jsx)("span",{className:"truncate max-w-[160px] text-text-muted",children:e.model||"—"}),(0,r.jsx)("span",{className:(0,l.cn)("size-1.5 rounded-full","done"===e.status&&"bg-success","running"===e.status&&"bg-info animate-pulse","error"===e.status&&"bg-danger",(!e.status||"pending"===e.status)&&"bg-text-subtle")}),e.durationMs&&(0,r.jsx)("span",{className:"font-mono text-text-subtle",children:x(e.durationMs)})]},s))})]}),"error"===e.status&&e.error&&(0,r.jsx)("div",{className:"border-t border-danger/20 bg-danger/5 px-4 py-2",children:(0,r.jsx)("p",{className:"text-xs text-danger",children:e.error})})]})}},54960:(e,s,t)=>{"use strict";t.d(s,{default:()=>n});var r=t(95155),a=t(31474);function n({title:e,description:s,icon:t,iconNode:i,actions:l,breadcrumbs:d,className:c}){return(0,r.jsxs)("div",{className:(0,a.cn)("mb-6",c),children:[d?.length>0&&(0,r.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:d.map((e,s)=>(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[s>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,r.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},s))}),(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:"flex min-w-0 items-start gap-3",children:[i?(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:i}):t&&(0,r.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:t})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),s&&(0,r.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:s})]})]}),l&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:l})]})]})}},56061:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var r=t(95155),a=t(31474);let n={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},i={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},l={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function d({children:e,variant:s="default",size:t="md",dot:c=!1,icon:o,className:u}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",n[s],l[t],u),children:[c&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full",i[s])}),o&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:o}),e]})}},86344:(e,s,t)=>{Promise.resolve().then(t.bind(t,54960)),Promise.resolve().then(t.bind(t,54677))},92542:(e,s,t)=>{"use strict";t.d(s,{default:()=>l});var r=t(95155),a=t(31474);let n={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},i={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function l({children:e,variant:s="primary",size:t="md",icon:d,iconRight:c,disabled:o=!1,loading:u=!1,fullWidth:x=!1,className:m,...g}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",n[s],i[t],x&&"w-full",m),disabled:o||u,...g,children:[u?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):d?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:d}):null,e,c&&!u&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:c})]})}},99312:(e,s,t)=>{"use strict";t.d(s,{default:()=>i});var r=t(95155),a=t(31474),n=t(92542);function i({icon:e="inbox",title:s="No items found",description:t="There's nothing here yet.",action:l,actionText:d,onAction:c,className:o}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",o),children:[(0,r.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,r.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:s}),(0,r.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:t}),l||d&&c&&(0,r.jsx)(n.default,{variant:"outline",size:"sm",onClick:c,children:d})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=86344)),_N_E=e.O()}]);