@rsalmn/extremerouter 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (855) 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 +9 -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/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  90. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  101. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  103. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  104. package/app/.next-cli-build/server/app/_not-found.rsc +7 -6
  105. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -6
  106. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  108. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  109. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -2
  111. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/alerts/test/route_client-reference-manifest.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/reset-password/route_client-reference-manifest.js +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  135. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/breaker/route_client-reference-manifest.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cache/route_client-reference-manifest.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  142. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  172. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  178. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  181. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  184. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  187. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  189. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/validate-roles/route_client-reference-manifest.js +1 -1
  201. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  202. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/dashboard/stream/route_client-reference-manifest.js +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  211. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -1
  213. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/health/providers/route_client-reference-manifest.js +1 -1
  216. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  219. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  220. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/health/stream/route_client-reference-manifest.js +1 -1
  222. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  225. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  228. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  231. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  234. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  235. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  237. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  238. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  240. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  243. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  255. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  258. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  261. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  264. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  267. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  270. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/1min/import/route_client-reference-manifest.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  286. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  303. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  306. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route_client-reference-manifest.js +1 -1
  309. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  312. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  315. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route_client-reference-manifest.js +1 -1
  318. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route_client-reference-manifest.js +1 -1
  321. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +38 -2
  322. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route_client-reference-manifest.js +1 -1
  324. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/oauth/zed/import/route_client-reference-manifest.js +1 -1
  327. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  330. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  333. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  336. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  339. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route_client-reference-manifest.js +1 -1
  342. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route_client-reference-manifest.js +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route_client-reference-manifest.js +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route_client-reference-manifest.js +1 -1
  351. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  354. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route_client-reference-manifest.js +1 -1
  357. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route_client-reference-manifest.js +1 -1
  360. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route_client-reference-manifest.js +1 -1
  363. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  366. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  369. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  372. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route_client-reference-manifest.js +1 -1
  375. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route_client-reference-manifest.js +1 -1
  378. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route_client-reference-manifest.js +1 -1
  381. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  384. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  387. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  390. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  393. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  396. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  399. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  402. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  405. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  406. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -1
  408. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  409. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -1
  411. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  414. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  415. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
  417. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  418. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -1
  420. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  421. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -1
  423. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  426. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  429. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  432. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  435. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  438. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/swarm/active/route_client-reference-manifest.js +1 -1
  441. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
  442. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/swarm/stream/route_client-reference-manifest.js +1 -1
  444. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  447. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  450. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  451. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  453. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  456. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  459. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  462. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  465. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  468. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  469. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  470. package/app/.next-cli-build/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  471. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  474. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  475. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  476. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
  477. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
  480. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  481. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  482. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
  483. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  484. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
  486. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  487. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -1
  489. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  492. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  493. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  495. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  496. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  498. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  499. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  500. package/app/.next-cli-build/server/app/api/usage/leaderboard/route_client-reference-manifest.js +1 -1
  501. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  502. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  503. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  504. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  505. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  506. package/app/.next-cli-build/server/app/api/usage/meta/route_client-reference-manifest.js +1 -1
  507. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  508. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  509. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  510. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  511. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  512. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  513. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  514. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  515. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  516. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  517. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  518. package/app/.next-cli-build/server/app/api/usage/retry-stats/route_client-reference-manifest.js +1 -1
  519. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  520. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  521. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  522. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  523. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  524. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  525. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  526. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  528. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  529. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  530. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  531. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  532. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  533. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  534. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  535. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  536. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  537. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  538. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  540. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  541. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  542. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  543. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  544. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  546. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  547. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  548. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  549. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  550. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  552. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  553. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  554. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  555. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  556. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  557. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  558. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  559. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  560. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  561. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  562. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  563. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  564. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  565. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  566. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  567. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  568. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  569. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  570. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  571. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  572. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  573. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  574. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  575. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  576. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  577. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  578. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  579. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  580. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  581. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  582. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  583. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  584. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  585. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  586. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  587. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  588. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  589. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  590. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  591. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  592. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  593. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  594. package/app/.next-cli-build/server/app/callback.html +1 -1
  595. package/app/.next-cli-build/server/app/callback.rsc +8 -7
  596. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +8 -7
  597. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  599. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -2
  600. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  601. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  602. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  603. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  605. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  606. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -7
  607. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -7
  608. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  609. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  610. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -2
  611. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  615. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  616. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  617. package/app/.next-cli-build/server/app/index.html +1 -1
  618. package/app/.next-cli-build/server/app/index.rsc +7 -6
  619. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -6
  621. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -2
  624. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  625. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  626. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  627. package/app/.next-cli-build/server/app/landing.html +1 -1
  628. package/app/.next-cli-build/server/app/landing.rsc +8 -7
  629. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -7
  630. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  632. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -2
  633. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  634. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/login/page.js +2 -2
  636. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  637. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  638. package/app/.next-cli-build/server/app/login.html +1 -1
  639. package/app/.next-cli-build/server/app/login.rsc +8 -7
  640. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -7
  641. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  642. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  643. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -2
  644. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  645. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  646. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  647. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  648. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  649. package/app/.next-cli-build/server/app/page.js +2 -2
  650. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  651. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  652. package/app/.next-cli-build/server/app-paths-manifest.json +9 -9
  653. package/app/.next-cli-build/server/chunks/1212.js +1 -0
  654. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  655. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  656. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  657. package/app/.next-cli-build/server/chunks/212.js +1 -1
  658. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  659. package/app/.next-cli-build/server/chunks/319.js +3 -3
  660. package/app/.next-cli-build/server/chunks/{2926.js → 3437.js} +9 -9
  661. package/app/.next-cli-build/server/chunks/3735.js +1 -1
  662. package/app/.next-cli-build/server/chunks/4046.js +1 -0
  663. package/app/.next-cli-build/server/chunks/5330.js +66 -66
  664. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  665. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  666. package/app/.next-cli-build/server/chunks/5852.js +1 -1
  667. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  668. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  669. package/app/.next-cli-build/server/chunks/{7152.js → 6482.js} +2 -2
  670. package/app/.next-cli-build/server/chunks/6686.js +1 -1
  671. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  672. package/app/.next-cli-build/server/chunks/7187.js +1 -1
  673. package/app/.next-cli-build/server/chunks/7218.js +1 -0
  674. package/app/.next-cli-build/server/chunks/7410.js +1 -0
  675. package/app/.next-cli-build/server/chunks/7566.js +3 -0
  676. package/app/.next-cli-build/server/chunks/7774.js +18 -18
  677. package/app/.next-cli-build/server/chunks/7872.js +1 -1
  678. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  679. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  680. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  681. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  682. package/app/.next-cli-build/server/chunks/8802.js +2 -0
  683. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  684. package/app/.next-cli-build/server/chunks/{4502.js → 8955.js} +2 -2
  685. package/app/.next-cli-build/server/chunks/9422.js +1 -1
  686. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  687. package/app/.next-cli-build/server/chunks/9703.js +1 -1
  688. package/app/.next-cli-build/server/chunks/9903.js +1 -1
  689. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  690. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  691. package/app/.next-cli-build/server/middleware.js +5 -5
  692. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  693. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  694. package/app/.next-cli-build/server/pages/404.html +1 -1
  695. package/app/.next-cli-build/server/pages/500.html +1 -1
  696. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  697. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  698. package/app/.next-cli-build/static/chunks/{1321-aa0d45362a7ebc08.js → 1321-5792bb21361dcd65.js} +1 -1
  699. package/app/.next-cli-build/static/chunks/705-cfe5cd65ea2dc6f1.js +1 -0
  700. package/app/.next-cli-build/static/chunks/8105-37d0f6450b27ac6b.js +1 -0
  701. package/app/.next-cli-build/static/chunks/{8720-bbafc2ad7d186ebd.js → 8982-6d1803817450bcd4.js} +2 -2
  702. package/app/.next-cli-build/static/chunks/981-777b2911f938c030.js +3 -0
  703. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-920869c698a8b3cf.js → page-c263cd784e69e6f1.js} +1 -1
  704. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-75247ad22e97f7cc.js → page-ecd3a85a40e51c66.js} +1 -1
  705. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-3c3074cf3f61df46.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8b043b8296199edb.js → page-f7cdc992cb310077.js} +1 -1
  707. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-648e105b4f37fef0.js +3 -0
  708. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-959b3ee3c662de33.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/{page-ec1dc4e44702257d.js → page-133cf1aa2ce53c87.js} +1 -1
  711. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-b635b8b051acb5a5.js → page-3828106aa4f490c1.js} +2 -2
  712. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-d9958dfec1d2e28e.js → page-e086fed7677d4852.js} +1 -1
  713. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-a36b3b632d16f4cb.js → page-f36e5ac11783fd1e.js} +2 -2
  714. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-e794909abbc7a09a.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-1d972fd3baee7474.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-2dae733c8e1582bf.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/{page-dc8e49b1fe778d9c.js → page-e7ba910803086460.js} +1 -1
  719. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-2e82495d63f499e9.js → page-201ce34cf7a0a9ed.js} +1 -1
  721. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-8965749fb7d0fac3.js → page-bcf9d97ab4dc20d9.js} +1 -1
  722. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5b11b61863963cad.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-843c810c0818ce1b.js → page-58d8d0fa5523ff95.js} +1 -1
  724. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-9a44fa1600f3ff42.js → page-0be4cac4f06ef3e2.js} +1 -1
  725. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-97c920b552343488.js → page-a8b151d5ae9004ea.js} +1 -1
  726. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d57c129c03c9cb36.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-a8af04fbd6293d2f.js → page-61d162d7a7f88a11.js} +1 -1
  729. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-bd421513fd2dc28a.js → page-483f01fd35d212f5.js} +1 -1
  730. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-9144cc5f6a208199.js → layout-d62e22634bbd6c94.js} +1 -1
  731. package/app/.next-cli-build/static/chunks/app/_not-found/{page-732ac0fa56005849.js → page-0161671512f52984.js} +1 -1
  732. package/app/.next-cli-build/static/chunks/app/callback/{page-4e8ab9d9128acffb.js → page-20e990994d8da6d3.js} +1 -1
  733. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-d4eb2ba84eef2143.js → page-bb9f307074c5c23a.js} +1 -1
  734. package/app/.next-cli-build/static/chunks/app/landing/{page-ade86a48ca5749f4.js → page-468c5cb1d127c02a.js} +1 -1
  735. package/app/.next-cli-build/static/chunks/app/layout-10bff7b57a2a3c2c.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/login/page-32ab5d7c75651107.js +1 -0
  737. package/app/.next-cli-build/static/chunks/main-ab3c4d38db15f747.js +5 -0
  738. package/app/.next-cli-build/static/chunks/main-app-f661afc91c813cfe.js +1 -0
  739. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-8fecb2690f5e9ae2.js +1 -0
  740. package/app/.next-cli-build/static/chunks/webpack-c2bac8d80aa27536.js +1 -0
  741. package/app/.next-cli-build/static/css/27a3eadf22014a5b.css +1 -0
  742. package/app/custom-server.js +9 -0
  743. package/app/package.json +5 -4
  744. package/app/public/i18n/literals/ar.json +195 -195
  745. package/app/public/i18n/literals/bn.json +195 -195
  746. package/app/public/i18n/literals/cs.json +195 -195
  747. package/app/public/i18n/literals/da.json +195 -195
  748. package/app/public/i18n/literals/de.json +195 -195
  749. package/app/public/i18n/literals/el.json +195 -195
  750. package/app/public/i18n/literals/es.json +195 -195
  751. package/app/public/i18n/literals/fi.json +195 -195
  752. package/app/public/i18n/literals/fr.json +195 -195
  753. package/app/public/i18n/literals/he.json +195 -195
  754. package/app/public/i18n/literals/hi.json +195 -195
  755. package/app/public/i18n/literals/hu.json +195 -195
  756. package/app/public/i18n/literals/id.json +195 -195
  757. package/app/public/i18n/literals/it.json +195 -195
  758. package/app/public/i18n/literals/ja.json +195 -195
  759. package/app/public/i18n/literals/ko.json +195 -195
  760. package/app/public/i18n/literals/nl.json +195 -195
  761. package/app/public/i18n/literals/no.json +195 -195
  762. package/app/public/i18n/literals/pl.json +195 -195
  763. package/app/public/i18n/literals/pt-BR.json +195 -195
  764. package/app/public/i18n/literals/pt-PT.json +195 -195
  765. package/app/public/i18n/literals/ro.json +195 -195
  766. package/app/public/i18n/literals/ru.json +195 -195
  767. package/app/public/i18n/literals/sv.json +195 -195
  768. package/app/public/i18n/literals/th.json +195 -195
  769. package/app/public/i18n/literals/tl.json +195 -195
  770. package/app/public/i18n/literals/tr.json +195 -195
  771. package/app/public/i18n/literals/uk.json +195 -195
  772. package/app/public/i18n/literals/ur.json +195 -195
  773. package/app/public/i18n/literals/vi.json +195 -195
  774. package/app/public/i18n/literals/zh-CN.json +773 -773
  775. package/app/public/i18n/literals/zh-TW.json +195 -195
  776. package/app/public/providers/agnes-api.svg +6 -6
  777. package/app/public/providers/agnes-web.svg +6 -6
  778. package/app/public/providers/alibaba-cn.svg +11 -11
  779. package/app/public/providers/alibaba.svg +11 -11
  780. package/app/public/providers/bynara.svg +22 -22
  781. package/app/public/providers/devin.svg +5 -5
  782. package/app/public/providers/featherless.svg +8 -8
  783. package/app/public/providers/forge.svg +9 -9
  784. package/app/public/providers/freebuff-web.svg +6 -6
  785. package/app/public/providers/hcnsec.svg +10 -10
  786. package/app/public/providers/inxorastudio-web.svg +4 -4
  787. package/app/public/providers/inxorastudio.svg +4 -4
  788. package/app/public/providers/moonshot.svg +8 -8
  789. package/app/public/providers/openvecta.svg +7 -7
  790. package/app/public/providers/perplexity-agent.svg +13 -13
  791. package/app/public/providers/qwen-cloud.svg +1 -1
  792. package/app/public/providers/qwencloud.svg +6 -6
  793. package/app/public/providers/stepfun.svg +53 -53
  794. package/app/public/providers/tokenrouter.svg +15 -15
  795. package/app/public/providers/wp-studio.svg +11 -11
  796. package/app/public/providers/zed.svg +11 -11
  797. package/app/public/providers/zenmux-free.svg +9 -9
  798. package/app/server.js +1 -1
  799. package/app/src/lib/db/adapters/sqljsAdapter.js +115 -115
  800. package/app/src/lib/db/migrate.js +286 -286
  801. package/app/src/lib/network/pickProxyPoolId.js +38 -38
  802. package/app/src/lib/updater/updater.js +235 -235
  803. package/app/src/mitm/server.js +2 -2
  804. package/cli.js +830 -830
  805. package/package.json +66 -66
  806. package/src/cli/api/client.js +556 -556
  807. package/src/cli/menus/cliTools.js +618 -618
  808. package/src/cli/terminalUI.js +121 -121
  809. package/src/cli/tray/autostart.js +306 -306
  810. package/src/cli/tray/tray.js +322 -322
  811. package/src/cli/tray/tray.ps1 +130 -130
  812. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  813. package/app/.next-cli-build/server/chunks/1216.js +0 -3
  814. package/app/.next-cli-build/server/chunks/541.js +0 -1
  815. package/app/.next-cli-build/server/chunks/6316.js +0 -2
  816. package/app/.next-cli-build/server/chunks/9140.js +0 -1
  817. package/app/.next-cli-build/server/chunks/9630.js +0 -1
  818. package/app/.next-cli-build/static/chunks/1696-bafe4b44a7a0439e.js +0 -3
  819. package/app/.next-cli-build/static/chunks/1966.b8f83f7ba376c962.js +0 -1
  820. package/app/.next-cli-build/static/chunks/3899.3f761f7e3a944e8c.js +0 -1
  821. package/app/.next-cli-build/static/chunks/705-b7d7b61f41806f0d.js +0 -1
  822. package/app/.next-cli-build/static/chunks/8105-204edc780a329497.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-cd77e53dbcd46b6c.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-dbf52954681b093c.js +0 -3
  825. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-a8c4d8c681e19868.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-408845bd809806a6.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-92a0799a23d869b3.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-a67cd1c5f77da355.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-262fa6911888d4f1.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-f644da989b8878c3.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-aa26b25a26b5dac8.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-96d3eb0dfde0711b.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-9739651f4f19cec6.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2f3b8761d7b32ec0.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/layout-16b611f4f5717ccd.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/login/page-0831b035aa4c0f17.js +0 -1
  837. package/app/.next-cli-build/static/chunks/main-28015457a328b97c.js +0 -5
  838. package/app/.next-cli-build/static/chunks/main-app-705d8c306f358a5f.js +0 -1
  839. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-22e44aa316880902.js +0 -1
  840. package/app/.next-cli-build/static/chunks/webpack-a990cabb6976f421.js +0 -1
  841. package/app/.next-cli-build/static/css/68d66160ca549ddc.css +0 -1
  842. package/app/cli/.build-home/AppData/Local/npm-cache/_update-notifier-last-checked +0 -0
  843. package/app/cli/.build-home/AppData/Roaming/extremerouter/.migrated-from +0 -1
  844. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/schema-3-to-4-0.8.0-20260802-152036/data.sqlite +0 -0
  845. 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
  846. 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
  847. 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
  848. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite +0 -0
  849. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  850. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  851. package/app/cli/.build-home/AppData/Roaming/extremerouter/jwt-secret +0 -1
  852. package/app/cli/.build-home/AppData/Roaming/extremerouter/machine-id +0 -1
  853. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +0 -7
  854. /package/app/.next-cli-build/static/{S-pbWChrUiCkwFyfx4Su3 → j7bBgtavtSkTBPfbmetr9}/_buildManifest.js +0 -0
  855. /package/app/.next-cli-build/static/{S-pbWChrUiCkwFyfx4Su3 → j7bBgtavtSkTBPfbmetr9}/_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([[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([[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()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>o,Nv:()=>m,RL:()=>d,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,c=5,d=1e4,o=5e3,x=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],m=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),l=s(12115),n=s(35497),r=s(11059),i=s(73006),c=s(15536);function d(){let[e,t]=(0,l.useState)(!0),[s,d]=(0,l.useState)(!1),[o,x]=(0,l.useState)("http://localhost:8787"),[m,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,P]=(0,l.useState)(.85),[$,R]=(0,l.useState)(null),[z,_]=(0,l.useState)(!1),[H,I]=(0,l.useState)({installed:!1,loaded:!1,version:null,loading:!0}),[M,O]=(0,l.useState)(!1),[A,F]=(0,l.useState)("en"),{copied:D,copy:W}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let B=c.hT.includes(A),G=B?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!B&&(w("ultra"),J({cavemanLevel:"ultra"}))},[B,N]);let J=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},Y=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},q=async()=>{let e=o.trim()||"http://localhost:8787";x(e),await J({headroomUrl:e}),Z()},Z=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),K=(0,l.useCallback)(async()=>{b(""),j(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await Z()}catch(e){b(e.message)}finally{j(!1)}},[Z]),Q=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await Z()}finally{j(!1)}},[Z]),X=async()=>{I(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();I({...t,loading:!1})}catch{I({installed:!1,loaded:!1,version:null,loading:!1})}},V=async()=>{O(!0);try{let e=await fetch("/api/pxpipe/install",{method:"POST"});await e.json(),await X()}catch{}O(!1)},ee=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),d(!!s.headroomEnabled),x(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),P("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),_(!!s.pxpipeEnabled),Z(),X()}}catch{}})()},[Z]);let et=!!m.running,es=m.loading?"Checking…":et?"Running":!1===m.localUrl||m.installed?!1!==m.localUrl?"Stopped":"External":"Not installed",ea=!1!==m.localUrl,el=!!m.canStart,en=ea&&!!m.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(n.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(n.lM,{checked:e,onChange:()=>Y(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${et?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:es}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:et?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(n.lM,{checked:s&&et,disabled:!et,onChange:()=>{var e;let t;return e=!s,void(x(t=o.trim()||"http://localhost:8787"),d(e),J({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[y&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:G.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),J({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(n.lM,{checked:y,onChange:()=>{var e;v(e=!y),J({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),J({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(n.lM,{checked:k,onChange:()=>{var e;C(e=!k),J({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(n.lM,{checked:T,onChange:()=>{var e;L(e=!T),J({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;P(t=parseFloat(e.target.value)),J({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),$&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",$.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",$.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",$.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",$.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",$.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:ee,children:"Clear Cache"})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"image_compressor"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Pxpipe (Image Compression)"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Render dense Claude-format contexts as PNG images before dispatch. Saves ~35-60% input tokens on large payloads."})]})]}),(0,a.jsx)(n.lM,{checked:z,onChange:()=>{var e;_(e=!z),J({pxpipeEnabled:e})}})]}),z&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${H.installed?"text-success":"text-warning"}`,children:H.installed?"check_circle":"error"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Package: ",H.installed?`v${H.version||"?"} installed`:"not installed"]}),H.loaded&&(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Loaded"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:M?"progress_activity":"download",onClick:V,disabled:M,children:M?"Installing...":H.installed?"Reinstall / Upgrade":"Install Package"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"refresh",onClick:X,children:"Refresh Status"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Only activates for Claude-format requests with text content above threshold. Fail-open — never blocks requests."})]})]}),(0,a.jsx)(n.aF,{isOpen:p,title:et?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:et?"text-success":"text-warning",children:es})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(n.pd,{value:o,onChange:e=>x(e.target.value),onBlur:q,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),en?(0,a.jsx)(n.$n,{onClick:Q,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):et?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):el?(0,a.jsx)(n.$n,{onClick:K,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):ea?m.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>W('pip install "headroom-ai[proxy]"'),children:D?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),g&&(0,a.jsx)("p",{className:"text-sm text-warning",children:g}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:()=>Z(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(n.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{26610:(e,n,r)=>{Promise.resolve().then(r.bind(r,30565)),Promise.resolve().then(r.bind(r,90285)),Promise.resolve().then(r.bind(r,26300)),Promise.resolve().then(r.t.bind(r,5887,23)),Promise.resolve().then(r.t.bind(r,42593,23)),Promise.resolve().then(r.t.bind(r,57688,23)),Promise.resolve().then(r.t.bind(r,51743,23)),Promise.resolve().then(r.bind(r,94635)),Promise.resolve().then(r.bind(r,21110))},51743:()=>{},94635:(e,n,r)=>{"use strict";r.d(n,{RuntimeI18nProvider:()=>m});var s=r(95155),i=r(12115),t=r(73321),o=r(73006);function m({children:e}){let n=(0,t.usePathname)();return(0,i.useEffect)(()=>{(0,o.FE)()},[]),(0,i.useEffect)(()=>{n&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,o.wn)()})})},[n]),(0,s.jsx)(s.Fragment,{children:e})}}},e=>{e.O(0,[4652,3334,8720,8105,1321,8441,3794,7358],()=>e(e.s=26610)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{51380:(e,t,s)=>{Promise.resolve().then(s.bind(s,83016))},83016:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(95155),r=s(12115),i=s(35497);function n(){let[e,t]=(0,r.useState)(""),[s,n]=(0,r.useState)(""),[l,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(0),[x,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null),[p,b]=(0,r.useState)("password"),[f,w]=(0,r.useState)(!1),[g,j]=(0,r.useState)("Sign in with OIDC"),[N,y]=(0,r.useState)(!1),[v,S]=(0,r.useState)("");(0,r.useEffect)(()=>{if(d<=0)return;let e=setInterval(()=>c(e=>e>0?e-1:0),1e3);return()=>clearInterval(e)},[d]),(0,r.useEffect)(()=>{!async function(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3),s=window.location.origin;try{let a=await fetch(`${s}/api/auth/status`,{signal:e.signal});if(clearTimeout(t),a.ok){let e=await a.json();if(!1===e.requireLogin)return void window.location.assign("/dashboard");h(!!e.hasPassword),b(e.authMode||"password"),w(!0===e.oidcConfigured),j(e.oidcLoginLabel||"Sign in with OIDC")}else h(!0)}catch(e){clearTimeout(t),h(!0)}}()},[]);let C=async t=>{t.preventDefault(),u(!0),n(""),o("");try{let t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(t.ok){if((await t.json()).mustChangePassword)return void y(!0);window.location.assign("/dashboard")}else{let e=await t.json();n(e.error||"Invalid password"),e.resetHint&&o(e.resetHint),e.retryAfter&&c(Number(e.retryAfter))}}catch(e){n("An error occurred. Please try again.")}finally{u(!1)}},k=async t=>{t.preventDefault(),u(!0),n("");try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:e,newPassword:v})});if(t.ok)window.location.assign("/dashboard");else{let e=await t.json();n(e.error||"Failed to set password")}}catch(e){n("An error occurred. Please try again.")}finally{u(!1)}},P=f&&["oidc","both"].includes(p),O="oidc"!==p||!f;return null===m?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),(0,a.jsx)("p",{className:"text-text-muted mt-4",children:"Loading..."})]})}):(0,a.jsxs)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4 relative overflow-hidden",children:[(0,a.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-primary mb-2",children:"ExtremeRouter"}),(0,a.jsx)("p",{className:"text-text-muted",children:"oidc"===p&&f?"Sign in with your OIDC provider to access the dashboard":"Enter your password to access the dashboard"})]}),(0,a.jsx)(i.Zp,{children:N?(0,a.jsxs)("form",{onSubmit:k,className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-amber-600 dark:text-amber-400 text-center",children:"Set a new password before accessing the dashboard remotely."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:v,onChange:e=>S(e.target.value),required:!0,autoFocus:!0}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",className:"w-full",loading:x,disabled:!v,children:"Set password"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[P&&(0,a.jsx)(i.$n,{type:"button",variant:"primary",className:"w-full",onClick:()=>{window.location.href="/api/auth/oidc/start"},children:g}),P&&O&&(0,a.jsx)("div",{className:"h-px bg-border/60"}),O?(0,a.jsxs)("form",{onSubmit:C,className:"flex flex-col gap-4",children:[("oidc"===p&&!f||"both"===p&&!f)&&(0,a.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-400 text-center",children:"OIDC login is enabled, but the issuer/client fields are not configured yet. Password login is still available for recovery."}),"both"===p&&f&&(0,a.jsx)("p",{className:"text-xs text-text-muted text-center",children:"Password and OIDC login are both enabled."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter password",value:e,onChange:e=>t(e.target.value),required:!0,autoFocus:!P}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s}),d>0&&(0,a.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["Locked. Retry in ",(0,a.jsxs)("span",{className:"font-mono",children:[d,"s"]}),"."]}),l&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Forgot password? Open ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"extremerouter"})," CLI on the host → ",(0,a.jsx)("b",{children:"Settings"})," → ",(0,a.jsx)("b",{children:"Reset Password to Default"}),"."]})]}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",className:"w-full",loading:x,disabled:d>0,children:d>0?`Wait ${d}s`:"Login"}),(0,a.jsxs)("p",{className:"text-xs text-center text-text-muted mt-2",children:["Default password is ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"123456"})]}),!1===m&&(0,a.jsx)("p",{className:"text-xs text-center text-amber-600 dark:text-amber-400",children:"Security risk: no password set. You will be asked to set one when logging in remotely."})]}):s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]})})]})]})}}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=51380)),_N_E=e.O()}]);