@rabbi696/ezrouter 0.6.22 → 0.6.23

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 (928) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +5 -5
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  5. package/app/.next-cli-build/required-server-files.json +3 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  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/profile/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +26 -6
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/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/routing-health/page.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  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 +1 -1
  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/(dashboard)/dashboard/wakeup/page.js +1 -1
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  109. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  111. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  112. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  114. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  115. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  116. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  117. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +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/stop/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +2 -2
  241. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +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/inworld/voices/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  304. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  384. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  457. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  496. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/wakeup/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/wakeup/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  500. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/callback.html +1 -1
  503. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  504. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  505. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  507. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  512. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  517. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  519. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  522. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  527. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  529. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  532. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  537. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  539. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  540. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +6 -6
  542. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +4 -4
  549. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  552. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  557. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  559. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +6 -6
  562. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +6 -6
  568. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +4 -4
  570. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +2 -2
  571. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +6 -6
  573. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  578. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +6 -6
  579. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +4 -4
  581. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +6 -6
  584. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  588. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +6 -6
  589. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +4 -4
  591. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  594. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  600. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  602. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  603. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  605. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  610. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  612. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  613. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  615. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  620. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  622. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  623. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  625. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  630. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  631. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  632. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  633. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  634. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  636. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  637. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  638. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  640. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  641. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  642. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  643. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  644. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  646. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  649. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  650. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  651. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  652. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  653. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  654. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  655. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  656. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  657. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  660. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  661. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  662. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  663. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  664. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  665. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  666. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  667. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  670. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  671. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  672. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  673. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  674. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  675. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +6 -6
  676. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  677. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  679. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  680. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +6 -6
  681. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  682. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +4 -4
  683. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +2 -2
  684. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  685. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  686. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  687. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  688. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  689. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  690. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  691. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  692. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  693. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  695. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  696. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  697. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  698. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  699. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  700. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  701. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  702. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  703. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  704. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  705. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  706. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  707. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  709. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  710. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  712. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  713. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  714. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  715. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  716. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  717. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  718. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  719. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  720. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  721. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  722. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  723. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  724. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  725. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  726. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  727. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  728. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  729. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  730. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  731. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  732. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  733. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  734. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  735. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  736. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  737. package/app/.next-cli-build/server/app/dashboard/wakeup.html +1 -1
  738. package/app/.next-cli-build/server/app/dashboard/wakeup.rsc +6 -6
  739. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup/__PAGE__.segment.rsc +2 -2
  740. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup.segment.rsc +1 -1
  741. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  742. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  743. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_full.segment.rsc +6 -6
  744. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_head.segment.rsc +1 -1
  745. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_index.segment.rsc +4 -4
  746. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_tree.segment.rsc +2 -2
  747. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  748. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  749. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  750. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  751. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  752. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  753. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  754. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  755. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  756. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  757. package/app/.next-cli-build/server/app/index.html +1 -1
  758. package/app/.next-cli-build/server/app/index.rsc +4 -4
  759. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  760. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  761. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  762. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  763. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  764. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  765. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  766. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  767. package/app/.next-cli-build/server/app/landing.html +1 -1
  768. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  769. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  770. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  771. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  772. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  773. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  774. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  775. package/app/.next-cli-build/server/app/login/page.js +1 -1
  776. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  777. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  778. package/app/.next-cli-build/server/app/login.html +1 -1
  779. package/app/.next-cli-build/server/app/login.rsc +5 -5
  780. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  781. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  782. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  783. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  784. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  785. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  786. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  787. package/app/.next-cli-build/server/app/page.js +1 -1
  788. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  789. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  790. package/app/.next-cli-build/server/app-paths-manifest.json +5 -5
  791. package/app/.next-cli-build/server/chunks/1446.js +1 -1
  792. package/app/.next-cli-build/server/chunks/1482.js +2 -2
  793. package/app/.next-cli-build/server/chunks/1522.js +1 -1
  794. package/app/.next-cli-build/server/chunks/1530.js +1 -0
  795. package/app/.next-cli-build/server/chunks/1561.js +9 -0
  796. package/app/.next-cli-build/server/chunks/1641.js +1 -1
  797. package/app/.next-cli-build/server/chunks/1733.js +5 -1
  798. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  799. package/app/.next-cli-build/server/chunks/1923.js +1 -0
  800. package/app/.next-cli-build/server/chunks/2072.js +255 -0
  801. package/app/.next-cli-build/server/chunks/2180.js +1 -1
  802. package/app/.next-cli-build/server/chunks/2348.js +1 -1
  803. package/app/.next-cli-build/server/chunks/2414.js +1 -0
  804. package/app/.next-cli-build/server/chunks/2687.js +1 -1
  805. package/app/.next-cli-build/server/chunks/2898.js +1 -1
  806. package/app/.next-cli-build/server/chunks/290.js +1 -1
  807. package/app/.next-cli-build/server/chunks/2937.js +1 -0
  808. package/app/.next-cli-build/server/chunks/3092.js +1 -1
  809. package/app/.next-cli-build/server/chunks/3159.js +9 -0
  810. package/app/.next-cli-build/server/chunks/321.js +2 -2
  811. package/app/.next-cli-build/server/chunks/3245.js +1 -1
  812. package/app/.next-cli-build/server/chunks/3433.js +4 -4
  813. package/app/.next-cli-build/server/chunks/3449.js +1 -1
  814. package/app/.next-cli-build/server/chunks/3547.js +1 -1
  815. package/app/.next-cli-build/server/chunks/3548.js +9 -0
  816. package/app/.next-cli-build/server/chunks/369.js +9 -9
  817. package/app/.next-cli-build/server/chunks/3759.js +5 -0
  818. package/app/.next-cli-build/server/chunks/3794.js +1 -1
  819. package/app/.next-cli-build/server/chunks/3966.js +1 -1
  820. package/app/.next-cli-build/server/chunks/3977.js +1 -1
  821. package/app/.next-cli-build/server/chunks/4017.js +1 -0
  822. package/app/.next-cli-build/server/chunks/412.js +5 -5
  823. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  824. package/app/.next-cli-build/server/chunks/4190.js +1 -1
  825. package/app/.next-cli-build/server/chunks/4370.js +2 -0
  826. package/app/.next-cli-build/server/chunks/4642.js +1 -0
  827. package/app/.next-cli-build/server/chunks/4807.js +1 -1
  828. package/app/.next-cli-build/server/chunks/4811.js +1 -1
  829. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  830. package/app/.next-cli-build/server/chunks/4878.js +1 -1
  831. package/app/.next-cli-build/server/chunks/4882.js +1 -1
  832. package/app/.next-cli-build/server/chunks/5005.js +1 -0
  833. package/app/.next-cli-build/server/chunks/5251.js +1 -1
  834. package/app/.next-cli-build/server/chunks/5292.js +1 -1
  835. package/app/.next-cli-build/server/chunks/5434.js +1 -1
  836. package/app/.next-cli-build/server/chunks/5460.js +4 -4
  837. package/app/.next-cli-build/server/chunks/5749.js +1 -1
  838. package/app/.next-cli-build/server/chunks/5872.js +1 -1
  839. package/app/.next-cli-build/server/chunks/6038.js +1 -1
  840. package/app/.next-cli-build/server/chunks/6103.js +1 -1
  841. package/app/.next-cli-build/server/chunks/615.js +1 -1
  842. package/app/.next-cli-build/server/chunks/6569.js +1 -1
  843. package/app/.next-cli-build/server/chunks/6646.js +1 -0
  844. package/app/.next-cli-build/server/chunks/6708.js +1 -1
  845. package/app/.next-cli-build/server/chunks/6889.js +3 -0
  846. package/app/.next-cli-build/server/chunks/6988.js +1 -1
  847. package/app/.next-cli-build/server/chunks/7144.js +1 -0
  848. package/app/.next-cli-build/server/chunks/722.js +1 -0
  849. package/app/.next-cli-build/server/chunks/7511.js +9 -0
  850. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  851. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  852. package/app/.next-cli-build/server/chunks/7811.js +1 -1
  853. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  854. package/app/.next-cli-build/server/chunks/7982.js +9 -0
  855. package/app/.next-cli-build/server/chunks/7995.js +2 -2
  856. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  857. package/app/.next-cli-build/server/chunks/823.js +1 -1
  858. package/app/.next-cli-build/server/chunks/8243.js +1 -1
  859. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  860. package/app/.next-cli-build/server/chunks/8327.js +24 -15
  861. package/app/.next-cli-build/server/chunks/8459.js +1 -1
  862. package/app/.next-cli-build/server/chunks/8670.js +1 -0
  863. package/app/.next-cli-build/server/chunks/8950.js +1 -1
  864. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  865. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  866. package/app/.next-cli-build/server/chunks/9485.js +1 -1
  867. package/app/.next-cli-build/server/chunks/9616.js +1 -1
  868. package/app/.next-cli-build/server/chunks/9761.js +2 -2
  869. package/app/.next-cli-build/server/chunks/9843.js +1 -1
  870. package/app/.next-cli-build/server/chunks/9865.js +1 -1
  871. package/app/.next-cli-build/server/chunks/9898.js +2 -2
  872. package/app/.next-cli-build/server/instrumentation.js +1 -1
  873. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  874. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  875. package/app/.next-cli-build/server/middleware.js +5 -5
  876. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  877. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  878. package/app/.next-cli-build/server/pages/404.html +1 -1
  879. package/app/.next-cli-build/server/pages/500.html +1 -1
  880. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  881. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  882. package/app/.next-cli-build/static/chunks/1321-374cf8300fa9283a.js +1 -0
  883. package/app/.next-cli-build/static/chunks/5497-552ad04ae3380014.js +17 -0
  884. package/app/.next-cli-build/static/chunks/{6252-0f14a5b69160c9da.js → 6252-361b1d5b9d98e0f6.js} +1 -1
  885. package/app/.next-cli-build/static/chunks/6509-8408cfa51bab02b8.js +1 -0
  886. package/app/.next-cli-build/static/chunks/8105-2341cae0a3b70fc9.js +1 -0
  887. package/app/.next-cli-build/static/chunks/9227-08a1ad2fd60f90a1.js +5 -0
  888. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-2ac64e666515ee53.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-1f6447383234195f.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-948cbe61db1d6e26.js → page-94eb5202d9b42b30.js} +1 -1
  891. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-886fa42ab104c02b.js → page-5b823a675c71106d.js} +2 -2
  892. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-9e25e5d249d9c772.js +27 -0
  893. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-61cabb346811532e.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-ed31b8fb16ed1c2c.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/wakeup/{page-cc38ba001d74e072.js → page-97d58b76627b2b45.js} +1 -1
  896. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-0441382e88eeda7c.js → layout-afb8830458a68375.js} +1 -1
  897. package/app/.next-cli-build/static/chunks/{webpack-63e69ceb57f8fc86.js → webpack-d3b25b624caf2b22.js} +1 -1
  898. package/app/.next-cli-build/static/css/09d93ff4fa82a09d.css +1 -0
  899. package/app/CHANGELOG.md +32 -0
  900. package/app/package.json +1 -1
  901. package/app/public/CHANGELOG.md +32 -0
  902. package/app/server.js +1 -1
  903. package/package.json +1 -1
  904. package/src/cli/api/client.js +28 -9
  905. package/src/cli/utils/modelSelector.js +4 -2
  906. package/app/.next-cli-build/server/chunks/1133.js +0 -1
  907. package/app/.next-cli-build/server/chunks/1837.js +0 -3
  908. package/app/.next-cli-build/server/chunks/3275.js +0 -1
  909. package/app/.next-cli-build/server/chunks/5743.js +0 -254
  910. package/app/.next-cli-build/server/chunks/6464.js +0 -1
  911. package/app/.next-cli-build/server/chunks/6765.js +0 -1
  912. package/app/.next-cli-build/server/chunks/7358.js +0 -1
  913. package/app/.next-cli-build/server/chunks/7362.js +0 -2
  914. package/app/.next-cli-build/server/chunks/8540.js +0 -1
  915. package/app/.next-cli-build/server/chunks/9352.js +0 -1
  916. package/app/.next-cli-build/static/chunks/1321-8a4ed98cd27f3c72.js +0 -1
  917. package/app/.next-cli-build/static/chunks/5497-b45e1c7b332ddf12.js +0 -17
  918. package/app/.next-cli-build/static/chunks/6509-3113291463d9844c.js +0 -1
  919. package/app/.next-cli-build/static/chunks/8105-09b5824ceb7fd21b.js +0 -1
  920. package/app/.next-cli-build/static/chunks/9227-96f7384b30545e0d.js +0 -5
  921. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b29a8b9ee4742767.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-862a88526522df85.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-5cddf336494d65c2.js +0 -27
  924. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bb32b01b204c30e6.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-c804bcf327d3ef5a.js +0 -1
  926. package/app/.next-cli-build/static/css/99e24003a7301d8b.css +0 -1
  927. /package/app/.next-cli-build/static/{Y99WYOLLyt5Zmp6hx75Z1 → qhov0HpMB8g5P8LJxjypq}/_buildManifest.js +0 -0
  928. /package/app/.next-cli-build/static/{Y99WYOLLyt5Zmp6hx75Z1 → qhov0HpMB8g5P8LJxjypq}/_ssgManifest.js +0 -0
@@ -0,0 +1,5 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9227],{5784:(e,t,l)=>{"use strict";l.d(t,{default:()=>T});var s=l(95155),a=l(12115),r=l(14051),n=l.n(r),i=l(98500),o=l.n(i),d=l(35497),c=l(11059),m=l(15536);async function x(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(m.Iv)})).ok}catch{return!1}}async function u(...e){let t=e.filter(Boolean).map(x);return!!t.length&&new Promise(e=>{let l=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--l&&e(!1)}))})}var p=l(72767);function h({label:e,url:t,copyId:l,copied:a,onCopy:r,badge:n,actions:i}){return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===n||"TS"===n?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,s.jsx)(d.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)("button",{onClick:()=>r(t,l),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a===l?"check":"content_copy"})}),i]})}function b({status:e,className:t=""}){return(0,s.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,s.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function y({text:e}){return(0,s.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,s.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function g({message:e,action:t}){return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,s.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}var f=l(57250),j=l(88105);function v({value:e,onChange:t}){let[l,r]=(0,a.useState)([]),[n,i]=(0,a.useState)(!0),[o,d]=(0,a.useState)(()=>new Set);(0,a.useEffect)(()=>{let e=!1;return fetch("/v1/models",{cache:"no-store"}).then(e=>e.ok?e.json():{data:[]}).then(t=>{e||r(Array.isArray(t.data)?t.data:[])}).catch(()=>{e||r([])}).finally(()=>{e||i(!1)}),()=>{e=!0}},[]);let c=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let l of e){if(!l?.id||"string"!=typeof l.id||!l.id.includes("/"))continue;let e=l.owned_by||l.id.slice(0,l.id.indexOf("/")),s=l.id.slice(l.id.indexOf("/")+1);t.has(e)||t.set(e,[]),t.get(e).push(s)}return t})(l),[l]),m=(0,a.useMemo)(()=>Array.from(c.keys()).sort((e,t)=>e.localeCompare(t)),[c]),x=null==e,u=(0,a.useMemo)(()=>new Set(e?.providers||[]),[e]);(0,a.useMemo)(()=>new Set(e?.models||[]),[e]);let p=t=>{let l=`${t}/`;return(e?.models||[]).filter(e=>e.startsWith(l))},h=(e,l)=>{0===e.length?t(null):t({providers:e,models:l})},b=e=>{d(t=>{let l=new Set(t);return l.has(e)?l.delete(e):l.add(e),l})};return n?(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Loading available providers…"}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:x,onChange:e=>t(e.target.checked?null:{providers:[],models:[]})}),(0,s.jsx)("span",{children:"Unrestricted (key can reach every provider and model)"})]}),!x&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 max-h-80 overflow-y-auto border border-black/[0.06] dark:border-white/[0.06] rounded-lg p-2",children:[0===m.length&&(0,s.jsx)("p",{className:"text-sm text-text-muted px-2 py-1",children:"No providers configured yet."}),m.map(t=>{let l,a=(0,j.rs)(t),r=j.Q2[a],n=c.get(t)||[],i=(l=(0,j.rs)(t),u.has(t)||u.has(l)),d=p(t),m=o.has(t);return(0,s.jsxs)("div",{className:"border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 py-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:i,onChange:()=>{let l,s;return l=new Set(e?.providers||[]),s=(e?.models||[]).slice(),void(l.has(t)?(l.delete(t),s=s.filter(e=>!e.startsWith(`${t}/`))):l.add(t),h(Array.from(l),s))}}),(0,s.jsx)(f.A,{providerId:a,size:16}),(0,s.jsx)("button",{type:"button",className:"flex-1 text-left text-sm font-medium",onClick:()=>b(t),children:r?.name||t}),(0,s.jsx)("span",{className:"text-xs text-text-muted",children:i?0===d.length?`all ${n.length} models`:`${d.length}/${n.length} models`:""}),(0,s.jsx)("button",{type:"button",className:"material-symbols-outlined text-[16px] text-text-muted",onClick:()=>b(t),children:m?"expand_less":"expand_more"})]}),m&&(0,s.jsx)("div",{className:"pl-8 mt-1 flex flex-col gap-1",children:n.map(l=>{let a=`${t}/${l}`,r=i&&(0===d.length||d.includes(a));return(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("input",{type:"checkbox",checked:r,onChange:()=>{let s,a,r,n,i,o;return(a=new Set(e?.providers||[])).add(t),r=`${t}/${l}`,n=p(t),i=c.get(t)||[],o=(e?.models||[]).filter(e=>!e.startsWith(`${t}/`)),void(0===n.length?s=i.filter(e=>e!==l).map(e=>`${t}/${e}`):n.includes(r)?s=n.filter(e=>e!==r):(s=[...n,r]).length===i.length&&(s=[]),h(Array.from(a),[...o,...s]))}}),(0,s.jsx)("span",{className:"font-mono",children:l})]},a)})})]},t)})]})]})}v.propTypes={value:n().shape({providers:n().arrayOf(n().string),models:n().arrayOf(n().string)}),onChange:n().func.isRequired},Object.freeze({restricted:!1,allow:Object.freeze([])}),Object.freeze(["webSearch","webFetch"]);var k=l(31474);function w({apiKey:e,onChange:t,onRequestRestrict:l}){let r=e.access||{restricted:!1,allow:[]},[n,i]=(0,a.useState)(!1),[o,c]=(0,a.useState)([]),[m,x]=(0,a.useState)(!1),[u,p]=(0,a.useState)({}),[h,b]=(0,a.useState)({}),[y,g]=(0,a.useState)(""),[f,v]=(0,a.useState)(!1),N=async()=>{if(!m){x(!0);try{let[e,t,l]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/provider-nodes")]);if(e.ok&&c((await e.json()).connections||[]),t.ok&&p((await t.json()).aliases||{}),l?.ok){let e=await l.json(),t={};for(let l of e.nodes||[])l.id&&l.name&&(t[l.id]=l.name);b(t)}}catch(e){console.log("Error loading picker data:",e)}}},C=e=>t({restricted:!0,allow:e}),S=e=>{let t=String(e||"").trim();t&&!r.allow.some(e=>e.toLowerCase()===t.toLowerCase())&&C([...r.allow,t])},$=e=>C(r.allow.filter(t=>t!==e)),T=()=>{S(y),g("")},A=[],E=new Set;for(let e of o){let t=(0,j.wG)(e.provider)||e.provider,l=`${t}/*`;if(E.has(t)||r.allow.some(e=>e.toLowerCase()===l.toLowerCase()))continue;E.add(t);let s=h[e.provider]||e.providerSpecificData?.nodeName||j.Q2[e.provider]?.name||e.provider;A.push({value:l,label:s})}A.sort((e,t)=>e.label.localeCompare(t.label));let P=(0,a.useMemo)(()=>{let e=r.allow.length;return 0===e?"No models allowed":`${e} model${e>1?"s":""} allowed`},[r.allow.length]);return(0,s.jsxs)("div",{className:"mt-2","data-testid":"key-access",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2.5",children:[(0,s.jsx)(d.lM,{size:"sm",checked:r.restricted,label:"Restrict access",onChange:e=>{e?(v(!0),l()):(v(!1),t({restricted:!1,allow:r.allow}))}}),r.restricted&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:(0,k.cn)("inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium border",0===r.allow.length?"bg-amber-500/10 text-amber-700 dark:text-amber-400 border-amber-500/20":"bg-primary/10 text-primary border border-primary/20"),children:P}),(0,s.jsxs)("button",{type:"button",onClick:()=>{N(),v(e=>!e)},"aria-expanded":f,className:"inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-lg border border-black/10 dark:border-white/10 hover:bg-black/5 dark:hover:bg-white/5 text-text-main transition-colors select-none",children:[(0,s.jsx)("span",{children:"Configure Access"}),(0,s.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[16px] text-text-muted transition-transform duration-200",f?"rotate-180":""),children:"expand_more"})]})]})]}),r.restricted&&f&&(0,s.jsxs)("div",{className:"mt-2 flex flex-col gap-2 rounded-xl border border-black/[0.08] dark:border-white/[0.08] bg-black/[0.01] dark:bg-white/[0.01] p-3.5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[0===r.allow.length&&(0,s.jsx)("span",{className:"text-xs text-orange-500",children:"No combos or models allowed — this key can call nothing."}),r.allow.map(e=>{let t=function(e){if("string"!=typeof e||!e.endsWith("/*"))return null;let t=e.slice(0,-2).trim();return t&&!t.includes("/")?t:null}(e);return(0,s.jsxs)("span",{className:"flex items-center gap-1 rounded-xl border border-primary/30 bg-primary/10 px-2 py-0.5 font-mono text-xs text-text-main",title:t?`Every model of provider "${t}"`:void 0,children:[e,(0,s.jsx)("button",{type:"button",onClick:()=>$(e),className:"rounded text-text-muted hover:text-red-500",title:`Remove ${e}`,"aria-label":`Remove ${e}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"12px"},children:"close"})})]},e)}),(0,s.jsxs)("button",{type:"button",onClick:()=>{i(!0),N()},className:"flex items-center gap-0.5 rounded-xl border border-dashed border-black/10 px-2 py-0.5 text-xs font-medium text-primary hover:border-primary/50 dark:border-white/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"14px"},children:"add"}),"Add combo or model"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,s.jsxs)("select",{value:"",onFocus:N,onMouseDown:N,onChange:e=>S(e.target.value),className:"min-w-0 rounded-xl border border-black/10 bg-transparent px-2 py-0.5 text-xs text-text-main dark:border-white/10","aria-label":"Allow every model of a provider",children:[(0,s.jsx)("option",{value:"",disabled:!0,children:"All models of a provider…"}),A.map(e=>(0,s.jsxs)("option",{value:e.value,children:[e.label," (",e.value,")"]},e.value))]}),(0,s.jsx)("input",{value:y,onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),T())},placeholder:"Type a model, combo or provider/*","aria-label":"Type an allowed model, combo or provider/*",className:"min-w-0 flex-1 rounded-xl border border-black/10 bg-transparent px-2 py-0.5 font-mono text-xs text-text-main outline-none focus:border-primary/50 dark:border-white/10"}),(0,s.jsx)("button",{type:"button",onClick:T,disabled:!y.trim(),className:"rounded-xl border border-black/10 px-2 py-0.5 text-xs font-medium text-primary hover:border-primary/50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10",children:"Add"})]})]}),n&&(0,s.jsx)(d.rq,{isOpen:n,onClose:()=>i(!1),onSelect:e=>S(e?.value),onDeselect:e=>$(r.allow.find(t=>t.toLowerCase()===String(e?.value).toLowerCase())),activeProviders:o,modelAliases:u,title:`Allowed for "${e.name}"`,addedModelValues:r.allow,closeOnSelect:!1})]})}w.propTypes={apiKey:n().shape({id:n().string.isRequired,name:n().string,access:n().shape({restricted:n().bool,allow:n().arrayOf(n().string)})}).isRequired,onChange:n().func.isRequired,onRequestRestrict:n().func.isRequired};let N=[{label:"100K",value:"100000"},{label:"500K",value:"500000"},{label:"1M",value:"1000000"},{label:"5M",value:"5000000"},{label:"10M",value:"10000000"}];function C(e){let t=Math.max(0,Number(e)||0);return t>=1e6?`${(t/1e6).toFixed(+(t%1e6!=0))}M`:t>=1e3?`${(t/1e3).toFixed(+(t%1e3!=0))}K`:String(t)}function S({used:e,limit:t}){let l=Math.max(1,Number(t)||1),a=Math.max(0,Number(e)||0),r=Math.min(100,Math.round(a/l*100)),n=Math.max(0,l-a),i=r>=90?{bar:"bg-red-500",text:"text-red-600 dark:text-red-400"}:r>=75?{bar:"bg-amber-500",text:"text-amber-600 dark:text-amber-400"}:{bar:"bg-emerald-500",text:"text-text-muted"};return(0,s.jsxs)("div",{className:"mt-2 max-w-sm",title:`${C(a)} of ${C(l)} tokens used`,children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-3 text-[11px]",children:[(0,s.jsxs)("span",{className:i.text,children:[r,"% used"]}),(0,s.jsxs)("span",{className:"text-text-muted",children:[C(n)," remaining"]})]}),(0,s.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-black/10 dark:bg-white/10",role:"progressbar","aria-label":`Token usage: ${r}% used, ${C(n)} remaining`,"aria-valuemin":0,"aria-valuemax":l,"aria-valuenow":Math.min(a,l),children:(0,s.jsx)("div",{className:`h-full rounded-full transition-[width] duration-300 ${i.bar}`,style:{width:`${r}%`}})})]})}function $({apiKey:e,activeProviders:t,modelAliases:l,onClose:r,onSave:n}){let[i,o]=(0,a.useState)(e.expiresAt?e.expiresAt.slice(0,16):""),[c,m]=(0,a.useState)(e.allowedModels||[]),[x,u]=(0,a.useState)(""),[p,h]=(0,a.useState)(null==e.tokenLimit?"unlimited":"unchanged"),[b,y]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!1),j=null!=e.tokenLimit,v=async()=>{f(!0),await n({expiresAt:i||null,allowedModels:c,..."unlimited"===p?{tokenLimit:null}:x?{[j?"tokenLimitIncrement":"tokenLimit"]:x}:{}}),f(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.aF,{isOpen:!0,onClose:r,title:`Edit ${e.name}`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.pd,{label:"Expires at (optional)",type:"datetime-local",value:i,onChange:e=>o(e.target.value),hint:"Leave blank for no expiry."}),(0,s.jsx)(d.pd,{label:j?"Add tokens":"Set token limit",type:"number",min:"1",step:"1",value:x,onChange:e=>{let t=e.target.value;u(t),h(t?"amount":j?"unchanged":"unlimited")},placeholder:j?"e.g. 500000":"e.g. 1000000",hint:j?`Added to the current ${C(e.tokenLimit)} limit; usage is preserved.`:"Choose Unlimited to remove the limit."}),(0,s.jsxs)("div",{className:"-mt-2 flex flex-wrap gap-1.5","aria-label":"Token limit presets",children:[N.map(e=>{let t="amount"===p&&x===e.value;return(0,s.jsx)("button",{type:"button",onClick:()=>{u(e.value),h("amount")},"aria-pressed":t,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${t?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:e.label},e.value)}),(0,s.jsx)("button",{type:"button",onClick:()=>{u(""),h("unlimited")},"aria-pressed":"unlimited"===p,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${"unlimited"===p?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:"Unlimited"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"mb-1.5 block text-sm font-medium text-text-main",children:"Allowed models"}),(0,s.jsx)("div",{className:"flex min-h-12 flex-wrap gap-1 rounded-lg border border-border bg-surface-2 p-2",children:c.length?c.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs text-primary",children:[(0,s.jsx)("span",{children:e}),(0,s.jsx)("button",{type:"button",onClick:()=>m(t=>t.filter(t=>t!==e)),"aria-label":`Remove ${e}`,className:"material-symbols-outlined text-[14px]",children:"close"})]},e)):(0,s.jsx)("span",{className:"p-1 text-xs text-text-muted",children:"All models allowed"})}),(0,s.jsxs)("button",{type:"button",onClick:()=>y(!0),className:"mt-2 flex w-full items-center justify-center gap-1 rounded-lg border border-dashed border-black/10 py-2 text-xs font-medium text-primary dark:border-white/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"}),"Edit model access"]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:g,children:g?"Saving...":"Save changes"}),(0,s.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,disabled:g,children:"Cancel"})]})]})}),b&&(0,s.jsx)(d.rq,{isOpen:!0,onClose:()=>y(!1),onSelect:e=>m(t=>t.includes(e.value)?t:[...t,e.value]),onDeselect:e=>m(t=>t.filter(t=>t!==e.value)),activeProviders:t,modelAliases:l,addedModelValues:c,closeOnSelect:!1,title:"Edit allowed models"})]})}function T({machineId:e}){let[t,l]=(0,a.useState)([]),[r,n]=(0,a.useState)(!0),[i,f]=(0,a.useState)(!1),[j,k]=(0,a.useState)(""),[C,A]=(0,a.useState)(""),[E,P]=(0,a.useState)(""),[_,R]=(0,a.useState)([]),[O,L]=(0,a.useState)(!1),[U,F]=(0,a.useState)([]),[I,q]=(0,a.useState)({}),[D,M]=(0,a.useState)(null),[W,K]=(0,a.useState)(null),[z,J]=(0,a.useState)(null),[H,V]=(0,a.useState)(null),[B,Q]=(0,a.useState)(null),[Y,G]=(0,a.useState)(null),[X,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(!0),[el,es]=(0,a.useState)(!0),[ea,er]=(0,a.useState)(!1),[en,ei]=(0,a.useState)(!1),[eo,ed]=(0,a.useState)(!1),[ec,em]=(0,a.useState)(!1),[ex,eu]=(0,a.useState)(""),[ep,eh]=(0,a.useState)(""),[eb,ey]=(0,a.useState)(!1),[eg,ef]=(0,a.useState)(""),[ej,ev]=(0,a.useState)(null),[ek,ew]=(0,a.useState)(!1),[eN,eC]=(0,a.useState)(!1),[eS,e$]=(0,a.useState)(!1),[eT,eA]=(0,a.useState)(!1),[eE,eP]=(0,a.useState)(""),[e_,eR]=(0,a.useState)(!1),[eO,eL]=(0,a.useState)(""),[eU,eF]=(0,a.useState)(null),[eI,eq]=(0,a.useState)(""),[eD,eM]=(0,a.useState)(""),[eW,eK]=(0,a.useState)(null),[ez,eJ]=(0,a.useState)(!1),[eH,eV]=(0,a.useState)([]),[eB,eQ]=(0,a.useState)(""),[eY,eG]=(0,a.useState)(!1),[eX,eZ]=(0,a.useState)(!1),[e0,e1]=(0,a.useState)(!1),e5=(0,a.useRef)(null),e2=(0,a.useRef)(0),e4=(0,a.useRef)(0),e3=(0,a.useRef)(!1),e8=(0,a.useRef)(!1),e6=(0,a.useRef)(!1),e7=(0,a.useRef)(!1),[e9,te]=(0,a.useState)(!1),[tt,tl]=(0,a.useState)(!1),[ts,ta]=(0,a.useState)(new Set),[tr,tn]=(0,a.useState)(!1);(0,a.useEffect)(()=>{tn(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:ti,copy:to}=(0,c.C)(),td=!ee||!el,tc=ee?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,a.useEffect)(()=>{e5.current&&(e5.current.scrollTop=e5.current.scrollHeight)},[eH]),(0,a.useEffect)(()=>{tb(),tu()},[]),(0,a.useEffect)(()=>{if(!i&&!z)return;let e=!1;return Promise.all([fetch("/api/providers"),fetch("/api/models/alias")]).then(async([t,l])=>{let[s,a]=await Promise.all([t.ok?t.json():{},l.ok?l.json():{}]);e||(F(s.connections||[]),q(a.aliases||{}))}).catch(e=>console.log("Error loading model picker:",e)),()=>{e=!0}},[i,z]),(0,a.useEffect)(()=>{if(!(eo||eS))return;let e=!eo||ec,t=!eS||eT,l=()=>{document.hidden||tx()};document.addEventListener("visibilitychange",l);let s=setInterval(()=>{document.hidden||tx()},e&&t?m.YR:m.fl);return()=>{clearInterval(s),document.removeEventListener("visibilitychange",l)}},[eo,eS,ec,eT]),(0,a.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(eo&&(ex||ep)){let e=await u(ep,ex);e3.current=e,e?(e2.current=0,em(!0),e6.current||(e6.current=!0,te(!0))):(e2.current+=1,e2.current>=m.t6&&em(!1))}else e3.current=!1;if(eS&&eE){let e=await x(eE);e8.current=e,e?(e4.current=0,eA(!0),e7.current||(e7.current=!0,tl(!0))):(e4.current+=1,e4.current>=m.t6&&eA(!1))}else e8.current=!1}};if(!(eo&&(ex||ep)||eS&&eE))return;e();let t=!eS||eT,l=setInterval(e,(!eo||ec)&&t?m.N9:m.RL);return()=>clearInterval(l)},[eo,ex,ep,eS,eE,ec,eT]);let tm=(0,a.useCallback)((e,t,l,s,a,r)=>{t.current?(l.current=0,s(!0),a.current||(a.current=!0,r(!0))):(l.current+=1,l.current>=m.t6&&s(!1))},[]),tx=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),l=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,s=t.tunnel?.tunnelUrl||"";eu(s),eh(t.tunnel?.publicUrl||""),ed(l),tm(null,e3,e2,em,e6,te);let a=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,r=t.tailscale?.tunnelUrl||"";eP(r),e$(a),tm(null,e8,e4,eA,e7,tl)}catch{}},tu=async()=>{try{let[e,t]=await Promise.all([p.A.getState().fetchSettings(),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e&&(Z(e.requireApiKey||!1),et(!1!==e.requireLogin),es(e.hasPassword||!1),er(e.tunnelDashboardAccess||!1)),t.ok){let e=await t.json(),l=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,s=e.tunnel?.tunnelUrl||"";eu(s),eh(e.tunnel?.publicUrl||""),ed(l),tm(null,e3,e2,em,e6,te);let a=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,r=e.tailscale?.tunnelUrl||"";eP(r),e$(a),tm(null,e8,e4,eA,e7,tl)}}catch(e){console.log("Error loading settings:",e)}finally{ei(!1)}},tp=async e=>{try{await p.A.getState().patchSettings({tunnelDashboardAccess:e})&&er(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},th=async e=>{try{await p.A.getState().patchSettings({requireApiKey:e})&&Z(e)}catch(e){console.log("Error updating requireApiKey:",e)}},tb=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&l(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},ty=async(...e)=>{ey(!0),ef("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),l=Date.now();for(;Date.now()-l<m.Cp;){if(await new Promise(e=>setTimeout(e,m.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return ed(!0),ey(!1),ef(""),!0;if((Date.now()-l)%1e4<m.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return ev({type:"error",message:"Tunnel process stopped unexpectedly."}),ey(!1),ef(""),!1}}catch{}}return ev({type:"error",message:"Tunnel created but not reachable. Please try again."}),ey(!1),ef(""),!1},tg=async()=>{ew(!1),ey(!0),ev(null),ef("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let l=await t.json();l.download?.downloading?ef(`Downloading cloudflared... ${l.download.progress}%`):e&&ef("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let l=await t.json();if(!t.ok)return void ev({type:"error",message:l.error||"Failed to enable tunnel"});let s=l.tunnelUrl;if(!s)return void ev({type:"error",message:"No tunnel URL returned"});eu(s),eh(l.publicUrl||""),await ty(l.publicUrl,s)}catch(e){ev({type:"error",message:e.message})}finally{e=!1,ey(!1),ef("")}},tf=async()=>{ey(!0),ev(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(ed(!1),eu(""),eC(!1),ev({type:"success",message:"Tunnel disabled"})):ev({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){ev({type:"error",message:e.message})}finally{ey(!1)}},tj=async()=>{eK(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eK(t.installed),t}}catch{}return eK(!1),{installed:!1}},tv=async()=>{eJ(!0),eF(null),eV([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eB})});eQ("");let t=e.body.getReader(),l=new TextDecoder,s="";for(;;){let{done:e,value:a}=await t.read();if(e)break;let r=(s+=l.decode(a,{stream:!0})).split("\n\n");for(let e of(s=r.pop()||"",r)){let t=e.split("\n"),l="progress",s=null;for(let e of t)if(e.startsWith("event: ")&&(l=e.slice(7).trim()),e.startsWith("data: "))try{s=JSON.parse(e.slice(6))}catch{}if(s)if("progress"===l)eV(e=>[...e.slice(-50),s.message]);else if("done"===l){eK(!0),eJ(!1),eZ(!1),tC();return}else"error"===l&&eF({type:"error",message:s.error||"Install failed"})}}}catch(e){eF({type:"error",message:e.message})}finally{eJ(!1)}},tk=async e=>{eL("Waiting for Tailscale ready...");let t=`${e}/api/health`,l=Date.now();for(;Date.now()-l<m.Cp;){await new Promise(e=>setTimeout(e,m.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},tw=(e,t)=>{eq(e),eM(t)},tN=()=>{eq(""),eM("")},tC=async()=>{eZ(!1),eG(!0),eR(!0),eF(null),eL("Connecting..."),tN();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eP(t.tunnelUrl||"");let e=await tk(t.tunnelUrl);e$(!0),eF(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){tw(t.authUrl,"Open Login Page"),eL('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tN(),eL("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eP(t.tunnelUrl||"");let e=await tk(t.tunnelUrl);e$(!0),eF(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await tS(t.enableUrl):eF({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tN(),eF({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tS(t.enableUrl);eF({type:"error",message:t.error||"Failed to connect"})}catch(e){eF({type:"error",message:e.message})}finally{eR(!1),eG(!1),eL(""),tN()}},tS=async e=>{tw(e,"Open Funnel Settings"),eL('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tN(),eP(t.tunnelUrl||"");let e=await tk(t.tunnelUrl);e$(!0),eF(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tN(),eF({type:"error",message:t.error});return}}catch{}}tN(),eF({type:"error",message:"Timed out waiting for Funnel to be enabled."})},t$=async()=>{eR(!0),eF(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(e$(!1),eP(""),e1(!1),eF({type:"success",message:"Tailscale disabled"})):eF({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eF({type:"error",message:e.message})}finally{eR(!1)}},tT=async()=>{eF(null),eV([]);let e=await tj();e?.installed&&e?.hasCachedPassword?tC():eZ(!0)},tA=async()=>{if(j.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j,expiresAt:C||null,tokenLimit:E||null,allowedModels:_,scope:D})}),t=await e.json();e.ok&&(K(t.key),await tb(),k(""),A(""),P(""),R([]),L(!1),M(null),f(!1))}catch(e){console.log("Error creating key:",e)}},tE=async()=>{if(B)try{(await fetch(`/api/keys/${B.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:Y})})).ok&&(l(e=>e.map(e=>e.id===B.id?{...e,scope:Y}:e)),Q(null),G(null))}catch(e){console.log("Error updating key scope:",e)}},tP=async e=>{V({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{V(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(l(t.filter(t=>t.id!==e)),ta(t=>{let l=new Set(t);return l.delete(e),l}))}catch(e){console.log("Error deleting key:",e)}}})},t_=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&l(l=>l.map(l=>l.id===e?{...l,isActive:t}:l))}catch(e){console.log("Error toggling key:",e)}},tR=async(e,t)=>{let l=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw Error((await l.json()).error||"Failed to update key");await tb(),J(null)},tO=async(e,t)=>{try{let s=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({access:t})}),a=await s.json().catch(()=>({}));s.ok&&a.key?l(t=>t.map(t=>t.id===e?{...t,access:a.key.access}:t)):console.log("Error updating key access:",a.error||s.status)}catch(e){console.log("Error updating key access:",e)}},[tL,tU]=(0,a.useState)("/v1");return((0,a.useEffect)(()=>{tU(`${window.location.origin}/v1`)},[]),r)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.Qv,{}),(0,s.jsx)(d.Qv,{})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(h,{label:"Local",url:tL,copyId:"local_url",copied:ti,onCopy:to}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${eo?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),eo&&!eb&&ec?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.pd,{value:`${ep||ex}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)("button",{onClick:()=>to(`${ep||ex}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===ti?"check":"content_copy"})}),(0,s.jsx)("button",{onClick:()=>eC(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!eo||eb||ec?eb?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eg||"Creating tunnel..."]}),(0,s.jsx)("button",{onClick:()=>{ey(!1),ef("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ej?.type==="error"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ej.message]}),(0,s.jsx)(d.$n,{size:"sm",icon:"cloud_upload",onClick:()=>ew(!0),children:"Enable"})]}):en?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,s.jsx)("button",{onClick:()=>ei(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,s.jsx)(d.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{td?ev({type:"error",message:`Security required: ${tc}`}):X?ew(!0):ev({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e9?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,s.jsx)("button",{onClick:()=>eC(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${eS?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),eS&&!e_&&eT?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.pd,{value:`${eE}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)("button",{onClick:()=>to(`${eE}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===ti?"check":"content_copy"})}),(0,s.jsx)("button",{onClick:()=>e1(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!eS||e_||eT?e_||eY?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eO||"Connecting..."]}),eI&&(0,s.jsx)(d.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eI,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eD||"Open"}),(0,s.jsx)("button",{onClick:()=>{eR(!1),eG(!1),eL(""),tN()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eU?.type==="error"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eU.message]}),(0,s.jsx)(d.$n,{size:"sm",icon:"vpn_lock",onClick:tT,children:"Enable"})]}):(0,s.jsx)(d.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{td?eF({type:"error",message:`Security required: ${tc}`}):tT()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),tt?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,s.jsx)("button",{onClick:()=>e1(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),td&&!eo&&!eS&&(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(g,{message:tc,action:{label:"Open settings",href:"/dashboard/profile"}})}),(eo||eS)&&(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!X&&(0,s.jsx)(g,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!ee||!el)&&(0,s.jsx)(g,{message:ee?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:ee?"Change password":"Enable",href:"/dashboard/profile"}})]}),(eo||eS)&&(0,s.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,s.jsx)(d.lM,{checked:ea,onChange:()=>tp(!ea)}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,s.jsx)(y,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,s.jsxs)(d.Zp,{id:"require-api-key",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,s.jsx)(d.$n,{icon:"add",onClick:()=>f(!0),children:"Create Key"})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,s.jsx)(d.lM,{checked:X,onChange:()=>th(!X)})]}),tr&&!X&&(0,s.jsx)("div",{className:"mb-4 -mt-2",children:(0,s.jsx)(g,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,s.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,s.jsx)(d.$n,{icon:"add",onClick:()=>f(!0),children:"Create Key"})]}):(0,s.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,s.jsxs)("div",{className:`group flex items-start justify-between gap-3 py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1 min-w-0 flex-wrap",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono break-all min-w-0",children:ts.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,s.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,s.jsx)("button",{onClick:()=>{var t;return t=e.id,void ta(e=>{let l=new Set(e);return l.has(t)?l.delete(t):l.add(t),l})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:ts.has(e.id)?"Hide key":"Show key",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ts.has(e.id)?"visibility_off":"visibility"})}),(0,s.jsx)("button",{onClick:()=>to(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ti===e.id?"check":"content_copy"})})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1 flex-wrap text-xs text-text-muted",children:[(0,s.jsxs)("span",{children:["Created ",new Date(e.createdAt).toLocaleDateString(),e.expiresAt?` \xb7 Expires ${new Date(e.expiresAt).toLocaleString()}`:" \xb7 No expiry",null!=e.tokenLimit?` \xb7 ${e.tokensUsed}/${e.tokenLimit} tokens`:" \xb7 Unlimited tokens"]}),e.usage?.requests>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{children:"•"}),(0,s.jsxs)("span",{children:[e.usage.requests.toLocaleString()," reqs"]}),(0,s.jsx)("span",{children:"•"}),(0,s.jsxs)("span",{children:[e.usage.totalTokens.toLocaleString()," tokens"]}),(0,s.jsx)("span",{children:"•"}),(0,s.jsxs)(o(),{href:"/dashboard/usage?view=apiKey",className:"text-primary hover:underline font-medium inline-flex items-center gap-0.5",children:["View usage",(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] rtl:rotate-180",children:"arrow_forward"})]})]}):null]}),null!=e.tokenLimit&&(0,s.jsx)(S,{used:e.tokensUsed,limit:e.tokenLimit}),Array.isArray(e.allowedModels)&&e.allowedModels.length>0&&(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1 truncate",title:e.allowedModels.join(", "),children:["Models: ",e.allowedModels.join(", ")]}),!1===e.isActive&&(0,s.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"}),e.scope&&(0,s.jsxs)("p",{className:"text-xs text-primary mt-1",children:["Scoped (",(e.scope.providers||[]).length," provider",1===(e.scope.providers||[]).length?"":"s",")"]}),(0,s.jsx)(w,{apiKey:e,onChange:t=>tO(e.id,t),onRequestRestrict:()=>V({title:"Restrict API Key",message:`Restrict API key "${e.name}"?
2
+
3
+ It will only be able to call the combos and models you add. Until you add one, it can call nothing.`,onConfirm:async()=>{V(null),tO(e.id,{restricted:!0,allow:e.access?.allow||[]})}})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0 pt-0.5",children:[(0,s.jsx)("button",{onClick:()=>{Q(e),G(e.scope??null)},className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:"Edit scope",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"})}),(0,s.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?V({title:"Pause API Key",message:`Pause API key "${e.name}"?
4
+
5
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{V(null),t_(e.id,t)}}):t_(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,s.jsx)("button",{onClick:()=>J(e),className:"p-2 hover:bg-primary/10 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:"Edit key",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,s.jsx)("button",{onClick:()=>tP(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),z&&(0,s.jsx)($,{apiKey:z,activeProviders:U,modelAliases:I,onClose:()=>J(null),onSave:e=>tR(z.id,e)},z.id),(0,s.jsx)(d.aF,{isOpen:i,title:"Create API Key",onClose:()=>{f(!1),k(""),A(""),P(""),R([]),L(!1),M(null)},children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.pd,{label:"Key Name",value:j,onChange:e=>k(e.target.value),placeholder:"Production Key"}),(0,s.jsx)(d.pd,{label:"Expires at (optional)",type:"datetime-local",value:C,onChange:e=>A(e.target.value),hint:"Leave blank for no expiry."}),(0,s.jsx)(d.pd,{label:"Token limit (optional)",type:"number",min:"1",step:"1",value:E,onChange:e=>P(e.target.value),placeholder:"Unlimited",hint:"Total input and output tokens. Strictly enforced."}),(0,s.jsxs)("div",{className:"-mt-2 flex flex-wrap gap-1.5","aria-label":"Token limit presets",children:[N.map(e=>{let t=E===e.value;return(0,s.jsx)("button",{type:"button",onClick:()=>P(e.value),"aria-pressed":t,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${t?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:e.label},e.value)}),(0,s.jsx)("button",{type:"button",onClick:()=>P(""),"aria-pressed":!E,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${!E?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:"Unlimited"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Allowed models (optional)"}),0===_.length?(0,s.jsxs)("div",{className:"rounded-lg border border-dashed border-black/10 bg-black/[0.01] px-3 py-4 text-center dark:border-white/10 dark:bg-white/[0.01]",children:[(0,s.jsx)("span",{className:"material-symbols-outlined mb-1 text-xl text-text-muted",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"All models are allowed"})]}):(0,s.jsx)("div",{className:"flex max-h-28 flex-wrap gap-1 overflow-y-auto rounded-lg border border-border bg-surface-2 p-2",children:_.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs text-primary",children:[(0,s.jsx)("span",{className:"max-w-48 truncate",children:e}),(0,s.jsx)("button",{type:"button",onClick:()=>R(t=>t.filter(t=>t!==e)),"aria-label":`Remove ${e}`,className:"material-symbols-outlined text-[14px] hover:text-red-500",children:"close"})]},e))}),(0,s.jsxs)("button",{type:"button",onClick:()=>L(!0),className:"flex w-full items-center justify-center gap-1 rounded-lg border border-dashed border-black/10 py-2 text-xs font-medium text-primary transition-colors hover:border-primary/50 dark:border-white/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),_.length?"Add another model":"Choose models"]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Leave empty to allow every model."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Access Scope"}),(0,s.jsx)(v,{value:D,onChange:M})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:tA,fullWidth:!0,disabled:!j.trim(),children:"Create"}),(0,s.jsx)(d.$n,{onClick:()=>{f(!1),k(""),A(""),P(""),R([]),L(!1),M(null)},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,s.jsx)(d.aF,{isOpen:!!B,title:`Edit Scope — ${B?.name||""}`,onClose:()=>{Q(null),G(null)},children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(v,{value:Y,onChange:G}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:tE,fullWidth:!0,children:"Save"}),(0,s.jsx)(d.$n,{onClick:()=>{Q(null),G(null)},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),O&&(0,s.jsx)(d.rq,{isOpen:O,onClose:()=>L(!1),onSelect:e=>R(t=>t.includes(e.value)?t:[...t,e.value]),onDeselect:e=>R(t=>t.filter(t=>t!==e.value)),activeProviders:U,modelAliases:I,addedModelValues:_,closeOnSelect:!1,title:"Choose models for this API key"}),(0,s.jsx)(d.aF,{isOpen:!!W,title:"API Key Created",onClose:()=>K(null),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,s.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{value:W||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)(d.$n,{variant:"secondary",icon:"created_key"===ti?"check":"content_copy",onClick:()=>to(W,"created_key"),children:"created_key"===ti?"Copied!":"Copy"})]}),(0,s.jsx)(d.$n,{onClick:()=>K(null),fullWidth:!0,children:"Done"})]})}),(0,s.jsx)(d.aF,{isOpen:ek,title:"Enable Tunnel",onClose:()=>ew(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3",children:m.oX.map(e=>(0,s.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,s.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:tg,fullWidth:!0,children:"Start Tunnel"}),(0,s.jsx)(d.$n,{onClick:()=>ew(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,s.jsx)(d.aF,{isOpen:eN,title:"Disable Tunnel",onClose:()=>!eb&&eC(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:tf,fullWidth:!0,disabled:eb,variant:"danger",children:eb?"Disabling...":"Disable"}),(0,s.jsx)(d.$n,{onClick:()=>eC(!1),variant:"ghost",fullWidth:!0,disabled:eb,children:"Cancel"})]})]})}),(0,s.jsx)(d.aF,{isOpen:eX,title:"Tailscale Funnel",onClose:()=>{ez||(eZ(!1),eQ(""),eF(null))},children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eW&&(0,s.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eW&&!ez&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:tv,fullWidth:!0,children:"Install Tailscale"}),(0,s.jsx)(d.$n,{onClick:()=>eZ(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ez&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eH.length>0&&(0,s.jsx)("div",{ref:e5,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eH.map((e,t)=>(0,s.jsx)("div",{children:e},t))})]}),!0===eW&&!ez&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:()=>tC(),fullWidth:!0,children:"Connect"}),(0,s.jsx)(d.$n,{onClick:()=>eZ(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eU&&(0,s.jsx)(b,{status:eU})]})}),(0,s.jsx)(d.aF,{isOpen:e0,title:"Disable Tailscale",onClose:()=>!e_&&e1(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:t$,fullWidth:!0,disabled:e_,variant:"danger",children:e_?"Disabling...":"Disable"}),(0,s.jsx)(d.$n,{onClick:()=>e1(!1),variant:"ghost",fullWidth:!0,disabled:e_,children:"Cancel"})]})]})}),(0,s.jsx)(d.uo,{isOpen:!!H,onClose:()=>V(null),onConfirm:H?.onConfirm,title:H?.title||"Confirm",message:H?.message,variant:"danger"})]})}S.propTypes={used:n().number,limit:n().number.isRequired},$.propTypes={apiKey:n().object.isRequired,activeProviders:n().array.isRequired,modelAliases:n().object.isRequired,onClose:n().func.isRequired,onSave:n().func.isRequired},T.propTypes={machineId:n().string.isRequired}},15536:(e,t,l)=>{"use strict";l.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>x,N9:()=>m,Nv:()=>p,RL:()=>c,YR:()=>o,ev:()=>u,fl:()=>i,hT:()=>s,oX:()=>a,t6:()=>d});let s=["zh-CN","zh-TW"],a=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,o=3e4,d=5,c=1e4,m=6e4,x=5e3,u=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],p=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},59227:(e,t,l)=>{Promise.resolve().then(l.bind(l,5784))}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{25100:(e,t,s)=>{Promise.resolve().then(s.bind(s,58876))},58876:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>w});var a=s(95155),l=s(12115),r=s(44923),n=s(87256),i=s(39768),o=s(5020),d=s(35497),c=s(11059),m=s(929),x=s(88105),u=s(57151);function p(e,t,s){let a={...e};return"inherit"===s.fallbackStrategy?delete a[t]:a[t]={...a[t]||{},...s},a}let h="oc/jev-1.13-free",b=/^[a-zA-Z0-9_.\-]+$/,f=[{key:"vision",label:"Vision",icon:"visibility",desc:"images (png, jpg, webp, …)"},{key:"audioInput",label:"Audio",icon:"graphic_eq",desc:"audio input"}],g="oc/mimo-v2.6-flash-free",y={enabled:!0,roundRobin:!1,models:[]},j={vision:{...y},pdf:{...y},audioInput:{...y},videoInput:{...y}},v=e=>"oc/mimo-v2.5-free"===e?g:e,N=[{value:"inherit",label:"Inherit global strategy"},{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"auto",label:"Auto Router — select one tier"},{value:"weighted",label:"Weighted — random by weight"},{value:"fusion",label:"Fusion — panel + judge"},{value:"smart",label:"Smart — Jev complexity routing"}];function w(){let e,[t,s]=(0,l.useState)([]),[r,n]=(0,l.useState)(!0),[i,o]=(0,l.useState)(!1),[u,h]=(0,l.useState)(null),[b,g]=(0,l.useState)(null),[w,k]=(0,l.useState)([]),[C,M]=(0,l.useState)({}),[O,T]=(0,l.useState)("fallback"),[D,A]=(0,l.useState)(j),{getCaps:F}=(0,m.y)(),[P,R]=(0,l.useState)(null),[_,I]=(0,l.useState)(null),[z,q]=(0,l.useState)([]),[H,W]=(0,l.useState)(!1),{copied:B,copy:G}=(0,c.C)();(0,l.useEffect)(()=>{K()},[]),(0,l.useEffect)(()=>{let e=new Set(t.map(e=>e.id));q(t=>t.filter(t=>e.has(t)))},[t]);let J=t.filter(e=>z.includes(e.id)),V=t.length>0&&z.length===t.length,L=z.length>0,Q=()=>q([]),Z=async e=>{let t="cursor"===e?"Cursor Default":"Claude Default";I(e);try{let s=await fetch(`/api/combos/presets?source=${e}`),a=await s.json();if(!s.ok)return void alert(a.error||`Failed to preview ${t}`);let l=a.toCreate??(a.items||[]).filter(e=>!e.exists).length,r=a.toSkip??(a.items||[]).filter(e=>e.exists).length,n=(a.items||[]).length;if(0===n)return void alert(`No ${t} models available to generate.`);if(0===l)return void alert(`All ${n} ${t} combos already exist. Nothing to create.`);R({title:`Generate ${t}`,message:`Create ${l} combo${1===l?"":"s"} named like ${"cursor"===e?"Cursor":"Claude"} model IDs (seeded with cu/… or cc/…). ${r} already exist and will be skipped. You can edit any combo afterward to add fallbacks.`,confirmText:"Generate",variant:"primary",onConfirm:async()=>{R(e=>e?{...e,loading:!0}:null);try{let s=await fetch("/api/combos/presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:e})}),a=await s.json();if(!s.ok)return void alert(a.error||`Failed to generate ${t}`);await K(),R(null)}catch(e){console.log(`Error generating ${t}:`,e),alert(`Failed to generate ${t}`),R(e=>e?{...e,loading:!1}:null)}}})}catch(e){console.log(`Error previewing ${t}:`,e),alert(`Failed to preview ${t}`)}finally{I(null)}},K=async()=>{try{let[t,a,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),r=await t.json(),n=await a.json(),i=l.ok?await l.json():{};t.ok&&s((r.combos||[]).filter(e=>!x.rj.some(({id:t})=>t===e.kind))),a.ok&&k((n.connections||[]).filter(e=>!1!==e.isActive)),M(i.comboStrategies||{}),T(i.comboStrategy||"fallback");let o=i.capacityAdapter||{},d={};for(let t of f){var e;d[t.key]=(e=o[t.key],Array.isArray(e)?{enabled:!0,roundRobin:!1,models:e.map(e=>v(e?.model||e)).filter(Boolean)}:e&&"object"==typeof e?{enabled:!1!==e.enabled,roundRobin:!!e.roundRobin,models:Array.isArray(e.models)?e.models.map(v).filter(Boolean):[]}:{...y})}A(d)}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},U=async e=>{A(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({capacityAdapter:e})})}catch(e){console.log("Error updating capacity adapter:",e)}},Y=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await K(),o(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},X=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await K(),h(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},ee=(e,t=C)=>{let s={...t};for(let t of e)delete s[t];return s},et=async e=>{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})}),M(e)},es=async e=>{let a=t.find(t=>t.id===e);R({title:"Delete Combo",message:a?`Delete combo "${a.name}"?`:"Delete this combo?",onConfirm:async()=>{R(e=>e?{...e,loading:!0}:null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&(a?.name&&await et(ee([a.name])),s(t=>t.filter(t=>t.id!==e)),q(t=>t.filter(t=>t!==e))),R(null)}catch(e){console.log("Error deleting combo:",e),R(e=>e?{...e,loading:!1}:null)}}})},ea=async(e,t)=>{try{await et(p(C,e,t))}catch(e){console.log("Error updating combo strategy:",e)}},el=async e=>{if(0!==J.length&&e){W(!0);try{let t={...C};for(let s of J)t=p(t,s.name,{fallbackStrategy:e});await et(t)}catch(e){console.log("Error bulk updating combo strategy:",e),alert("Failed to update strategy for selected combos")}finally{W(!1)}}};return r?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,a.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," — tries models in order (next on failure)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," — rotates models across requests to spread load"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Auto Router"})," — classifies request complexity and selects one configured tier before normal routing"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," — queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Smart"})," — uses a System One classifier to pick the lead model by task complexity, then falls back normally"]})]}),(0,a.jsxs)("p",{className:"hidden text-xs text-text-muted mt-3 max-w-2xl",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Cursor / Claude Default"})," create combos named exactly like those clients' model IDs (e.g. ",(0,a.jsx)("code",{className:"font-mono",children:"composer-2.5"}),", ",(0,a.jsx)("code",{className:"font-mono",children:"opus"}),"), seeded with the matching ",(0,a.jsx)("code",{className:"font-mono",children:"cu/…"})," or ",(0,a.jsx)("code",{className:"font-mono",children:"cc/…"})," route so traffic can hit EzRouter without the prefix."," ",'Note: Cursor IDE itself often blocks built-in Composer / Grok from Override OpenAI Base URL ("model does not support custom API"); add them via Cursor\'s ',(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Add Custom Model"})," using the combo name, or pick a model Cursor allows through the custom endpoint."]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:items-stretch",children:[(0,a.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto whitespace-nowrap",children:"Create Combo"}),(0,a.jsxs)("div",{className:"hidden",children:[(0,a.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"edit_note",loading:"cursor"===_,disabled:!!_,onClick:()=>Z("cursor"),className:"w-full whitespace-nowrap",children:"Cursor Default"}),(0,a.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"smart_toy",loading:"claude"===_,disabled:!!_,onClick:()=>Z("claude"),className:"w-full whitespace-nowrap",children:"Claude Default"})]})]})]}),0===t.length?(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 rounded-lg border border-black/5 bg-black/[0.015] px-3 py-2 dark:border-white/5 dark:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-text-muted hover:text-primary select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:V,ref:e=>{e&&(e.indeterminate=L&&!V)},onChange:()=>{q(V?[]:t.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),(0,a.jsx)("span",{children:L?`${z.length} selected`:`Select all (${t.length})`})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:L&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-full min-w-[160px] sm:w-[200px]",children:(0,a.jsx)(d.l6,{options:N,value:"",placeholder:"Set strategy…",disabled:H,onChange:e=>{let t=e.target.value;t&&el(t)},selectClassName:"py-1.5 text-xs"})}),(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",disabled:H,loading:H,onClick:()=>{if(0===J.length)return;let e=J.length;R({title:"Delete Selected Combos",message:`Delete ${e} selected combo${1===e?"":"s"}? This cannot be undone.`,confirmText:"Delete",variant:"danger",onConfirm:async()=>{R(e=>e?{...e,loading:!0}:null),W(!0);try{let e=J.map(e=>e.id),t=J.map(e=>e.name),a=(await Promise.all(e.map(e=>fetch(`/api/combos/${e}`,{method:"DELETE"})))).filter(e=>!e.ok).length;await et(ee(t)),s(t=>t.filter(t=>!e.includes(t.id))),Q(),R(null),a>0&&alert(`Deleted with ${a} failure${1===a?"":"s"}.`)}catch(e){console.log("Error bulk deleting combos:",e),alert("Failed to delete selected combos"),R(e=>e?{...e,loading:!1}:null)}finally{W(!1)}}})},className:"whitespace-nowrap",children:["Delete (",z.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:Q,disabled:H,children:"Clear"})]})})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:(e=Object.fromEntries(t.map(e=>[e.name,e.models])),t.map(t=>(0,a.jsx)(S,{combo:t,getCaps:F,comboByName:e,activeProviders:w,copied:B,onCopy:G,onEdit:()=>h(t),onDelete:()=>es(t.id),onTest:()=>g(t),strategy:C[t.name]||{},globalComboStrategy:O,onSetStrategy:e=>ea(t.name,e),selected:z.includes(t.id),onToggleSelect:()=>{var e;return e=t.id,void q(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}},t.id)))})]}),(0,a.jsx)($,{capacityAdapter:D,onChange:U,activeProviders:w,getCaps:F}),b&&(0,a.jsx)(d.St,{isOpen:!!b,combo:b,onClose:()=>g(null),strategy:C[b.name]||{}}),i&&(0,a.jsx)(E,{isOpen:i,onClose:()=>o(!1),onSave:Y,onTestDraft:e=>g(e),activeProviders:w},"create"),u&&(0,a.jsx)(E,{isOpen:!!u,combo:u,onClose:()=>h(null),onSave:e=>X(u.id,e),onTestDraft:e=>g(e),activeProviders:w},u.id),(0,a.jsx)(d.uo,{isOpen:!!P,onClose:()=>!P?.loading&&R(null),onConfirm:P?.onConfirm,title:P?.title||"Confirm",message:P?.message,confirmText:P?.confirmText||"Confirm",variant:P?.variant||"danger",loading:!!P?.loading})]})}let k=e=>{if(!e)return"?";if(e>=1e6){let t=e/1e6;return`${Number.isInteger(t)?t:t.toFixed(1)}M`}return`${Math.round(e/1e3)}k`};function C({label:e,title:t,value:s,fallback:l,min:r,max:n,step:i,onCommit:o}){return(0,a.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] font-medium text-text-muted",title:t,children:[e,(0,a.jsx)("input",{type:"number",min:r,max:n,step:i,defaultValue:s??l,onBlur:e=>{var t;let a,i,d;return a=Number((t=e.target).value),d=(i=""!==t.value&&Number.isFinite(a)?Math.min(n,Math.max(r,a)):"")===l?"":i,void(t.value=""===d?l:d,d!==(s??"")&&o(d))},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},className:"w-16 rounded border border-border bg-transparent px-1 py-0.5 font-mono text-[11px] text-text-main focus:border-primary focus:outline-none"},s??"default")]})}function S({combo:e,getCaps:t,comboByName:s={},activeProviders:r=[],copied:n,onCopy:i,onEdit:o,onDelete:c,onTest:m,strategy:x={},globalComboStrategy:p="fallback",onSetStrategy:b,selected:f=!1,onToggleSelect:g}){let[y,j]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),$=x.fallbackStrategy||"inherit",M=x.judgeModel||"",O=x.smartClassifierModel||h,E="inherit"===$?p:$,T=(0,u.Q5)(e.models,s,t);return(0,a.jsxs)(d.Zp,{padding:"sm",className:`group ${f?"ring-1 ring-primary/40 bg-primary/[0.03]":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsx)("label",{className:"flex shrink-0 items-center pt-1 sm:pt-0 cursor-pointer",title:"Select combo",children:(0,a.jsx)("input",{type:"checkbox",checked:f,onChange:g,onClick:e=>e.stopPropagation(),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary","aria-label":`Select ${e.name}`})}),(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,l)=>(0,a.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,a.jsx)("span",{children:e}),(0,a.jsx)(d.nh,{caps:s[e]?(0,u.Q5)(s[e],s,t):t?.(e)})]},l)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),T&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["ctx ",k(T.contextWindow)]}),(0,a.jsx)("span",{className:"opacity-40",children:"\xb7"}),(0,a.jsxs)("span",{children:["max ",k(T.maxOutput)]})]}),"smart"===E&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Classifier"}),(0,a.jsxs)("button",{onClick:()=>w(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Choose any connected System One model; OpenCode Jev Free is the default",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"psychology"}),(0,a.jsx)("span",{className:"truncate",children:O})]}),x.smartClassifierModel&&(0,a.jsx)("button",{onClick:()=>b({smartClassifierModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:`Reset to ${h}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})}),(0,a.jsx)(C,{label:"Min conf.",title:"Below this classifier confidence the default combo order is kept (default 0.5)",value:""===x.smartMinConfidence?void 0:x.smartMinConfidence,fallback:.5,min:0,max:1,step:.05,onCommit:e=>b({smartMinConfidence:e})}),(0,a.jsx)(C,{label:"Timeout ms",title:"Classifier deadline; on timeout the default order is used (default 5000)",value:""===x.smartTimeoutMs?void 0:x.smartTimeoutMs,fallback:5e3,min:500,max:3e4,step:500,onCommit:e=>b({smartTimeoutMs:e})})]}),"fusion"===E&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,a.jsx)("span",{className:"truncate",children:M||`Auto — ${e.models[0]||"first model"}`})]}),M&&(0,a.jsx)("button",{onClick:()=>b({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,a.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,a.jsx)(d.l6,{options:N.map(e=>"inherit"===e.value?{...e,label:`Inherit global — ${p}`}:e),value:$,onChange:e=>b({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-1 sm:flex",children:[(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-primary transition-colors hover:bg-primary/10",title:"Test Run Combo",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight font-medium",children:"Test"})]}),(0,a.jsxs)("button",{onClick:t=>{t.stopPropagation(),i(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:n===`combo-${e.id}`?"check":"content_copy"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,a.jsxs)("button",{onClick:o,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:c,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),v&&(0,a.jsx)(d.rq,{isOpen:v,onClose:()=>w(!1),onSelect:e=>{b({smartClassifierModel:e?.value||""}),w(!1)},activeProviders:r,title:"Select System One Classifier",kindFilter:"systemone",addedModelValues:[O],closeOnSelect:!0}),y&&(0,a.jsx)(d.rq,{isOpen:y,onClose:()=>j(!1),onSelect:e=>{b({judgeModel:e?.value||""}),j(!1)},activeProviders:r,title:"Select Judge Model",addedModelValues:M?[M]:[],closeOnSelect:!0})]})}function $({capacityAdapter:e,onChange:t,activeProviders:s,getCaps:l}){return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Vision Adapter"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Your model can't read image/audio? Auto-switches to a model in the pool below."})]})}),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:f.map(r=>(0,a.jsx)(M,{cap:r,entry:e[r.key]||y,onChange:s=>t({...e,[r.key]:s}),activeProviders:s,getCaps:l},r.key))})]})}function M({cap:e,entry:t,onChange:s,activeProviders:r,getCaps:n}){let[i,o]=(0,l.useState)(!1),{enabled:c,roundRobin:m,models:x}=t,u=e=>s({...t,...e}),p=(e,t)=>{let s=e+t;if(s<0||s>=x.length)return;let a=[...x];[a[e],a[s]]=[a[s],a[e]],u({models:a})};return(0,a.jsxs)(d.Zp,{padding:"sm",className:`group ${!c?"opacity-50":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2.5 sm:items-center",children:[(0,a.jsx)(d.lM,{checked:c,onChange:e=>u({enabled:e}),"aria-label":`Enable ${e.label} adapter`}),(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:e.icon})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("code",{className:"font-mono text-sm font-medium",children:e.label}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["— ",e.desc]})]})})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer select-none",children:[(0,a.jsx)(d.lM,{checked:m,onChange:e=>u({roundRobin:e}),disabled:!c,"aria-label":`Round-robin ${e.label} adapter`}),(0,a.jsx)("span",{children:"Round"})]}),(0,a.jsx)(d.$n,{icon:"add",variant:"ghost",size:"sm",onClick:()=>o(!0),disabled:!c,title:`Add ${e.label} model`,children:"Add Model"})]})]}),0===x.length?(0,a.jsx)("div",{className:"mt-3 py-2 text-center text-xs text-text-muted italic",children:`No models in pool (will fallback to ${g})`}):(0,a.jsx)("div",{className:"mt-3 overflow-hidden rounded-lg border border-border/50",children:(0,a.jsxs)("table",{className:"w-full text-left text-xs",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border/40 bg-black/[0.02] text-text-muted dark:bg-white/[0.02]",children:[(0,a.jsx)("th",{className:"w-12 px-3 py-1.5 font-medium text-center",children:"#"}),(0,a.jsx)("th",{className:"px-3 py-1.5 font-medium",children:"Model"}),(0,a.jsx)("th",{className:"w-24 px-3 py-1.5 font-medium text-center",children:"Order"}),(0,a.jsx)("th",{className:"w-12 px-3 py-1.5 font-medium text-right"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/30 font-mono",children:x.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsxs)("td",{className:"px-3 py-2 text-center text-text-muted text-[11px] font-sans",children:["#",t+1]}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-main",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,a.jsx)("span",{className:"truncate",children:e}),(0,a.jsx)(d.nh,{caps:n?.(e)}),e===g&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 font-sans text-[10px] font-medium text-emerald-600 dark:text-emerald-400",children:"free default"})]})}),(0,a.jsx)("td",{className:"px-3 py-2 text-center",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>p(t,-1),disabled:!c||0===t,className:`p-1 rounded transition-colors ${!c||0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_upward"})}),(0,a.jsx)("button",{type:"button",onClick:()=>p(t,1),disabled:!c||t===x.length-1,className:`p-1 rounded transition-colors ${!c||t===x.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_downward"})})]})}),(0,a.jsx)("td",{className:"px-3 py-2 text-right",children:(0,a.jsx)("button",{type:"button",onClick:()=>{let e;u({models:0===(e=x.filter((e,s)=>s!==t)).length?[g]:e})},disabled:!c,className:`p-1 rounded transition-colors ${!c?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-red-500 hover:bg-red-500/10"}`,title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"close"})})})]},`${e}-${t}`))})]})}),i&&(0,a.jsx)(d.rq,{isOpen:i,onClose:()=>o(!1),onSelect:e=>{let t=e?.value||e?.name||e;!t||x.includes(t)||u({models:[...x,t]})},onDeselect:e=>{let t=e?.value||e?.name||e,s=x.filter(e=>e!==t);u({models:0===s.length?[g]:s})},activeProviders:r,title:`Add ${e.label} Model`,addedModelValues:x,capFilter:e.key,closeOnSelect:!1})]})}function O({id:e,index:t,model:s,weight:r=1,isFirst:o,isLast:d,onEdit:c,onWeightChange:m,onMoveUp:x,onMoveDown:u,onRemove:p}){let{attributes:h,listeners:b,setNodeRef:f,transform:g,isDragging:y}=(0,n.gl)({id:e}),j={transform:i.Ks.Transform.toString(g),opacity:y?.4:1,zIndex:y?999:void 0},[v,N]=(0,l.useState)(!1),[w,k]=(0,l.useState)(s),C=()=>{let e=w.trim();e&&e!==s?c(e):k(s),N(!1)};return(0,a.jsxs)("div",{ref:f,style:j,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${y?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,a.jsx)("button",{...h,...b,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,a.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),v?(0,a.jsx)("input",{autoFocus:!0,value:w,onChange:e=>k(e.target.value),onBlur:C,onKeyDown:e=>{"Enter"===e.key&&C(),"Escape"===e.key&&(k(s),N(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,a.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>N(!0),title:"Click to edit",children:s}),(0,a.jsxs)("label",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-text-muted",title:"Weight for Weighted strategy",children:["w",(0,a.jsx)("input",{type:"number",min:1,max:10,value:r,onChange:e=>m?.(e.target.value),className:"w-9 rounded border border-black/10 px-1 py-0.5 text-xs text-text-main dark:border-white/10 bg-transparent text-center"})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:x,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:u,disabled:d,className:`p-0.5 rounded ${d?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:p,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function E({isOpen:e,combo:t,onClose:s,onSave:i,onTestDraft:c,activeProviders:m,kindFilter:x=null}){let[u,p]=(0,l.useState)(t?.name||""),h=t?.members?.length?t.members:(t?.models||[]).map(e=>({id:e,weight:1})),[f,g]=(0,l.useState)(h),[y,j]=(0,l.useState)(!1),[v,N]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[C,S]=(0,l.useState)({}),[$,M]=(0,l.useState)(!1),[T,D]=(0,l.useState)(()=>t?.policy||t?.config?.policy||{}),[A,F]=(0,l.useState)(()=>t?.fusion||t?.config?.fusion||{}),P=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:n.JR})),R=f.map((e,t)=>({uid:`item-${t}`,id:e.id,weight:e.weight})),_=f.map(e=>e.id),I=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,l.useEffect)(()=>{e&&I()},[e]);let z=e=>e.trim()?b.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and . allowed"),!1):(k("Name is required"),!1),q=async()=>{if(!z(u))return;N(!0);let e=f.map(e=>e.id),t=f.some(e=>1!==(e.weight||1)),s={name:u.trim(),models:e};if(t||Object.keys(T).length||Object.keys(A).length){s.members=f;let e={};t&&(e.members=f),Object.keys(T).length&&(e.policy=T),Object.keys(A).length&&(e.fusion=A),Object.keys(e).length&&(s.config=e)}await i(s),N(!1)},H=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.aF,{isOpen:e,onClose:s,title:H?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.pd,{label:"Combo Name",value:u,onChange:e=>{let t=e.target.value;p(t),t?z(t):k("")},placeholder:"my-combo",error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"text-sm font-medium mb-1.5 block",children:["Models ",(0,a.jsx)("span",{className:"text-[11px] text-text-muted font-normal",children:"— weights matter for Weighted strategy"})]}),0===f.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)(r.Mp,{sensors:P,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=R.findIndex(e=>e.uid===t.id),a=R.findIndex(e=>e.uid===s.id);-1!==e&&-1!==a&&g(t=>(0,n.be)(t,e,a))}},modifiers:[o.FN,o.gj],children:(0,a.jsx)(n.gB,{items:R.map(e=>e.uid),strategy:n._G,children:(0,a.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:R.map(({uid:e,id:t,weight:s},l)=>(0,a.jsx)(O,{id:e,index:l,model:t,weight:s,isFirst:0===l,isLast:l===R.length-1,onEdit:e=>{let t=[...f];t[l]={...t[l],id:e},g(t)},onWeightChange:e=>{let t,s;return t=Math.max(1,Math.min(10,parseInt(e,10)||1)),void((s=[...f])[l]={...s[l],weight:t},g(s))},onMoveUp:()=>(e=>{if(0===e)return;let t=[...f];[t[e-1],t[e]]=[t[e],t[e-1]],g(t)})(l),onMoveDown:()=>(e=>{if(e===f.length-1)return;let t=[...f];[t[e],t[e+1]]=[t[e+1],t[e]],g(t)})(l),onRemove:()=>{g(f.filter((e,t)=>t!==l))}},e))})})}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]}),(0,a.jsxs)("div",{className:"rounded-lg border border-black/10 dark:border-white/10 p-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>M(e=>!e),className:"flex w-full items-center justify-between text-xs font-medium text-text-main",children:[(0,a.jsx)("span",{children:"Advanced — weights, retry, fusion tuning"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:$?"expand_less":"expand_more"})]}),$&&(0,a.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsxs)("label",{className:"text-xs",children:["Sticky (requests per model)",(0,a.jsx)("input",{type:"number",min:1,max:50,value:T.sticky||1,onChange:e=>D({...T,sticky:Math.max(1,parseInt(e.target.value,10)||1)}),className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]}),(0,a.jsxs)("label",{className:"text-xs",children:["Max Hops (attempts)",(0,a.jsx)("input",{type:"number",min:1,max:20,placeholder:"all",value:T.maxHops||"",onChange:e=>{let t=parseInt(e.target.value,10);D(t?{...T,maxHops:t}:{...T,maxHops:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,a.jsxs)("label",{className:"text-xs",children:["Min Panel",(0,a.jsx)("input",{type:"number",min:2,max:10,value:A.minPanel||"",placeholder:"2",onChange:e=>{let t=parseInt(e.target.value,10);F(t?{...A,minPanel:t}:{...A,minPanel:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]}),(0,a.jsxs)("label",{className:"text-xs",children:["Grace ms",(0,a.jsx)("input",{type:"number",min:0,max:3e4,value:A.stragglerGraceMs||"",placeholder:"8000",onChange:e=>{let t=parseInt(e.target.value,10);F(Number.isFinite(t)?{...A,stragglerGraceMs:t}:{...A,stragglerGraceMs:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]}),(0,a.jsxs)("label",{className:"text-xs",children:["Hard timeout ms",(0,a.jsx)("input",{type:"number",min:1e3,max:3e5,value:A.panelHardTimeoutMs||"",placeholder:"90000",onChange:e=>{let t=parseInt(e.target.value,10);F(Number.isFinite(t)?{...A,panelHardTimeoutMs:t}:{...A,panelHardTimeoutMs:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted",children:"Weights 1–10 affect Weighted strategy only. Sticky & Max Hops affect fallback/round-robin. Fusion tuning affects panel collection."})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,a.jsx)(d.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),c&&_.length>0&&(0,a.jsx)(d.$n,{type:"button",onClick:()=>c({id:t?.id,name:u||"Draft Combo",models:_,kind:x||"llm"}),variant:"outline",fullWidth:!0,size:"sm",icon:"play_circle",children:"Test Run"}),(0,a.jsx)(d.$n,{onClick:q,fullWidth:!0,size:"sm",disabled:!u.trim()||!!w||v,children:v?"Saving...":H?"Save":"Create"})]})]})}),y&&(0,a.jsx)(d.rq,{isOpen:y,onClose:()=>j(!1),onSelect:e=>{f.find(t=>t.id===e.value)||g([...f,{id:e.value,weight:1}])},onDeselect:e=>{g(f.filter(t=>t.id!==e.value))},activeProviders:m,modelAliases:C,title:"Add Model to Combo",kindFilter:x,addedModelValues:f.map(e=>e.id),closeOnSelect:!1})]})}},84680:(e,t,s)=>{"use strict";s.d(t,{PM:()=>a.PM,Sj:()=>a.Sj,Vy:()=>a.Vy,fF:()=>a.fF,sl:()=>a.sl,vL:()=>a.vL,y$:()=>a.y$,zM:()=>a.zM});var a=s(44923)}},e=>{e.O(0,[763,5353,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=25100)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4455],{25455:(e,t,s)=>{Promise.resolve().then(s.bind(s,92717))},28067:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({options:e=[],value:t,onChange:s,size:l="md",className:i}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,a.jsx)("div",{className:(0,r.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",i),children:e.map(e=>(0,a.jsxs)("button",{onClick:()=>s(e.value),className:(0,r.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[l],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},29499:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var a=s(95155),r=s(12115),n=s(31474);function l({isOpen:e,onClose:t,title:s,children:i,width:o="md",className:d}){let c={sm:"w-[400px]",md:"w-[500px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-full"};return((0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,r.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,a.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:(0,n.cn)("absolute right-0 top-0 h-full bg-surface flex flex-col","shadow-[var(--shadow-elev)]","slide-in-right","border-l border-border-subtle",c[o]||c.md,d),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border-subtle flex-shrink-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:s&&(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})}),(0,a.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:i})]})]}):null}},31474:(e,t,s)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>a})},50378:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var a=s(95155),r=s(12115),n=s(31474),l=s(92542),i=s(28067);function o({currentPage:e,pageSize:t,totalItems:s,onPageChange:d,onPageSizeChange:c,className:x,pageSizeOptions:m=[10,20,50],allowCustomPageSize:u=!1,maxPageSize:p=500}){let[h,b]=(0,r.useState)(!1),[f,g]=(0,r.useState)(String(t)),j=()=>{let e=Number.parseInt(f,10);if(!Number.isFinite(e))return void g(String(t));let s=Math.min(p,Math.max(1,e));g(String(s)),s!==t&&c(s)},v=Math.ceil(s/t),N=s>0?(e-1)*t+1:0,w=Math.min(e*t,s),k=(()=>{let t=[],s=Math.max(1,e-2),a=Math.min(v,s+5-1);a-s+1<5&&(s=Math.max(1,a-5+1));for(let e=s;e<=a;e++)t.push(e);return t})();return(0,a.jsxs)("div",{className:(0,n.cn)("flex flex-col gap-2 py-4 px-2",x),children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 sm:gap-4",children:[s>0&&(0,a.jsxs)("div",{className:"whitespace-nowrap text-sm text-text-muted",children:["Showing ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:N})," to"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:w})," of"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),c&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,a.jsx)(i.default,{size:"sm",value:h&&u?"__custom__":String(t),options:[...m.map(e=>({value:String(e),label:String(e)})),...u?[{value:"__custom__",label:"Custom"}]:[]],onChange:e=>{if("__custom__"===e){b(!0),g(String(t));return}b(!1),c(Number(e))}}),h&&u&&(0,a.jsx)("input",{type:"number",min:"1",max:String(p),value:f,onChange:e=>g(e.target.value),onBlur:j,onKeyDown:e=>{"Enter"===e.key&&j()},className:(0,n.cn)("h-7 w-20 rounded-[8px] border border-border bg-surface-2","px-2 text-xs text-text-main focus:outline-none focus:ring-2 focus:ring-brand-500/30","transition-all"),style:{colorScheme:"auto"},"aria-label":"Custom accounts per page"})]})]}),v>1&&(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>d(e-1),disabled:1===e,className:"w-9 px-0","aria-label":"Go to previous page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),(0,a.jsxs)("span",{className:"px-2 text-sm text-text-muted sm:hidden",children:["Page ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:e})," of"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:v})]}),(0,a.jsxs)("div",{className:"hidden items-center gap-1 sm:flex",children:[k[0]>1&&(0,a.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>d(1),className:"w-9 px-0","aria-label":"Go to first page",children:"1"}),k[0]>2&&(0,a.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>d(Math.max(1,e-5)),className:"w-9 px-0","aria-label":"Jump 5 pages back",children:"..."}),k.map(t=>{let s=e===t;return(0,a.jsx)(l.default,{variant:s?"primary":"ghost",size:"sm",onClick:()=>d(t),className:"w-9 px-0","aria-label":`Go to page ${t}`,"aria-current":s?"page":void 0,children:t},t)}),k[k.length-1]<v-1&&(0,a.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>d(Math.min(v,e+5)),className:"w-9 px-0","aria-label":"Jump 5 pages forward",children:"..."}),k[k.length-1]<v&&(0,a.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>d(v),className:"w-9 px-0","aria-label":"Go to last page",children:v})]}),(0,a.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>d(e+1),disabled:e===v,className:"w-9 px-0","aria-label":"Go to next page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})})]})}},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},84588:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({children:e,title:t,subtitle:s,icon:l,action:i,padding:o="md",hover:d=!1,elev:c=!1,className:x,...m}){return(0,a.jsxs)("div",{className:(0,r.cn)("bg-surface border border-border-subtle",c?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",d&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],x),...m,children:[(t||i)&&(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[l&&(0,a.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:l})}),(0,a.jsxs)("div",{children:[t&&(0,a.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),i]}),e]})}n.Section=function({children:e,className:t,...s}){return(0,a.jsx)("div",{className:(0,r.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...s,children:e})},n.Row=function({children:e,className:t,...s}){return(0,a.jsx)("div",{className:(0,r.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...s,children:e})},n.ListItem=function({children:e,actions:t,className:s,...n}){return(0,a.jsxs)("div",{className:(0,r.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",s),...n,children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,a.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var a=s(95155),r=s(31474);let n={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},l={xs:"h-6 px-2.5 text-[11px] rounded-[6px] gap-1.5",sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]"};function i({children:e,variant:t="primary",size:s="md",icon:o,iconRight:d,disabled:c=!1,loading:x=!1,fullWidth:m=!1,className:u,...p}){return(0,a.jsxs)("button",{className:(0,r.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",n[t],l[s],m&&"w-full",u),disabled:c||x,...p,children:[x?(0,a.jsx)("span",{className:(0,r.cn)("material-symbols-outlined animate-spin","xs"===s?"text-[14px]":"text-[18px]"),children:"progress_activity"}):o?(0,a.jsx)("span",{className:(0,r.cn)("material-symbols-outlined","xs"===s?"text-[14px]":"text-[18px]"),children:o}):null,e,d&&!x&&(0,a.jsx)("span",{className:(0,r.cn)("material-symbols-outlined","xs"===s?"text-[14px]":"text-[18px]"),children:d})]})}},92717:(e,t,s)=>{"use strict";s.d(t,{default:()=>m});var a=s(95155),r=s(12115),n=s(84588),l=s(92542),i=s(29499),o=s(50378),d=s(31474),c=s(88105);function x(e){if(!e)return null;if("string"!=typeof e)try{e=JSON.stringify(e)}catch{e=String(e)}return e.length>240?`${e.slice(0,237)}...`:e}function m(){let[e,t]=(0,r.useState)([]),[s,m]=(0,r.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[p,h]=(0,r.useState)(!1),[b,f]=(0,r.useState)(null),[g,j]=(0,r.useState)(!1),[v,N]=(0,r.useState)({provider:"",model:"",connectionId:"",comboName:"",statusCode:""}),[w,k]=(0,r.useState)(!0),y=(0,r.useCallback)(async()=>{h(!0);try{let e=new URLSearchParams({page:String(s.page),pageSize:String(s.pageSize)});for(let[t,s]of Object.entries(v))s&&e.append(t,s);let a=await fetch(`/api/usage/error-logs?${e}`),r=await a.json();t(r.details||[]),m(e=>({...e,...r.pagination}))}catch(e){console.error("Failed to fetch error logs:",e)}finally{h(!1)}},[s.page,s.pageSize,v]);return(0,r.useEffect)(()=>{y()},[y]),(0,r.useEffect)(()=>{if(!w)return;let e=setInterval(y,4e3);return()=>clearInterval(e)},[w,y]),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(n.default,{padding:"md",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Provider"}),(0,a.jsx)("input",{value:v.provider,onChange:e=>{N(t=>({...t,provider:e.target.value})),m(e=>({...e,page:1}))},placeholder:"All providers",className:(0,d.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Model"}),(0,a.jsx)("input",{value:v.model,onChange:e=>{N(t=>({...t,model:e.target.value})),m(e=>({...e,page:1}))},placeholder:"All models",className:(0,d.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Combo"}),(0,a.jsx)("input",{value:v.comboName,onChange:e=>{N(t=>({...t,comboName:e.target.value})),m(e=>({...e,page:1}))},placeholder:"All combos",className:(0,d.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Status"}),(0,a.jsx)("input",{value:v.statusCode,onChange:e=>{N(t=>({...t,statusCode:e.target.value})),m(e=>({...e,page:1}))},placeholder:"e.g. 502",className:(0,d.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 font-mono text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Account"}),(0,a.jsx)("input",{value:v.connectionId,onChange:e=>{N(t=>({...t,connectionId:e.target.value})),m(e=>({...e,page:1}))},placeholder:"All accounts",className:(0,d.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 font-mono text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.default,{variant:"ghost",onClick:()=>{k(e=>!e)},children:w?"Pause live refresh":"Resume live refresh"}),(0,a.jsx)(l.default,{variant:"outline",onClick:()=>{N({provider:"",model:"",connectionId:"",comboName:"",statusCode:""}),m(e=>({...e,page:1}))},disabled:!Object.values(v).some(e=>e),children:"Clear filters"})]})]})}),(0,a.jsxs)(n.default,{padding:"none",children:[(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"min-w-[860px] w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5",children:[(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Endpoint / Combo"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Account"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Status"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Error"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Action"})]})}),(0,a.jsx)("tbody",{children:p&&0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading error logs..."]})})}):0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:"No error logs match the current filters."})}):e.map(e=>((e=>{if(!e)return;let t=[];return e.fallback&&t.push({label:"Fallback",variant:"danger"}),e.retryAfterHuman&&t.push({label:`Retry in ${e.retryAfterHuman}`,variant:"warning"})})(e.meta),(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,a.jsx)("td",{className:"max-w-[220px] truncate p-4 text-sm text-text-main",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-text-muted",children:e.endpoint||"/v1/chat/completions"}),e.comboName?(0,a.jsxs)("span",{className:"inline-flex w-fit items-center rounded-md border border-black/10 bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-700 dark:border-white/10 dark:text-amber-300",children:["Combo: ",e.comboName]}):null]})}),(0,a.jsx)("td",{className:"max-w-[180px] truncate p-4 text-sm font-mono text-text-main",children:e.model}),(0,a.jsx)("td",{className:"max-w-[160px] truncate p-4 text-sm text-text-main",children:c.Q2[e.provider]?.name||e.provider||"Unknown provider"}),(0,a.jsx)("td",{className:"max-w-[160px] truncate p-4 font-mono text-sm text-text-main",children:e.connectionId||"—"}),(0,a.jsx)("td",{className:"whitespace-nowrap p-4 text-center text-sm",children:(0,a.jsx)("span",{className:(0,d.cn)("inline-flex min-w-[3.5rem] justify-center rounded-md border px-2 py-1 font-mono text-xs",e.statusCode&&/4|5/.test(String(e.statusCode))?"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300":"border-black/10 bg-black/5 text-text-main dark:border-white/10 dark:bg-white/5"),children:e.statusCode||"ERR"})}),(0,a.jsx)("td",{className:"max-w-[320px] truncate p-4 text-sm text-text-main",children:x(e.errorMessage)}),(0,a.jsx)("td",{className:"p-4 text-center",children:(0,a.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>{f(e),j(!0)},children:"Inspect"})})]},e.id)))})]})}),!p&&e.length>0&&(0,a.jsx)("div",{className:"border-t border-black/5 dark:border-white/5",children:(0,a.jsx)(o.default,{currentPage:s.page,pageSize:s.pageSize,totalItems:s.totalItems,onPageChange:e=>m(t=>({...t,page:e})),onPageSizeChange:e=>m(t=>({...t,pageSize:e,page:1}))})})]}),(0,a.jsx)(i.A,{isOpen:g,onClose:()=>j(!1),title:"Error Log Details",width:"lg",children:b&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 text-sm sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Timestamp:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:new Date(b.timestamp).toLocaleString()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Endpoint:"})," ",(0,a.jsx)("span",{className:"font-mono text-text-main",children:b.endpoint||"/v1/chat/completions"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Provider:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:c.Q2[b.provider]?.name||b.provider||"Unknown provider"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Model:"})," ",(0,a.jsx)("span",{className:"font-mono text-text-main",children:b.model})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Account:"})," ",(0,a.jsx)("span",{className:"font-mono text-text-main",children:b.connectionId||"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Combo:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:b.comboName||"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,a.jsx)("span",{className:(0,d.cn)("font-mono font-medium",b.statusCode&&/4|5/.test(String(b.statusCode))?"text-red-600":"text-text-main"),children:b.statusCode||"ERR"})]}),(0,a.jsxs)("div",{className:"sm:col-span-2",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Error:"})," ",(0,a.jsx)("span",{className:"text-red-700 dark:text-red-300",children:x(b.errorMessage)})]}),b.meta?.latency?.total!=null?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"})," ",(0,a.jsxs)("span",{className:"font-mono text-text-main",children:["TTFT ",b.meta.latency.ttft||0,"ms / Total ",b.meta.latency.total||0,"ms"]})]}):null,b.meta?.tokens?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Tokens:"})," ",(0,a.jsx)("span",{className:"font-mono text-text-main",children:`in ${b.meta.tokens.prompt_tokens||b.meta.tokens.input_tokens||0} / out ${b.meta.tokens.completion_tokens||b.meta.tokens.output_tokens||0}`})]}):null,b.meta?.retryAfterHuman?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Retry after:"})," ",(0,a.jsx)("span",{className:"font-mono text-text-main",children:b.meta.retryAfterHuman})]}):null,(0,a.jsx)("div",{className:"sm:col-span-2 flex gap-2",children:b.meta?.fallback?(0,a.jsx)("span",{className:"inline-flex rounded-md border border-amber-500/20 bg-amber-500/10 px-2 py-1 text-xs font-medium text-amber-700 dark:text-amber-300",children:"Fallback event"}):null})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[b.request&&(0,a.jsx)(u,{title:"Client Request (Input)",defaultOpen:!0,icon:"input",data:b.request}),b.providerRequest&&(0,a.jsx)(u,{title:"Provider Request (Translated)",icon:"translate",data:b.providerRequest}),b.providerResponse&&(0,a.jsx)(u,{title:"Provider Response (Raw)",icon:"data_object",data:b.providerResponse})]})]})})]})}function u({title:e,children:t,defaultOpen:s=!1,icon:n=null,data:l}){let[i,o]=(0,r.useState)(s);return(0,a.jsxs)("div",{className:"rounded-lg border border-black/5 dark:border-white/5",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"flex w-full items-center justify-between p-3 hover:bg-black/[0.04] dark:hover:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[n&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:n}),(0,a.jsx)("span",{className:"text-sm font-semibold text-text-main",children:e})]}),(0,a.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-text-muted transition-transform",i?"rotate-90":""),children:"chevron_right"})]}),i&&(0,a.jsx)("div",{className:"space-y-0 border-t border-black/5 p-4 dark:border-white/5",children:t??(0,a.jsx)("pre",{className:"max-h-[280px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs dark:border-white/5 dark:bg-white/5",children:JSON.stringify(l,null,2)})})]})}}},e=>{e.O(0,[8105,8441,3794,7358],()=>e(e.s=25455)),_N_E=e.O()}]);
@@ -90,4 +90,4 @@ Return ONLY the resulting tagged text.`,H=/\b(flash|mini|haiku|lite|nano|small|t
90
90
  -F "diarize=true"`:""}${p.includes("num_speakers")&&!P&&T?` \\
91
91
  -F "num_speakers=${T}"`:""}`,er=async()=>{if(!x||!ea)return;W(!0),Y(""),q(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",ea),p.includes("language")&&g&&t.append("language",g),p.includes("response_format")&&t.append("response_format",v),p.includes("temperature")&&w&&t.append("temperature",w),p.includes("prompt")&&f&&t.append("prompt",f),p.includes("timestamps_granularity")&&C&&t.append("timestamps_granularity",C),p.includes("tag_audio_events")&&A&&t.append("tag_audio_events","true"),p.includes("diarize")&&P?t.append("diarize","true"):p.includes("num_speakers")&&T&&t.append("num_speakers",T);let a={};L&&(a.Authorization=`Bearer ${L}`);let s=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:a,body:t});H(Date.now()-e);let r=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void Y(r?.error?.message||r?.error||r||`HTTP ${s.status}`);q(r)}catch(e){Y(e.message||"Network error")}finally{W(!1)}},el="string"==typeof z?z:z?JSON.stringify(z,null,2):`{
92
92
  "text": "Hello world..."
93
- }`;return(0,s.jsxs)(o.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,s.jsx)(_,{label:"Model",children:(0,s.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,s.jsx)(_,{label:"Model",children:(0,s.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,s.jsx)(_,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[et,"/v1/audio/transcriptions"]}),K&&(0,s.jsxs)("button",{onClick:()=>D(e=>!e),title:M?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${M?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(_,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:L?`${L.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,L.length-8)))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,s.jsx)(_,{label:"Audio File",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,s.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,s.jsx)(_,{label:"Language",children:(0,s.jsx)("input",{value:g,onChange:e=>b(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,s.jsx)(_,{label:"Prompt",children:(0,s.jsx)("input",{value:f,onChange:e=>y(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,s.jsx)(_,{label:"Temperature",children:(0,s.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:w,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("response_format")&&(0,s.jsx)(_,{label:"Response Format",children:(0,s.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"json",children:"json"}),(0,s.jsx)("option",{value:"text",children:"text"}),(0,s.jsx)("option",{value:"srt",children:"srt"}),(0,s.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,s.jsx)("option",{value:"vtt",children:"vtt"})]})}),p.includes("timestamps_granularity")&&(0,s.jsx)(_,{label:"Timestamps",children:(0,s.jsxs)("select",{value:C,onChange:e=>$(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"",children:"provider default"}),(0,s.jsx)("option",{value:"word",children:"word"}),(0,s.jsx)("option",{value:"character",children:"character"}),(0,s.jsx)("option",{value:"none",children:"none"})]})}),p.includes("tag_audio_events")&&(0,s.jsx)(_,{label:"Tag audio events",children:(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("input",{type:"checkbox",checked:A,onChange:e=>E(e.target.checked),className:"accent-primary"}),"Label non-speech sounds as [laughter], [applause], ..."]})}),p.includes("diarize")&&(0,s.jsx)(_,{label:"Speaker labels",children:(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("input",{type:"checkbox",checked:P,onChange:e=>I(e.target.checked),className:"accent-primary"}),"Detect speakers automatically (overrides speaker count)"]})}),p.includes("num_speakers")&&(0,s.jsx)(_,{label:"Speaker count",children:(0,s.jsx)("input",{type:"number",step:"1",min:"1",max:"32",value:T,onChange:e=>R(e.target.value),disabled:P,placeholder:"auto-detect",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary disabled:opacity-50"})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>Q(es),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:X?"check":"content_copy"}),X?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:er,disabled:J||!x||!ea,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:J?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),J?"Transcribing...":"Run"]})]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:es})]}),G&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:G}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",z&&V&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",V,"ms"]})]}),z&&(0,s.jsxs)("button",{onClick:()=>ee(el),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:Z?"check":"content_copy"}),Z?"Copied":"Copy"]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:el})]})]})]})}function el(){let{kind:e,id:t}=(0,r.useParams)(),a=(0,r.useRouter)(),n=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=(0,c.AR)(t)&&"video"===e,p=m||u,x=u?"Custom Video":"Custom Embedding",h=async()=>{if(confirm(`Delete this ${x} node?`))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&a.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom node:",e)}},[g,b]=(0,i.useState)(null),[f,y]=(0,i.useState)(p),[v,j]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{if(!p)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(a=>{e||(b((a.nodes||[]).find(e=>e.id===t)||null),y(!1))}).catch(()=>{e||y(!1)}),()=>{e=!0}},[t,p]),!n)return(0,r.notFound)();let N=c.Q2[t],k=u?"#EC4899":"#6366F1",S=u?"CV":"CE",C=p?g?{id:t,name:g.name||x,color:k,textIcon:S}:null:N;if(!p&&!N||p&&!f&&!g)return(0,r.notFound)();if(p&&f)return(0,s.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let _=p?[e]:C.serviceKinds??["llm"];return p||_.includes(e)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),n.label]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,s.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${C.color}15`},children:(0,s.jsx)(d.A,{src:`/providers/${C.id}.png`,alt:C.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:C.textIcon||C.id.slice(0,2).toUpperCase(),fallbackColor:C.color})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:C.name}),!p&&C.notice?.apiKeyUrl&&(0,s.jsxs)("a",{href:C.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[p&&(0,s.jsxs)(o.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",g?.prefix]}),_.map(t=>(0,s.jsx)(o.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),p&&(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>j(!0),children:"Edit"}),(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:h,children:"Delete"})]})]})]}),!p&&C.kindNotice?.[e]&&(0,s.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-sm",children:C.kindNotice[e]})]}),!p&&C.notice?.text&&!C.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:C.notice.text}),C.notice.apiKeyUrl&&(0,s.jsx)("a",{href:C.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!p&&C.noAuth?(0,s.jsx)(o.gw,{providerId:t}):(0,s.jsx)(w,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,s.jsx)($,{providerId:t,kindFilter:e,providerAliasOverride:p?g?.prefix:void 0}),!p&&(C.searchConfig||C.fetchConfig||C.ttsConfig||C.sttConfig||C.embeddingConfig||C.searchViaChat)&&(0,s.jsx)(o.Wx,{config:"webFetch"===e?C.fetchConfig:"tts"===e?C.ttsConfig:"stt"===e?C.sttConfig:"embedding"===e?C.embeddingConfig:C.searchConfig||{mode:"chat-completions",defaultModel:C.searchViaChat?.defaultModel,pricingUrl:C.searchViaChat?.pricingUrl,freeTier:C.searchViaChat?.freeTier},provider:C,title:`${n.label} Config`}),"embedding"===e&&(0,s.jsx)(P,{providerId:t,customAlias:g?.prefix}),"tts"===e&&(0,s.jsx)(Q,{providerId:t}),"stt"===e&&!p&&(0,s.jsx)(en,{providerId:t}),!p&&A[e]&&(0,s.jsx)(er,{providerId:t,kind:e}),m&&(0,s.jsx)(o.x0,{isOpen:v,node:g,onClose:()=>j(!1),onSaved:e=>{b(e),j(!1)}}),u&&(0,s.jsx)(o.fA,{isOpen:v,node:g,onClose:()=>j(!1),onSaved:e=>{b(e),j(!1)}})]}):(0,r.notFound)()}},28915:(e,t,a)=>{"use strict";a.d(t,{E2:()=>s,gs:()=>r});function s(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function r(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let a=Math.floor(t/60);if(a<24)return`${a}h ago`;let s=Math.floor(a/24);return`${s}d ago`}a(8247)},64827:(e,t,a)=>{"use strict";function s(e){if(!e)return null;let t=null,a=Date.now();for(let[s,r]of Object.entries(e)){if(!s.startsWith("modelLock_")||!r)continue;let e=new Date(r).getTime();e<=a||(!t||e<t)&&(t=e)}return t?new Date(t).toISOString():null}a.d(t,{kJ:()=>s}),a(10904)},70217:(e,t,a)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>s})}},e=>{e.O(0,[763,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=1389)),_N_E=e.O()}]);
93
+ }`;return(0,s.jsxs)(o.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,s.jsx)(_,{label:"Model",children:(0,s.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,s.jsx)(_,{label:"Model",children:(0,s.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,s.jsx)(_,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[et,"/v1/audio/transcriptions"]}),K&&(0,s.jsxs)("button",{onClick:()=>D(e=>!e),title:M?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${M?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(_,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:L?`${L.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,L.length-8)))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,s.jsx)(_,{label:"Audio File",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,s.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,s.jsx)(_,{label:"Language",children:(0,s.jsx)("input",{value:g,onChange:e=>b(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,s.jsx)(_,{label:"Prompt",children:(0,s.jsx)("input",{value:f,onChange:e=>y(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,s.jsx)(_,{label:"Temperature",children:(0,s.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:w,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("response_format")&&(0,s.jsx)(_,{label:"Response Format",children:(0,s.jsxs)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"json",children:"json"}),(0,s.jsx)("option",{value:"text",children:"text"}),(0,s.jsx)("option",{value:"srt",children:"srt"}),(0,s.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,s.jsx)("option",{value:"vtt",children:"vtt"})]})}),p.includes("timestamps_granularity")&&(0,s.jsx)(_,{label:"Timestamps",children:(0,s.jsxs)("select",{value:C,onChange:e=>$(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"",children:"provider default"}),(0,s.jsx)("option",{value:"word",children:"word"}),(0,s.jsx)("option",{value:"character",children:"character"}),(0,s.jsx)("option",{value:"none",children:"none"})]})}),p.includes("tag_audio_events")&&(0,s.jsx)(_,{label:"Tag audio events",children:(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("input",{type:"checkbox",checked:A,onChange:e=>E(e.target.checked),className:"accent-primary"}),"Label non-speech sounds as [laughter], [applause], ..."]})}),p.includes("diarize")&&(0,s.jsx)(_,{label:"Speaker labels",children:(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("input",{type:"checkbox",checked:P,onChange:e=>I(e.target.checked),className:"accent-primary"}),"Detect speakers automatically (overrides speaker count)"]})}),p.includes("num_speakers")&&(0,s.jsx)(_,{label:"Speaker count",children:(0,s.jsx)("input",{type:"number",step:"1",min:"1",max:"32",value:T,onChange:e=>R(e.target.value),disabled:P,placeholder:"auto-detect",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary disabled:opacity-50"})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>Q(es),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:X?"check":"content_copy"}),X?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:er,disabled:J||!x||!ea,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:J?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),J?"Transcribing...":"Run"]})]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:es})]}),G&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:G}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",z&&V&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",V,"ms"]})]}),z&&(0,s.jsxs)("button",{onClick:()=>ee(el),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:Z?"check":"content_copy"}),Z?"Copied":"Copy"]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:el})]})]})]})}function el(){let{kind:e,id:t}=(0,r.useParams)(),a=(0,r.useRouter)(),n=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=(0,c.AR)(t)&&"video"===e,p=m||u,x=u?"Custom Video":"Custom Embedding",h=async()=>{if(confirm(`Delete this ${x} node?`))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&a.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom node:",e)}},[g,b]=(0,i.useState)(null),[f,y]=(0,i.useState)(p),[v,j]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{if(!p)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(a=>{e||(b((a.nodes||[]).find(e=>e.id===t)||null),y(!1))}).catch(()=>{e||y(!1)}),()=>{e=!0}},[t,p]),!n)return(0,r.notFound)();let N=c.Q2[t],k=u?"#EC4899":"#6366F1",S=u?"CV":"CE",C=p?g?{id:t,name:g.name||x,color:k,textIcon:S}:null:N;if(!p&&!N||p&&!f&&!g)return(0,r.notFound)();if(p&&f)return(0,s.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let _=p?[e]:C.serviceKinds??["llm"];return p||_.includes(e)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),n.label]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,s.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${C.color}15`},children:(0,s.jsx)(d.A,{src:`/providers/${C.id}.png`,alt:C.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:C.textIcon||C.id.slice(0,2).toUpperCase(),fallbackColor:C.color})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:C.name}),!p&&C.notice?.apiKeyUrl&&(0,s.jsxs)("a",{href:C.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[p&&(0,s.jsxs)(o.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",g?.prefix]}),_.map(t=>(0,s.jsx)(o.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),p&&(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>j(!0),children:"Edit"}),(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:h,children:"Delete"})]})]})]}),!p&&C.kindNotice?.[e]&&(0,s.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-sm",children:C.kindNotice[e]})]}),!p&&C.notice?.text&&!C.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:C.notice.text}),C.notice.apiKeyUrl&&(0,s.jsx)("a",{href:C.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!p&&C.noAuth?(0,s.jsx)(o.gw,{providerId:t}):(0,s.jsx)(w,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,s.jsx)($,{providerId:t,kindFilter:e,providerAliasOverride:p?g?.prefix:void 0}),!p&&(C.searchConfig||C.fetchConfig||C.ttsConfig||C.sttConfig||C.embeddingConfig||C.searchViaChat)&&(0,s.jsx)(o.Wx,{config:"webFetch"===e?C.fetchConfig:"tts"===e?C.ttsConfig:"stt"===e?C.sttConfig:"embedding"===e?C.embeddingConfig:C.searchConfig||{mode:"chat-completions",defaultModel:C.searchViaChat?.defaultModel,pricingUrl:C.searchViaChat?.pricingUrl,freeTier:C.searchViaChat?.freeTier},provider:C,title:`${n.label} Config`}),"embedding"===e&&(0,s.jsx)(P,{providerId:t,customAlias:g?.prefix}),"tts"===e&&(0,s.jsx)(Q,{providerId:t}),"stt"===e&&!p&&(0,s.jsx)(en,{providerId:t}),!p&&A[e]&&(0,s.jsx)(er,{providerId:t,kind:e}),m&&(0,s.jsx)(o.x0,{isOpen:v,node:g,onClose:()=>j(!1),onSaved:e=>{b(e),j(!1)}}),u&&(0,s.jsx)(o.fA,{isOpen:v,node:g,onClose:()=>j(!1),onSaved:e=>{b(e),j(!1)}})]}):(0,r.notFound)()}},28915:(e,t,a)=>{"use strict";a.d(t,{E2:()=>s,gs:()=>r});function s(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function r(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let a=Math.floor(t/60);if(a<24)return`${a}h ago`;let s=Math.floor(a/24);return`${s}d ago`}a(8247)},64827:(e,t,a)=>{"use strict";function s(e){if(!e)return null;let t=null,a=Date.now();for(let[s,r]of Object.entries(e)){if(!s.startsWith("modelLock_")||!r)continue;let e=new Date(r).getTime();e<=a||(!t||e<t)&&(t=e)}return t?new Date(t).toISOString():null}a.d(t,{kJ:()=>s}),a(10904)}},e=>{e.O(0,[763,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=1389)),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),n=s(12115),r=s(98500),i=s.n(r),o=s(35497),d=s(57250),c=s(88105);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech",systemone:"System One"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech",systemone:"/v1/systemone"},u={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"}),systemone:e=>({model:e,state:"My payments have failed for three days and I am losing sales. Please help now.",questions:{is_urgent:{type:"noul",instructions:"Does this request require urgent attention?"}}})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,r]=(0,n.useState)(null),[b,f]=(0,n.useState)(!0),[j,g]=(0,n.useState)(""),[w,y]=(0,n.useState)(""),[v,N]=(0,n.useState)([]),[k,S]=(0,n.useState)(!1),[U,$]=(0,n.useState)(!1),[O,C]=(0,n.useState)([]),[_,T]=(0,n.useState)(!1),[R,A]=(0,n.useState)(null),[P,L]=(0,n.useState)(""),[z,D]=(0,n.useState)(""),[E,F]=(0,n.useState)([]),[M,q]=(0,n.useState)({}),I=async()=>{try{let[t,s,a,l,n,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&&q((await i.json()).aliases||{}),l.ok){let e=await l.json();D((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(n.ok&&F((await n.json()).connections||[]),!t.ok){r(null),f(!1);return}let o=await t.json();r(o),g(o.name),N(o.models||[]);let d=s.ok?await s.json():{};S(d.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let c=a.ok?await a.json():[];C(c.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,n.useEffect)(()=>{I()},[e]);let J=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),W=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},H=async()=>{!J(j)||j===s.name||await W({name:j})&&await I()},Z=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await W({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await W({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await W({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await W({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.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=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let n=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),r=Date.now()-e;if(!n.ok){let e=await n.json().catch(()=>({}));L(e?.error?.message||e?.error||`HTTP ${n.status}`),A({json:JSON.stringify(e,null,2),latencyMs:r});return}let i=n.headers.get("content-type")||"";if(i.startsWith("image/")){let e=await n.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:r});return}if(i.startsWith("audio/")||"application/octet-stream"===i){let e=await n.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:r});return}let o=await n.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 s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:c,latencyMs:r})}catch(e){L(e.message||"Network error")}finally{T(!1)}};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||c.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=window.location.origin,ea=ee?`curl -X POST ${es}${ee} \\
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),n=s(98500),i=s.n(n),o=s(35497),d=s(57250),c=s(88105);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech",systemone:"System One"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech",systemone:"/v1/systemone"},u={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"}),systemone:e=>({model:e,state:"My payments have failed for three days and I am losing sales. Please help now.",questions:{is_urgent:{type:"noul",instructions:"Does this request require urgent attention?"}}})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,n]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[O,C]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[P,L]=(0,r.useState)(""),[z,D]=(0,r.useState)(""),[E,F]=(0,r.useState)([]),[M,q]=(0,r.useState)({}),I=async()=>{try{let[t,s,a,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&&q((await i.json()).aliases||{}),l.ok){let e=await l.json();D((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F(((await r.json()).connections||[]).filter(e=>!1!==e.isActive)),!t.ok){n(null),f(!1);return}let o=await t.json();n(o),g(o.name),N(o.models||[]);let d=s.ok?await s.json():{};S(d.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let c=a.ok?await a.json():[];C(c.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{I()},[e]);let J=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),W=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},H=async()=>{!J(j)||j===s.name||await W({name:j})&&await I()},Z=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await W({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await W({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await W({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await W({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.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=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),n=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:n});return}let i=r.headers.get("content-type")||"";if(i.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:n});return}if(i.startsWith("audio/")||"application/octet-stream"===i){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:n});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 s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:c,latencyMs:n})}catch(e){L(e.message||"Network error")}finally{T(!1)}};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||c.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=window.location.origin,ea=ee?`curl -X POST ${es}${ee} \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${z||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(et)}'`:"",el=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(i(),{href:el,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),J(e.target.value)},onBlur:H,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,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),n=c.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(d.A,{src:`/providers/${s}.png`,alt:n?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:n?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:n?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:n?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.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,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border",loading:"lazy",decoding:"async"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.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,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===O.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.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:O.join("\n")})]}),U&&(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:Z,onDeselect:B,activeProviders:E,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},34861:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[763,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=34861)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(et)}'`:"",el=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(i(),{href:el,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),J(e.target.value)},onBlur:H,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,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=c.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(d.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.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,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border",loading:"lazy",decoding:"async"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.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,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===O.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.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:O.join("\n")})]}),U&&(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:Z,onDeselect:B,activeProviders:E,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},34861:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[763,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=34861)),_N_E=e.O()}]);