@rsalmn/extremerouter 0.8.2 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1232) hide show
  1. package/README.md +89 -89
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +13 -9
  4. package/app/.next-cli-build/build-manifest.json +4 -4
  5. package/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/app/.next-cli-build/react-loadable-manifest.json +1 -13
  7. package/app/.next-cli-build/required-server-files.json +23 -23
  8. package/app/.next-cli-build/routes-manifest.json +24 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -0
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -0
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -0
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.rsc +7 -6
  109. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -6
  110. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -2
  115. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/alerts/test/route_client-reference-manifest.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/reset-password/route_client-reference-manifest.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  139. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/breaker/route_client-reference-manifest.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cache/route_client-reference-manifest.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  146. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  173. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  176. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  182. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  188. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  190. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  191. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  193. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  199. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  202. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/combos/validate-roles/route_client-reference-manifest.js +1 -1
  205. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  206. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/dashboard/stream/route_client-reference-manifest.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -1
  211. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -1
  214. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  215. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -1
  217. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/health/providers/route_client-reference-manifest.js +1 -1
  220. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  223. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  224. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/health/stream/route_client-reference-manifest.js +1 -1
  226. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  229. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  232. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  235. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  239. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  241. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  242. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  244. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  256. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  262. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  265. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  271. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  274. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/1min/import/route_client-reference-manifest.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  290. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -0
  302. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -0
  303. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route_client-reference-manifest.js +1 -0
  304. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -0
  305. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -0
  306. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route_client-reference-manifest.js +1 -0
  307. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -0
  308. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -0
  309. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route_client-reference-manifest.js +1 -0
  310. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -1
  313. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  316. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  319. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route_client-reference-manifest.js +1 -1
  322. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  325. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  328. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route_client-reference-manifest.js +1 -1
  331. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route_client-reference-manifest.js +1 -1
  334. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +38 -2
  335. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route_client-reference-manifest.js +1 -1
  337. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/oauth/zed/import/route_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  343. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  346. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  352. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route_client-reference-manifest.js +1 -1
  355. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route_client-reference-manifest.js +1 -1
  358. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route_client-reference-manifest.js +1 -1
  361. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route_client-reference-manifest.js +1 -1
  364. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  367. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route_client-reference-manifest.js +1 -1
  370. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route_client-reference-manifest.js +1 -1
  373. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route_client-reference-manifest.js +1 -1
  376. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  379. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  382. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  385. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route_client-reference-manifest.js +1 -1
  388. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route_client-reference-manifest.js +1 -1
  394. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  397. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  406. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  409. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  412. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  415. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  418. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  419. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -1
  421. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  422. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -1
  424. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  427. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  428. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
  430. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  431. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -1
  433. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  434. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -1
  436. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  439. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  445. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  448. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  451. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/swarm/active/route_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
  455. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/swarm/stream/route_client-reference-manifest.js +1 -1
  457. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  460. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  464. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  466. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  469. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  472. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  478. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  481. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  487. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
  490. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
  496. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  497. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  498. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
  499. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  500. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  503. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  505. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  506. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  508. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  509. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  510. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  511. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  512. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  513. package/app/.next-cli-build/server/app/api/usage/leaderboard/route_client-reference-manifest.js +1 -1
  514. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  515. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  517. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  518. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/api/usage/meta/route_client-reference-manifest.js +1 -1
  520. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  521. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  523. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  524. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  526. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  527. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  529. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  530. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/api/usage/retry-stats/route_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  533. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  534. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  535. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  536. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  538. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  539. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  540. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  542. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  544. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  545. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  546. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  547. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  548. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  550. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  551. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  552. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  553. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  554. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  556. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  557. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  558. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  559. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  560. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  561. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  562. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  563. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  564. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  565. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  566. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  567. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  568. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  569. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  570. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  571. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  572. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  573. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  574. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  575. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  577. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  578. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  579. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  580. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  581. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  582. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  583. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  584. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  586. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  587. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  588. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  589. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  590. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  591. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  592. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  593. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  594. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  595. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  596. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  598. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  599. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  600. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  601. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  602. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  603. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  604. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  605. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  606. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  607. package/app/.next-cli-build/server/app/callback.html +1 -1
  608. package/app/.next-cli-build/server/app/callback.rsc +8 -7
  609. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +8 -7
  610. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  612. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -2
  613. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  614. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  615. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  619. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -7
  620. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -7
  621. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -2
  624. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  625. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  629. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  630. package/app/.next-cli-build/server/app/index.html +1 -1
  631. package/app/.next-cli-build/server/app/index.rsc +7 -6
  632. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -6
  634. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  636. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -2
  637. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  638. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  639. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  640. package/app/.next-cli-build/server/app/landing.html +1 -1
  641. package/app/.next-cli-build/server/app/landing.rsc +8 -7
  642. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -7
  643. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  645. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -2
  646. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/login/page.js +2 -2
  649. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  650. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  651. package/app/.next-cli-build/server/app/login.html +1 -1
  652. package/app/.next-cli-build/server/app/login.rsc +8 -7
  653. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -7
  654. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  655. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  656. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -2
  657. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  658. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  660. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  661. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  662. package/app/.next-cli-build/server/app/page.js +2 -2
  663. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  664. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  665. package/app/.next-cli-build/server/app-paths-manifest.json +13 -9
  666. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  667. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  668. package/app/.next-cli-build/server/chunks/1429.js +1 -0
  669. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  670. package/app/.next-cli-build/server/chunks/212.js +1 -1
  671. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  672. package/app/.next-cli-build/server/chunks/2409.js +1 -0
  673. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  674. package/app/.next-cli-build/server/chunks/2742.js +1 -0
  675. package/app/.next-cli-build/server/chunks/319.js +3 -3
  676. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  677. package/app/.next-cli-build/server/chunks/3735.js +1 -1
  678. package/app/.next-cli-build/server/chunks/4046.js +1 -0
  679. package/app/.next-cli-build/server/chunks/412.js +2 -2
  680. package/app/.next-cli-build/server/chunks/5330.js +70 -68
  681. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  682. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  683. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  684. package/app/.next-cli-build/server/chunks/5852.js +1 -1
  685. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  686. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  687. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  688. package/app/.next-cli-build/server/chunks/{7152.js → 6482.js} +2 -2
  689. package/app/.next-cli-build/server/chunks/6560.js +1 -0
  690. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  691. package/app/.next-cli-build/server/chunks/7187.js +1 -1
  692. package/app/.next-cli-build/server/chunks/7218.js +1 -0
  693. package/app/.next-cli-build/server/chunks/7410.js +1 -0
  694. package/app/.next-cli-build/server/chunks/7566.js +3 -0
  695. package/app/.next-cli-build/server/chunks/7774.js +18 -18
  696. package/app/.next-cli-build/server/chunks/7872.js +1 -1
  697. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  698. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  699. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  700. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  701. package/app/.next-cli-build/server/chunks/8802.js +2 -0
  702. package/app/.next-cli-build/server/chunks/885.js +75 -0
  703. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  704. package/app/.next-cli-build/server/chunks/8955.js +16 -0
  705. package/app/.next-cli-build/server/chunks/9422.js +1 -1
  706. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  707. package/app/.next-cli-build/server/chunks/9703.js +1 -1
  708. package/app/.next-cli-build/server/chunks/9903.js +1 -1
  709. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  710. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  711. package/app/.next-cli-build/server/middleware.js +5 -5
  712. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  713. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  714. package/app/.next-cli-build/server/pages/404.html +1 -1
  715. package/app/.next-cli-build/server/pages/500.html +1 -1
  716. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  717. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  718. package/app/.next-cli-build/static/JRaGItQgERhBp83cHyRqE/_buildManifest.js +1 -0
  719. package/app/.next-cli-build/static/chunks/{1321-aa0d45362a7ebc08.js → 1321-a7bfb848c63bdbf7.js} +1 -1
  720. package/app/.next-cli-build/static/chunks/1992-7359483e85c66d42.js +1 -0
  721. package/app/.next-cli-build/static/chunks/5497-6eb58895074fec6d.js +7 -0
  722. package/app/.next-cli-build/static/chunks/705-35d16348285626c8.js +1 -0
  723. package/app/.next-cli-build/static/chunks/8105-49cec265df0de251.js +1 -0
  724. package/app/.next-cli-build/static/chunks/{8720-bbafc2ad7d186ebd.js → 8982-6d1803817450bcd4.js} +2 -2
  725. package/app/.next-cli-build/static/chunks/981-777b2911f938c030.js +3 -0
  726. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-920869c698a8b3cf.js → page-c263cd784e69e6f1.js} +1 -1
  727. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-75247ad22e97f7cc.js → page-ecd3a85a40e51c66.js} +1 -1
  728. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-3c3074cf3f61df46.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8b043b8296199edb.js → page-f7cdc992cb310077.js} +1 -1
  730. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b4a78d784383253c.js +3 -0
  731. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-959b3ee3c662de33.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/{page-ec1dc4e44702257d.js → page-133cf1aa2ce53c87.js} +1 -1
  734. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-b635b8b051acb5a5.js → page-7d472b122fb182f0.js} +10 -10
  735. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-83272baae17d38f1.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-a36b3b632d16f4cb.js → page-f36e5ac11783fd1e.js} +2 -2
  737. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-4069e1d40a3c70a6.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-e794909abbc7a09a.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-1d972fd3baee7474.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-2dae733c8e1582bf.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/{page-dc8e49b1fe778d9c.js → page-e7ba910803086460.js} +1 -1
  743. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-2e82495d63f499e9.js → page-6b500acebeff856b.js} +2 -2
  745. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-8965749fb7d0fac3.js → page-bcf9d97ab4dc20d9.js} +1 -1
  746. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5b11b61863963cad.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-843c810c0818ce1b.js → page-58d8d0fa5523ff95.js} +1 -1
  748. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c02ccb0fd35970d1.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-97c920b552343488.js → page-a8b151d5ae9004ea.js} +1 -1
  750. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d57c129c03c9cb36.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-a8af04fbd6293d2f.js → page-61d162d7a7f88a11.js} +1 -1
  753. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-bd421513fd2dc28a.js → page-483f01fd35d212f5.js} +1 -1
  754. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-0a63db83d5e05667.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/_global-error/page-158df2528a1edacc.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/_not-found/{page-732ac0fa56005849.js → page-0161671512f52984.js} +1 -1
  757. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-158df2528a1edacc.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-158df2528a1edacc.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-158df2528a1edacc.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-158df2528a1edacc.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-158df2528a1edacc.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-158df2528a1edacc.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-158df2528a1edacc.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-158df2528a1edacc.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/breaker/route-158df2528a1edacc.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/cache/route-158df2528a1edacc.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-158df2528a1edacc.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-158df2528a1edacc.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-158df2528a1edacc.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-158df2528a1edacc.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-158df2528a1edacc.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-158df2528a1edacc.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-158df2528a1edacc.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-158df2528a1edacc.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-158df2528a1edacc.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-158df2528a1edacc.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-158df2528a1edacc.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-158df2528a1edacc.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-158df2528a1edacc.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-158df2528a1edacc.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-158df2528a1edacc.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-158df2528a1edacc.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-158df2528a1edacc.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-158df2528a1edacc.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/combos/route-158df2528a1edacc.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-158df2528a1edacc.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-158df2528a1edacc.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-158df2528a1edacc.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-158df2528a1edacc.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-158df2528a1edacc.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-158df2528a1edacc.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/health/route-158df2528a1edacc.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-158df2528a1edacc.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/init/route-158df2528a1edacc.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-158df2528a1edacc.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/keys/route-158df2528a1edacc.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/locale/route-158df2528a1edacc.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-158df2528a1edacc.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-158df2528a1edacc.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-158df2528a1edacc.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-158df2528a1edacc.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-158df2528a1edacc.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-158df2528a1edacc.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-158df2528a1edacc.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-158df2528a1edacc.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-158df2528a1edacc.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-158df2528a1edacc.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-158df2528a1edacc.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/models/route-158df2528a1edacc.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/models/test/route-158df2528a1edacc.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-158df2528a1edacc.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-158df2528a1edacc.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-158df2528a1edacc.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-158df2528a1edacc.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-158df2528a1edacc.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-158df2528a1edacc.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-158df2528a1edacc.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-158df2528a1edacc.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-158df2528a1edacc.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-158df2528a1edacc.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-158df2528a1edacc.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-158df2528a1edacc.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-158df2528a1edacc.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-158df2528a1edacc.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-158df2528a1edacc.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-158df2528a1edacc.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-158df2528a1edacc.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-158df2528a1edacc.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-158df2528a1edacc.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-158df2528a1edacc.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-158df2528a1edacc.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/pricing/route-158df2528a1edacc.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-158df2528a1edacc.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-158df2528a1edacc.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-158df2528a1edacc.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-158df2528a1edacc.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-158df2528a1edacc.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-158df2528a1edacc.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-158df2528a1edacc.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-158df2528a1edacc.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-158df2528a1edacc.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-158df2528a1edacc.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-158df2528a1edacc.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-158df2528a1edacc.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-158df2528a1edacc.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-158df2528a1edacc.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-158df2528a1edacc.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-158df2528a1edacc.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-158df2528a1edacc.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-158df2528a1edacc.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-158df2528a1edacc.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/providers/route-158df2528a1edacc.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-158df2528a1edacc.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-158df2528a1edacc.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-158df2528a1edacc.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-158df2528a1edacc.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-158df2528a1edacc.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-158df2528a1edacc.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-158df2528a1edacc.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-158df2528a1edacc.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-158df2528a1edacc.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-158df2528a1edacc.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-158df2528a1edacc.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-158df2528a1edacc.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-158df2528a1edacc.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-158df2528a1edacc.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/settings/route-158df2528a1edacc.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-158df2528a1edacc.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-158df2528a1edacc.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-158df2528a1edacc.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/tags/route-158df2528a1edacc.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-158df2528a1edacc.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-158df2528a1edacc.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-158df2528a1edacc.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-158df2528a1edacc.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-158df2528a1edacc.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-158df2528a1edacc.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-158df2528a1edacc.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-158df2528a1edacc.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-158df2528a1edacc.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-158df2528a1edacc.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-158df2528a1edacc.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-158df2528a1edacc.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-158df2528a1edacc.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-158df2528a1edacc.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-158df2528a1edacc.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-158df2528a1edacc.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-158df2528a1edacc.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-158df2528a1edacc.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-158df2528a1edacc.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-158df2528a1edacc.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-158df2528a1edacc.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-158df2528a1edacc.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-158df2528a1edacc.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-158df2528a1edacc.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-158df2528a1edacc.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-158df2528a1edacc.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-158df2528a1edacc.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-158df2528a1edacc.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-158df2528a1edacc.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-158df2528a1edacc.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-158df2528a1edacc.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-158df2528a1edacc.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-158df2528a1edacc.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-158df2528a1edacc.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-158df2528a1edacc.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-158df2528a1edacc.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-158df2528a1edacc.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-158df2528a1edacc.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-158df2528a1edacc.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-158df2528a1edacc.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/v1/route-158df2528a1edacc.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-158df2528a1edacc.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-158df2528a1edacc.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-158df2528a1edacc.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-158df2528a1edacc.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/version/route-158df2528a1edacc.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-158df2528a1edacc.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/version/update/route-158df2528a1edacc.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/callback/{page-4e8ab9d9128acffb.js → page-20e990994d8da6d3.js} +1 -1
  921. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-d4eb2ba84eef2143.js → page-bb9f307074c5c23a.js} +1 -1
  922. package/app/.next-cli-build/static/chunks/app/landing/{page-ade86a48ca5749f4.js → page-468c5cb1d127c02a.js} +1 -1
  923. package/app/.next-cli-build/static/chunks/app/layout-10bff7b57a2a3c2c.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/login/page-32ab5d7c75651107.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-158df2528a1edacc.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/page-158df2528a1edacc.js +1 -0
  927. package/app/.next-cli-build/static/chunks/main-ab3c4d38db15f747.js +5 -0
  928. package/app/.next-cli-build/static/chunks/main-app-f661afc91c813cfe.js +1 -0
  929. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-158df2528a1edacc.js +1 -0
  930. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-158df2528a1edacc.js +1 -0
  931. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-8fecb2690f5e9ae2.js +1 -0
  932. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-158df2528a1edacc.js +1 -0
  933. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-158df2528a1edacc.js +1 -0
  934. package/app/.next-cli-build/static/chunks/webpack-c2bac8d80aa27536.js +1 -0
  935. package/app/.next-cli-build/static/css/d25230f8c6390408.css +1 -0
  936. package/app/custom-server.js +9 -0
  937. package/app/node_modules/nanoid/package.json +1 -1
  938. package/app/package.json +9 -6
  939. package/app/public/i18n/literals/ar.json +195 -195
  940. package/app/public/i18n/literals/bn.json +195 -195
  941. package/app/public/i18n/literals/cs.json +195 -195
  942. package/app/public/i18n/literals/da.json +195 -195
  943. package/app/public/i18n/literals/de.json +195 -195
  944. package/app/public/i18n/literals/el.json +195 -195
  945. package/app/public/i18n/literals/es.json +195 -195
  946. package/app/public/i18n/literals/fi.json +195 -195
  947. package/app/public/i18n/literals/fr.json +195 -195
  948. package/app/public/i18n/literals/he.json +195 -195
  949. package/app/public/i18n/literals/hi.json +195 -195
  950. package/app/public/i18n/literals/hu.json +195 -195
  951. package/app/public/i18n/literals/id.json +195 -195
  952. package/app/public/i18n/literals/it.json +195 -195
  953. package/app/public/i18n/literals/ja.json +195 -195
  954. package/app/public/i18n/literals/ko.json +195 -195
  955. package/app/public/i18n/literals/nl.json +195 -195
  956. package/app/public/i18n/literals/no.json +195 -195
  957. package/app/public/i18n/literals/pl.json +195 -195
  958. package/app/public/i18n/literals/pt-BR.json +195 -195
  959. package/app/public/i18n/literals/pt-PT.json +195 -195
  960. package/app/public/i18n/literals/ro.json +195 -195
  961. package/app/public/i18n/literals/ru.json +195 -195
  962. package/app/public/i18n/literals/sv.json +195 -195
  963. package/app/public/i18n/literals/th.json +195 -195
  964. package/app/public/i18n/literals/tl.json +195 -195
  965. package/app/public/i18n/literals/tr.json +195 -195
  966. package/app/public/i18n/literals/uk.json +195 -195
  967. package/app/public/i18n/literals/ur.json +195 -195
  968. package/app/public/i18n/literals/vi.json +195 -195
  969. package/app/public/i18n/literals/zh-CN.json +773 -773
  970. package/app/public/i18n/literals/zh-TW.json +195 -195
  971. package/app/public/providers/agnes-api.svg +6 -6
  972. package/app/public/providers/agnes-web.svg +6 -6
  973. package/app/public/providers/alibaba-cn.svg +11 -11
  974. package/app/public/providers/alibaba.svg +11 -11
  975. package/app/public/providers/bynara.svg +22 -22
  976. package/app/public/providers/codebuddy-intl.png +0 -0
  977. package/app/public/providers/devin.svg +5 -5
  978. package/app/public/providers/featherless.svg +8 -8
  979. package/app/public/providers/forge.svg +9 -9
  980. package/app/public/providers/freebuff-web.svg +6 -6
  981. package/app/public/providers/hcnsec.svg +10 -10
  982. package/app/public/providers/inferx.svg +8 -0
  983. package/app/public/providers/inxorastudio-web.svg +4 -4
  984. package/app/public/providers/inxorastudio.svg +4 -4
  985. package/app/public/providers/kimi-desktop.svg +9 -0
  986. package/app/public/providers/moonshot.svg +8 -8
  987. package/app/public/providers/novita.svg +6 -0
  988. package/app/public/providers/openvecta.svg +7 -7
  989. package/app/public/providers/perplexity-agent.svg +13 -13
  990. package/app/public/providers/qwen-cloud.svg +1 -1
  991. package/app/public/providers/qwencloud.svg +6 -6
  992. package/app/public/providers/stepfun.svg +53 -53
  993. package/app/public/providers/tokenrouter.svg +15 -15
  994. package/app/public/providers/workbuddy.png +0 -0
  995. package/app/public/providers/wp-studio.svg +11 -11
  996. package/app/public/providers/zed.svg +11 -11
  997. package/app/public/providers/zenmux-free.svg +9 -9
  998. package/app/server.js +1 -1
  999. package/app/src/lib/db/adapters/sqljsAdapter.js +115 -115
  1000. package/app/src/lib/db/migrate.js +286 -286
  1001. package/app/src/lib/network/pickProxyPoolId.js +38 -38
  1002. package/app/src/lib/updater/updater.js +235 -235
  1003. package/app/src/mitm/server.js +2 -2
  1004. package/cli.js +830 -830
  1005. package/package.json +66 -66
  1006. package/src/cli/api/client.js +556 -556
  1007. package/src/cli/menus/cliTools.js +618 -618
  1008. package/src/cli/terminalUI.js +121 -121
  1009. package/src/cli/tray/autostart.js +306 -306
  1010. package/src/cli/tray/tray.js +322 -322
  1011. package/src/cli/tray/tray.ps1 +130 -130
  1012. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  1013. package/app/.next-cli-build/server/chunks/1216.js +0 -3
  1014. package/app/.next-cli-build/server/chunks/2926.js +0 -75
  1015. package/app/.next-cli-build/server/chunks/4502.js +0 -16
  1016. package/app/.next-cli-build/server/chunks/4632.js +0 -1
  1017. package/app/.next-cli-build/server/chunks/541.js +0 -1
  1018. package/app/.next-cli-build/server/chunks/615.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/6316.js +0 -2
  1020. package/app/.next-cli-build/server/chunks/6686.js +0 -1
  1021. package/app/.next-cli-build/server/chunks/9140.js +0 -1
  1022. package/app/.next-cli-build/server/chunks/9630.js +0 -1
  1023. package/app/.next-cli-build/static/S-pbWChrUiCkwFyfx4Su3/_buildManifest.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/1696-bafe4b44a7a0439e.js +0 -3
  1025. package/app/.next-cli-build/static/chunks/1966.b8f83f7ba376c962.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/1992-b492aa3235a8c259.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/3899.3f761f7e3a944e8c.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/5497-b321fb89cc6d6e14.js +0 -7
  1029. package/app/.next-cli-build/static/chunks/705-b7d7b61f41806f0d.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/8105-204edc780a329497.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-cd77e53dbcd46b6c.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-dbf52954681b093c.js +0 -3
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-a8c4d8c681e19868.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-408845bd809806a6.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-d9958dfec1d2e28e.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-92a0799a23d869b3.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-a67cd1c5f77da355.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-262fa6911888d4f1.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-f644da989b8878c3.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-aa26b25a26b5dac8.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-96d3eb0dfde0711b.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9a44fa1600f3ff42.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-9739651f4f19cec6.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2f3b8761d7b32ec0.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-9144cc5f6a208199.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/_global-error/page-ab464cb25617d9dd.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-ab464cb25617d9dd.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ab464cb25617d9dd.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ab464cb25617d9dd.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ab464cb25617d9dd.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ab464cb25617d9dd.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ab464cb25617d9dd.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-ab464cb25617d9dd.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ab464cb25617d9dd.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/breaker/route-ab464cb25617d9dd.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cache/route-ab464cb25617d9dd.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ab464cb25617d9dd.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ab464cb25617d9dd.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ab464cb25617d9dd.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ab464cb25617d9dd.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ab464cb25617d9dd.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ab464cb25617d9dd.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ab464cb25617d9dd.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ab464cb25617d9dd.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ab464cb25617d9dd.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ab464cb25617d9dd.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ab464cb25617d9dd.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ab464cb25617d9dd.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ab464cb25617d9dd.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ab464cb25617d9dd.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ab464cb25617d9dd.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ab464cb25617d9dd.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ab464cb25617d9dd.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ab464cb25617d9dd.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/combos/route-ab464cb25617d9dd.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-ab464cb25617d9dd.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-ab464cb25617d9dd.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-ab464cb25617d9dd.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-ab464cb25617d9dd.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-ab464cb25617d9dd.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-ab464cb25617d9dd.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/health/route-ab464cb25617d9dd.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-ab464cb25617d9dd.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/init/route-ab464cb25617d9dd.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ab464cb25617d9dd.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/keys/route-ab464cb25617d9dd.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/locale/route-ab464cb25617d9dd.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ab464cb25617d9dd.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ab464cb25617d9dd.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ab464cb25617d9dd.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ab464cb25617d9dd.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ab464cb25617d9dd.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ab464cb25617d9dd.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ab464cb25617d9dd.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ab464cb25617d9dd.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ab464cb25617d9dd.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ab464cb25617d9dd.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ab464cb25617d9dd.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/models/route-ab464cb25617d9dd.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/models/test/route-ab464cb25617d9dd.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-ab464cb25617d9dd.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ab464cb25617d9dd.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-ab464cb25617d9dd.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ab464cb25617d9dd.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ab464cb25617d9dd.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ab464cb25617d9dd.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ab464cb25617d9dd.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ab464cb25617d9dd.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-ab464cb25617d9dd.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ab464cb25617d9dd.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ab464cb25617d9dd.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-ab464cb25617d9dd.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ab464cb25617d9dd.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ab464cb25617d9dd.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-ab464cb25617d9dd.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-ab464cb25617d9dd.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-ab464cb25617d9dd.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-ab464cb25617d9dd.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/pricing/route-ab464cb25617d9dd.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ab464cb25617d9dd.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ab464cb25617d9dd.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ab464cb25617d9dd.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-ab464cb25617d9dd.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-ab464cb25617d9dd.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-ab464cb25617d9dd.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-ab464cb25617d9dd.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ab464cb25617d9dd.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-ab464cb25617d9dd.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-ab464cb25617d9dd.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-ab464cb25617d9dd.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ab464cb25617d9dd.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ab464cb25617d9dd.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ab464cb25617d9dd.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-ab464cb25617d9dd.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-ab464cb25617d9dd.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-ab464cb25617d9dd.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ab464cb25617d9dd.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ab464cb25617d9dd.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/route-ab464cb25617d9dd.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ab464cb25617d9dd.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ab464cb25617d9dd.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ab464cb25617d9dd.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ab464cb25617d9dd.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ab464cb25617d9dd.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ab464cb25617d9dd.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ab464cb25617d9dd.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ab464cb25617d9dd.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ab464cb25617d9dd.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-ab464cb25617d9dd.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-ab464cb25617d9dd.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ab464cb25617d9dd.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ab464cb25617d9dd.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ab464cb25617d9dd.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/settings/route-ab464cb25617d9dd.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ab464cb25617d9dd.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-ab464cb25617d9dd.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-ab464cb25617d9dd.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/tags/route-ab464cb25617d9dd.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ab464cb25617d9dd.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ab464cb25617d9dd.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ab464cb25617d9dd.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ab464cb25617d9dd.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ab464cb25617d9dd.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ab464cb25617d9dd.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ab464cb25617d9dd.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ab464cb25617d9dd.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ab464cb25617d9dd.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ab464cb25617d9dd.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ab464cb25617d9dd.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ab464cb25617d9dd.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ab464cb25617d9dd.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-ab464cb25617d9dd.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ab464cb25617d9dd.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ab464cb25617d9dd.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ab464cb25617d9dd.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-ab464cb25617d9dd.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-ab464cb25617d9dd.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-ab464cb25617d9dd.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ab464cb25617d9dd.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ab464cb25617d9dd.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ab464cb25617d9dd.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-ab464cb25617d9dd.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ab464cb25617d9dd.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ab464cb25617d9dd.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ab464cb25617d9dd.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ab464cb25617d9dd.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ab464cb25617d9dd.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ab464cb25617d9dd.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ab464cb25617d9dd.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ab464cb25617d9dd.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ab464cb25617d9dd.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ab464cb25617d9dd.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ab464cb25617d9dd.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ab464cb25617d9dd.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ab464cb25617d9dd.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ab464cb25617d9dd.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ab464cb25617d9dd.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ab464cb25617d9dd.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/route-ab464cb25617d9dd.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ab464cb25617d9dd.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ab464cb25617d9dd.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ab464cb25617d9dd.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ab464cb25617d9dd.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/version/route-ab464cb25617d9dd.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ab464cb25617d9dd.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/version/update/route-ab464cb25617d9dd.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/layout-16b611f4f5717ccd.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/login/page-0831b035aa4c0f17.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ab464cb25617d9dd.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/page-ab464cb25617d9dd.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/main-28015457a328b97c.js +0 -5
  1212. package/app/.next-cli-build/static/chunks/main-app-705d8c306f358a5f.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ab464cb25617d9dd.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ab464cb25617d9dd.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-22e44aa316880902.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ab464cb25617d9dd.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ab464cb25617d9dd.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/webpack-a990cabb6976f421.js +0 -1
  1219. package/app/.next-cli-build/static/css/68d66160ca549ddc.css +0 -1
  1220. package/app/cli/.build-home/AppData/Local/npm-cache/_update-notifier-last-checked +0 -0
  1221. package/app/cli/.build-home/AppData/Roaming/extremerouter/.migrated-from +0 -1
  1222. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/schema-3-to-4-0.8.0-20260802-152036/data.sqlite +0 -0
  1223. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.8-to-0.7.9-0.7.9-20260729-181011/data.sqlite +0 -0
  1224. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.9-to-0.8.0-0.8.0-20260729-213634/data.sqlite +0 -0
  1225. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.8.0-to-0.8.1-0.8.1-20260802-152517/data.sqlite +0 -0
  1226. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite +0 -0
  1227. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  1228. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  1229. package/app/cli/.build-home/AppData/Roaming/extremerouter/jwt-secret +0 -1
  1230. package/app/cli/.build-home/AppData/Roaming/extremerouter/machine-id +0 -1
  1231. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +0 -7
  1232. /package/app/.next-cli-build/static/{S-pbWChrUiCkwFyfx4Su3 → JRaGItQgERhBp83cHyRqE}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{12654:(e,t,a)=>{Promise.resolve().then(a.bind(a,22662))},22662:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p});var s=a(95155),l=a(73321),r=a(12115);a(98500);var i=a(35497),n=a(57250),o=a(88105),d=a(8247);let c=/^[a-zA-Z0-9_.\-]+$/,m={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},x={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},h={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function u(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function p(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[a,p]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,v]=(0,r.useState)(""),[y,k]=(0,r.useState)([]),[N,S]=(0,r.useState)(!1),[$,U]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[P,L]=(0,r.useState)(""),[z,E]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,a,s,l,r,i]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(i.ok&&I((await i.json()).aliases||{}),l.ok){let e=await l.json();E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){p(null),f(!1);return}let n=await t.json();p(n),g(n.name),k(n.models||[]);let o=a.ok?await a.json():{};S(o.comboStrategies?.[n.name]?.fallbackStrategy==="round-robin");let d=s.ok?await s.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(n.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?c.test(e)?(v(""),!0):(v("Only letters, numbers, -, _ and ."),!1):(v("Name is required"),!1),H=async t=>{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!a.ok||(alert((await a.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===a.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||y.includes(t))return;let a=[...y,t];k(a),await H({models:a})},B=async e=>{let t=e?.value||e;if(!t||!y.includes(t))return;let a=y.filter(e=>e!==t);k(a),await H({models:a})},Y=async e=>{let t=y.filter((t,a)=>a!==e);k(t),await H({models:t})},G=async(e,t)=>{let a=[...y],s=e+t;s<0||s>=a.length||([a[e],a[s]]=[a[s],a[e]],k(a),await H({models:a}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).comboStrategies||{}};e?s[a.name]={fallbackStrategy:"round-robin"}:delete s[a.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})})},Q=async()=>{!confirm(`Delete combo "${a.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(u(a.kind))},V=async()=>{if(T(!0),A(null),L(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=x[a.kind],s=h[a.kind](a.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(s)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));L(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let a={};for(let[s,l]of Object.entries(t))a[s]="b64_json"===s&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return a}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){L(e.message||"Network error")}T(!1)};if(b)return(0,s.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!a)return(0,l.notFound)();let X=m[a.kind]||o.rj.find(e=>e.id===a.kind)?.label||"Combo",ee=x[a.kind],et=a.kind&&h[a.kind]?h[a.kind](a.name):null,ea=ee?`curl -X POST http://localhost:20128${ee} \\
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p});var s=a(95155),l=a(73321),r=a(12115);a(98500);var i=a(35497),n=a(57250),o=a(88105),d=a(8247);let c=/^[a-zA-Z0-9_.\-]+$/,m={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},x={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},h={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function u(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function p(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[a,p]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,v]=(0,r.useState)(""),[y,k]=(0,r.useState)([]),[N,S]=(0,r.useState)(!1),[$,U]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[P,L]=(0,r.useState)(""),[z,E]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,a,s,l,r,i]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(i.ok&&I((await i.json()).aliases||{}),l.ok){let e=await l.json();E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){p(null),f(!1);return}let n=await t.json();p(n),g(n.name),k(n.models||[]);let o=a.ok?await a.json():{};S(o.comboStrategies?.[n.name]?.fallbackStrategy==="round-robin");let d=s.ok?await s.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(n.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?c.test(e)?(v(""),!0):(v("Only letters, numbers, -, _ and ."),!1):(v("Name is required"),!1),H=async t=>{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!a.ok||(alert((await a.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===a.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||y.includes(t))return;let a=[...y,t];k(a),await H({models:a})},B=async e=>{let t=e?.value||e;if(!t||!y.includes(t))return;let a=y.filter(e=>e!==t);k(a),await H({models:a})},Y=async e=>{let t=y.filter((t,a)=>a!==e);k(t),await H({models:t})},G=async(e,t)=>{let a=[...y],s=e+t;s<0||s>=a.length||([a[e],a[s]]=[a[s],a[e]],k(a),await H({models:a}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).comboStrategies||{}};e?s[a.name]={fallbackStrategy:"round-robin"}:delete s[a.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})})},Q=async()=>{!confirm(`Delete combo "${a.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(u(a.kind))},V=async()=>{if(T(!0),A(null),L(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=x[a.kind],s=h[a.kind](a.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(s)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));L(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let a={};for(let[s,l]of Object.entries(t))a[s]="b64_json"===s&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return a}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){L(e.message||"Network error")}T(!1)};if(b)return(0,s.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!a)return(0,l.notFound)();let X=m[a.kind]||o.rj.find(e=>e.id===a.kind)?.label||"Combo",ee=x[a.kind],et=a.kind&&h[a.kind]?h[a.kind](a.name):null,ea=ee?`curl -X POST http://localhost:20128${ee} \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${z||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(et)}'`:"";return u(a.kind),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(i.zY,{title:a.name,description:`${X} Combo`,icon:"layers",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${a.kind}`},{label:`${X} Combos`,href:`/dashboard/media-providers/${a.kind}`},{label:a.name}],actions:(0,s.jsx)(i.$n,{variant:"outline",size:"sm",icon:"delete",onClick:Q,children:"Delete"})}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,s.jsx)(i.lM,{checked:N,onChange:K})]})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,s.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>U(!0),children:"Add Provider"})]}),0===y.length?(0,s.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:y.map((e,t)=>{let{providerId:a,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=o.Q2[a];return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,s.jsx)(n.A,{src:(0,d.k)(a),alt:r?.name||a,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||a.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||a}),l&&(0,s.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>G(t,1),disabled:t===y.length-1,className:`p-1 rounded ${t===y.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,s.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),a.kind&&ee&&(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,s.jsx)(i.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===y.length,children:_?"Running...":"Run"})]}),(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:ea}),P&&(0,s.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,s.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,s.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,s.jsx)(i.rq,{isOpen:$,onClose:()=>U(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:a.kind,addedModelValues:y,closeOnSelect:!1})]})}}},e=>{e.O(0,[27,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=12654)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(et)}'`:"";return u(a.kind),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(i.zY,{title:a.name,description:`${X} Combo`,icon:"layers",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${a.kind}`},{label:`${X} Combos`,href:`/dashboard/media-providers/${a.kind}`},{label:a.name}],actions:(0,s.jsx)(i.$n,{variant:"outline",size:"sm",icon:"delete",onClick:Q,children:"Delete"})}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,s.jsx)(i.lM,{checked:N,onChange:K})]})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,s.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>U(!0),children:"Add Provider"})]}),0===y.length?(0,s.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:y.map((e,t)=>{let{providerId:a,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=o.Q2[a];return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,s.jsx)(n.A,{src:(0,d.k)(a),alt:r?.name||a,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||a.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||a}),l&&(0,s.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>G(t,1),disabled:t===y.length-1,className:`p-1 rounded ${t===y.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,s.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),a.kind&&ee&&(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,s.jsx)(i.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===y.length,children:_?"Running...":"Run"})]}),(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:ea}),P&&(0,s.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,s.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,s.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,s.jsx)(i.rq,{isOpen:$,onClose:()=>U(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:a.kind,addedModelValues:y,closeOnSelect:!1})]})}},28903:(e,t,a)=>{Promise.resolve().then(a.bind(a,22662))}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=28903)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{57767:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var n=s(95155),i=s(98500),r=s.n(i),o=s(12115),l=s(35497),d=s(57250),c=s(88105),a=s(8247);let m=[{kind:"image",title:"Text to Image",icon:"brush",nodeType:null,addLabel:""},{kind:"stt",title:"Speech To Text",icon:"mic",nodeType:"custom-stt",addLabel:"STT"},{kind:"tts",title:"Text To Speech",icon:"record_voice_over",nodeType:"custom-tts",addLabel:"TTS"}],x={"custom-stt":{color:"#DC2626",textIcon:"ST"},"custom-tts":{color:"#10B981",textIcon:"TT"}};function u(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"}function h({provider:e,kind:t,connections:s,isCustom:i}){let o=!!c.Q2[e.id]?.noAuth,m=(s||[]).filter(t=>t.provider===e.id),x=m.filter(e=>{let t=u(e);return"active"===t||"success"===t}).length,p=m.filter(e=>{let t=u(e);return"error"===t||"expired"===t||"unavailable"===t}).length,f=m.length;return(0,n.jsx)(r(),{href:`/dashboard/media-providers/${t}/${e.id}`,className:"group",children:(0,n.jsx)(l.Zp,{padding:"xs",className:"h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer",children:(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.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,n.jsx)(d.A,{src:(0,a.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,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,n.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[i&&(0,n.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),o?(0,n.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):0===f?(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,n.jsxs)(n.Fragment,{children:[x>0&&(0,n.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[x," Connected"]}),p>0&&(0,n.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===x&&0===p&&(0,n.jsxs)(l.Ex,{variant:"default",size:"sm",children:[f," Added"]})]})]})]})]})})})}function p({title:e,icon:t,kind:s,connections:i,providers:r,custom:o,addLabel:d,onAddCustom:c}){let a=[...r,...o];return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary",children:t}),(0,n.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,n.jsxs)("span",{className:"text-xs text-text-muted",children:["(",r.length," providers \xb7 ",o.length," custom)"]})]}),c&&(0,n.jsxs)(l.$n,{size:"sm",icon:"add",onClick:c,children:["Add Custom ",d]})]}),0===a.length?(0,n.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,n.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,n.jsx)(h,{provider:e,kind:s,connections:i,isCustom:e.isCustom},e.id))})]})}function f(){let[e,t]=(0,o.useState)([]),[s,i]=(0,o.useState)([]),[r,d]=(0,o.useState)(null);return(0,o.useEffect)(()=>{fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>t(e.connections||[])).catch(()=>{}),fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>i((e.nodes||[]).filter(e=>["custom-stt","custom-tts"].includes(e.type)))).catch(()=>{})},[]),(0,n.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,n.jsx)(l.zY,{title:"Media Providers",description:"Text to Image, speech-to-text, and text-to-speech providers",icon:"perm_media"}),m.map(t=>{let i=(0,c.o5)(t.kind).map(e=>({...e})),r=s.filter(e=>e.type===t.nodeType).map(e=>({id:e.id,name:e.name||`Custom ${t.addLabel}`,isCustom:!0,...x[t.nodeType]||{color:"#6366F1",textIcon:"CE"}}));return(0,n.jsxs)("div",{children:[(0,n.jsx)(p,{title:t.title,icon:t.icon,kind:t.kind,providers:i,custom:r,connections:e,addLabel:t.addLabel,onAddCustom:t.nodeType?()=>d(t.nodeType):null}),t!==m[m.length-1]&&(0,n.jsx)("div",{className:"my-6 border-t border-border"})]},t.kind)}),(0,n.jsx)(l.x0,{isOpen:!!r,nodeType:r||"custom-stt",onClose:()=>d(null),onCreated:e=>{i(t=>[...t,e]),d(null)}})]})}},61412:(e,t,s)=>{Promise.resolve().then(s.bind(s,57767))}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=61412)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{55039:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},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")})]})}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=55039)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{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))})]})}},80409:(e,t,s)=>{Promise.resolve().then(s.bind(s,23879))}},e=>{e.O(0,[27,5772,8105,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=80409)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{41190:(e,t,s)=>{Promise.resolve().then(s.bind(s,54645))},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}))}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=41190)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[27,8105,705,1321,5497,981,8441,3794,7358],()=>_(_.s=90981)),_N_E=_.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{51191:(e,t,s)=>{Promise.resolve().then(s.bind(s,65784))},65784:(e,t,s)=>{"use strict";s.d(t,{default:()=>$});var a=s(95155),r=s(12115),n=s(35497),l=s(14051),i=s.n(l),o=s(57250),c=s(8247),d=s(28777);function m({value:e,onChange:t,models:s,compact:l=!1,modelAliases:i={},activeProviders:u=[]}){let[x,p]=(0,r.useState)(!1),g="string"==typeof e?e:null==e?"":String(e),h=(()=>{if(!g)return null;let e=s?.find(e=>e.id===g);return e?.provider||g.split("/")[0]})(),f=(()=>{if(!g)return"Select a model...";if(i?.[g])return i[g];if(h){let e=(0,d.u0)(h,g);if(e&&e!==g)return e}return g})();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>p(!0),className:l?"flex h-8 items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2 text-xs text-text-main hover:border-primary/40":"flex h-9 w-full items-center gap-2 rounded-lg border border-border-subtle bg-surface-2 px-3 text-sm text-text-main hover:border-primary/40",title:f,children:[h&&(0,a.jsx)(o.A,{src:(0,c.k)(h),alt:h,size:l?16:18,fallbackText:(h||"?").slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:`truncate ${e?"font-medium":"text-text-muted"}`,children:f}),(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[16px] text-text-muted",children:"expand_more"})]}),(0,a.jsx)(n.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{t("string"==typeof e?e:e?.value||e?.name||e?.id||""),p(!1)},selectedModel:g,activeProviders:u,title:"Select Model",modelAliases:i})]})}m.propTypes={value:i().string,onChange:i().func.isRequired,models:i().arrayOf(i().shape({id:i().string,provider:i().string})),compact:i().bool,modelAliases:i().object,activeProviders:i().array};var u=s(53593);let x=["low","medium","high","max"];function p({params:e,onChange:t,selectedModel:s=""}){let[n,l]=(0,r.useState)(!0),{getCaps:i}=(0,u.y)(),o=(s,a)=>t({...e,[s]:a}),c=i?.(s),d=!!c?.reasoning,m=!!(e.systemPrompt&&e.systemPrompt.trim());return(0,a.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("button",{onClick:()=>l(!n),className:"mb-3 flex w-full items-center justify-between",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"tune"}),"Parameters",m&&(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"system"})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-90":""}`,children:"chevron_right"})]}),n&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,a.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>o("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),d&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Thinking Level"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:x.map(t=>{let s=(e.reasoningEffort||"medium")===t;return"max"!==t||c?.thinkingMaxEffort?(0,a.jsx)("button",{onClick:()=>o("reasoningEffort",s?"":t),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${s?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:t},t):null})}),(0,a.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reasoning effort. Tap active level to clear."})]}),(0,a.jsx)(g,{label:"Temperature",value:e.temperature??.7,min:0,max:2,step:.05,onChange:e=>o("temperature",e)}),(0,a.jsx)(g,{label:"Top P",value:e.topP??1,min:0,max:1,step:.05,onChange:e=>o("topP",e)}),(0,a.jsx)(g,{label:"Frequency Penalty",value:e.frequencyPenalty??0,min:0,max:2,step:.1,onChange:e=>o("frequencyPenalty",e)}),(0,a.jsx)(g,{label:"Presence Penalty",value:e.presencePenalty??0,min:0,max:2,step:.1,onChange:e=>o("presencePenalty",e)}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,a.jsx)("input",{type:"number",min:"1",max:"128000",value:e.maxTokens??4096,onChange:e=>o("maxTokens",parseInt(e.target.value)||4096),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Top K"}),(0,a.jsx)("input",{type:"number",min:"1",max:"1000",placeholder:"unset",value:e.topK??"",onChange:e=>o("topK",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Seed"}),(0,a.jsx)("input",{type:"number",placeholder:"unset",value:e.seed??"",onChange:e=>o("seed",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]})]})]})}function g({label:e,value:t,min:s,max:r,step:n,onChange:l}){return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:e}),(0,a.jsx)("span",{className:"text-xs font-mono text-text-main",children:Number(t).toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:s,max:r,step:n,value:t,onChange:e=>l(parseFloat(e.target.value)),className:"w-full accent-primary"})]})}p.propTypes={params:i().shape({systemPrompt:i().string,reasoningEffort:i().string,temperature:i().number,maxTokens:i().number,topP:i().number,frequencyPenalty:i().number,presencePenalty:i().number,topK:i().number,seed:i().number}).isRequired,onChange:i().func.isRequired,selectedModel:i().string},g.propTypes={label:i().string.isRequired,value:i().number.isRequired,min:i().number.isRequired,max:i().number.isRequired,step:i().number.isRequired,onChange:i().func.isRequired};var h=s(62630);function f(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function b(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function y({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,a.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Total: ",b(e.compareLatencyMs)]})]});let r=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),a=s>0?t.slice(0,s):null,r=s>0?t.slice(s+1):t,n=(0,h.PS)(a,r);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,h.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,h.BD)(s);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:f(e.inputTokens)})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:f(e.outputTokens)})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:b(e.latencyMs)})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-warning",children:r})]})]}),e.model&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function j({sessions:e,currentSession:t,onNew:s,onLoad:l,onDelete:i}){let[o,c]=(0,r.useState)(""),[,d]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),6e4);return()=>clearInterval(e)},[]);let m=(0,r.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>(e.title||"").toLowerCase().includes(t)):e},[e,o]);return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat","aria-label":"New chat"})]}),e.length>0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"search"}),(0,a.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"Search...",className:"w-full bg-transparent py-1 text-xs text-text-main placeholder:text-text-muted focus:outline-none"})]}),0===e.length?(0,a.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):0===m.length?(0,a.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No matches"}):(0,a.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:m.map(e=>(0,a.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,a.jsxs)("button",{onClick:()=>l(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,a.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,a.jsx)("button",{onClick:()=>i(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete","aria-label":`Delete ${e.title}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}y.propTypes={stats:i().object,mode:i().string},j.propTypes={sessions:i().array,currentSession:i().string,onNew:i().func.isRequired,onLoad:i().func.isRequired,onDelete:i().func.isRequired};var v=s(9233),N=s(91992);let w=void 0!==window.document,k=!1,C={FORBID_TAGS:["style","form","input","textarea","button","select","svg"],FORBID_ATTR:["style"],ALLOW_UNKNOWN_PROTOCOLS:!1};function S({content:e,role:t,error:s=!1}){let n=!s&&"assistant"===t,l=(0,r.useMemo)(()=>{if(!n||!e)return"";try{var t;let s=v.xI.parse(e);return t="string"==typeof s?s:String(s),"string"==typeof t&&t?w?(!k&&w&&(k=!0,N.A.addHook("afterSanitizeAttributes",e=>{for(let t of("A"===e.tagName&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),["src","href","xlink:href","action","formaction"])){let s=e.getAttribute(t);s&&/^\s*data:/i.test(s)&&!/^\s*data:image\/(?:png|jpe?g|gif|webp);/i.test(s)&&e.removeAttribute(t)}})),N.A.sanitize(t,C)):t:""}catch{return""}},[e,n]);return n&&l?(0,a.jsx)("div",{className:"prose-chat whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:l}}):(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function T({messages:e,onSend:t,streaming:s}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,a.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,a.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,a.jsx)("div",{ref:l,className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,a.jsx)(P,{msg:e},e.id))})}function P({msg:e}){let t="user"===e.role,s=e.error;return(0,a.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,a.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,a.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),e.reasoning&&(0,a.jsxs)("details",{className:"mb-1.5 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,a.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs italic text-text-muted",children:e.reasoning})]}),t&&e.attachments&&e.attachments.length>0&&(0,a.jsx)("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(e=>(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-20 w-20 rounded-lg border border-white/20 object-cover"},e.id))}),(0,a.jsxs)("div",{className:"break-words",children:[(0,a.jsx)(S,{content:e.content,role:e.role,error:s}),e.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}async function A(e,{onChunk:t}={}){if(!e?.body?.getReader)return null;let s=e.body.getReader(),a=new TextDecoder,r="",n=null;for(;;){let{value:e,done:l}=await s.read();if(l)break;let i=(r+=a.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(r=i.pop()||"",i)){let s=e.trim();if(!s.startsWith("data:"))continue;let a=s.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=function(e){let t=e?.choices?.[0],s=t?.delta||{};return{content:"string"==typeof s.content?s.content:null,reasoning:"string"==typeof s.reasoning_content?s.reasoning_content:null,toolCalls:Array.isArray(s.tool_calls)&&s.tool_calls.length>0?s.tool_calls:null,finishReason:t?.finish_reason??null,usage:e?.usage??null}}(JSON.parse(a));e.usage&&(n=e.usage),t?.(e)}catch{}}}return n}v.xI.setOptions({gfm:!0,breaks:!0,async:!1}),S.propTypes={content:i().string,role:i().string,error:i().bool},T.propTypes={messages:i().arrayOf(i().shape({id:i().string,role:i().string,content:i().string,reasoning:i().string,model:i().string,streaming:i().bool,error:i().bool,attachments:i().array})),onSend:i().func,streaming:i().bool};let _="extremerouter.playground.sessions";function R(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function O(e){try{return localStorage.setItem(_,JSON.stringify(e)),"saved"}catch{try{return localStorage.setItem(_,JSON.stringify(e.map(e=>({...e,messages:(e.messages||[]).map(e=>"user"!==e.role?e:{...e,displayAttachments:Array.isArray(e.displayAttachments)?e.displayAttachments.map(e=>({id:e.id,name:e.name,stripped:!0})):void 0,content:Array.isArray(e.content)?e.content.map(e=>e&&"image_url"===e.type?{type:"image_url",image_url:{url:""}}:e):e.content})})))),"stripped"}catch{return"failed"}}}function $(){let[e,t]=(0,r.useState)(!0),[s,l]=(0,r.useState)([]),[i,o]=(0,r.useState)([]),[c,d]=(0,r.useState)({}),[u,x]=(0,r.useState)([]),[g,h]=(0,r.useState)(null),[f,b]=(0,r.useState)([]),[v,N]=(0,r.useState)({}),[w,k]=(0,r.useState)("single"),[C,P]=(0,r.useState)([""]),[$,z]=(0,r.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1,frequencyPenalty:0,presencePenalty:0,topK:null,seed:null,reasoningEffort:""}),[D,E]=(0,r.useState)({}),I=(0,r.useRef)(null),M=(0,r.useRef)({}),[F,L]=(0,r.useState)(null),K=(0,r.useRef)(!1),[B,H]=(0,r.useState)(null),U=(0,r.useRef)(null),W=(0,r.useCallback)(e=>{H(e),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>H(null),3e3)},[]),[J,Y]=(0,r.useState)(!1),[Z,G]=(0,r.useState)(null),[Q,V]=(0,r.useState)(null),{streamChat:X,abortAll:ee,streaming:et}=function({onDelta:e,onComplete:t,onError:s}){let a=(0,r.useRef)({}),[n,l]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=a.current;return()=>{Object.values(e).forEach(e=>e?.abort?.())}},[]);let i=(0,r.useCallback)(async(r,{body:n,apiKey:i})=>{let o=new AbortController;a.current[r]=o,l(e=>e+1);try{let a={"Content-Type":"application/json",Accept:"text/event-stream"};i&&(a.Authorization=`Bearer ${i}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:a,body:JSON.stringify({...n,stream:!0}),signal:o.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));s(r,e.error?.message||`HTTP ${l.status}`,l.status);return}let c=await A(l,{onChunk:t=>e(r,t)});t(r,{usage:c,ok:!0})}catch(e){e?.name!=="AbortError"&&s(r,e?.message||"Network error",0)}finally{delete a.current[r],l(e=>Math.max(0,e-1))}},[e,t,s]);return{streamChat:i,abort:(0,r.useCallback)(e=>{a.current[e]?.abort?.()},[]),abortAll:(0,r.useCallback)(()=>{Object.values(a.current).forEach(e=>e?.abort?.())},[]),streaming:n>0}}({onDelta:(0,r.useCallback)((e,t)=>{let s=M.current[e];if(!s)return;let a=(e,t,s)=>s?(e||"")+s:e;"single"===s.mode?b(e=>e.map(e=>e.id!==s.assistantId?e:{...e,content:a(e.content,"content",t.content),reasoning:a(e.reasoning,"reasoning",t.reasoning)})):N(s=>{let r=s[e]||{content:"",reasoning:"",streaming:!0,error:null};return{...s,[e]:{...r,content:a(r.content,"content",t.content),reasoning:a(r.reasoning,"reasoning",t.reasoning)}}})},[]),onComplete:(0,r.useCallback)((e,{usage:t})=>{let s=M.current[e];s&&("single"===s.mode?(b(e=>e.map(e=>e.id===s.assistantId?{...e,streaming:!1}:e)),E({model:s.modelId,inputTokens:t?.prompt_tokens||0,outputTokens:t?.completion_tokens||0,latencyMs:Date.now()-s.startTime})):N(s=>({...s,[e]:{...s[e],streaming:!1,usage:t}})),delete M.current[e])},[]),onError:(0,r.useCallback)((e,t)=>{let s,a=M.current[e];if(!a)return;let r=((s=(s=(s=(s=(s="string"==typeof t?t:String(t??"")).replace(/https?:\/\/[^\s"'<>]+/g,"[url]")).replace(/(Bearer\s+)[A-Za-z0-9._\-]{16,}/gi,"$1[token]")).replace(/(signature=)[A-Za-z0-9%+/=]{16,}/gi,"$1[sig]")).replace(/\{[\s\S]{80,}\}/g,"[provider json]")).length>300&&(s=s.slice(0,297)+"..."),s.trim());"single"===a.mode?b(e=>e.map(e=>e.id===a.assistantId?{...e,content:`❌ Error: ${r}`,streaming:!1,error:!0}:e)):N(t=>({...t,[e]:{...t[e],content:`❌ ${r}`,streaming:!1,error:!0}})),delete M.current[e]},[])}),es=(0,r.useCallback)(async()=>{G(null);try{let[e,t,s]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/v1/models")]),a=await e.json();o((a.connections||[]).filter(e=>!1!==e.isActive));let r=await t.json();d(r.aliases||{});let n=((await s.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(n),n.length>0&&P(e=>e[0]?e:[n[0].id])}catch(e){G(e?.message||"Failed to load models")}},[]);(0,r.useEffect)(()=>{(async()=>{x(function(){try{let e=localStorage.getItem(_);return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(I.current=s.key)}catch{}try{let e=await fetch("/api/settings"),t=await e.json(),s=!0===t.requireApiKey;Y(s&&!I.current)}catch{Y(!1)}await es(),t(!1)})()},[es]),(0,r.useEffect)(()=>{"single"===w&&(K.current=!1)},[w]);let ea=(0,r.useCallback)(()=>{f.length>0&&g&&el(g,f),L(null),b([]),h(null),E({}),N({})},[f,g]),er=(0,r.useCallback)(e=>{f.length>0&&g&&el(g,f),b(e.messages||[]),h(e.id),e.model&&P([e.model]),e.params&&z(e.params),E({}),N({})},[f,g]),en=(0,r.useCallback)(e=>{let t=u.filter(t=>t.id!==e);x(t),O(t),g===e&&(h(null),b([]))},[u,g]),el=(0,r.useCallback)((e,t)=>{let s=u.map(s=>s.id===e?{...s,messages:t.slice(-60),updatedAt:Date.now()}:s).slice(0,100);x(s),O(s)},[u]),ei=(0,r.useCallback)(()=>{if(0===f.length)return;let e=g||R(),t={id:e,title:f.find(e=>"user"===e.role)?.content?.slice(0,40)||"New Chat",messages:f.slice(-60),model:C[0],params:$,createdAt:Date.now(),updatedAt:Date.now()},s=(u.find(t=>t.id===e)?u.map(s=>s.id===e?{...s,...t}:s):[t,...u]).slice(0,100);x(s);let a=O(s);h(e),W(a)},[f,g,u,C,$,W]),eo=(0,r.useCallback)((e,t=[])=>{let s=t.length>0,a={role:"user",content:s?[{type:"text",text:e},...t.map(e=>({type:"image_url",image_url:{url:e.dataUrl}}))]:e,id:R(),displayText:e,displayAttachments:s?t:void 0},r=[...f];$.systemPrompt&&r.unshift({role:"system",content:$.systemPrompt});let n=[...r.slice(-50),a],l={temperature:$.temperature,max_tokens:$.maxTokens,top_p:$.topP};return $.frequencyPenalty&&(l.frequency_penalty=$.frequencyPenalty),$.presencePenalty&&(l.presence_penalty=$.presencePenalty),$.topK&&(l.top_k=$.topK),null!=$.seed&&(l.seed=$.seed),$.reasoningEffort&&(l.reasoning_effort=$.reasoningEffort),{userMsg:a,baseMessages:n,requestParams:l}},[f,$]),ec=(0,r.useCallback)(async(e,t=[])=>{let{userMsg:s,baseMessages:a,requestParams:r}=eo(e,t),n=I.current,l=Date.now();if("single"===w){let e=C[0];if(!e)return;let t=R();b([...a.filter(e=>"system"!==e.role).map(e=>"user"===e.role?{...e,content:e.displayText??e.content,attachments:e.displayAttachments}:e),{role:"assistant",content:"",reasoning:"",id:t,model:e,streaming:!0}]),M.current.single={mode:"single",assistantId:t,modelId:e,startTime:l},await X("single",{body:{model:e,messages:a,...r},apiKey:n})}else{let e=C.filter(Boolean);if(0===e.length)return;N({}),e.forEach(e=>{M.current[e]={mode:"compare",modelId:e,startTime:l}}),await Promise.allSettled(e.map(e=>X(e,{body:{model:e,messages:a,...r},apiKey:n}))),E({compareLatencyMs:Date.now()-l,models:e.length})}},[w,C,eo,X]),ed=(0,r.useCallback)(async(e,t=[])=>{if((e.trim()||0!==t.length)&&!et){if("compare"===w&&!K.current&&C.filter(Boolean).length>1)return void L({text:e,attachments:t});await ec(e,t)}},[w,et,C,ec]),em=(0,r.useCallback)(()=>{K.current=!0,F&&(ec(F.text,F.attachments),L(null))},[F,ec]),eu=(0,r.useCallback)(()=>{ee(),M.current={},b(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),N(e=>{let t={};for(let[s,a]of Object.entries(e))t[s]={...a,streaming:!1};return t})},[ee]);return e?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,a.jsx)(n.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:w,onChange:k,size:"sm"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:et?"stop":"save",onClick:et?eu:ei,disabled:!et&&0===f.length,children:et?"Stop":"Save"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"history",className:"lg:hidden","aria-label":"Open history",onClick:()=>V("history")}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"tune",className:"lg:hidden","aria-label":"Open parameters",onClick:()=>V("params")}),B&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",role:"status","aria-live":"polite",children:["saved"===B&&"Saved","stripped"===B&&"Saved — images removed to fit storage","failed"===B&&"Save failed"]})]})}),(J||Z)&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[J&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-warning/30 bg-warning/5 px-3 py-2 text-xs text-warning",children:[(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{children:"API key required."})," The gateway requires an API key for requests, but no active key was found — sends will fail with a 401."]}),(0,a.jsx)("a",{href:"/dashboard/endpoint",className:"shrink-0 font-semibold underline hover:text-warning/80",children:"Create an API key →"})]}),Z&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-danger/30 bg-danger/5 px-3 py-2 text-xs text-danger",children:[(0,a.jsxs)("span",{className:"truncate",children:["Failed to load models: ",Z]}),(0,a.jsx)(n.$n,{size:"sm",variant:"outline",icon:"refresh",onClick:es,children:"Retry"})]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,a.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,a.jsx)(j,{sessions:u,currentSession:g,onNew:ea,onLoad:er,onDelete:en})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===w?(0,a.jsx)(m,{models:s,value:C[0],onChange:e=>P([e]),activeProviders:i,modelAliases:c}):(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[C.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(m,{models:s,value:e,onChange:e=>{let s=[...C];s[t]=e,P(s)},compact:!0,activeProviders:i,modelAliases:c}),C.length>2&&(0,a.jsx)("button",{onClick:()=>P(C.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),C.length<4&&(0,a.jsxs)("button",{onClick:()=>P([...C,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===w?(0,a.jsx)(T,{messages:f,onSend:ed,streaming:et,stats:D}):(0,a.jsx)("div",{className:"flex min-w-0 gap-3",children:C.filter(Boolean).map(e=>{let t=v[e];return(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,a.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,a.jsxs)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:[t?.reasoning&&(0,a.jsxs)("details",{className:"mb-2 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,a.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs italic text-text-muted",children:t.reasoning})]}),t?.content?(0,a.jsxs)("div",{className:`text-sm ${t.error?"text-danger":"text-text-main"}`,children:[t.error?(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words",children:t.content}):(0,a.jsx)(S,{content:t.content,role:"assistant"}),t.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:et?"Waiting...":"Send a message to compare"})]})]},e)})}),(0,a.jsx)(q,{onSend:ed,streaming:et,onStop:eu}),Object.keys(D).length>0&&(0,a.jsx)(y,{stats:D,mode:w})]}),(0,a.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,a.jsx)(p,{params:$,onChange:z,selectedModel:C[0]})})]}),(0,a.jsx)(n.uo,{isOpen:!!F,onClose:()=>L(null),onConfirm:em,title:"Send to multiple models at once?",message:F?`Compare mode sends this exact prompt to ${C.filter(Boolean).length} models simultaneously. One request becomes ${C.filter(Boolean).length} upstream calls (~${C.filter(Boolean).length}\xd7 the tokens of a single request), billed by each provider.`:"",confirmText:"Compare all",cancelText:"Cancel",variant:"secondary"}),(0,a.jsx)(n.aF,{isOpen:"history"===Q,onClose:()=>V(null),title:"History",size:"lg",children:(0,a.jsx)("div",{className:"max-h-[70vh] overflow-y-auto",children:(0,a.jsx)(j,{sessions:u,currentSession:g,onNew:ea,onLoad:e=>{er(e),V(null)},onDelete:en})})}),(0,a.jsx)(n.aF,{isOpen:"params"===Q,onClose:()=>V(null),title:"Parameters",size:"lg",children:(0,a.jsx)(p,{params:$,onChange:z,selectedModel:C[0]})})]})}function q({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,r.useState)(""),[i,o]=(0,r.useState)([]),c=(0,r.useRef)(null),d=e=>{if(!e||!e.type.startsWith("image/")||e.size>5242880)return;let t=new FileReader;t.onload=()=>{o(s=>[...s,{id:R(),dataUrl:t.result,name:e.name}])},t.readAsDataURL(e)},m=()=>{(n.trim()||0!==i.length)&&!t&&(e(n,i),l(""),o([]),c.current&&(c.current.style.height="auto"))},u=(n.trim()||i.length>0)&&!t;return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[i.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,a.jsxs)("div",{className:"group relative",children:[(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-16 w-16 rounded-lg border border-border-subtle object-cover"}),(0,a.jsx)("button",{onClick:()=>o(t=>t.filter(t=>t.id!==e.id)),className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-danger text-white opacity-0 transition-opacity group-hover:opacity-100",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.id))}),(0,a.jsxs)("div",{className:"flex items-end gap-2",children:[(0,a.jsx)("textarea",{ref:c,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let s=!1;for(let e of t)e.type.startsWith("image/")&&(s=!0,d(e.getAsFile()));s&&e.preventDefault()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),m())},placeholder:"Send a message... (Enter to send, Shift+Enter for newline, paste images)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,a.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop","aria-label":"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,a.jsx)("button",{onClick:m,disabled:!u,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send","aria-label":"Send",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})]})}}},e=>{e.O(0,[27,1992,8105,1321,705,5497,8441,3794,7358],()=>e(e.s=51191)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{45518:(e,t,s)=>{Promise.resolve().then(s.bind(s,65784))},65784:(e,t,s)=>{"use strict";s.d(t,{default:()=>$});var a=s(95155),r=s(12115),n=s(35497),l=s(14051),i=s.n(l),o=s(57250),c=s(8247),d=s(28777);function m({value:e,onChange:t,models:s,compact:l=!1,modelAliases:i={},activeProviders:u=[]}){let[x,p]=(0,r.useState)(!1),g="string"==typeof e?e:null==e?"":String(e),h=(()=>{if(!g)return null;let e=s?.find(e=>e.id===g);return e?.provider||g.split("/")[0]})(),f=(()=>{if(!g)return"Select a model...";if(i?.[g])return i[g];if(h){let e=(0,d.u0)(h,g);if(e&&e!==g)return e}return g})();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>p(!0),className:l?"flex h-8 items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2 text-xs text-text-main hover:border-primary/40":"flex h-9 w-full items-center gap-2 rounded-lg border border-border-subtle bg-surface-2 px-3 text-sm text-text-main hover:border-primary/40",title:f,children:[h&&(0,a.jsx)(o.A,{src:(0,c.k)(h),alt:h,size:l?16:18,fallbackText:(h||"?").slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:`truncate ${e?"font-medium":"text-text-muted"}`,children:f}),(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[16px] text-text-muted",children:"expand_more"})]}),(0,a.jsx)(n.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{t("string"==typeof e?e:e?.value||e?.name||e?.id||""),p(!1)},selectedModel:g,activeProviders:u,title:"Select Model",modelAliases:i})]})}m.propTypes={value:i().string,onChange:i().func.isRequired,models:i().arrayOf(i().shape({id:i().string,provider:i().string})),compact:i().bool,modelAliases:i().object,activeProviders:i().array};var u=s(53593);let x=["low","medium","high","max"];function p({params:e,onChange:t,selectedModel:s=""}){let[n,l]=(0,r.useState)(!0),{getCaps:i}=(0,u.y)(),o=(s,a)=>t({...e,[s]:a}),c=i?.(s),d=!!c?.reasoning,m=!!(e.systemPrompt&&e.systemPrompt.trim());return(0,a.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("button",{onClick:()=>l(!n),className:"mb-3 flex w-full items-center justify-between",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"tune"}),"Parameters",m&&(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"system"})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-90":""}`,children:"chevron_right"})]}),n&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,a.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>o("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),d&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Thinking Level"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:x.map(t=>{let s=(e.reasoningEffort||"medium")===t;return"max"!==t||c?.thinkingMaxEffort?(0,a.jsx)("button",{onClick:()=>o("reasoningEffort",s?"":t),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${s?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:t},t):null})}),(0,a.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reasoning effort. Tap active level to clear."})]}),(0,a.jsx)(g,{label:"Temperature",value:e.temperature??.7,min:0,max:2,step:.05,onChange:e=>o("temperature",e)}),(0,a.jsx)(g,{label:"Top P",value:e.topP??1,min:0,max:1,step:.05,onChange:e=>o("topP",e)}),(0,a.jsx)(g,{label:"Frequency Penalty",value:e.frequencyPenalty??0,min:0,max:2,step:.1,onChange:e=>o("frequencyPenalty",e)}),(0,a.jsx)(g,{label:"Presence Penalty",value:e.presencePenalty??0,min:0,max:2,step:.1,onChange:e=>o("presencePenalty",e)}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,a.jsx)("input",{type:"number",min:"1",max:"128000",value:e.maxTokens??4096,onChange:e=>o("maxTokens",parseInt(e.target.value)||4096),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Top K"}),(0,a.jsx)("input",{type:"number",min:"1",max:"1000",placeholder:"unset",value:e.topK??"",onChange:e=>o("topK",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Seed"}),(0,a.jsx)("input",{type:"number",placeholder:"unset",value:e.seed??"",onChange:e=>o("seed",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]})]})]})}function g({label:e,value:t,min:s,max:r,step:n,onChange:l}){return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:e}),(0,a.jsx)("span",{className:"text-xs font-mono text-text-main",children:Number(t).toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:s,max:r,step:n,value:t,onChange:e=>l(parseFloat(e.target.value)),className:"w-full accent-primary"})]})}p.propTypes={params:i().shape({systemPrompt:i().string,reasoningEffort:i().string,temperature:i().number,maxTokens:i().number,topP:i().number,frequencyPenalty:i().number,presencePenalty:i().number,topK:i().number,seed:i().number}).isRequired,onChange:i().func.isRequired,selectedModel:i().string},g.propTypes={label:i().string.isRequired,value:i().number.isRequired,min:i().number.isRequired,max:i().number.isRequired,step:i().number.isRequired,onChange:i().func.isRequired};var h=s(62630);function f(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function b(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function y({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,a.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Total: ",b(e.compareLatencyMs)]})]});let r=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),a=s>0?t.slice(0,s):null,r=s>0?t.slice(s+1):t,n=(0,h.PS)(a,r);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,h.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,h.BD)(s);return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:f(e.inputTokens)})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:f(e.outputTokens)})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:b(e.latencyMs)})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-warning",children:r})]})]}),e.model&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function j({sessions:e,currentSession:t,onNew:s,onLoad:l,onDelete:i}){let[o,c]=(0,r.useState)(""),[,d]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),6e4);return()=>clearInterval(e)},[]);let m=(0,r.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>(e.title||"").toLowerCase().includes(t)):e},[e,o]);return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat","aria-label":"New chat"})]}),e.length>0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"search"}),(0,a.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"Search...",className:"w-full bg-transparent py-1 text-xs text-text-main placeholder:text-text-muted focus:outline-none"})]}),0===e.length?(0,a.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):0===m.length?(0,a.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No matches"}):(0,a.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:m.map(e=>(0,a.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,a.jsxs)("button",{onClick:()=>l(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,a.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,a.jsx)("button",{onClick:()=>i(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete","aria-label":`Delete ${e.title}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}y.propTypes={stats:i().object,mode:i().string},j.propTypes={sessions:i().array,currentSession:i().string,onNew:i().func.isRequired,onLoad:i().func.isRequired,onDelete:i().func.isRequired};var v=s(9233),N=s(91992);let w=void 0!==window.document,k=!1,C={FORBID_TAGS:["style","form","input","textarea","button","select","svg"],FORBID_ATTR:["style"],ALLOW_UNKNOWN_PROTOCOLS:!1};function S({content:e,role:t,error:s=!1}){let n=!s&&"assistant"===t,l=(0,r.useMemo)(()=>{if(!n||!e)return"";try{var t;let s=v.xI.parse(e);return t="string"==typeof s?s:String(s),"string"==typeof t&&t?w?(!k&&w&&(k=!0,N.A.addHook("afterSanitizeAttributes",e=>{for(let t of("A"===e.tagName&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),["src","href","xlink:href","action","formaction"])){let s=e.getAttribute(t);s&&/^\s*data:/i.test(s)&&!/^\s*data:image\/(?:png|jpe?g|gif|webp);/i.test(s)&&e.removeAttribute(t)}})),N.A.sanitize(t,C)):t:""}catch{return""}},[e,n]);return n&&l?(0,a.jsx)("div",{className:"prose-chat whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:l}}):(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function T({messages:e,onSend:t,streaming:s}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,a.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,a.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,a.jsx)("div",{ref:l,className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,a.jsx)(P,{msg:e},e.id))})}function P({msg:e}){let t="user"===e.role,s=e.error;return(0,a.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,a.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,a.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),e.reasoning&&(0,a.jsxs)("details",{className:"mb-1.5 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,a.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs italic text-text-muted",children:e.reasoning})]}),t&&e.attachments&&e.attachments.length>0&&(0,a.jsx)("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(e=>(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-20 w-20 rounded-lg border border-white/20 object-cover"},e.id))}),(0,a.jsxs)("div",{className:"break-words",children:[(0,a.jsx)(S,{content:e.content,role:e.role,error:s}),e.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}async function A(e,{onChunk:t}={}){if(!e?.body?.getReader)return null;let s=e.body.getReader(),a=new TextDecoder,r="",n=null;for(;;){let{value:e,done:l}=await s.read();if(l)break;let i=(r+=a.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(r=i.pop()||"",i)){let s=e.trim();if(!s.startsWith("data:"))continue;let a=s.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=function(e){let t=e?.choices?.[0],s=t?.delta||{};return{content:"string"==typeof s.content?s.content:null,reasoning:"string"==typeof s.reasoning_content?s.reasoning_content:null,toolCalls:Array.isArray(s.tool_calls)&&s.tool_calls.length>0?s.tool_calls:null,finishReason:t?.finish_reason??null,usage:e?.usage??null}}(JSON.parse(a));e.usage&&(n=e.usage),t?.(e)}catch{}}}return n}v.xI.setOptions({gfm:!0,breaks:!0,async:!1}),S.propTypes={content:i().string,role:i().string,error:i().bool},T.propTypes={messages:i().arrayOf(i().shape({id:i().string,role:i().string,content:i().string,reasoning:i().string,model:i().string,streaming:i().bool,error:i().bool,attachments:i().array})),onSend:i().func,streaming:i().bool};let _="extremerouter.playground.sessions";function R(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function O(e){try{return localStorage.setItem(_,JSON.stringify(e)),"saved"}catch{try{return localStorage.setItem(_,JSON.stringify(e.map(e=>({...e,messages:(e.messages||[]).map(e=>"user"!==e.role?e:{...e,displayAttachments:Array.isArray(e.displayAttachments)?e.displayAttachments.map(e=>({id:e.id,name:e.name,stripped:!0})):void 0,content:Array.isArray(e.content)?e.content.map(e=>e&&"image_url"===e.type?{type:"image_url",image_url:{url:""}}:e):e.content})})))),"stripped"}catch{return"failed"}}}function $(){let[e,t]=(0,r.useState)(!0),[s,l]=(0,r.useState)([]),[i,o]=(0,r.useState)([]),[c,d]=(0,r.useState)({}),[u,x]=(0,r.useState)([]),[g,h]=(0,r.useState)(null),[f,b]=(0,r.useState)([]),[v,N]=(0,r.useState)({}),[w,k]=(0,r.useState)("single"),[C,P]=(0,r.useState)([""]),[$,z]=(0,r.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1,frequencyPenalty:0,presencePenalty:0,topK:null,seed:null,reasoningEffort:""}),[D,E]=(0,r.useState)({}),I=(0,r.useRef)(null),M=(0,r.useRef)({}),[F,L]=(0,r.useState)(null),K=(0,r.useRef)(!1),[B,H]=(0,r.useState)(null),U=(0,r.useRef)(null),W=(0,r.useCallback)(e=>{H(e),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>H(null),3e3)},[]),[J,Y]=(0,r.useState)(!1),[Z,G]=(0,r.useState)(null),[Q,V]=(0,r.useState)(null),{streamChat:X,abortAll:ee,streaming:et}=function({onDelta:e,onComplete:t,onError:s}){let a=(0,r.useRef)({}),[n,l]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=a.current;return()=>{Object.values(e).forEach(e=>e?.abort?.())}},[]);let i=(0,r.useCallback)(async(r,{body:n,apiKey:i})=>{let o=new AbortController;a.current[r]=o,l(e=>e+1);try{let a={"Content-Type":"application/json",Accept:"text/event-stream"};i&&(a.Authorization=`Bearer ${i}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:a,body:JSON.stringify({...n,stream:!0}),signal:o.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));s(r,e.error?.message||`HTTP ${l.status}`,l.status);return}let c=await A(l,{onChunk:t=>e(r,t)});t(r,{usage:c,ok:!0})}catch(e){e?.name!=="AbortError"&&s(r,e?.message||"Network error",0)}finally{delete a.current[r],l(e=>Math.max(0,e-1))}},[e,t,s]);return{streamChat:i,abort:(0,r.useCallback)(e=>{a.current[e]?.abort?.()},[]),abortAll:(0,r.useCallback)(()=>{Object.values(a.current).forEach(e=>e?.abort?.())},[]),streaming:n>0}}({onDelta:(0,r.useCallback)((e,t)=>{let s=M.current[e];if(!s)return;let a=(e,t,s)=>s?(e||"")+s:e;"single"===s.mode?b(e=>e.map(e=>e.id!==s.assistantId?e:{...e,content:a(e.content,"content",t.content),reasoning:a(e.reasoning,"reasoning",t.reasoning)})):N(s=>{let r=s[e]||{content:"",reasoning:"",streaming:!0,error:null};return{...s,[e]:{...r,content:a(r.content,"content",t.content),reasoning:a(r.reasoning,"reasoning",t.reasoning)}}})},[]),onComplete:(0,r.useCallback)((e,{usage:t})=>{let s=M.current[e];s&&("single"===s.mode?(b(e=>e.map(e=>e.id===s.assistantId?{...e,streaming:!1}:e)),E({model:s.modelId,inputTokens:t?.prompt_tokens||0,outputTokens:t?.completion_tokens||0,latencyMs:Date.now()-s.startTime})):N(s=>({...s,[e]:{...s[e],streaming:!1,usage:t}})),delete M.current[e])},[]),onError:(0,r.useCallback)((e,t)=>{let s,a=M.current[e];if(!a)return;let r=((s=(s=(s=(s=(s="string"==typeof t?t:String(t??"")).replace(/https?:\/\/[^\s"'<>]+/g,"[url]")).replace(/(Bearer\s+)[A-Za-z0-9._\-]{16,}/gi,"$1[token]")).replace(/(signature=)[A-Za-z0-9%+/=]{16,}/gi,"$1[sig]")).replace(/\{[\s\S]{80,}\}/g,"[provider json]")).length>300&&(s=s.slice(0,297)+"..."),s.trim());"single"===a.mode?b(e=>e.map(e=>e.id===a.assistantId?{...e,content:`❌ Error: ${r}`,streaming:!1,error:!0}:e)):N(t=>({...t,[e]:{...t[e],content:`❌ ${r}`,streaming:!1,error:!0}})),delete M.current[e]},[])}),es=(0,r.useCallback)(async()=>{G(null);try{let[e,t,s]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/v1/models")]),a=await e.json();o((a.connections||[]).filter(e=>!1!==e.isActive));let r=await t.json();d(r.aliases||{});let n=((await s.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(n),n.length>0&&P(e=>e[0]?e:[n[0].id])}catch(e){G(e?.message||"Failed to load models")}},[]);(0,r.useEffect)(()=>{(async()=>{x(function(){try{let e=localStorage.getItem(_);return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(I.current=s.key)}catch{}try{let e=await fetch("/api/settings"),t=await e.json(),s=!0===t.requireApiKey;Y(s&&!I.current)}catch{Y(!1)}await es(),t(!1)})()},[es]),(0,r.useEffect)(()=>{"single"===w&&(K.current=!1)},[w]);let ea=(0,r.useCallback)(()=>{f.length>0&&g&&el(g,f),L(null),b([]),h(null),E({}),N({})},[f,g]),er=(0,r.useCallback)(e=>{f.length>0&&g&&el(g,f),b(e.messages||[]),h(e.id),e.model&&P([e.model]),e.params&&z(e.params),E({}),N({})},[f,g]),en=(0,r.useCallback)(e=>{let t=u.filter(t=>t.id!==e);x(t),O(t),g===e&&(h(null),b([]))},[u,g]),el=(0,r.useCallback)((e,t)=>{let s=u.map(s=>s.id===e?{...s,messages:t.slice(-60),updatedAt:Date.now()}:s).slice(0,100);x(s),O(s)},[u]),ei=(0,r.useCallback)(()=>{if(0===f.length)return;let e=g||R(),t={id:e,title:f.find(e=>"user"===e.role)?.content?.slice(0,40)||"New Chat",messages:f.slice(-60),model:C[0],params:$,createdAt:Date.now(),updatedAt:Date.now()},s=(u.find(t=>t.id===e)?u.map(s=>s.id===e?{...s,...t}:s):[t,...u]).slice(0,100);x(s);let a=O(s);h(e),W(a)},[f,g,u,C,$,W]),eo=(0,r.useCallback)((e,t=[])=>{let s=t.length>0,a={role:"user",content:s?[{type:"text",text:e},...t.map(e=>({type:"image_url",image_url:{url:e.dataUrl}}))]:e,id:R(),displayText:e,displayAttachments:s?t:void 0},r=[...f];$.systemPrompt&&r.unshift({role:"system",content:$.systemPrompt});let n=[...r.slice(-50),a],l={temperature:$.temperature,max_tokens:$.maxTokens,top_p:$.topP};return $.frequencyPenalty&&(l.frequency_penalty=$.frequencyPenalty),$.presencePenalty&&(l.presence_penalty=$.presencePenalty),$.topK&&(l.top_k=$.topK),null!=$.seed&&(l.seed=$.seed),$.reasoningEffort&&(l.reasoning_effort=$.reasoningEffort),{userMsg:a,baseMessages:n,requestParams:l}},[f,$]),ec=(0,r.useCallback)(async(e,t=[])=>{let{userMsg:s,baseMessages:a,requestParams:r}=eo(e,t),n=I.current,l=Date.now();if("single"===w){let e=C[0];if(!e)return;let t=R();b([...a.filter(e=>"system"!==e.role).map(e=>"user"===e.role?{...e,content:e.displayText??e.content,attachments:e.displayAttachments}:e),{role:"assistant",content:"",reasoning:"",id:t,model:e,streaming:!0}]),M.current.single={mode:"single",assistantId:t,modelId:e,startTime:l},await X("single",{body:{model:e,messages:a,...r},apiKey:n})}else{let e=C.filter(Boolean);if(0===e.length)return;N({}),e.forEach(e=>{M.current[e]={mode:"compare",modelId:e,startTime:l}}),await Promise.allSettled(e.map(e=>X(e,{body:{model:e,messages:a,...r},apiKey:n}))),E({compareLatencyMs:Date.now()-l,models:e.length})}},[w,C,eo,X]),ed=(0,r.useCallback)(async(e,t=[])=>{if((e.trim()||0!==t.length)&&!et){if("compare"===w&&!K.current&&C.filter(Boolean).length>1)return void L({text:e,attachments:t});await ec(e,t)}},[w,et,C,ec]),em=(0,r.useCallback)(()=>{K.current=!0,F&&(ec(F.text,F.attachments),L(null))},[F,ec]),eu=(0,r.useCallback)(()=>{ee(),M.current={},b(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),N(e=>{let t={};for(let[s,a]of Object.entries(e))t[s]={...a,streaming:!1};return t})},[ee]);return e?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,a.jsx)(n.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:w,onChange:k,size:"sm"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:et?"stop":"save",onClick:et?eu:ei,disabled:!et&&0===f.length,children:et?"Stop":"Save"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"history",className:"lg:hidden","aria-label":"Open history",onClick:()=>V("history")}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"tune",className:"lg:hidden","aria-label":"Open parameters",onClick:()=>V("params")}),B&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",role:"status","aria-live":"polite",children:["saved"===B&&"Saved","stripped"===B&&"Saved — images removed to fit storage","failed"===B&&"Save failed"]})]})}),(J||Z)&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[J&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-warning/30 bg-warning/5 px-3 py-2 text-xs text-warning",children:[(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{children:"API key required."})," The gateway requires an API key for requests, but no active key was found — sends will fail with a 401."]}),(0,a.jsx)("a",{href:"/dashboard/endpoint",className:"shrink-0 font-semibold underline hover:text-warning/80",children:"Create an API key →"})]}),Z&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-danger/30 bg-danger/5 px-3 py-2 text-xs text-danger",children:[(0,a.jsxs)("span",{className:"truncate",children:["Failed to load models: ",Z]}),(0,a.jsx)(n.$n,{size:"sm",variant:"outline",icon:"refresh",onClick:es,children:"Retry"})]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,a.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,a.jsx)(j,{sessions:u,currentSession:g,onNew:ea,onLoad:er,onDelete:en})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===w?(0,a.jsx)(m,{models:s,value:C[0],onChange:e=>P([e]),activeProviders:i,modelAliases:c}):(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[C.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(m,{models:s,value:e,onChange:e=>{let s=[...C];s[t]=e,P(s)},compact:!0,activeProviders:i,modelAliases:c}),C.length>2&&(0,a.jsx)("button",{onClick:()=>P(C.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),C.length<4&&(0,a.jsxs)("button",{onClick:()=>P([...C,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===w?(0,a.jsx)(T,{messages:f,onSend:ed,streaming:et,stats:D}):(0,a.jsx)("div",{className:"flex min-w-0 gap-3",children:C.filter(Boolean).map(e=>{let t=v[e];return(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,a.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,a.jsxs)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:[t?.reasoning&&(0,a.jsxs)("details",{className:"mb-2 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,a.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs italic text-text-muted",children:t.reasoning})]}),t?.content?(0,a.jsxs)("div",{className:`text-sm ${t.error?"text-danger":"text-text-main"}`,children:[t.error?(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words",children:t.content}):(0,a.jsx)(S,{content:t.content,role:"assistant"}),t.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:et?"Waiting...":"Send a message to compare"})]})]},e)})}),(0,a.jsx)(q,{onSend:ed,streaming:et,onStop:eu}),Object.keys(D).length>0&&(0,a.jsx)(y,{stats:D,mode:w})]}),(0,a.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,a.jsx)(p,{params:$,onChange:z,selectedModel:C[0]})})]}),(0,a.jsx)(n.uo,{isOpen:!!F,onClose:()=>L(null),onConfirm:em,title:"Send to multiple models at once?",message:F?`Compare mode sends this exact prompt to ${C.filter(Boolean).length} models simultaneously. One request becomes ${C.filter(Boolean).length} upstream calls (~${C.filter(Boolean).length}\xd7 the tokens of a single request), billed by each provider.`:"",confirmText:"Compare all",cancelText:"Cancel",variant:"secondary"}),(0,a.jsx)(n.aF,{isOpen:"history"===Q,onClose:()=>V(null),title:"History",size:"lg",children:(0,a.jsx)("div",{className:"max-h-[70vh] overflow-y-auto",children:(0,a.jsx)(j,{sessions:u,currentSession:g,onNew:ea,onLoad:e=>{er(e),V(null)},onDelete:en})})}),(0,a.jsx)(n.aF,{isOpen:"params"===Q,onClose:()=>V(null),title:"Parameters",size:"lg",children:(0,a.jsx)(p,{params:$,onChange:z,selectedModel:C[0]})})]})}function q({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,r.useState)(""),[i,o]=(0,r.useState)([]),c=(0,r.useRef)(null),d=e=>{if(!e||!e.type.startsWith("image/")||e.size>5242880)return;let t=new FileReader;t.onload=()=>{o(s=>[...s,{id:R(),dataUrl:t.result,name:e.name}])},t.readAsDataURL(e)},m=()=>{(n.trim()||0!==i.length)&&!t&&(e(n,i),l(""),o([]),c.current&&(c.current.style.height="auto"))},u=(n.trim()||i.length>0)&&!t;return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[i.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,a.jsxs)("div",{className:"group relative",children:[(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-16 w-16 rounded-lg border border-border-subtle object-cover"}),(0,a.jsx)("button",{onClick:()=>o(t=>t.filter(t=>t.id!==e.id)),className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-danger text-white opacity-0 transition-opacity group-hover:opacity-100",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.id))}),(0,a.jsxs)("div",{className:"flex items-end gap-2",children:[(0,a.jsx)("textarea",{ref:c,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let s=!1;for(let e of t)e.type.startsWith("image/")&&(s=!0,d(e.getAsFile()));s&&e.preventDefault()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),m())},placeholder:"Send a message... (Enter to send, Shift+Enter for newline, paste images)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,a.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop","aria-label":"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,a.jsx)("button",{onClick:m,disabled:!u,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send","aria-label":"Send",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})]})}}},e=>{e.O(0,[27,1992,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=45518)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{3658:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},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})]})]})}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=3658)),_N_E=e.O()}]);