omniroute 2.0.0 → 2.0.2

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 (576) hide show
  1. package/README.ar.md +4 -3
  2. package/README.bg.md +4 -3
  3. package/README.da.md +4 -2
  4. package/README.de.md +3 -2
  5. package/README.es.md +1 -0
  6. package/README.fi.md +1 -0
  7. package/README.fr.md +1 -0
  8. package/README.he.md +9 -8
  9. package/README.hu.md +1 -0
  10. package/README.id.md +1 -0
  11. package/README.in.md +9 -8
  12. package/README.it.md +1 -0
  13. package/README.ja.md +3 -0
  14. package/README.ko.md +9 -8
  15. package/README.md +17 -16
  16. package/README.ms.md +9 -8
  17. package/README.nl.md +9 -8
  18. package/README.no.md +1 -0
  19. package/README.phi.md +2 -1
  20. package/README.pl.md +9 -8
  21. package/README.pt-BR.md +3 -2
  22. package/README.pt.md +1 -0
  23. package/README.ro.md +2 -0
  24. package/README.ru.md +1 -0
  25. package/README.sk.md +1 -0
  26. package/README.sv.md +1 -0
  27. package/README.th.md +1 -0
  28. package/README.uk-UA.md +1 -0
  29. package/README.vi.md +1 -0
  30. package/README.zh-CN.md +10 -9
  31. package/app/.env +122 -0
  32. package/app/.next/BUILD_ID +1 -1
  33. package/app/.next/app-path-routes-manifest.json +54 -54
  34. package/app/.next/build-manifest.json +3 -3
  35. package/app/.next/prerender-manifest.json +3 -3
  36. package/app/.next/required-server-files.json +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js +2 -2
  38. package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
  41. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +2 -2
  44. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +2 -2
  47. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js +2 -2
  50. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js.nft.json +1 -1
  51. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +3 -3
  53. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  56. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  57. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  58. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +2 -2
  59. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
  60. package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
  61. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  62. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  63. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  64. package/app/.next/server/app/(dashboard)/dashboard/health/page.js +2 -2
  65. package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  66. package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +2 -2
  68. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
  69. package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
  71. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
  72. package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js +2 -2
  74. package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
  75. package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/(dashboard)/dashboard/media/page.js +2 -2
  77. package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
  78. package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
  80. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
  81. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  83. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  84. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  85. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  86. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  87. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  88. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  89. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  90. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  91. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  92. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  93. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  95. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  96. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +2 -2
  98. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
  99. package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
  101. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  102. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  103. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +3 -3
  104. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  105. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  106. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  107. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  108. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  109. package/app/.next/server/app/.well-known/agent.json/route.js +1 -1
  110. package/app/.next/server/app/.well-known/agent.json/route_client-reference-manifest.js +1 -1
  111. package/app/.next/server/app/400/page.js +2 -2
  112. package/app/.next/server/app/400/page.js.nft.json +1 -1
  113. package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
  114. package/app/.next/server/app/401/page.js +2 -2
  115. package/app/.next/server/app/401/page.js.nft.json +1 -1
  116. package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
  117. package/app/.next/server/app/403/page.js +2 -2
  118. package/app/.next/server/app/403/page.js.nft.json +1 -1
  119. package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
  120. package/app/.next/server/app/408/page.js +2 -2
  121. package/app/.next/server/app/408/page.js.nft.json +1 -1
  122. package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
  123. package/app/.next/server/app/429/page.js +2 -2
  124. package/app/.next/server/app/429/page.js.nft.json +1 -1
  125. package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
  126. package/app/.next/server/app/500/page.js +2 -2
  127. package/app/.next/server/app/500/page.js.nft.json +1 -1
  128. package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
  129. package/app/.next/server/app/502/page.js +2 -2
  130. package/app/.next/server/app/502/page.js.nft.json +1 -1
  131. package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
  132. package/app/.next/server/app/503/page.js +2 -2
  133. package/app/.next/server/app/503/page.js.nft.json +1 -1
  134. package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
  135. package/app/.next/server/app/_global-error/page.js +3 -3
  136. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  137. package/app/.next/server/app/_global-error.html +2 -2
  138. package/app/.next/server/app/_global-error.rsc +5 -5
  139. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +5 -5
  140. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  141. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  142. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  143. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +4 -4
  144. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  145. package/app/.next/server/app/_not-found/page.js +2 -2
  146. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  147. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  148. package/app/.next/server/app/a2a/route.js +2 -2
  149. package/app/.next/server/app/a2a/route_client-reference-manifest.js +1 -1
  150. package/app/.next/server/app/api/a2a/status/route.js +1 -1
  151. package/app/.next/server/app/api/a2a/status/route_client-reference-manifest.js +1 -1
  152. package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route.js +1 -1
  153. package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route_client-reference-manifest.js +1 -1
  154. package/app/.next/server/app/api/a2a/tasks/[id]/route.js +1 -1
  155. package/app/.next/server/app/api/a2a/tasks/[id]/route_client-reference-manifest.js +1 -1
  156. package/app/.next/server/app/api/a2a/tasks/route.js +1 -1
  157. package/app/.next/server/app/api/a2a/tasks/route_client-reference-manifest.js +1 -1
  158. package/app/.next/server/app/api/auth/login/route.js +1 -1
  159. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  160. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  161. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  162. package/app/.next/server/app/api/auth/status/route.js +1 -1
  163. package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  164. package/app/.next/server/app/api/cache/route.js +1 -1
  165. package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
  166. package/app/.next/server/app/api/cache/stats/route.js +1 -1
  167. package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
  168. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  169. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  170. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +3 -3
  171. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  172. package/app/.next/server/app/api/cli-tools/backups/route.js +2 -2
  173. package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
  174. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
  175. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  176. package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
  177. package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  178. package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  179. package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
  180. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
  181. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  182. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
  183. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  184. package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js +1 -1
  185. package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
  186. package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  187. package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  188. package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route.js +1 -1
  189. package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route_client-reference-manifest.js +1 -1
  190. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  191. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  192. package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
  193. package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
  194. package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
  195. package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
  196. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  197. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  198. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  199. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  200. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  201. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  202. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  203. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  204. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  205. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  206. package/app/.next/server/app/api/combos/auto/route.js +1 -1
  207. package/app/.next/server/app/api/combos/auto/route_client-reference-manifest.js +1 -1
  208. package/app/.next/server/app/api/combos/metrics/route.js +1 -1
  209. package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
  210. package/app/.next/server/app/api/combos/route.js +1 -1
  211. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  212. package/app/.next/server/app/api/combos/test/route.js +1 -1
  213. package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
  214. package/app/.next/server/app/api/compliance/audit-log/route.js +1 -1
  215. package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
  216. package/app/.next/server/app/api/db-backups/export/route.js +1 -1
  217. package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
  218. package/app/.next/server/app/api/db-backups/exportAll/route.js +1 -1
  219. package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
  220. package/app/.next/server/app/api/db-backups/import/route.js +1 -1
  221. package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
  222. package/app/.next/server/app/api/db-backups/route.js +1 -1
  223. package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
  224. package/app/.next/server/app/api/evals/[suiteId]/route.js +1 -1
  225. package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
  226. package/app/.next/server/app/api/evals/route.js +1 -1
  227. package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
  228. package/app/.next/server/app/api/fallback/chains/route.js +2 -2
  229. package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
  230. package/app/.next/server/app/api/init/route.js +1 -1
  231. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  232. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  233. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  234. package/app/.next/server/app/api/keys/route.js +1 -1
  235. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  236. package/app/.next/server/app/api/logs/console/route.js +1 -1
  237. package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
  238. package/app/.next/server/app/api/mcp/audit/route.js +2 -2
  239. package/app/.next/server/app/api/mcp/audit/route_client-reference-manifest.js +1 -1
  240. package/app/.next/server/app/api/mcp/audit/stats/route.js +2 -2
  241. package/app/.next/server/app/api/mcp/audit/stats/route_client-reference-manifest.js +1 -1
  242. package/app/.next/server/app/api/mcp/sse/route.js +1 -1
  243. package/app/.next/server/app/api/mcp/sse/route_client-reference-manifest.js +1 -1
  244. package/app/.next/server/app/api/mcp/status/route.js +1 -1
  245. package/app/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  246. package/app/.next/server/app/api/mcp/stream/route.js +1 -1
  247. package/app/.next/server/app/api/mcp/stream/route_client-reference-manifest.js +1 -1
  248. package/app/.next/server/app/api/mcp/tools/route.js +1 -1
  249. package/app/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
  250. package/app/.next/server/app/api/models/alias/route.js +1 -1
  251. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  252. package/app/.next/server/app/api/models/availability/route.js +1 -1
  253. package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  254. package/app/.next/server/app/api/models/catalog/route.js +2 -2
  255. package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
  256. package/app/.next/server/app/api/models/route.js +2 -2
  257. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  258. package/app/.next/server/app/api/monitoring/health/route.js +2 -2
  259. package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
  260. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +2 -2
  261. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  262. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  263. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  264. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  265. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  266. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  267. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  268. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  269. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  270. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  271. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  272. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  273. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  274. package/app/.next/server/app/api/policies/route.js +2 -2
  275. package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
  276. package/app/.next/server/app/api/pricing/defaults/route.js +1 -1
  277. package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
  278. package/app/.next/server/app/api/pricing/models/route.js +1 -1
  279. package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
  280. package/app/.next/server/app/api/pricing/route.js +1 -1
  281. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  282. package/app/.next/server/app/api/provider-metrics/route.js +2 -2
  283. package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
  284. package/app/.next/server/app/api/provider-models/route.js +1 -1
  285. package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
  286. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  287. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  288. package/app/.next/server/app/api/provider-nodes/route.js +2 -2
  289. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  290. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  291. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  292. package/app/.next/server/app/api/providers/[id]/models/route.js +2 -2
  293. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  294. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  295. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  296. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  297. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  298. package/app/.next/server/app/api/providers/client/route.js +1 -1
  299. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  300. package/app/.next/server/app/api/providers/route.js +2 -2
  301. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  302. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  303. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  304. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  305. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  306. package/app/.next/server/app/api/rate-limit/route.js +1 -1
  307. package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
  308. package/app/.next/server/app/api/rate-limits/route.js +1 -1
  309. package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
  310. package/app/.next/server/app/api/resilience/reset/route.js +1 -1
  311. package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
  312. package/app/.next/server/app/api/resilience/route.js +1 -1
  313. package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
  314. package/app/.next/server/app/api/restart/route.js +1 -1
  315. package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  316. package/app/.next/server/app/api/sessions/route.js +1 -1
  317. package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  318. package/app/.next/server/app/api/settings/background-degradation/route.js +1 -1
  319. package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -1
  320. package/app/.next/server/app/api/settings/combo-defaults/route.js +1 -1
  321. package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
  322. package/app/.next/server/app/api/settings/ip-filter/route.js +1 -1
  323. package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
  324. package/app/.next/server/app/api/settings/model-aliases/route.js +1 -1
  325. package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -1
  326. package/app/.next/server/app/api/settings/proxy/route.js +1 -1
  327. package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
  328. package/app/.next/server/app/api/settings/proxy/test/route.js +1 -1
  329. package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
  330. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  331. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  332. package/app/.next/server/app/api/settings/route.js +1 -1
  333. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  334. package/app/.next/server/app/api/settings/system-prompt/route.js +1 -1
  335. package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
  336. package/app/.next/server/app/api/settings/thinking-budget/route.js +1 -1
  337. package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
  338. package/app/.next/server/app/api/shutdown/route.js +1 -1
  339. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  340. package/app/.next/server/app/api/storage/health/route.js +1 -1
  341. package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
  342. package/app/.next/server/app/api/sync/cloud/route.js +1 -1
  343. package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
  344. package/app/.next/server/app/api/sync/initialize/route.js +1 -1
  345. package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
  346. package/app/.next/server/app/api/tags/route.js +1 -1
  347. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  348. package/app/.next/server/app/api/telemetry/summary/route.js +1 -1
  349. package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
  350. package/app/.next/server/app/api/token-health/route.js +1 -1
  351. package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
  352. package/app/.next/server/app/api/translator/detect/route.js +1 -1
  353. package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
  354. package/app/.next/server/app/api/translator/history/route.js +1 -1
  355. package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
  356. package/app/.next/server/app/api/translator/load/route.js +1 -1
  357. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  358. package/app/.next/server/app/api/translator/save/route.js +1 -1
  359. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  360. package/app/.next/server/app/api/translator/send/route.js +1 -1
  361. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  362. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  363. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  364. package/app/.next/server/app/api/usage/[connectionId]/route.js +2 -2
  365. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  366. package/app/.next/server/app/api/usage/analytics/route.js +1 -1
  367. package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
  368. package/app/.next/server/app/api/usage/budget/route.js +2 -2
  369. package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
  370. package/app/.next/server/app/api/usage/call-logs/[id]/route.js +1 -1
  371. package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
  372. package/app/.next/server/app/api/usage/call-logs/route.js +1 -1
  373. package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
  374. package/app/.next/server/app/api/usage/history/route.js +1 -1
  375. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  376. package/app/.next/server/app/api/usage/logs/route.js +1 -1
  377. package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  378. package/app/.next/server/app/api/usage/proxy-logs/route.js +1 -1
  379. package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
  380. package/app/.next/server/app/api/usage/quota/route.js +1 -1
  381. package/app/.next/server/app/api/usage/quota/route_client-reference-manifest.js +1 -1
  382. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  383. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  384. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  385. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  386. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  387. package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  388. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
  389. package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  390. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  391. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  392. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  393. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  394. package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
  395. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  396. package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  397. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  398. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  399. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  400. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  401. package/app/.next/server/app/api/v1/models/route.js +1 -1
  402. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  403. package/app/.next/server/app/api/v1/moderations/route.js +1 -1
  404. package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
  405. package/app/.next/server/app/api/v1/music/generations/route.js +1 -1
  406. package/app/.next/server/app/api/v1/music/generations/route_client-reference-manifest.js +1 -1
  407. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
  408. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
  409. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +1 -1
  410. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
  411. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +1 -1
  412. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
  413. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
  414. package/app/.next/server/app/api/v1/rerank/route.js +1 -1
  415. package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
  416. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  417. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  418. package/app/.next/server/app/api/v1/route.js +1 -1
  419. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  420. package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
  421. package/app/.next/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -1
  422. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  423. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  424. package/app/.next/server/app/api/v1beta/models/route.js +2 -2
  425. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  426. package/app/.next/server/app/callback/page.js +2 -2
  427. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  428. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  429. package/app/.next/server/app/docs/page.js +4 -4
  430. package/app/.next/server/app/docs/page.js.nft.json +1 -1
  431. package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  432. package/app/.next/server/app/forbidden/page.js +2 -2
  433. package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
  434. package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
  435. package/app/.next/server/app/forgot-password/page.js +2 -2
  436. package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
  437. package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
  438. package/app/.next/server/app/landing/page.js +2 -2
  439. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  440. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  441. package/app/.next/server/app/login/page.js +2 -2
  442. package/app/.next/server/app/login/page.js.nft.json +1 -1
  443. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  444. package/app/.next/server/app/maintenance/page.js +2 -2
  445. package/app/.next/server/app/maintenance/page.js.nft.json +1 -1
  446. package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
  447. package/app/.next/server/app/offline/page.js +2 -2
  448. package/app/.next/server/app/offline/page.js.nft.json +1 -1
  449. package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  450. package/app/.next/server/app/page.js +2 -2
  451. package/app/.next/server/app/page.js.nft.json +1 -1
  452. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  453. package/app/.next/server/app/privacy/page.js +2 -2
  454. package/app/.next/server/app/privacy/page.js.nft.json +1 -1
  455. package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  456. package/app/.next/server/app/status/page.js +2 -2
  457. package/app/.next/server/app/status/page.js.nft.json +1 -1
  458. package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
  459. package/app/.next/server/app/terms/page.js +2 -2
  460. package/app/.next/server/app/terms/page.js.nft.json +1 -1
  461. package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  462. package/app/.next/server/app-paths-manifest.json +54 -54
  463. package/app/.next/server/chunks/1033.js +1 -1
  464. package/app/.next/server/chunks/1909.js +2 -0
  465. package/app/.next/server/chunks/2180.js +1 -1
  466. package/app/.next/server/chunks/2901.js +1 -1
  467. package/app/.next/server/chunks/2910.js +1 -1
  468. package/app/.next/server/chunks/3498.js +1 -1
  469. package/app/.next/server/chunks/3969.js +1 -1
  470. package/app/.next/server/chunks/4488.js +1 -1
  471. package/app/.next/server/chunks/4631.js +2 -2
  472. package/app/.next/server/chunks/7109.js +1 -1
  473. package/app/.next/server/chunks/7167.js +1 -0
  474. package/app/.next/server/chunks/7669.js +1 -1
  475. package/app/.next/server/chunks/8020.js +3 -3
  476. package/app/.next/server/chunks/8369.js +1 -1
  477. package/app/.next/server/chunks/9548.js +1 -1
  478. package/app/.next/server/instrumentation.js +1 -1
  479. package/app/.next/server/middleware-build-manifest.js +1 -1
  480. package/app/.next/server/middleware.js +3 -3
  481. package/app/.next/server/next-font-manifest.js +1 -1
  482. package/app/.next/server/next-font-manifest.json +1 -1
  483. package/app/.next/server/pages/500.html +2 -2
  484. package/app/.next/server/server-reference-manifest.js +1 -1
  485. package/app/.next/server/server-reference-manifest.json +1 -1
  486. package/app/.next/static/chunks/{5846-c2071f4db5ecc3da.js → 5846-014698d5430bb218.js} +1 -1
  487. package/app/.next/static/chunks/{647-f42f77310d9d9936.js → 647-52d3e2e64d7de62e.js} +2 -2
  488. package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-ed1f5b1ae0e01c02.js +1 -0
  489. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6a2bb3ad980b05b9.js +1 -0
  490. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-bef5c045e7eae657.js → page-6ab7701da3357bb9.js} +1 -1
  491. package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-027b3eb09d2d46e0.js +1 -0
  492. package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c9b98846b8479f3f.js +1 -0
  493. package/app/.next/static/chunks/app/(dashboard)/dashboard/auto-combo/{page-8e609f4c9b26a901.js → page-851063ded34ab7a6.js} +1 -1
  494. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-86acc32f9984a4e2.js +15 -0
  495. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-ac5dcffbe54f77f9.js +1 -0
  496. package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-7a233357dfbd2e05.js → page-8f6233f59f5277e9.js} +1 -1
  497. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-36f33de29eb978a1.js +1 -0
  498. package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-66ee4e631429e0d8.js → page-1e1eb2f79d606ab2.js} +1 -1
  499. package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-e8a28e4cf62889bd.js +1 -0
  500. package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-6e4bcb48b8731915.js → page-95e4b5e0bf023d76.js} +1 -1
  501. package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-d9b5c3282ec5d809.js +1 -0
  502. package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-72b768421394b42c.js +1 -0
  503. package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-d424641c7e428be9.js → page-5378e9473a20cd6a.js} +1 -1
  504. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-40d20c1273f57206.js +1 -0
  505. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-350aed2e86512c23.js +1 -0
  506. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-0400f175dd1372fa.js → error-a5ae03ba05400b04.js} +1 -1
  507. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-7deaa9f550841465.js +1 -0
  508. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-3ef302da4b756e50.js +1 -0
  509. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-87f0d43ce6cca0cb.js → page-cd0feb6c545b8a49.js} +1 -1
  510. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-c39d18f10fb7d3f6.js → error-ec9643134a96bbcd.js} +1 -1
  511. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-b5faf05c78a2cc54.js → loading-3519a633b514f31a.js} +1 -1
  512. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{page-6b38a30bfddf3b89.js → page-cbaa4b638a583fe9.js} +1 -1
  513. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-a4b8b03ffb39da1d.js → page-69eb8b0eb0e9de00.js} +1 -1
  514. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-b29f17c4dc7d449f.js → page-8cc93e616925f0a0.js} +1 -1
  515. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-8c8f2d59d0cbb516.js +1 -0
  516. package/app/.next/static/chunks/app/(dashboard)/{layout-6d0afc53f5f2a538.js → layout-7ae0c66c22bee8a1.js} +1 -1
  517. package/app/.next/static/chunks/app/400/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
  518. package/app/.next/static/chunks/app/401/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
  519. package/app/.next/static/chunks/app/403/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
  520. package/app/.next/static/chunks/app/408/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
  521. package/app/.next/static/chunks/app/429/page-3b9079ea400ca287.js +1 -0
  522. package/app/.next/static/chunks/app/500/page-3b9079ea400ca287.js +1 -0
  523. package/app/.next/static/chunks/app/502/page-3b9079ea400ca287.js +1 -0
  524. package/app/.next/static/chunks/app/503/page-3b9079ea400ca287.js +1 -0
  525. package/app/.next/static/chunks/app/callback/{page-585a53f7dc6a30f1.js → page-0f0ebc0820dd18a5.js} +1 -1
  526. package/app/.next/static/chunks/app/docs/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
  527. package/app/.next/static/chunks/app/{error-f7f595c541537e63.js → error-32c03f14529d3920.js} +1 -1
  528. package/app/.next/static/chunks/app/forbidden/page-8d8e1709a1e32585.js +1 -0
  529. package/app/.next/static/chunks/app/forgot-password/page-d5c9b77748aa9deb.js +1 -0
  530. package/app/.next/static/chunks/app/global-error-5840b1caa830f2ec.js +1 -0
  531. package/app/.next/static/chunks/app/landing/page-75b0c988db383cfc.js +1 -0
  532. package/app/.next/static/chunks/app/{layout-108592eafb959363.js → layout-070972eb026af319.js} +1 -1
  533. package/app/.next/static/chunks/app/{loading-e063375d5b12a2f7.js → loading-da2f6e1471afc070.js} +1 -1
  534. package/app/.next/static/chunks/app/login/{page-cf6b82187b09a701.js → page-26d717c652d56032.js} +1 -1
  535. package/app/.next/static/chunks/app/maintenance/page-3b9079ea400ca287.js +1 -0
  536. package/app/.next/static/chunks/app/not-found-faf36d2a9a452506.js +1 -0
  537. package/app/.next/static/chunks/app/offline/page-bf68bf461af876a3.js +1 -0
  538. package/app/.next/static/chunks/app/privacy/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
  539. package/app/.next/static/chunks/app/status/page-29a433b40631ce12.js +1 -0
  540. package/app/.next/static/chunks/app/terms/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
  541. package/app/.next/static/chunks/{main-app-c9da11a8061df107.js → main-app-ae230f6bf51a5edb.js} +1 -1
  542. package/app/logs/application/app.log +1 -0
  543. package/app/package.json +1 -1
  544. package/app/server.js +1 -1
  545. package/package.json +1 -1
  546. package/app/.next/server/chunks/5248.js +0 -1
  547. package/app/.next/server/chunks/7889.js +0 -2
  548. package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-43d6fa6b75cca497.js +0 -1
  549. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-49ae846d72948391.js +0 -1
  550. package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-16f886b3711a6a50.js +0 -1
  551. package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-e5bf8955e7b9a4f5.js +0 -1
  552. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d1e5ed188e14c618.js +0 -15
  553. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-8d4d2f071d114b90.js +0 -1
  554. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-7b1037d65eef97a8.js +0 -1
  555. package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-d5e0c556e2b32478.js +0 -1
  556. package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-8e35334b9f393139.js +0 -1
  557. package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-1d0ca9b5d3eaf7cd.js +0 -1
  558. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-d75ccdb976b36258.js +0 -1
  559. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1abb3ea768844f2b.js +0 -1
  560. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-9552383fd2e11282.js +0 -1
  561. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-d57908b59d4b482c.js +0 -1
  562. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-9e20463252daf023.js +0 -1
  563. package/app/.next/static/chunks/app/429/page-3b77bf358909019a.js +0 -1
  564. package/app/.next/static/chunks/app/500/page-3b77bf358909019a.js +0 -1
  565. package/app/.next/static/chunks/app/502/page-3b77bf358909019a.js +0 -1
  566. package/app/.next/static/chunks/app/503/page-3b77bf358909019a.js +0 -1
  567. package/app/.next/static/chunks/app/forbidden/page-b33079c1573b0bfa.js +0 -1
  568. package/app/.next/static/chunks/app/forgot-password/page-90cd6259c75badfc.js +0 -1
  569. package/app/.next/static/chunks/app/global-error-1dfd1c91ad5199fe.js +0 -1
  570. package/app/.next/static/chunks/app/landing/page-9d540ab1716f8e3e.js +0 -1
  571. package/app/.next/static/chunks/app/maintenance/page-3b77bf358909019a.js +0 -1
  572. package/app/.next/static/chunks/app/not-found-511518956bcae7bc.js +0 -1
  573. package/app/.next/static/chunks/app/offline/page-9d6ea493783a0219.js +0 -1
  574. package/app/.next/static/chunks/app/status/page-4e5e9b5a513aa474.js +0 -1
  575. /package/app/.next/static/{i4hXorUJfOXsVFs23YXiR → GDoUzLvy4YDqhnGqUCiZ0}/_buildManifest.js +0 -0
  576. /package/app/.next/static/{i4hXorUJfOXsVFs23YXiR → GDoUzLvy4YDqhnGqUCiZ0}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1066],{39387:(e,t,s)=>{Promise.resolve().then(s.bind(s,73732))},40993:(e,t,s)=>{"use strict";s.d(t,{Ex:()=>o.default,$n:()=>a.default,Zp:()=>n.default,Qv:()=>c.CardSkeleton,G9:()=>y.default,bQ:()=>N.default,pp:()=>v.default,Qn:()=>k.default,pd:()=>r.default,Mh:()=>g.default,uR:()=>m.default,aF:()=>i.default,rq:()=>x.default,LF:()=>u.default,KN:()=>f.default,Lo:()=>b.default,y7:()=>h.default,Iz:()=>j.default,l6:()=>l.default,lM:()=>d.default,cn:()=>p.default});var a=s(35806),r=s(34422),l=s(42994),n=s(81060),i=s(71361),c=s(92542);s(17705);var o=s(80927),d=s(19790);s(6261),s(55846),s(34243),s(89938),s(99023);var u=s(80178),x=s(85444),m=s(91961);s(25112);var p=s(45624),h=s(37415),f=s(48643),b=s(8287);s(1652);var g=s(92701);s(18150);var y=s(71689),j=s(33709);s(76332);var v=s(66200);s(61580);var k=s(51503);s(54128);var N=s(44638);s(21720),s(97050)},73732:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var a=s(95155),r=s(12115),l=s(40993),n=s(50910),i=s(5772),c=s(35144);function o(e){let t="string"==typeof e?e.trim():"";if(!t)return{key:"unknown",label:"Unknown",variant:"default",rank:0,raw:null};let s=t.toUpperCase();return s.includes("ENTERPRISE")||s.includes("CORP")||s.includes("ORG")?{key:"enterprise",label:"Enterprise",variant:"info",rank:7,raw:t}:s.includes("TEAM")||s.includes("CHATGPTTEAM")?{key:"team",label:"Team",variant:"info",rank:6,raw:t}:s.includes("BUSINESS")||s.includes("STANDARD")||s.includes("BIZ")?{key:"business",label:"Business",variant:"warning",rank:5,raw:t}:s.includes("ULTRA")?{key:"ultra",label:"Ultra",variant:"success",rank:4,raw:t}:s.includes("PRO")||s.includes("PREMIUM")?{key:"pro",label:"Pro",variant:"primary",rank:3,raw:t}:s.includes("PLUS")||s.includes("PAID")?{key:"plus",label:"Plus",variant:"secondary",rank:2,raw:t}:s.includes("FREE")||s.includes("INDIVIDUAL")||s.includes("BASIC")||s.includes("TRIAL")||s.includes("LEGACY")?{key:"free",label:"Free",variant:"default",rank:1,raw:t}:{key:"unknown",label:t.toLowerCase().split(/[\s_-]+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")||"Unknown",variant:"default",rank:0,raw:t}}var d=s(81060),u=s(80927),x=s(92542),m=s(20909);let p={antigravity:{label:"Antigravity",color:"#F59E0B"},github:{label:"GitHub Copilot",color:"#333"},kiro:{label:"Kiro AI",color:"#FF6B35"},codex:{label:"OpenAI Codex",color:"#10A37F"},claude:{label:"Claude Code",color:"#D97757"}},h=[{key:"all",labelKey:"tierAll"},{key:"enterprise",labelKey:"tierEnterprise"},{key:"team",labelKey:"tierTeam"},{key:"business",labelKey:"tierBusiness"},{key:"ultra",labelKey:"tierUltra"},{key:"pro",labelKey:"tierPro"},{key:"plus",labelKey:"tierPlus"},{key:"free",labelKey:"tierFree"},{key:"unknown",labelKey:"tierUnknown"}];function f(){let e=(0,n.c)("usage"),[t,s]=(0,r.useState)([]),[l,f]=(0,r.useState)({}),[b,g]=(0,r.useState)({}),[y,j]=(0,r.useState)({}),[v,k]=(0,r.useState)(!0),[N,w]=(0,r.useState)(null),[S,E]=(0,r.useState)(!1),[C,A]=(0,r.useState)(120),[I,M]=(0,r.useState)(!0),[P,T]=(0,r.useState)("all"),q=(0,r.useRef)(null),F=(0,r.useRef)(null),K=(0,r.useRef)({}),L=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers/client");if(!e.ok)throw Error("Failed");let t=(await e.json()).connections||[];return s(t),t}catch{return s([]),[]}},[]),_=(0,r.useCallback)(async(e,t)=>{let s=Date.now();if(!(s-(K.current[e]||0)<3e4)){K.current[e]=s,g(t=>({...t,[e]:!0})),j(t=>({...t,[e]:null}));try{let s=await fetch(`/api/usage/${e}`);if(!s.ok){let t=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return;if(401===s.status)return void f(s=>({...s,[e]:{quotas:[],message:t}}));throw Error(`HTTP ${s.status}: ${t}`)}let a=await s.json(),r=function(e,t){if(!t||"object"!=typeof t)return[];let s=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"claude":t.message?s.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,c.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));s.sort((t,s)=>{let a=t.modelKey||t.name,r=s.modelKey||s.name;return(e.get(a)??999)-(e.get(r)??999)})}return s}(t,a);f(t=>({...t,[e]:{quotas:r,plan:a.plan||null,message:a.message||null,raw:a}}))}catch(t){j(s=>({...s,[e]:t.message||"Failed to fetch quota"}))}finally{g(t=>({...t,[e]:!1}))}}},[]),R=(0,r.useCallback)(async(e,t)=>{await _(e,t),w(new Date)},[_]),D=(0,r.useCallback)(async()=>{if(!S){E(!0),A(120);try{let e=(await L()).filter(e=>m.wb.includes(e.provider)&&"oauth"===e.authType);await Promise.all(e.map(e=>_(e.id,e.provider))),w(new Date)}catch(e){console.error("Error refreshing all:",e)}finally{E(!1)}}},[S,L,_]);(0,r.useEffect)(()=>{(async()=>{M(!0),await D(),M(!1)})()},[]),(0,r.useEffect)(()=>{if(!v){q.current&&clearInterval(q.current),F.current&&clearInterval(F.current);return}return q.current=setInterval(D,12e4),F.current=setInterval(()=>{A(e=>e<=1?120:e-1)},1e3),()=>{q.current&&clearInterval(q.current),F.current&&clearInterval(F.current)}},[v,D]),(0,r.useEffect)(()=>{let e=()=>{document.hidden?(q.current&&clearInterval(q.current),F.current&&clearInterval(F.current)):v&&(q.current=setInterval(D,12e4),F.current=setInterval(()=>{A(e=>e<=1?120:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[v,D]);let O=(0,r.useMemo)(()=>t.filter(e=>m.wb.includes(e.provider)&&"oauth"===e.authType),[t]),U=(0,r.useMemo)(()=>{let e={antigravity:1,github:2,codex:3,claude:4,kiro:5};return[...O].sort((t,s)=>(e[t.provider]||9)-(e[s.provider]||9))},[O]),$=(0,r.useMemo)(()=>{let e={};for(let t of U)e[t.id]=o(l[t.id]?.plan);return e},[U,l]),G=(0,r.useMemo)(()=>{let e={all:U.length,enterprise:0,team:0,business:0,ultra:0,pro:0,free:0,unknown:0};for(let t of U){let s=$[t.id]?.key||"unknown";e[s]=(e[s]||0)+1}return e},[U,$]),Q=(0,r.useMemo)(()=>"all"===P?U:U.filter(e=>($[e.id]?.key||"unknown")===P),[U,$,P]);return I?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(x.CardSkeleton,{}),(0,a.jsx)(x.CardSkeleton,{})]}):0===U.length?(0,a.jsx)(d.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] opacity-15",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-main",children:e("noProviders")}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-[400px] mx-auto",children:e("connectProvidersForQuota")})]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main m-0",children:e("providerLimits")}),(0,a.jsxs)("span",{className:"text-[13px] text-text-muted",children:[e("accountsCount",{count:Q.length}),Q.length!==U.length&&` ${e("filteredFromCount",{count:U.length})}`]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>k(e=>!e),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-white/[0.08] bg-transparent cursor-pointer text-text-main text-[13px]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:v?"#22c55e":"var(--text-muted)"},children:v?"toggle_on":"toggle_off"}),e("autoRefresh"),v&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",C,"s)"]})]}),(0,a.jsxs)("button",{onClick:D,disabled:S,className:"flex items-center gap-1.5 px-3.5 py-1.5 rounded-lg bg-white/[0.06] border border-white/10 text-text-main text-[13px] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${S?"animate-spin":""}`,children:"refresh"}),e("refreshAll")]})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:h.map(t=>{if("all"!==t.key&&!G[t.key])return null;let s=P===t.key;return(0,a.jsxs)("button",{onClick:()=>T(t.key),className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold cursor-pointer",style:{border:s?"1px solid var(--primary, #E54D5E)":"1px solid rgba(255,255,255,0.12)",background:s?"rgba(249,120,21,0.14)":"transparent",color:s?"var(--primary, #E54D5E)":"var(--text-muted)"},children:[(0,a.jsx)("span",{children:e(t.labelKey)}),(0,a.jsx)("span",{className:"opacity-85",children:G[t.key]||0})]},t.key)})}),(0,a.jsxs)("div",{className:"rounded-xl border border-white/[0.06] overflow-hidden bg-black/15",children:[(0,a.jsxs)("div",{className:"items-center px-4 py-2.5 border-b border-white/[0.06] text-[11px] font-semibold uppercase tracking-wider text-text-muted",style:{display:"grid",gridTemplateColumns:"280px 1fr 100px 48px"},children:[(0,a.jsx)("div",{children:e("account")}),(0,a.jsx)("div",{children:e("modelQuotas")}),(0,a.jsx)("div",{className:"text-center",children:e("lastUsed")}),(0,a.jsx)("div",{className:"text-center",children:e("actions")})]}),Q.map((t,s)=>{let r=l[t.id],n=b[t.id],c=y[t.id],d=p[t.provider]||{label:t.provider,color:"#666"},x=$[t.id]||o(null);return(0,a.jsxs)("div",{className:"items-center px-4 py-3.5 transition-[background] duration-150 hover:bg-white/[0.02]",style:{display:"grid",gridTemplateColumns:"280px 1fr 100px 48px",borderBottom:s<Q.length-1?"1px solid rgba(255,255,255,0.04)":"none"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center overflow-hidden shrink-0",children:(0,a.jsx)(i.default,{src:`/providers/${t.provider}.png`,alt:t.provider,width:32,height:32,className:"object-contain",sizes:"32px"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[13px] font-semibold text-text-main truncate",children:t.name||d.label}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,a.jsx)("span",{title:r?.plan?e("rawPlanWithValue",{plan:r.plan}):e("noPlanFromProvider"),children:(0,a.jsx)(u.default,{variant:x.variant,size:"sm",dot:!0,children:x.label})}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:d.label})]})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-x-3 gap-y-1.5 pr-3",children:n?(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-text-muted text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),e("loadingQuotas")]}):c?(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap max-w-[300px]",children:c})]}):r?.message&&(!r.quotas||0===r.quotas.length)?(0,a.jsx)("div",{className:"text-xs text-text-muted italic",children:r.message}):r?.quotas?.length>0?r.quotas.map((e,t)=>{var s,r,l;let n=void 0!==e.remainingPercentage?Math.round(e.remainingPercentage):(s=e.used,(r=e.total)&&0!==r?!s||s<0?100:s>=r?0:Math.round((r-s)/r*100):0),i=n>70?{bar:"#22c55e",text:"#22c55e",bg:"rgba(34,197,94,0.12)"}:n>=30?{bar:"#eab308",text:"#eab308",bg:"rgba(234,179,8,0.12)"}:{bar:"#ef4444",text:"#ef4444",bg:"rgba(239,68,68,0.12)"},c=function(e){if(!e)return null;try{let t=new Date(e)-new Date;if(t<=0)return null;let s=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4);if(s>=24){let e=Math.floor(s/24);return`${e}d ${s%24}h`}return`${s}h ${a}m`}catch{return null}}(e.resetAt),o={"gemini-3-pro-high":"G3 Pro","gemini-3-pro-low":"G3 Pro Low","gemini-3-flash":"G3 Flash","gemini-2.5-flash":"G2.5 Flash","claude-opus-4-6-thinking":"Opus 4.6 Tk","claude-opus-4-5-thinking":"Opus 4.5 Tk","claude-opus-4-5":"Opus 4.5","claude-sonnet-4-5-thinking":"Sonnet 4.5 Tk","claude-sonnet-4-5":"Sonnet 4.5",chat:"Chat",completions:"Completions",premium_interactions:"Premium",session:"Session",weekly:"Weekly",agentic_request:"Agentic",agentic_request_freetrial:"Agentic (Trial)"}[l=e.name]||l;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-[200px] shrink-0",children:[(0,a.jsx)("span",{className:"text-[11px] font-semibold py-0.5 px-2 rounded whitespace-nowrap min-w-[60px] text-center",style:{background:i.bg,color:i.text},children:o}),c&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted whitespace-nowrap",children:["⏱ ",c]}),(0,a.jsx)("div",{className:"flex-1 h-1.5 rounded-sm bg-white/[0.06] min-w-[60px] overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-sm transition-[width] duration-300 ease-out",style:{width:`${Math.min(n,100)}%`,background:i.bar}})}),(0,a.jsxs)("span",{className:"text-[11px] font-semibold min-w-[32px] text-right",style:{color:i.text},children:[n,"%"]})]},t)}):(0,a.jsx)("div",{className:"text-xs text-text-muted italic",children:e("noQuotaData")})}),(0,a.jsx)("div",{className:"text-center text-[11px] text-text-muted",children:N?(0,a.jsx)("span",{children:N.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}):"-"}),(0,a.jsx)("div",{className:"flex justify-center gap-0.5",children:(0,a.jsx)("button",{onClick:()=>R(t.id,t.provider),disabled:n,title:e("refreshQuota"),className:"p-1 rounded-md border-none bg-transparent cursor-pointer disabled:cursor-not-allowed disabled:opacity-30 opacity-60 hover:opacity-100 flex items-center justify-center transition-opacity duration-150",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] text-text-muted ${n?"animate-spin":""}`,children:"refresh"})})})]},t.id)}),0===Q.length&&(0,a.jsxs)("div",{className:"py-6 px-4 text-center text-text-muted text-[13px]",children:[e("noAccountsForTierFilter")," ",(0,a.jsx)("strong",{children:e(h.find(e=>e.key===P)?.labelKey||"tierUnknown")}),"."]})]})]})}function b(){let e=(0,n.c)("usage"),t=(0,n.c)("common"),[s,i]=(0,r.useState)({lockouts:[],cacheStats:null}),[c,o]=(0,r.useState)(!0),d=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/rate-limits");e.ok&&i(await e.json())}catch{}finally{o(!1)}},[]);return(0,r.useEffect)(()=>{d();let e=setInterval(d,1e4);return()=>clearInterval(e)},[d]),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"lock_clock"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:e("modelLockouts")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e("lockoutsAutoRefreshHint")})]}),s.lockouts.length>0&&(0,a.jsx)("span",{className:"px-2.5 py-1 rounded-full text-xs font-semibold bg-orange-500/10 text-orange-400 border border-orange-500/20",children:e("lockedCount",{count:s.lockouts.length})})]}),0===s.lockouts.length?(0,a.jsxs)("div",{className:"text-center py-6 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] mb-2 block opacity-40","aria-hidden":"true",children:"lock_open"}),(0,a.jsx)("p",{className:"text-sm",children:e("noLockouts")})]}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:s.lockouts.map((s,r)=>{var l;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 rounded-lg bg-orange-500/5 border border-orange-500/15",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-orange-400","aria-hidden":"true",children:"lock"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:s.model}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[e("account"),":"," ",(0,a.jsx)("span",{className:"font-mono",children:s.accountId?.slice(0,12)||t("none")}),s.reason&&(0,a.jsxs)(a.Fragment,{children:[e("reasonSeparator"),s.reason]})]})]})]}),(0,a.jsx)("span",{className:"text-xs font-mono tabular-nums text-orange-400",children:e("timeLeft",{time:(l=s.remainingMs)<1e3?e("durationMillisecondsShort",{value:l}):l<6e4?e("durationSecondsShort",{value:Math.ceil(l/1e3)}):e("durationMinutesShort",{value:Math.ceil(l/6e4)})})})]},r)})})]})})}function g(){let e=(0,n.c)("usage"),[t,s]=(0,r.useState)({count:0,sessions:[]}),[i,c]=(0,r.useState)(!0),o=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/sessions");e.ok&&s(await e.json())}catch{}finally{c(!1)}},[]);return(0,r.useEffect)(()=>{o();let e=setInterval(o,5e3);return()=>clearInterval(e)},[o]),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-cyan-500/10 text-cyan-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"fingerprint"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:e("activeSessions")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e("sessionsTrackedHint")})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("span",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-cyan-500/10 border border-cyan-500/20",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-cyan-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-sm font-semibold tabular-nums text-cyan-400",children:t.count})]})})]}),0===t.sessions.length?(0,a.jsxs)("div",{className:"text-center py-8 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] mb-2 block opacity-40","aria-hidden":"true",children:"fingerprint"}),(0,a.jsx)("p",{className:"text-sm",children:e("noSessions")}),(0,a.jsx)("p",{className:"text-xs mt-1",children:e("sessionsHint")})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border/30",children:[(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("session")}),(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("age")}),(0,a.jsx)("th",{className:"text-right py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("requests")}),(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("connection")})]})}),(0,a.jsx)("tbody",{children:t.sessions.map(t=>{var s;return(0,a.jsxs)("tr",{className:"border-b border-border/10 hover:bg-surface/20 transition-colors",children:[(0,a.jsx)("td",{className:"py-2.5 px-3",children:(0,a.jsxs)("span",{className:"font-mono text-xs px-2 py-1 rounded bg-surface/40 text-text-muted",children:[t.sessionId.slice(0,12),"…"]})}),(0,a.jsx)("td",{className:"py-2.5 px-3 text-text-muted tabular-nums",children:(s=t.ageMs)<6e4?e("durationSecondsShort",{value:Math.floor(s/1e3)}):s<36e5?e("durationMinutesShort",{value:Math.floor(s/6e4)}):e("durationHoursShort",{value:Math.floor(s/36e5)})}),(0,a.jsx)("td",{className:"py-2.5 px-3 text-right",children:(0,a.jsx)("span",{className:"font-semibold tabular-nums",children:t.requestCount})}),(0,a.jsx)("td",{className:"py-2.5 px-3",children:t.connectionId?(0,a.jsx)("span",{className:"text-xs font-mono text-cyan-400",children:t.connectionId.slice(0,10)}):(0,a.jsx)("span",{className:"text-text-muted/40",children:e("notAvailableSymbol")})})]},t.sessionId)})})]})})]})}function y(){return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(l.Qv,{}),children:(0,a.jsx)(f,{})}),(0,a.jsx)(b,{}),(0,a.jsx)(g,{})]})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=39387)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3542],{4333:(e,s,_)=>{Promise.resolve().then(_.bind(_,24726))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,4726,8441,3794,7358],()=>e(e.s=4333)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1606],{38701:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var a=s(95155),r=s(12115),l=s(50910);let i={image:{icon:"image",endpoint:"/api/v1/images/generations",label:"Image Generation",placeholder:"A serene landscape with mountains at sunset...",color:"from-purple-500 to-pink-500"},video:{icon:"videocam",endpoint:"/api/v1/videos/generations",label:"Video Generation",placeholder:"A timelapse of a flower blooming...",color:"from-blue-500 to-cyan-500"},music:{icon:"music_note",endpoint:"/api/v1/music/generations",label:"Music Generation",placeholder:"Upbeat electronic music with synth pads...",color:"from-orange-500 to-yellow-500"}};function n(){let e=(0,l.c)("media"),[t,s]=(0,r.useState)("image"),[n,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,x]=(0,r.useState)([]),[u,p]=(0,r.useState)(!1),[h,b]=(0,r.useState)(!1),[g,f]=(0,r.useState)(null),[j,y]=(0,r.useState)(null),N=async e=>{b(!0);try{let t=await fetch(i[e].endpoint);if(t.ok){let e=(await t.json()).data||[];x(e),e.length>0&&c(e[0].id)}}catch{x([])}b(!1)},v=async()=>{if(n.trim()){p(!0),y(null),f(null);try{let e=i[t],s=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d||void 0,prompt:n.trim(),..."image"===t?{size:"1024x1024",n:1}:{}})});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(e?.error?.message||`Generation failed (${s.status})`)}let a=await s.json();f({type:t,data:a,timestamp:Date.now()})}catch(e){y(e.message||"Generation failed")}p(!1)}};(0,r.useState)(()=>{N("image")});let w=i[t];return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:e("title")}),(0,a.jsx)("p",{className:"text-text-muted text-sm mt-1",children:e("subtitle")})]}),(0,a.jsx)("div",{className:"flex gap-2 p-1 bg-surface/50 rounded-xl border border-black/5 dark:border-white/5",children:Object.keys(i).map(e=>{let r=i[e],l=e===t;return(0,a.jsxs)("button",{onClick:()=>{s(e),o(""),f(null),y(null),N(e)},className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-all ${l?"bg-primary/10 text-primary shadow-sm border border-primary/20":"text-text-muted hover:text-text-main hover:bg-surface/80"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r.icon}),r.label]},e)})}),(0,a.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:e("model")}),h?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}),e("loadingModels")]}):m.length>0?(0,a.jsx)("select",{value:d,onChange:e=>c(e.target.value),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:m.map(e=>(0,a.jsx)("option",{value:e.id,children:e.id},e.id))}):(0,a.jsx)("p",{className:"text-text-muted text-sm",children:e("noModels")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:e("prompt")}),(0,a.jsx)("textarea",{rows:3,value:n,onChange:e=>o(e.target.value),placeholder:w.placeholder,className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/30 resize-none"})]}),(0,a.jsx)("button",{onClick:v,disabled:u||!n.trim(),className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg text-white font-medium transition-all bg-gradient-to-r ${w.color} ${u||!n.trim()?"opacity-50 cursor-not-allowed":"hover:opacity-90 hover:shadow-lg"}`,children:u?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),e("generating")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"auto_awesome"}),e("generate")," ",w.label]})})]}),j&&(0,a.jsxs)("div",{className:"bg-red-500/10 border border-red-500/20 rounded-xl p-4 flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[20px] mt-0.5",children:"error"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-red-500",children:e("error")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:j})]})]}),g&&(0,a.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] bg-gradient-to-r ${w.color} bg-clip-text text-transparent`,children:w.icon}),(0,a.jsx)("h3",{className:"text-sm font-medium text-text-main",children:e("result")}),(0,a.jsx)("span",{className:"text-xs text-text-muted ml-auto",children:new Date(g.timestamp).toLocaleTimeString()})]}),(0,a.jsx)("pre",{className:"bg-surface rounded-lg p-4 text-xs text-text-muted overflow-auto max-h-96 custom-scrollbar",children:JSON.stringify(g.data,null,2)})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Object.keys(i).map(t=>{let s=i[t];return(0,a.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)("div",{className:`flex items-center justify-center size-8 rounded-lg bg-gradient-to-r ${s.color}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-white text-[16px]",children:s.icon})}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:s.label})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e(`${t}Description`)}),(0,a.jsxs)("code",{className:"block mt-2 text-xs text-primary/70 bg-primary/5 rounded px-2 py-1",children:["POST ",s.endpoint]})]},t)})})]})}},50910:(e,t,s)=>{"use strict";s.d(t,{c:()=>l});var a=s(33418);function r(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let l=r(0,a.c3);r(0,a.kc)},79021:(e,t,s)=>{Promise.resolve().then(s.bind(s,38701))}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=79021)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{7153:(e,s,t)=>{Promise.resolve().then(t.bind(t,49433))},40993:(e,s,t)=>{"use strict";t.d(s,{Ex:()=>o.default,$n:()=>l.default,Zp:()=>i.default,Qv:()=>d.CardSkeleton,G9:()=>v.default,bQ:()=>k.default,pp:()=>N.default,Qn:()=>y.default,pd:()=>r.default,Mh:()=>g.default,uR:()=>u.default,aF:()=>n.default,rq:()=>m.default,LF:()=>x.default,KN:()=>f.default,Lo:()=>b.default,y7:()=>h.default,Iz:()=>j.default,l6:()=>a.default,lM:()=>c.default,cn:()=>p.default});var l=t(35806),r=t(34422),a=t(42994),i=t(81060),n=t(71361),d=t(92542);t(17705);var o=t(80927),c=t(19790);t(6261),t(55846),t(34243),t(89938),t(99023);var x=t(80178),m=t(85444),u=t(91961);t(25112);var p=t(45624),h=t(37415),f=t(48643),b=t(8287);t(1652);var g=t(92701);t(18150);var v=t(71689),j=t(33709);t(76332);var N=t(66200);t(61580);var y=t(51503);t(54128);var k=t(44638);t(21720),t(97050)},49433:(e,s,t)=>{"use strict";t.d(s,{default:()=>h});var l=t(95155),r=t(50910),a=t(12115),i=t(14051),n=t.n(i),d=t(5772),o=t(98500),c=t.n(o),x=t(73321),m=t(40993),u=t(20909),p=t(67671);function h({machineId:e}){let s=(0,r.c)("home"),t=(0,r.c)("common"),i=(0,r.c)("sidebar"),[n,d]=(0,a.useState)([]),[o,x]=(0,a.useState)([]),[p,h]=(0,a.useState)(!0),[g,v]=(0,a.useState)("/v1"),[j,N]=(0,a.useState)(null),[y,k]=(0,a.useState)({});(0,a.useEffect)(()=>{v(`${window.location.origin}/v1`)},[]);let w=(0,a.useCallback)(async()=>{try{let[e,s,t]=await Promise.all([fetch("/api/providers"),fetch("/api/models"),fetch("/api/provider-metrics")]);if(e.ok){let s=await e.json();d(s.connections||[])}if(s.ok){let e=await s.json();x(e.models||[])}if(t.ok){let e=await t.json();k(e.metrics||{})}}catch(e){console.log("Error fetching data:",e)}finally{h(!1)}},[]);(0,a.useEffect)(()=>{w()},[w]);let S=(0,a.useMemo)(()=>Object.entries(u.Q2).map(([e,s])=>{let t=n.filter(s=>s.provider===e),l=t.filter(e=>!1!==e.isActive&&("active"===e.testStatus||"success"===e.testStatus||"unknown"===e.testStatus)).length,r=t.filter(e=>!1!==e.isActive&&("error"===e.testStatus||"expired"===e.testStatus||"unavailable"===e.testStatus)).length,a=new Set([e,s.alias].filter(Boolean)),i=o.filter(e=>a.has(e.provider)),d=u.IS[e]?"free":u.zN[e]?"oauth":"apikey";return{id:e,provider:s,total:t.length,connected:l,errors:r,modelCount:i.length,authType:d}}),[n,o]),R=(0,a.useMemo)(()=>{if(!j)return[];let e=new Set([j.id,j.provider?.alias].filter(Boolean));return o.filter(s=>e.has(s.provider))},[j,o]),q=[{label:s("documentation"),href:"/docs",icon:"menu_book"},{label:i("providers"),href:"/dashboard/providers",icon:"dns"},{label:i("combos"),href:"/dashboard/combos",icon:"layers"},{label:i("analytics"),href:"/dashboard/analytics",icon:"analytics"},{label:s("healthMonitor"),href:"/dashboard/health",icon:"health_and_safety"},{label:i("cliTools"),href:"/dashboard/cli-tools",icon:"terminal"},{label:s("reportIssue"),href:"https://github.com/diegosouzapw/OmniRoute/issues",external:!0,icon:"bug_report"}];return p?(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsx)(m.Qv,{}),(0,l.jsx)(m.Qv,{})]}):(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsx)(m.Zp,{children:(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-semibold",children:s("quickStart")}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:s("quickStartDesc")})]}),(0,l.jsxs)(c(),{href:"/docs",className:"hidden sm:inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"menu_book"}),s("fullDocs")]})]}),(0,l.jsxs)("ol",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm",children:[(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"key"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step1Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step1Desc",{endpoint:e=>(0,l.jsx)(c(),{href:"/dashboard/endpoint",className:"text-primary hover:underline",children:e})})})]})]}),(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-green-500/10 text-green-500 shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"dns"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step2Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step2Desc",{providers:e=>(0,l.jsx)(c(),{href:"/dashboard/providers",className:"text-primary hover:underline",children:e})})})]})]}),(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"link"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step3Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s("step3Desc",{url:g})})]})]}),(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-amber-500/10 text-amber-500 shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"analytics"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step4Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step4Desc",{logs:e=>(0,l.jsx)(c(),{href:"/dashboard/usage",className:"text-primary hover:underline",children:e}),analytics:e=>(0,l.jsx)(c(),{href:"/dashboard/analytics",className:"text-primary hover:underline",children:e})})})]})]})]}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:q.map(e=>(0,l.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e.icon||(e.external?"open_in_new":"arrow_forward")}),e.label]},e.href))})]})}),(0,l.jsxs)(m.Zp,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-semibold",children:s("providersOverview")}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:s("configuredOf",{configured:S.filter(e=>e.total>0).length,total:S.length})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4",children:[(0,l.jsxs)("div",{className:"hidden sm:flex items-center gap-3 text-[11px] text-text-muted",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",t("free")]}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{className:"size-2 rounded-full bg-blue-500"})," ",s("oauthLabel")]}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," ",s("apiKeyLabel")]})]}),(0,l.jsxs)(c(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"settings"}),t("manage")]})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:S.map(e=>(0,l.jsx)(f,{item:e,metrics:y[e.provider.alias]||y[e.id],onClick:()=>N(e)},e.id))})]}),j&&(0,l.jsx)(b,{provider:j,models:R,onClose:()=>N(null)})]})}function f({item:e,metrics:s,onClick:t}){let[i,n]=(0,a.useState)(!1),o=(0,r.c)("home"),c=(0,r.c)("common"),x=e.errors>0?"text-red-500":e.connected>0?"text-green-500":"text-text-muted",m={free:{color:"bg-green-500",label:c("free")},oauth:{color:"bg-blue-500",label:o("oauthLabel")},apikey:{color:"bg-amber-500",label:o("apiKeyLabel")}},u=m[e.authType]||m.apikey;return(0,l.jsx)("button",{onClick:t,className:"border border-border rounded-lg p-3 hover:bg-surface/40 transition-colors text-left cursor-pointer w-full",children:(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.provider.color||"#888"}15`},children:i?(0,l.jsx)("span",{className:"text-[10px] font-bold",style:{color:e.provider.color||"#888"},children:e.provider.textIcon||e.provider.id.slice(0,2).toUpperCase()}):(0,l.jsx)(d.default,{src:`/providers/${e.provider.id}.png`,alt:e.provider.name,width:26,height:26,className:"object-contain rounded-lg",sizes:"26px",onError:()=>n(!0)})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm font-semibold truncate",children:e.provider.name}),(0,l.jsx)("span",{className:`size-2 rounded-full ${u.color} shrink-0`,title:u.label})]}),(0,l.jsx)("p",{className:`text-xs ${x}`,children:0===e.total?c("notConfigured"):o("activeError",{active:e.connected,errors:e.errors})}),s&&s.totalRequests>0&&(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,l.jsx)("span",{className:"text-emerald-500",children:s.totalSuccesses}),"/",o("requestsShort",{count:s.totalRequests})]}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[s.successRate,"%"]}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",s.avgLatencyMs,"ms"]})]})]}),(0,l.jsxs)("div",{className:"text-right shrink-0",children:[(0,l.jsx)("p",{className:"text-xs font-medium text-text-main",children:e.modelCount}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted",children:c("models")})]})]})})}function b({provider:e,models:s,onClose:t}){let[i,n]=(0,a.useState)(null),d=(0,p.i)(),o=(0,x.useRouter)(),c=(0,r.c)("home"),u=(0,r.c)("common"),h=(0,r.c)("sidebar");return(0,l.jsx)(m.aF,{isOpen:!0,title:c("providerModelsTitle",{provider:e.provider.name}),onClose:t,children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"token"}),1===s.length?c("modelAvailable",{count:s.length}):c("modelsAvailable",{count:s.length}),e.total>0&&(0,l.jsxs)("span",{className:"ml-auto text-xs text-green-500",children:["●"," ",1===e.connected?c("connectionsActive",{count:e.connected}):c("connectionsActivePlural",{count:e.connected})]})]}),0===s.length?(0,l.jsxs)("div",{className:"text-center py-6",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:c("noModelsAvailable")}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:c("configureFirst",{providers:h("providers")})})]}):(0,l.jsx)("div",{className:"flex flex-col gap-1 max-h-[400px] overflow-y-auto",children:s.map(e=>(0,l.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg hover:bg-surface/50 transition-colors group",children:[(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("p",{className:"font-mono text-sm text-text-main truncate",children:e.fullModel}),e.alias!==e.model&&(0,l.jsxs)("p",{className:"text-[10px] text-text-muted",children:[c("aliasLabel"),": ",e.alias]})]}),(0,l.jsx)("button",{onClick:()=>{var s;return s=e.fullModel,void(navigator.clipboard.writeText(s),n(s),d.success(c("copiedModel",{model:s})),setTimeout(()=>n(null),2e3))},className:"shrink-0 ml-2 p-1.5 rounded-lg text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors opacity-0 group-hover:opacity-100",title:c("copyModelName"),children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:i===e.fullModel?"check":"content_copy"})})]},e.fullModel))}),(0,l.jsxs)("div",{className:"flex gap-2 pt-2 border-t border-border",children:[(0,l.jsxs)(m.$n,{variant:"secondary",fullWidth:!0,size:"sm",onClick:()=>{var s;return s=`/dashboard/providers/${e.id}`,void(t(),o.push(s))},className:"flex-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"settings"}),c("configureProvider")]}),(0,l.jsx)(m.$n,{variant:"ghost",size:"sm",onClick:t,children:u("close")})]})]})})}h.propTypes={machineId:n().string},f.propTypes={item:n().shape({id:n().string.isRequired,provider:n().shape({id:n().string.isRequired,name:n().string.isRequired,color:n().string,textIcon:n().string,alias:n().string}).isRequired,total:n().number.isRequired,connected:n().number.isRequired,errors:n().number.isRequired,modelCount:n().number.isRequired,authType:n().string.isRequired}).isRequired,metrics:n().shape({totalRequests:n().number,totalSuccesses:n().number,successRate:n().number,avgLatencyMs:n().number}),onClick:n().func.isRequired},b.propTypes={provider:n().object.isRequired,models:n().array.isRequired,onClose:n().func.isRequired}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=7153)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{40993:(e,t,r)=>{"use strict";r.d(t,{Ex:()=>d.default,$n:()=>a.default,Zp:()=>l.default,Qv:()=>n.CardSkeleton,G9:()=>v.default,bQ:()=>C.default,pp:()=>j.default,Qn:()=>N.default,pd:()=>s.default,Mh:()=>g.default,uR:()=>u.default,aF:()=>o.default,rq:()=>m.default,LF:()=>p.default,KN:()=>f.default,Lo:()=>y.default,y7:()=>h.default,Iz:()=>b.default,l6:()=>i.default,lM:()=>c.default,cn:()=>x.default});var a=r(35806),s=r(34422),i=r(42994),l=r(81060),o=r(71361),n=r(92542);r(17705);var d=r(80927),c=r(19790);r(6261),r(55846),r(34243),r(89938),r(99023);var p=r(80178),m=r(85444),u=r(91961);r(25112);var x=r(45624),h=r(37415),f=r(48643),y=r(8287);r(1652);var g=r(92701);r(18150);var v=r(71689),b=r(33709);r(76332);var j=r(66200);r(61580);var N=r(51503);r(54128);var C=r(44638);r(21720),r(97050)},56411:(e,t,r)=>{Promise.resolve().then(r.bind(r,88618))},88618:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var a=r(95155),s=r(12115),i=r(67671),l=r(14051),o=r.n(l),n=r(73321),d=r(98500),c=r.n(d),p=r(5772),m=r(50910),u=r(40993),x=r(20909),h=r(81135),f=r(30949);function y(){let e=(0,n.useParams)(),t=(0,n.useRouter)(),r=e.id,[i,l]=(0,s.useState)([]),[o,d]=(0,s.useState)(!0),[y,b]=(0,s.useState)(null),[C,w]=(0,s.useState)(!1),[R,$]=(0,s.useState)(!1),[A,M]=(0,s.useState)(!1),[P,_]=(0,s.useState)(!1),[O,K]=(0,s.useState)(null),[I,q]=(0,s.useState)(null),[L,U]=(0,s.useState)({}),[F,D]=(0,s.useState)(!1),{copied:z,copy:J}=(0,f.C)(),B=(0,m.c)("providers"),W=(0,s.useRef)(!1),V=(0,s.useRef)(!1),[H,Q]=(0,s.useState)(null),[G,Z]=(0,s.useState)(null),[Y,X]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!1),[er,ea]=(0,s.useState)({current:0,total:0,phase:"idle",status:"",logs:[],error:"",importedCount:0}),es=y?{id:y.id,name:y.name||("anthropic-compatible"===y.type?B("anthropicCompatibleName"):B("openaiCompatibleName")),color:"anthropic-compatible"===y.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===y.type?"AC":"OC",apiType:y.apiType,baseUrl:y.baseUrl,type:y.type}:x.IS[r]||x.zN[r]||x.fg[r],ei=!!x.IS[r]||!!x.zN[r],el=(0,h.KC)(r),eo=(0,x.wG)(r),en=(0,x.mq)(r),ed=(0,x.gb)(r),ec=en||ed,ep=ec?r:eo,em=ec?y?.prefix||r:eo,eu=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&U(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),ex=(0,s.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"})]),a=await e.json(),s=await t.json();if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===r);l(e)}if(t.ok){let e=(s.nodes||[]).find(e=>e.id===r)||null;if(!e&&ec)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}b(e)}}catch(e){console.log("Error fetching connections:",e)}finally{d(!1)}},[r,ec]),eh=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(b(a.node),await ex(),_(!1))}catch(e){console.log("Error updating provider node:",e)}};(0,s.useEffect)(()=>{ex(),eu(),fetch("/api/settings/proxy").then(e=>e.ok?e.json():null).then(e=>Z(e)).catch(()=>{})},[ex,eu]),(0,s.useEffect)(()=>{o||0!==i.length||!es||ec||W.current||V.current||(W.current=!0,ei?w(!0):$(!0))},[o]);let ef=async(e,t,r=eo)=>{let a=`${r}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await eu();else{let t=await e.json();alert(t.error||B("failedSetAlias"))}}catch(e){console.log("Error setting alias:",e)}},ey=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await eu()}catch(e){console.log("Error deleting alias:",e)}},eg=async e=>{if(confirm(B("deleteConnectionConfirm")))try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&l(i.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}},ev=(0,s.useCallback)(()=>{ex(),w(!1)},[ex]),eb=async e=>{try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})});if(t.ok)return await ex(),$(!1),null;let a=await t.json().catch(()=>({}));return a.error?.message||a.error||B("failedSaveConnection")}catch(e){return console.log("Error saving connection:",e),B("failedSaveConnectionRetry")}},ej=async e=>{try{(await fetch(`/api/providers/${O.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await ex(),M(!1))}catch(e){console.log("Error updating connection:",e)}},eN=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&l(r=>r.map(r=>r.id===e?{...r,isActive:t}:r))}catch(e){console.log("Error updating connection status:",e)}},eC=async(e,t)=>{try{(await fetch("/api/rate-limits",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e,enabled:t})})).ok&&l(r=>r.map(r=>r.id===e?{...r,rateLimitProtection:t}:r))}catch(e){console.error("Error toggling rate limit:",e)}},ew=async e=>{if(e&&!I){q(e);try{let t=await fetch(`/api/providers/${e}/test`,{method:"POST"});if(!t.ok){let e=await t.json().catch(()=>({}));alert(e.error||B("failedRetestConnection"));return}await ex()}catch(e){console.error("Error retesting connection:",e)}finally{q(null)}}},ek=async(e,t)=>{if(e&&t)try{let r=t.priority,a=e.priority;r===a&&(r=i.indexOf(e)>i.indexOf(t)?t.priority-.5:t.priority+.5),await Promise.all([fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:r})}),fetch(`/api/providers/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})})]),await ex()}catch(e){console.log("Error swapping priority:",e)}},eT=async()=>{if(Y)return;let e=i.find(e=>!1!==e.isActive);if(e){X(!0),et(!0),ea({current:0,total:0,phase:"fetching",status:B("fetchingModels"),logs:[],error:"",importedCount:0});try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void ea(e=>({...e,phase:"error",status:B("failedFetchModels"),error:a.error||B("failedImportModels")}));let s=a.models||[];if(0===s.length)return void ea(e=>({...e,phase:"done",status:B("noModelsFound"),logs:[B("noModelsReturnedFromEndpoint")]}));ea(e=>({...e,phase:"importing",total:s.length,status:B("importingModelsProgress",{current:0,total:s.length}),logs:[B("foundModelsStartingImport",{count:s.length})]}));let i=0;for(let e=0;e<s.length;e++){let t=s[e],a=t.id||t.name||t.model;if(!a)continue;let l=a.split("/"),o=l[l.length-1];ea(t=>({...t,current:e+1,status:B("importingModelsProgress",{current:e+1,total:s.length}),logs:[...t.logs,B("importingModelById",{modelId:a})]})),await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,modelId:a,modelName:t.name||a,source:"imported"})}),L[o]||await ef(a,o,ep),i+=1}await eu(),ea(e=>({...e,phase:"done",current:s.length,status:i>0?B("importSuccessCount",{count:i}):B("noNewModelsAddedExisting"),logs:[...e.logs,i>0?B("importDoneCount",{count:i}):B("noNewModelsAdded")],importedCount:i})),i>0&&setTimeout(()=>{window.location.reload()},2e3)}catch(e){console.log("Error importing models:",e),ea(t=>({...t,phase:"error",status:B("importFailed"),error:e instanceof Error?e.message:B("unexpectedErrorOccurred")}))}finally{X(!1)}}},eS=async(e,t)=>{et(!0),ea({current:0,total:0,phase:"fetching",status:B("fetchingModels"),logs:[],error:"",importedCount:0});try{let r=(await e()).models||[];if(0===r.length)return void ea(e=>({...e,phase:"done",status:B("noModelsFound"),logs:[B("noModelsReturnedFromEndpoint")]}));ea(e=>({...e,phase:"importing",total:r.length,status:B("importingModelsProgress",{current:0,total:r.length}),logs:[B("foundModelsStartingImport",{count:r.length})]}));let a=0;for(let e=0;e<r.length;e++){let s=r[e],i=s.id||s.name||s.model;i&&(ea(t=>({...t,current:e+1,status:B("importingModelsProgress",{current:e+1,total:r.length}),logs:[...t.logs,B("importingModelById",{modelId:i})]})),await t(s)&&(a+=1))}ea(e=>({...e,phase:"done",current:r.length,status:a>0?B("importSuccessCount",{count:a}):B("noNewModelsAdded"),logs:[...e.logs,a>0?B("importDoneCount",{count:a}):B("noNewModelsAdded")],importedCount:a})),a>0&&setTimeout(()=>{window.location.reload()},2e3)}catch(e){console.log("Error importing models:",e),ea(t=>({...t,phase:"error",status:B("importFailed"),error:e instanceof Error?e.message:B("unexpectedErrorOccurred")}))}},eE=i.some(e=>!1!==e.isActive);return o?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(u.Qv,{}),(0,a.jsx)(u.Qv,{})]}):es?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(c(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),B("backToProviders")]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"rounded-lg flex items-center justify-center",style:{backgroundColor:`${es.color}15`},children:F?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:es.color},children:es.textIcon||es.id.slice(0,2).toUpperCase()}):(0,a.jsx)(p.default,{src:en&&es.apiType?"responses"===es.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ed?"/providers/anthropic-m.png":`/providers/${es.id}.png`,alt:es.name,width:48,height:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",sizes:"48px",onError:()=>D(!0)})}),(0,a.jsxs)("div",{children:[es.website?(0,a.jsxs)("a",{href:es.website,target:"_blank",rel:"noopener noreferrer",className:"text-3xl font-semibold tracking-tight hover:underline inline-flex items-center gap-2",style:{color:es.color},children:[es.name,(0,a.jsx)("span",{className:"material-symbols-outlined text-lg opacity-60",children:"open_in_new"})]}):(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:es.name}),(0,a.jsx)("p",{className:"text-text-muted",children:B("connectionCountLabel",{count:i.length})})]})]})]}),ec&&y&&(0,a.jsxs)(u.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:ed?B("anthropicCompatibleDetails"):B("openaiCompatibleDetails")}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:[ed?B("messagesApi"):"responses"===y.apiType?B("responsesApi"):B("chatCompletions")," ","\xb7 ",(y.baseUrl||"").replace(/\/$/,""),"/",ed?B("messagesPath"):"responses"===y.apiType?B("responsesPath"):B("chatCompletionsPath")]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:()=>$(!0),disabled:i.length>0,children:B("add")}),(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>_(!0),children:B("edit")}),(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{if(confirm(B("deleteCompatibleNodeConfirm",{type:ed?B("anthropic"):B("openai")})))try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&t.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}},children:B("delete")})]})]}),i.length>0&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:B("singleConnectionPerCompatible")})]}),(0,a.jsxs)(u.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:B("connections")}),(0,a.jsxs)("button",{onClick:()=>Q({level:"provider",id:r,label:es?.name||r}),className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-all ${G?.providers?.[r]?"bg-amber-500/15 text-amber-500 hover:bg-amber-500/25":"bg-black/[0.03] dark:bg-white/[0.03] text-text-muted/50 hover:text-text-muted hover:bg-black/[0.06] dark:hover:bg-white/[0.06]"}`,title:G?.providers?.[r]?B("providerProxyTitleConfigured",{host:G.providers[r].host||B("configured")}):B("providerProxyConfigureHint"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"vpn_lock"}),G?.providers?.[r]&&G.providers[r].host||B("providerProxy")]})]}),!ec&&(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:()=>ei?w(!0):$(!0),children:B("add")})]}),0===i.length?(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:ei?"lock":"key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:B("noConnectionsYet")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:B("addFirstConnectionHint")}),!ec&&(0,a.jsx)(u.$n,{icon:"add",onClick:()=>ei?w(!0):$(!0),children:B("addConnection")})]}):(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:i.sort((e,t)=>(e.priority||0)-(t.priority||0)).map((e,t)=>(0,a.jsx)(k,{connection:e,isOAuth:ei,isFirst:0===t,isLast:t===i.length-1,onMoveUp:()=>ek(e,i[t-1]),onMoveDown:()=>ek(e,i[t+1]),onToggleActive:t=>eN(e.id,t),onToggleRateLimit:t=>eC(e.id,t),onRetest:()=>ew(e.id),isRetesting:I===e.id,onEdit:()=>{K(e),M(!0)},onDelete:()=>eg(e.id),onReauth:ei?()=>w(!0):void 0,onProxy:()=>Q({level:"key",id:e.id,label:e.name||e.email||e.id}),hasProxy:!!(G?.keys?.[e.id]||G?.providers?.[r]||G?.global),proxySource:G?.keys?.[e.id]?"key":G?.providers?.[r]?"provider":G?.global?"global":null,proxyHost:(G?.keys?.[e.id]||G?.providers?.[r]||G?.global)?.host||null},e.id))})]}),(0,a.jsxs)(u.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:B("availableModels")}),(()=>{if(ec)return(0,a.jsx)(N,{providerStorageAlias:ep,providerDisplayAlias:em,modelAliases:L,copied:z,onCopy:J,onSetAlias:ef,onDeleteAlias:ey,connections:i,isAnthropic:ed,onImportWithProgress:eS});if(es.passthroughModels)return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"download",onClick:eT,disabled:!eE||Y,children:Y?B("importingModels"):B("importFromModels")}),!eE&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:B("addConnectionToImport")})]}),(0,a.jsx)(v,{providerAlias:eo,modelAliases:L,copied:z,onCopy:J,onSetAlias:ef,onDeleteAlias:ey})]});let e=(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"download",onClick:eT,disabled:!eE||Y,children:Y?B("importingModels"):B("importFromModels")}),!eE&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:B("addConnectionToImport")})]});return 0===el.length?(0,a.jsxs)("div",{children:[e,(0,a.jsx)("p",{className:"text-sm text-text-muted",children:B("noModelsConfigured")})]}):(0,a.jsxs)("div",{children:[e,(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:el.map(e=>{let t=`${ep}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(L).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(g,{model:e,fullModel:`${em}/${e.id}`,alias:i,copied:z,onCopy:J,onSetAlias:t=>ef(e.id,t,ep),onDeleteAlias:()=>ey(i)},e.id)})})]})})(),!ec&&(0,a.jsx)(j,{providerId:r,providerAlias:em,copied:z,onCopy:J})]}),"kiro"===r?(0,a.jsx)(u.Mh,{isOpen:C,providerInfo:es,onSuccess:ev,onClose:()=>{V.current=!0,w(!1)}}):"cursor"===r?(0,a.jsx)(u.G9,{isOpen:C,onSuccess:ev,onClose:()=>{V.current=!0,w(!1)}}):(0,a.jsx)(u.LF,{isOpen:C,provider:r,providerInfo:es,onSuccess:ev,onClose:()=>{V.current=!0,w(!1)}}),(0,a.jsx)(T,{isOpen:R,provider:r,providerName:es.name,isCompatible:ec,isAnthropic:ed,onSave:eb,onClose:()=>$(!1)}),(0,a.jsx)(S,{isOpen:A,connection:O,onSave:ej,onClose:()=>M(!1)}),ec&&(0,a.jsx)(E,{isOpen:P,node:y,onSave:eh,onClose:()=>_(!1),isAnthropic:ed}),H&&(0,a.jsx)(u.KN,{isOpen:!!H,onClose:()=>Q(null),level:H.level,levelId:H.id,levelLabel:H.label}),(0,a.jsx)(u.aF,{isOpen:ee,onClose:()=>{("done"===er.phase||"error"===er.phase)&&et(!1)},title:B("importingModelsTitle"),size:"md",closeOnOverlay:!1,showCloseButton:"done"===er.phase||"error"===er.phase,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:["fetching"===er.phase&&(0,a.jsx)("span",{className:"material-symbols-outlined text-primary animate-spin",children:"progress_activity"}),"importing"===er.phase&&(0,a.jsx)("span",{className:"material-symbols-outlined text-primary animate-spin",children:"progress_activity"}),"done"===er.phase&&(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500",children:"check_circle"}),"error"===er.phase&&(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500",children:"error"}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:er.status})]}),("importing"===er.phase||"done"===er.phase)&&er.total>0&&(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[er.current," / ",er.total]}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[Math.round(er.current/er.total*100),"%"]})]}),(0,a.jsx)("div",{className:"w-full h-2.5 bg-black/10 dark:bg-white/10 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ease-out",style:{width:`${er.current/er.total*100}%`,background:"done"===er.phase?"linear-gradient(90deg, #22c55e, #16a34a)":"linear-gradient(90deg, var(--color-primary), var(--color-primary-hover, var(--color-primary)))"}})})]}),"fetching"===er.phase&&(0,a.jsx)("div",{className:"w-full h-2.5 bg-black/10 dark:bg-white/10 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full animate-pulse",style:{width:"60%",background:"linear-gradient(90deg, var(--color-primary), var(--color-primary-hover, var(--color-primary)))"}})}),"error"===er.phase&&er.error&&(0,a.jsx)("div",{className:"p-3 rounded-lg bg-red-500/10 border border-red-500/20",children:(0,a.jsx)("p",{className:"text-sm text-red-400",children:er.error})}),er.logs.length>0&&(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto rounded-lg bg-black/5 dark:bg-white/5 p-3 border border-black/5 dark:border-white/5",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:er.logs.map((e,t)=>(0,a.jsx)("p",{className:`text-xs font-mono ${e.startsWith("✓")?"text-green-500 font-semibold":"text-text-muted"}`,children:e},t))})}),"done"===er.phase&&er.importedCount>0&&(0,a.jsx)("p",{className:"text-xs text-text-muted text-center animate-pulse",children:B("pageAutoRefresh")})]})})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:B("providerNotFound")}),(0,a.jsx)(c(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:B("backToProviders")})]})}function g({model:e,fullModel:t,alias:r,copied:s,onCopy:i,onSetAlias:l,onDeleteAlias:o}){let n=(0,m.c)("providers");return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:"smart_toy"}),(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsx)("button",{onClick:()=>i(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:n("copyModel"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})})]})}function v({providerAlias:e,modelAliases:t,copied:r,onCopy:i,onSetAlias:l,onDeleteAlias:o}){let n=(0,m.c)("providers"),[d,c]=(0,s.useState)(""),[p,x]=(0,s.useState)(!1),h=Object.entries(t).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,r])=>({modelId:r.replace(`${e}/`,""),fullModel:r,alias:t})),f=async()=>{let e;if(!d.trim()||p)return;let r=d.trim(),a=(e=r.split("/"))[e.length-1];if(t[a])return void alert(n("aliasExistsAlert",{alias:a}));x(!0);try{await l(r,a),c("")}catch(e){console.log("Error adding model:",e)}finally{x(!1)}};return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:n("openRouterAnyModelHint")}),(0,a.jsxs)("div",{className:"flex items-end gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{htmlFor:"new-model-input",className:"text-xs text-text-muted mb-1 block",children:n("modelIdFromOpenRouter")}),(0,a.jsx)("input",{id:"new-model-input",type:"text",value:d,onChange:e=>c(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),placeholder:n("openRouterModelPlaceholder"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:f,disabled:!d.trim()||p,children:p?n("adding"):n("add")})]}),h.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:h.map(({modelId:e,fullModel:t,alias:s})=>(0,a.jsx)(b,{modelId:e,fullModel:t,copied:r,onCopy:i,onDeleteAlias:()=>o(s)},t))})]})}function b({modelId:e,fullModel:t,copied:r,onCopy:s,onDeleteAlias:i}){let l=(0,m.c)("providers");return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsx)("button",{onClick:()=>s(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:l("copyModel"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:r===`model-${e}`?"check":"content_copy"})})]})]}),(0,a.jsx)("button",{onClick:i,className:"p-1 hover:bg-red-50 rounded text-red-500",title:l("removeModel"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function j({providerId:e,providerAlias:t,copied:r,onCopy:i}){let l=(0,m.c)("providers"),[o,n]=(0,s.useState)([]),[d,c]=(0,s.useState)(""),[p,x]=(0,s.useState)(""),[h,f]=(0,s.useState)(!1),[y,g]=(0,s.useState)(!0),v=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/provider-models?provider=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();n(e.models||[])}}catch(e){console.error("Failed to fetch custom models:",e)}finally{g(!1)}},[e]);(0,s.useEffect)(()=>{v()},[v]);let b=async()=>{if(d.trim()&&!h){f(!0);try{(await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,modelId:d.trim(),modelName:p.trim()||void 0})})).ok&&(c(""),x(""),await v())}catch(e){console.error("Failed to add custom model:",e)}finally{f(!1)}}},j=async t=>{try{await fetch(`/api/provider-models?provider=${encodeURIComponent(e)}&model=${encodeURIComponent(t)}`,{method:"DELETE"}),await v()}catch(e){console.error("Failed to remove custom model:",e)}};return(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-primary",children:"tune"}),l("customModels")]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-3",children:l("customModelsHint")}),(0,a.jsxs)("div",{className:"flex items-end gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{htmlFor:"custom-model-id",className:"text-xs text-text-muted mb-1 block",children:l("modelId")}),(0,a.jsx)("input",{id:"custom-model-id",type:"text",value:d,onChange:e=>c(e.target.value),onKeyDown:e=>"Enter"===e.key&&b(),placeholder:l("customModelPlaceholder"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsxs)("div",{className:"w-40",children:[(0,a.jsx)("label",{htmlFor:"custom-model-name",className:"text-xs text-text-muted mb-1 block",children:l("displayName")}),(0,a.jsx)("input",{id:"custom-model-name",type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&b(),placeholder:l("optional"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:b,disabled:!d.trim()||h,children:h?l("adding"):l("add")})]}),y?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:l("loading")}):o.length>0?(0,a.jsx)("div",{className:"flex flex-col gap-2",children:o.map(e=>{let s=`${t}/${e.id}`,o=`custom-${e.id}`;return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-border hover:bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-primary",children:"tune"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e.name||e.id}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:s}),(0,a.jsx)("button",{onClick:()=>i(s,o),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",title:l("copyModel"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:r===o?"check":"content_copy"})})]})]}),(0,a.jsx)("button",{onClick:()=>j(e.id),className:"p-1 hover:bg-red-50 rounded text-red-500",title:l("removeCustomModel"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]},e.id)})}):(0,a.jsx)("p",{className:"text-xs text-text-muted",children:l("noCustomModels")})]})}function N({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:r,copied:l,onCopy:o,onSetAlias:n,onDeleteAlias:d,connections:c,isAnthropic:p,onImportWithProgress:x}){let h=(0,m.c)("providers"),[f,y]=(0,s.useState)(""),[g,v]=(0,s.useState)(!1),[j,N]=(0,s.useState)(!1),C=(0,i.i)(),w=Object.entries(r).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,r])=>({modelId:r.replace(`${e}/`,""),fullModel:r,alias:t})),k=e=>{let a,s=(a=e.split("/"))[a.length-1];if(!r[s])return s;let i=`${t}-${s}`;return r[i]?null:i},T=async()=>{if(!f.trim()||g)return;let t=f.trim(),r=k(t);if(!r)return void C.error(h("allSuggestedAliasesExist"));v(!0);try{let a=await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,modelId:t,modelName:t,source:"manual"})});if(!a.ok){let e={};try{e=await a.json()}catch(e){console.error("Failed to parse error response from custom model API:",e)}throw Error(e.error?.message||h("failedSaveCustomModel"))}await n(t,r,e),y(""),C.success(h("modelAddedSuccess",{modelId:t}))}catch(e){console.error("Error adding model:",e),C.error(e instanceof Error?e.message:h("failedAddModelTryAgain"))}finally{v(!1)}},S=async()=>{if(j)return;let t=c.find(e=>!1!==e.isActive);if(t){N(!0);try{await x(async()=>{let e=await fetch(`/api/providers/${t.id}/models`),r=await e.json();if(!e.ok)throw Error(r.error||h("failedImportModels"));return r},async t=>{let r=t.id||t.name||t.model;if(!r)return!1;let a=k(r);return!!a&&((await fetch("/api/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,modelId:r,modelName:t.name||r,source:"imported"})})).ok?(await n(r,a,e),!0):(C.error(h("failedSaveImportedModel")),!1))})}catch(e){console.error("Error importing models:",e),C.error(h("failedImportModelsTryAgain"))}finally{N(!1)}}},E=c.some(e=>!1!==e.isActive),R=async(t,r)=>{try{if(!(await fetch(`/api/provider-models?provider=${encodeURIComponent(e)}&model=${encodeURIComponent(t)}`,{method:"DELETE"})).ok)throw Error(h("failedRemoveModelFromDatabase"));await d(r),C.success(h("modelRemovedSuccess"))}catch(e){console.error("Error deleting model:",e),C.error(e instanceof Error?e.message:h("failedDeleteModelTryAgain"))}};return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:h("compatibleModelsDescription",{type:p?h("anthropic"):h("openai")})}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:h("modelId")}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:f,onChange:e=>y(e.target.value),onKeyDown:e=>"Enter"===e.key&&T(),placeholder:p?h("anthropicCompatibleModelPlaceholder"):h("openaiCompatibleModelPlaceholder"),className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(u.$n,{size:"sm",icon:"add",onClick:T,disabled:!f.trim()||g,children:g?h("adding"):h("add")}),(0,a.jsx)(u.$n,{size:"sm",variant:"secondary",icon:"download",onClick:S,disabled:!E||j,children:j?h("importingModels"):h("importFromModels")})]}),!E&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:h("addConnectionToImport")}),w.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:w.map(({modelId:e,fullModel:r,alias:s})=>(0,a.jsx)(b,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:o,onDeleteAlias:()=>R(e,s)},r))})]})}function C({until:e}){let[t,r]=(0,s.useState)("");return((0,s.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void r("");let a=Math.floor(t/1e3);if(a<60)r(`${a}s`);else if(a<3600)r(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);r(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}g.propTypes={model:o().shape({id:o().string.isRequired}).isRequired,fullModel:o().string.isRequired,alias:o().string,copied:o().string,onCopy:o().func.isRequired},v.propTypes={providerAlias:o().string.isRequired,modelAliases:o().object.isRequired,copied:o().string,onCopy:o().func.isRequired,onSetAlias:o().func.isRequired,onDeleteAlias:o().func.isRequired},b.propTypes={modelId:o().string.isRequired,fullModel:o().string.isRequired,copied:o().string,onCopy:o().func.isRequired,onDeleteAlias:o().func.isRequired},j.propTypes={providerId:o().string.isRequired,providerAlias:o().string.isRequired,copied:o().string,onCopy:o().func.isRequired},N.propTypes={providerStorageAlias:o().string.isRequired,providerDisplayAlias:o().string.isRequired,modelAliases:o().object.isRequired,copied:o().string,onCopy:o().func.isRequired,onSetAlias:o().func.isRequired,onDeleteAlias:o().func.isRequired,connections:o().arrayOf(o().shape({id:o().string,isActive:o().bool})).isRequired,isAnthropic:o().bool,onImportWithProgress:o().func.isRequired},C.propTypes={until:o().string.isRequired};let w={runtime_error:{labelKey:"errorTypeRuntime",variant:"warning"},upstream_auth_error:{labelKey:"errorTypeUpstreamAuth",variant:"error"},auth_missing:{labelKey:"errorTypeMissingCredential",variant:"warning"},token_refresh_failed:{labelKey:"errorTypeRefreshFailed",variant:"warning"},token_expired:{labelKey:"errorTypeTokenExpired",variant:"warning"},upstream_rate_limited:{labelKey:"errorTypeRateLimited",variant:"warning"},upstream_unavailable:{labelKey:"errorTypeUpstreamUnavailable",variant:"error"},network_error:{labelKey:"errorTypeNetworkError",variant:"warning"},unsupported:{labelKey:"errorTypeTestUnsupported",variant:"default"},upstream_error:{labelKey:"errorTypeUpstreamError",variant:"error"}};function k({connection:e,isOAuth:t,isFirst:r,isLast:i,onMoveUp:l,onMoveDown:o,onToggleActive:n,onToggleRateLimit:d,onRetest:c,isRetesting:p,onEdit:x,onDelete:h,onReauth:f,onProxy:y,hasProxy:g,proxySource:v,proxyHost:b}){let j,N=(0,m.c)("providers"),k=t?e.name||e.email||e.displayName||N("oauthAccount"):e.name,[T,S]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let t=()=>{S(e.rateLimitedUntil&&new Date(e.rateLimitedUntil).getTime()>Date.now())};t();let r=e.rateLimitedUntil?setInterval(t,1e3):null;return()=>{r&&clearInterval(r)}},[e.rateLimitedUntil]);let E="unavailable"!==e.testStatus||T?e.testStatus:"active",R=function(e,t,r,a){if(!1===e.isActive)return{statusVariant:"default",statusLabel:a("statusDisabled"),errorType:null,errorBadge:null,errorTextClass:"text-text-muted"};if("active"===t||"success"===t)return{statusVariant:"success",statusLabel:a("statusConnected"),errorType:null,errorBadge:null,errorTextClass:"text-text-muted"};let s=function(e,t){if(t)return"upstream_rate_limited";if(e.lastErrorType)return e.lastErrorType;let r=Number(e.errorCode);if(401===r||403===r)return"upstream_auth_error";if(429===r)return"upstream_rate_limited";if(r>=500)return"upstream_unavailable";let a=(e.lastError||"").toLowerCase();return a?a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")||a.includes("healthcheck")?"runtime_error":a.includes("refresh failed")?"token_refresh_failed":a.includes("token expired")||a.includes("expired")?"token_expired":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("access denied")||a.includes("unauthorized")?"upstream_auth_error":a.includes("rate limit")||a.includes("quota")||a.includes("too many requests")||a.includes("429")?"upstream_rate_limited":a.includes("fetch failed")||a.includes("network")||a.includes("timeout")||a.includes("econn")||a.includes("enotfound")?"network_error":a.includes("not supported")?"unsupported":"upstream_error":null}(e,r),i=s&&w[s]||null;return"runtime_error"===s?{statusVariant:"warning",statusLabel:a("statusRuntimeIssue"),errorType:s,errorBadge:i,errorTextClass:"text-yellow-600 dark:text-yellow-400"}:"upstream_auth_error"===s||"auth_missing"===s||"token_refresh_failed"===s||"token_expired"===s?{statusVariant:"error",statusLabel:a("statusAuthFailed"),errorType:s,errorBadge:i,errorTextClass:"text-red-500"}:"upstream_rate_limited"===s?{statusVariant:"warning",statusLabel:a("statusRateLimited"),errorType:s,errorBadge:i,errorTextClass:"text-yellow-600 dark:text-yellow-400"}:"network_error"===s?{statusVariant:"warning",statusLabel:a("statusNetworkIssue"),errorType:s,errorBadge:i,errorTextClass:"text-yellow-600 dark:text-yellow-400"}:"unsupported"===s?{statusVariant:"default",statusLabel:a("statusTestUnsupported"),errorType:s,errorBadge:i,errorTextClass:"text-text-muted"}:{statusVariant:"error",statusLabel:({unavailable:a("statusUnavailable"),failed:a("statusFailed"),error:a("statusError")})[t]||t||a("statusError"),errorType:s,errorBadge:i,errorTextClass:"text-red-500"}}(e,E,T,N),$=!!e.rateLimitProtection;return(0,a.jsxs)("div",{className:`group flex items-center justify-between p-3 rounded-lg hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:t?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:k}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[(0,a.jsx)(u.Ex,{variant:R.statusVariant,size:"sm",dot:!0,children:R.statusLabel}),T&&!1!==e.isActive&&(0,a.jsx)(C,{until:e.rateLimitedUntil}),R.errorBadge&&!1!==e.isActive&&(0,a.jsx)(u.Ex,{variant:R.errorBadge.variant,size:"sm",children:N(R.errorBadge.labelKey)}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:`text-xs truncate max-w-[300px] ${R.errorTextClass}`,title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:N("autoPriority",{priority:e.globalPriority})}),(0,a.jsx)("span",{className:"text-text-muted/30 select-none",children:"|"}),(0,a.jsxs)("button",{onClick:()=>d(!$),className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium transition-all cursor-pointer ${$?"bg-emerald-500/15 text-emerald-500 hover:bg-emerald-500/25":"bg-black/[0.03] dark:bg-white/[0.03] text-text-muted/50 hover:text-text-muted hover:bg-black/[0.06] dark:hover:bg-white/[0.06]"}`,title:N($?"disableRateLimitProtection":"enableRateLimitProtection"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"shield"}),N($?"rateLimitProtected":"rateLimitUnprotected")]}),g&&(j=N("global"===v?"proxySourceGlobal":"provider"===v?"proxySourceProvider":"proxySourceKey"),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted/30 select-none",children:"|"}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium ${"global"===v?"bg-emerald-500/15 text-emerald-500":"provider"===v?"bg-amber-500/15 text-amber-500":"bg-blue-500/15 text-blue-500"}`,title:N("proxyConfiguredBySource",{source:j,host:b||N("configured")}),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"vpn_lock"}),b||N("proxy")]})]}))]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(u.$n,{size:"sm",variant:"ghost",icon:"refresh",loading:p,disabled:!1===e.isActive,onClick:c,className:"!h-7 !px-2 text-xs",title:N("retestAuthentication"),children:N("retest")}),(0,a.jsx)(u.lM,{size:"sm",checked:e.isActive??!0,onChange:n,title:N(e.isActive??!0?"disableConnection":"enableConnection")}),(0,a.jsxs)("div",{className:"flex gap-1 ml-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[f&&(0,a.jsx)("button",{onClick:f,className:"p-2 hover:bg-amber-500/10 rounded text-amber-600 hover:text-amber-500",title:N("reauthenticateConnection"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"passkey"})}),(0,a.jsx)("button",{onClick:x,className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{onClick:y,className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary",title:N("proxyConfig"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"vpn_lock"})}),(0,a.jsx)("button",{onClick:h,className:"p-2 hover:bg-red-500/10 rounded text-red-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]})]})}function T({isOpen:e,provider:t,providerName:r,isCompatible:i,isAnthropic:l,onSave:o,onClose:n}){let d=(0,m.c)("providers"),[c,p]=(0,s.useState)({name:"",apiKey:"",priority:1}),[x,h]=(0,s.useState)(!1),[f,y]=(0,s.useState)(null),[g,v]=(0,s.useState)(!1),[b,j]=(0,s.useState)(null),N=async()=>{h(!0),j(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),r=await e.json();y(r.valid?"success":"failed")}catch{y("failed")}finally{h(!1)}},C=async()=>{if(t&&c.apiKey){v(!0),j(null);try{let e=!1;try{h(!0),y(null);let r=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await r.json()).valid,y(e?"success":"failed")}catch{y("failed")}finally{h(!1)}if(!e)return void j(d("apiKeyValidationFailed"));let r=await o({name:c.name,apiKey:c.apiKey,priority:c.priority,testStatus:"active"});r&&j("string"==typeof r?r:d("failedSaveConnection"))}finally{v(!1)}}};return t?(0,a.jsx)(u.aF,{isOpen:e,title:d("addProviderApiKeyTitle",{provider:r||t}),onClose:n,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(u.pd,{label:d("nameLabel"),value:c.name,onChange:e=>p({...c,name:e.target.value}),placeholder:d("productionKey")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.pd,{label:d("apiKeyLabel"),type:"password",value:c.apiKey,onChange:e=>p({...c,apiKey:e.target.value}),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(u.$n,{onClick:N,disabled:!c.apiKey||x||g,variant:"secondary",children:x?d("checking"):d("check")})})]}),f&&(0,a.jsx)(u.Ex,{variant:"success"===f?"success":"error",children:"success"===f?d("valid"):d("invalid")}),b&&(0,a.jsx)("div",{className:"text-sm text-red-500 bg-red-500/10 border border-red-500/20 rounded-lg px-3 py-2",children:b}),i&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:l?d("validationChecksAnthropicCompatible",{provider:r||d("anthropicCompatibleName")}):d("validationChecksOpenAiCompatible",{provider:r||d("openaiCompatibleName")})}),(0,a.jsx)(u.pd,{label:d("priorityLabel"),type:"number",value:c.priority,onChange:e=>p({...c,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{onClick:C,fullWidth:!0,disabled:!c.name||!c.apiKey||g,children:g?d("saving"):d("save")}),(0,a.jsx)(u.$n,{onClick:n,variant:"ghost",fullWidth:!0,children:d("cancel")})]})]})}):null}function S({isOpen:e,connection:t,onSave:r,onClose:i}){let l=(0,m.c)("providers"),[o,n]=(0,s.useState)({name:"",priority:1,apiKey:"",healthCheckInterval:60}),[d,c]=(0,s.useState)(!1),[p,h]=(0,s.useState)(null),[f,y]=(0,s.useState)(!1),[g,v]=(0,s.useState)(null),[b,j]=(0,s.useState)(!1);(0,s.useEffect)(()=>{t&&(n({name:t.name||"",priority:t.priority||1,apiKey:"",healthCheckInterval:t.healthCheckInterval??60}),h(null),v(null))},[t]);let N=async()=>{if(t?.provider){c(!0),h(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),r=await e.json();h({valid:!!r.valid,diagnosis:r.diagnosis||null,message:r.error||null})}catch{h({valid:!1,diagnosis:{type:"network_error"},message:l("failedTestConnection")})}finally{c(!1)}}},C=async()=>{if(t?.provider&&o.apiKey){y(!0),v(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})}),r=await e.json();v(r.valid?"success":"failed")}catch{v("failed")}finally{y(!1)}}},k=async()=>{j(!0);try{let e={name:o.name,priority:o.priority,healthCheckInterval:o.healthCheckInterval};if(!T&&o.apiKey){e.apiKey=o.apiKey;let r="success"===g;if(!r)try{y(!0),v(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:o.apiKey})});r=!!(await e.json()).valid,v(r?"success":"failed")}catch{v("failed")}finally{y(!1)}r&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null,e.lastErrorType=null,e.lastErrorSource=null,e.errorCode=null,e.rateLimitedUntil=null)}await r(e)}finally{j(!1)}};if(!t)return null;let T="oauth"===t.authType,S=(0,x.mq)(t.provider)||(0,x.gb)(t.provider),E=!p?.valid&&p?.diagnosis?.type&&w[p.diagnosis.type]||null;return(0,a.jsx)(u.aF,{isOpen:e,title:l("editConnection"),onClose:i,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(u.pd,{label:l("nameLabel"),value:o.name,onChange:e=>n({...o,name:e.target.value}),placeholder:T?l("accountName"):l("productionKey")}),T&&t.email&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-1",children:l("email")}),(0,a.jsx)("p",{className:"font-medium",children:t.email})]}),T&&(0,a.jsx)(u.pd,{label:l("healthCheckMinutes"),type:"number",value:o.healthCheckInterval,onChange:e=>n({...o,healthCheckInterval:Math.max(0,Number.parseInt(e.target.value)||0)}),hint:l("healthCheckHint")}),(0,a.jsx)(u.pd,{label:l("priorityLabel"),type:"number",value:o.priority,onChange:e=>n({...o,priority:Number.parseInt(e.target.value)||1})}),!T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.pd,{label:l("apiKeyLabel"),type:"password",value:o.apiKey,onChange:e=>n({...o,apiKey:e.target.value}),placeholder:l("enterNewApiKey"),hint:l("leaveBlankKeepCurrentApiKey"),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(u.$n,{onClick:C,disabled:!o.apiKey||f||b,variant:"secondary",children:f?l("checking"):l("check")})})]}),g&&(0,a.jsx)(u.Ex,{variant:"success"===g?"success":"error",children:"success"===g?l("valid"):l("invalid")})]}),!S&&(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(u.$n,{onClick:N,variant:"secondary",disabled:d,children:d?l("testing"):l("testConnection")}),p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Ex,{variant:p.valid?"success":"error",children:p.valid?l("valid"):l("failed")}),E&&(0,a.jsx)(u.Ex,{variant:E.variant,children:l(E.labelKey)})]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{onClick:k,fullWidth:!0,disabled:b,children:b?l("saving"):l("save")}),(0,a.jsx)(u.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:l("cancel")})]})]})})}function E({isOpen:e,node:t,onSave:r,onClose:i,isAnthropic:l}){let o=(0,m.c)("providers"),[n,d]=(0,s.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,s.useState)(!1),[x,h]=(0,s.useState)(""),[f,y]=(0,s.useState)(!1),[g,v]=(0,s.useState)(null);(0,s.useEffect)(()=>{t&&d({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(l?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,l]);let b=[{value:"chat",label:o("chatCompletions")},{value:"responses",label:o("responsesApi")}],j=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};l||(e.apiType=n.apiType),await r(e)}finally{p(!1)}}},N=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:x,type:l?"anthropic-compatible":"openai-compatible"})}),t=await e.json();v(t.valid?"success":"failed")}catch{v("failed")}finally{y(!1)}};return t?(0,a.jsx)(u.aF,{isOpen:e,title:o("editCompatibleTitle",{type:o(l?"anthropic":"openai")}),onClose:i,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(u.pd,{label:o("nameLabel"),value:n.name,onChange:e=>d({...n,name:e.target.value}),placeholder:o("compatibleProdPlaceholder",{type:o(l?"anthropic":"openai")}),hint:o("nameHint")}),(0,a.jsx)(u.pd,{label:o("prefixLabel"),value:n.prefix,onChange:e=>d({...n,prefix:e.target.value}),placeholder:o(l?"anthropicPrefixPlaceholder":"openaiPrefixPlaceholder"),hint:o("prefixHint")}),!l&&(0,a.jsx)(u.l6,{label:o("apiTypeLabel"),options:b,value:n.apiType,onChange:e=>d({...n,apiType:e.target.value})}),(0,a.jsx)(u.pd,{label:o("baseUrlLabel"),value:n.baseUrl,onChange:e=>d({...n,baseUrl:e.target.value}),placeholder:o(l?"anthropicBaseUrlPlaceholder":"openaiBaseUrlPlaceholder"),hint:o("compatibleBaseUrlHint",{type:o(l?"anthropic":"openai")})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.pd,{label:o("apiKeyForCheck"),type:"password",value:x,onChange:e=>h(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(u.$n,{onClick:N,disabled:!x||f||!n.baseUrl.trim(),variant:"secondary",children:o(f?"checking":"check")})})]}),g&&(0,a.jsx)(u.Ex,{variant:"success"===g?"success":"error",children:o("success"===g?"valid":"invalid")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(u.$n,{onClick:j,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:o(c?"saving":"save")}),(0,a.jsx)(u.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:o("cancel")})]})]})}):null}k.propTypes={connection:o().shape({id:o().string,name:o().string,email:o().string,displayName:o().string,rateLimitedUntil:o().string,rateLimitProtection:o().bool,testStatus:o().string,isActive:o().bool,priority:o().number,lastError:o().string,lastErrorType:o().string,lastErrorSource:o().string,errorCode:o().oneOfType([o().string,o().number]),globalPriority:o().number}).isRequired,isOAuth:o().bool.isRequired,isFirst:o().bool.isRequired,isLast:o().bool.isRequired,onMoveUp:o().func.isRequired,onMoveDown:o().func.isRequired,onToggleActive:o().func.isRequired,onToggleRateLimit:o().func.isRequired,onRetest:o().func.isRequired,isRetesting:o().bool,onEdit:o().func.isRequired,onDelete:o().func.isRequired,onReauth:o().func},T.propTypes={isOpen:o().bool.isRequired,provider:o().string,providerName:o().string,isCompatible:o().bool,isAnthropic:o().bool,onSave:o().func.isRequired,onClose:o().func.isRequired},S.propTypes={isOpen:o().bool.isRequired,connection:o().shape({id:o().string,name:o().string,email:o().string,priority:o().number,authType:o().string,provider:o().string}),onSave:o().func.isRequired,onClose:o().func.isRequired},E.propTypes={isOpen:o().bool.isRequired,node:o().shape({id:o().string,name:o().string,prefix:o().string,apiType:o().string,baseUrl:o().string}),onSave:o().func.isRequired,onClose:o().func.isRequired,isAnthropic:o().bool}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=56411)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9507],{67040:(e,s,a)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}a.d(s,{cn:()=>r})},68715:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>i});var r=a(95155),n=a(92542);function i(){return(0,r.jsxs)("div",{className:"space-y-6 p-6",role:"status","aria-live":"polite","aria-busy":"true",children:[(0,r.jsx)(n.Skeleton,{className:"h-8 w-48"}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>(0,r.jsx)(n.CardSkeleton,{},e))})]})}},91876:(e,s,a)=>{Promise.resolve().then(a.bind(a,68715))},92542:(e,s,a)=>{"use strict";a.d(s,{CardSkeleton:()=>d,PageLoading:()=>l,Skeleton:()=>c,Spinner:()=>t,default:()=>o});var r=a(95155),n=a(67040);let i={sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"};function t({size:e="md",className:s,label:a="Loading"}){return(0,r.jsxs)("span",{role:"status","aria-live":"polite","aria-label":a,className:(0,n.cn)("inline-flex",s),children:[(0,r.jsx)("span",{className:"sr-only",children:a}),(0,r.jsx)("span",{"aria-hidden":"true",className:(0,n.cn)("material-symbols-outlined text-primary animate-spin motion-reduce:animate-none",i[e]),children:"progress_activity"})]})}function l({message:e="Loading...",className:s}){return(0,r.jsxs)("div",{className:(0,n.cn)("fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg px-6",s),role:"status","aria-live":"polite","aria-busy":"true",children:[(0,r.jsx)(t,{size:"xl"}),(0,r.jsx)("p",{className:"mt-4 text-text-muted text-center",children:e})]})}function c({className:e,...s}){return(0,r.jsx)("div",{"aria-hidden":"true",className:(0,n.cn)("animate-pulse motion-reduce:animate-none rounded-lg bg-border",e),...s})}function d(){return(0,r.jsxs)("div",{className:"p-6 rounded-xl border border-border bg-surface","aria-hidden":"true",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 gap-4",children:[(0,r.jsx)(c,{className:"h-4 w-24"}),(0,r.jsx)(c,{className:"size-10 rounded-lg"})]}),(0,r.jsx)(c,{className:"h-8 w-16 mb-2"}),(0,r.jsx)(c,{className:"h-3 w-20"})]})}function o({type:e="spinner",className:s,message:a,size:n,label:i,...o}){switch(e){case"page":return(0,r.jsx)(l,{message:a,className:s});case"skeleton":return(0,r.jsx)(c,{className:s,...o});case"card":return(0,r.jsx)(d,{});default:return(0,r.jsx)(t,{size:n,className:s,label:i})}}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=91876)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{4346:(e,a,r)=>{Promise.resolve().then(r.bind(r,91241))},40993:(e,a,r)=>{"use strict";r.d(a,{Ex:()=>n.default,$n:()=>t.default,Zp:()=>d.default,Qv:()=>o.CardSkeleton,G9:()=>y.default,bQ:()=>k.default,pp:()=>N.default,Qn:()=>g.default,pd:()=>l.default,Mh:()=>f.default,uR:()=>m.default,aF:()=>i.default,rq:()=>p.default,LF:()=>u.default,KN:()=>v.default,Lo:()=>b.default,y7:()=>x.default,Iz:()=>j.default,l6:()=>s.default,lM:()=>c.default,cn:()=>h.default});var t=r(35806),l=r(34422),s=r(42994),d=r(81060),i=r(71361),o=r(92542);r(17705);var n=r(80927),c=r(19790);r(6261),r(55846),r(34243),r(89938),r(99023);var u=r(80178),p=r(85444),m=r(91961);r(25112);var h=r(45624),x=r(37415),v=r(48643),b=r(8287);r(1652);var f=r(92701);r(18150);var y=r(71689),j=r(33709);r(76332);var N=r(66200);r(61580);var g=r(51503);r(54128);var k=r(44638);r(21720),r(97050)},91241:(e,a,r)=>{"use strict";r.r(a),r.d(a,{default:()=>m});var t=r(95155),l=r(12115),s=r(73321),d=r(98500),i=r.n(d),o=r(40993),n=r(52529),c=r(50910);let u=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function m(){let e=(0,s.useRouter)(),[a,r]=(0,l.useState)(!1),d=(0,c.c)("providers"),[m,h]=(0,l.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[x,v]=(0,l.useState)({}),b=(e,a)=>{h(r=>({...r,[e]:a})),x[e]&&v(a=>({...a,[e]:null}))},f=async a=>{let t;if(a.preventDefault(),t={},m.provider||(t.provider=d("selectProvider")),"api_key"!==m.authMethod||m.apiKey||(t.apiKey=d("apiKeyRequired")),v(t),0===Object.keys(t).length){r(!0);try{let a=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)});if(a.ok)e.push("/dashboard/providers");else{let e=await a.json();v({submit:e.error||d("failedCreate")})}}catch(e){v({submit:d("errorOccurred")})}finally{r(!1)}}},y=n.Q2[m.provider];return(0,t.jsxs)("div",{className:"max-w-2xl mx-auto min-w-0",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsxs)(i(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),d("backToProviders")]}),(0,t.jsx)("h1",{className:"text-2xl sm:text-3xl font-semibold tracking-tight break-words",children:d("addNewProvider")}),(0,t.jsx)("p",{className:"text-text-muted mt-2",children:d("configureNewProvider")})]}),(0,t.jsx)(o.Zp,{children:(0,t.jsxs)("form",{onSubmit:f,className:"flex flex-col gap-6",children:[(0,t.jsx)(o.l6,{label:d("providerLabel"),options:u,value:m.provider,onChange:e=>b("provider",e.target.value),placeholder:d("selectProvider"),error:x.provider,required:!0}),y&&(0,t.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,t.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:y.color},children:y.icon})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:y.name}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:d("selectedProvider")})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("label",{className:"text-sm font-medium",children:[d("authMethod")," ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("div",{className:"flex flex-col sm:flex-row gap-3",children:p.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>b("authMethod",e.value),className:`flex-1 min-w-0 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${m.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,t.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,t.jsx)("span",{className:"font-medium text-center break-words",children:"api_key"===e.value?d("apiKeyLabel"):d("oauth2Label")})]},e.value))})]}),"api_key"===m.authMethod&&(0,t.jsx)(o.pd,{label:d("apiKeyLabel"),type:"password",placeholder:d("enterApiKey"),value:m.apiKey,onChange:e=>b("apiKey",e.target.value),error:x.apiKey,hint:d("apiKeySecure"),required:!0}),"oauth2"===m.authMethod&&(0,t.jsxs)(o.Zp.Section,{className:"",children:[(0,t.jsx)("p",{className:"text-sm text-text-muted mb-4",children:d("oauth2Desc")}),(0,t.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:d("oauth2Connect")})]}),(0,t.jsx)(o.pd,{label:d("displayName"),placeholder:d("displayNamePlaceholder"),value:m.displayName,onChange:e=>b("displayName",e.target.value),hint:d("displayNameHint")}),(0,t.jsx)(o.lM,{checked:m.isActive,onChange:e=>b("isActive",e),label:d("active"),description:d("activeDescription")}),x.submit&&(0,t.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:x.submit}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 pt-4 border-t border-border",children:[(0,t.jsx)(i(),{href:"/dashboard/providers",className:"flex-1",children:(0,t.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:d("cancel")})}),(0,t.jsx)(o.$n,{type:"submit",loading:a,fullWidth:!0,className:"flex-1",children:d("createProvider")})]})]})})]})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=4346)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{39608:(e,a,l)=>{Promise.resolve().then(l.bind(l,97449))},40993:(e,a,l)=>{"use strict";l.d(a,{Ex:()=>o.default,$n:()=>u.default,Zp:()=>f.default,Qv:()=>r.CardSkeleton,G9:()=>_.default,bQ:()=>j.default,pp:()=>y.default,Qn:()=>N.default,pd:()=>t.default,Mh:()=>h.default,uR:()=>c.default,aF:()=>s.default,rq:()=>p.default,LF:()=>n.default,KN:()=>b.default,Lo:()=>i.default,y7:()=>x.default,Iz:()=>k.default,l6:()=>d.default,lM:()=>v.default,cn:()=>g.default});var u=l(35806),t=l(34422),d=l(42994),f=l(81060),s=l(71361),r=l(92542);l(17705);var o=l(80927),v=l(19790);l(6261),l(55846),l(34243),l(89938),l(99023);var n=l(80178),p=l(85444),c=l(91961);l(25112);var g=l(45624),x=l(37415),b=l(48643),i=l(8287);l(1652);var h=l(92701);l(18150);var _=l(71689),k=l(33709);l(76332);var y=l(66200);l(61580);var N=l(51503);l(54128);var j=l(44638);l(21720),l(97050)},97449:(e,a,l)=>{"use strict";l.r(a),l.d(a,{default:()=>s});var u=l(95155),t=l(50910),d=l(12115),f=l(40993);function s(){let e=(0,t.c)("usage"),[a,l]=(0,d.useState)("logs");return(0,u.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,u.jsx)(f.Iz,{options:[{value:"logs",label:e("loggerTab")},{value:"proxy-logs",label:e("proxyTab")}],value:a,onChange:l}),"logs"===a&&(0,u.jsx)(f.y7,{}),"proxy-logs"===a&&(0,u.jsx)(f.Lo,{})]})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=39608)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1022,3716,5494,7388,8438,8647,8977,8985,9012],{32701:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=32701)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1022,3716,5494,7388,8438,8647,8977,8985,9012],{32701:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=32701)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1022,3716,5494,7388,8438,8647,8977,8985,9012],{32701:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=32701)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1022,3716,5494,7388,8438,8647,8977,8985,9012],{32701:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=32701)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[200],{50910:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});var a=r(33418);function n(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let s=n(0,a.c3);n(0,a.kc)},62128:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var a=r(95155),n=r(50910),s=r(98500),i=r.n(s);function l(){let e=(0,n.c)("auth");return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-screen p-6 bg-[var(--bg-primary,#0a0a0f)] text-[var(--text-primary,#e0e0e0)] text-center",children:[(0,a.jsx)("div",{className:"text-[96px] font-extrabold leading-none mb-2",style:{background:"linear-gradient(135deg, #ef4444 0%, #f97316 50%, #eab308 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"403"}),(0,a.jsx)("h1",{className:"text-2xl font-semibold mb-2",children:e("accessDenied")}),(0,a.jsx)("p",{className:"text-[15px] text-[var(--text-secondary,#888)] max-w-[400px] leading-relaxed mb-8",children:e("accessDeniedDescription")}),(0,a.jsx)(i(),{href:"/dashboard",className:"px-8 py-3 rounded-[10px] text-white text-sm font-semibold no-underline transition-all duration-200 shadow-[0_4px_16px_rgba(99,102,241,0.3)] hover:-translate-y-0.5",style:{background:"linear-gradient(135deg, #6366f1, #8b5cf6)"},children:e("goToDashboard")})]})}},88263:(e,t,r)=>{Promise.resolve().then(r.bind(r,62128))}},e=>{e.O(0,[8500,3418,8441,3794,7358],()=>e(e.s=88263)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2162],{40182:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(95155),l=s(50910),r=s(98500),d=s.n(r),i=s(40993);function n(){let e=(0,l.c)("auth");return(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,a.jsxs)("div",{className:"w-full max-w-lg",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-primary mb-2",children:e("resetPassword")}),(0,a.jsx)("p",{className:"text-text-muted",children:e("resetDescription")})]}),(0,a.jsx)(i.Zp,{className:"mb-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-4 p-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-10 rounded-lg bg-primary/10 text-primary shrink-0 mt-0.5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"terminal"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-1",children:e("methodCliTitle")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-3",children:e("methodCliDescription")}),(0,a.jsx)("div",{className:"bg-black/30 rounded-lg p-3 mb-3 font-mono text-sm text-green-400 border border-white/5",children:(0,a.jsx)("code",{children:"npx omniroute reset-password"})}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e("methodCliHint")})]})]})}),(0,a.jsx)(i.Zp,{className:"mb-6",children:(0,a.jsxs)("div",{className:"flex items-start gap-4 p-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-10 rounded-lg bg-amber-500/10 text-amber-500 shrink-0 mt-0.5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"database"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-1",children:e("methodManualTitle")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-3",children:e("methodManualDescription")}),(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-2 list-decimal list-inside mb-3",children:[(0,a.jsx)("li",{children:e("stopServer")}),(0,a.jsxs)("li",{children:[e("setPasswordInYour")," ",(0,a.jsx)("code",{className:"bg-black/30 px-1 rounded text-text-main",children:".env"})," ",e("fileLabelSuffix"),(0,a.jsxs)("div",{className:"bg-black/30 rounded-lg p-2 mt-1 font-mono text-xs text-green-400 border border-white/5",children:["INITIAL_PASSWORD=",e("newPasswordPlaceholder")]})]}),(0,a.jsxs)("li",{children:[e("deleteSettingsFile")," ",(0,a.jsx)("code",{className:"bg-black/30 px-1 rounded text-text-main",children:"data/settings.json"})," ","(",e("orRemovePasswordHashField"),")"]}),(0,a.jsx)("li",{children:e("restartServerWithNewPassword")})]})]})]})}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)(d(),{href:"/login",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"arrow_back"}),e("backToLogin")]})})]})})}},40993:(e,t,s)=>{"use strict";s.d(t,{Ex:()=>c.default,$n:()=>a.default,Zp:()=>d.default,Qv:()=>n.CardSkeleton,G9:()=>N.default,bQ:()=>k.default,pp:()=>g.default,Qn:()=>w.default,pd:()=>l.default,Mh:()=>j.default,uR:()=>h.default,aF:()=>i.default,rq:()=>o.default,LF:()=>m.default,KN:()=>b.default,Lo:()=>p.default,y7:()=>f.default,Iz:()=>v.default,l6:()=>r.default,lM:()=>x.default,cn:()=>u.default});var a=s(35806),l=s(34422),r=s(42994),d=s(81060),i=s(71361),n=s(92542);s(17705);var c=s(80927),x=s(19790);s(6261),s(55846),s(34243),s(89938),s(99023);var m=s(80178),o=s(85444),h=s(91961);s(25112);var u=s(45624),f=s(37415),b=s(48643),p=s(8287);s(1652);var j=s(92701);s(18150);var N=s(71689),v=s(33709);s(76332);var g=s(66200);s(61580);var w=s(51503);s(54128);var k=s(44638);s(21720),s(97050)},50057:(e,t,s)=>{Promise.resolve().then(s.bind(s,40182))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=50057)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{21728:(e,t,r)=>{Promise.resolve().then(r.bind(r,26719))},26719:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var s=r(95155);function n({error:e,reset:t}){return(0,s.jsx)("html",{lang:"en",children:(0,s.jsx)("body",{className:"flex flex-col items-center justify-center min-h-screen p-6 bg-bg text-text-main font-[system-ui,-apple-system,sans-serif] text-center m-0",children:(0,s.jsxs)("main",{role:"alert","aria-live":"assertive",className:"flex flex-col items-center",children:[(0,s.jsx)("div",{className:"text-[64px] mb-4","aria-hidden":"true",children:"⚠️"}),(0,s.jsx)("h1",{className:"text-[28px] font-bold mb-2",children:"Something went wrong"}),(0,s.jsx)("p",{className:"text-[15px] text-text-muted max-w-[400px] leading-relaxed mb-6",children:"An unexpected error occurred. This has been logged and our team will investigate."}),!1,(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,s.jsx)("button",{onClick:t,"aria-label":"Retry loading the page",className:"px-8 py-3 rounded-[10px] text-white border-none text-sm font-semibold cursor-pointer transition-transform duration-200 motion-reduce:transition-none motion-reduce:transform-none shadow-warm hover:-translate-y-0.5 bg-gradient-to-br from-primary to-primary-hover focus:outline-2 focus:outline-offset-2 focus:outline-primary",children:"Try Again"}),(0,s.jsx)("a",{href:"/status",className:"px-8 py-3 rounded-[10px] text-sm font-semibold border border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] no-underline focus:outline-2 focus:outline-offset-2 focus:outline-primary","aria-label":"Open system status",children:"System Status"})]})]})})})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=21728)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7018],{22857:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s(95155),a=s(39092),l=s.n(a),o=s(73321),i=s(50910),n=s(12115),d=s(33637);function c(){let e=(0,i.c)("landing"),[t,s]=(0,n.useState)(!1),a=(0,o.useRouter)();return(0,r.jsxs)("nav",{className:"fixed top-0 z-50 w-full bg-[#0B0E14]/80 backdrop-blur-md border-b border-[#2D333B]",children:[(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 h-16 flex items-center justify-between gap-3",children:[(0,r.jsxs)("button",{type:"button",className:"flex items-center gap-3 cursor-pointer bg-transparent border-none p-0 min-w-0",onClick:()=>a.push("/"),"aria-label":e("navigateHome"),children:[(0,r.jsx)("div",{className:"size-8 rounded bg-linear-to-br from-[#E54D5E] to-[#C93D4E] flex items-center justify-center text-white",children:(0,r.jsx)(d.A,{size:20,className:"text-white"})}),(0,r.jsx)("h2",{className:"text-white text-lg sm:text-xl font-bold tracking-tight truncate sm:max-w-none max-w-[160px]",children:e("brandName")})]}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-8",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",children:e("featuresLink")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",children:e("howItWorks")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"/docs",children:e("docsLink")}),(0,r.jsxs)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors flex items-center gap-1",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:[e("github"),(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]","aria-hidden":"true",children:"open_in_new"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4 shrink-0",children:[(0,r.jsx)("button",{onClick:()=>a.push("/dashboard"),className:"hidden sm:flex h-9 items-center justify-center rounded-lg px-4 bg-[#E54D5E] hover:bg-[#C93D4E] transition-all text-white text-sm font-bold shadow-[0_0_15px_rgba(229,77,94,0.4)] hover:shadow-[0_0_20px_rgba(229,77,94,0.6)]",children:e("getStarted")}),(0,r.jsx)("button",{className:"md:hidden text-white",onClick:()=>s(!t),"aria-label":e("toggleMenu"),children:(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:t?"close":"menu"})})]})]}),t&&(0,r.jsx)("div",{className:"md:hidden border-t border-[#2D333B] bg-[#0B0E14]/95 backdrop-blur-md",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",onClick:()=>s(!1),children:e("featuresLink")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",onClick:()=>s(!1),children:e("howItWorks")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"/docs",children:e("docsLink")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:e("github")}),(0,r.jsx)("button",{onClick:()=>a.push("/dashboard"),className:"h-9 rounded-lg bg-[#E54D5E] hover:bg-[#C93D4E] text-white text-sm font-bold",children:e("getStarted")})]})})]})}function x(){let e=(0,i.c)("landing"),t=(0,o.useRouter)();return(0,r.jsxs)("section",{className:"relative pt-32 pb-20 px-4 sm:px-6 min-h-[90vh] flex flex-col items-center justify-center overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-[#E54D5E]/10 rounded-full blur-[120px] pointer-events-none"}),(0,r.jsxs)("div",{className:"relative z-10 max-w-4xl w-full text-center flex flex-col items-center gap-8",children:[(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-[#2D333B] bg-[#111520]/50 px-3 py-1 text-xs font-medium text-[#E54D5E]",children:[(0,r.jsx)("span",{className:"flex h-2 w-2 rounded-full bg-[#E54D5E] animate-pulse"}),e("versionLive")]}),(0,r.jsxs)("h1",{className:"text-4xl sm:text-5xl md:text-7xl font-black leading-[1.1] tracking-tight break-words",children:[e("oneEndpoint")," ",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#E54D5E]",children:e("allProviders")})]}),(0,r.jsx)("p",{className:"text-lg md:text-xl text-gray-400 max-w-2xl mx-auto font-light break-words",children:e("heroDescription")}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4 w-full",children:[(0,r.jsxs)("button",{onClick:()=>t.push("/dashboard"),className:"w-full sm:w-auto h-12 px-8 rounded-lg bg-[#E54D5E] hover:bg-[#C93D4E] text-white text-base font-bold transition-all shadow-[0_0_15px_rgba(229,77,94,0.4)] flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:"rocket_launch"}),e("getStarted")]}),(0,r.jsxs)("a",{href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",className:"w-full sm:w-auto h-12 px-8 rounded-lg border border-[#2D333B] bg-[#111520] hover:bg-[#2D333B] text-white text-base font-bold transition-all flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:"code"}),e("viewOnGithub")]})]})]})]})}var m=s(5772);function h(){let e=(0,i.c)("landing"),[t,s]=(0,n.useState)(0),a=[{id:"claude",name:e("flowToolClaudeCode"),image:"/providers/claude.png"},{id:"codex",name:e("flowToolOpenAICodex"),image:"/providers/codex.png"},{id:"cline",name:e("flowToolCline"),image:"/providers/cline.png"},{id:"cursor",name:e("flowToolCursor"),image:"/providers/cursor.png"}],l=[{id:"openai",name:e("flowProviderOpenAI"),color:"bg-emerald-500",textColor:"text-white"},{id:"anthropic",name:e("flowProviderAnthropic"),color:"bg-orange-400",textColor:"text-white"},{id:"gemini",name:e("flowProviderGemini"),color:"bg-blue-500",textColor:"text-white"},{id:"github",name:e("flowProviderGithubCopilot"),color:"bg-gray-700",textColor:"text-white"}];return(0,n.useEffect)(()=>{let e=setInterval(()=>{s(e=>(e+1)%l.length)},2e3);return()=>clearInterval(e)},[l.length]),(0,r.jsxs)("div",{className:"mt-16 w-full max-w-4xl overflow-hidden",children:[(0,r.jsxs)("div",{className:"relative h-[360px] hidden md:flex items-center justify-center animate-[float_6s_ease-in-out_infinite] overflow-hidden",children:[(0,r.jsxs)("div",{className:"relative z-20 w-32 h-32 rounded-full bg-[#111520] border-2 border-[#E54D5E] shadow-[0_0_40px_rgba(229,77,94,0.3)] flex flex-col items-center justify-center gap-1 group cursor-pointer hover:scale-105 transition-transform duration-500",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-[#E54D5E]","aria-hidden":"true",children:"hub"}),(0,r.jsx)("span",{className:"text-xs font-bold text-white tracking-widest uppercase",children:e("brandName")}),(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border border-[#E54D5E]/30 animate-ping opacity-20"})]}),(0,r.jsx)("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 flex flex-col gap-7",children:a.map(e=>(0,r.jsx)("div",{className:"flex items-center gap-3 opacity-70 hover:opacity-100 transition-opacity group",children:(0,r.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-[#111520] border border-[#2D333B] flex items-center justify-center overflow-hidden p-2 hover:border-[#E54D5E]/50 transition-all hover:scale-105",children:(0,r.jsx)(m.default,{src:e.image,alt:e.name,width:48,height:48,className:"object-contain rounded-xl max-w-[48px] max-h-[48px]",sizes:"48px"})})},e.id))}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none stroke-yellow-700",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 50 C 250 70, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 140 C 250 140, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 210 C 250 210, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 300 C 250 280, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"})]}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 50, 740 50",fill:"none",stroke:0===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:0===t?"3":"2",className:0===t?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 130, 740 130",fill:"none",stroke:1===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:1===t?"3":"2",className:1===t?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 230, 740 230",fill:"none",stroke:2===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:2===t?"3":"2",className:2===t?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 310, 740 310",fill:"none",stroke:3===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:3===t?"3":"2",className:3===t?"animate-pulse":""})]}),(0,r.jsx)("div",{className:"absolute right-0 top-0 bottom-0 flex flex-col justify-between py-6",children:l.map((e,s)=>(0,r.jsx)("div",{className:`px-3 py-2 rounded-lg ${e.color} ${e.textColor} flex items-center justify-center font-bold text-[11px] leading-tight text-center shadow-lg hover:scale-110 transition-all cursor-help min-w-[110px] max-w-[140px] ${t===s?"ring-4 ring-[#E54D5E]/50 scale-110":""}`,title:e.name,children:e.name},e.id))})]}),(0,r.jsx)("div",{className:"md:hidden mt-8 w-full p-4 rounded-lg bg-[#111520] border border-[#2D333B]",children:(0,r.jsx)("p",{className:"text-sm text-center text-gray-400",children:e("interactiveDiagram")})})]})}function u(){let e=(0,i.c)("landing");return(0,r.jsx)("section",{className:"py-24 border-y border-[#2D333B] bg-[#111520]/30",id:"how-it-works",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:e("howItWorks")}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:e("howItWorksDescription")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 relative",children:[(0,r.jsx)("div",{className:"hidden md:block absolute top-12 left-[16%] right-[16%] h-[2px] bg-linear-to-r from-gray-700 via-[#E54D5E] to-gray-700 -z-10"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#0B0E14] border border-[#2D333B] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-gray-300","aria-hidden":"true",children:"terminal"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 break-words",children:e("howItWorksStep1Title")}),(0,r.jsx)("p",{className:"text-sm text-gray-400 break-words",children:e("howItWorksStep1Description")})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-center md:text-center",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#0B0E14] border-2 border-[#E54D5E] flex items-center justify-center shadow-[0_0_30px_rgba(229,77,94,0.2)] z-10 mx-auto",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-[#E54D5E] animate-pulse","aria-hidden":"true",children:"hub"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 text-[#E54D5E] break-words",children:e("howItWorksStep2Title")}),(0,r.jsx)("p",{className:"text-sm text-gray-400 break-words",children:e("howItWorksStep2Description")})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-end md:text-right",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#0B0E14] border border-[#2D333B] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 break-words",children:e("howItWorksStep3Title")}),(0,r.jsx)("p",{className:"text-sm text-gray-400 break-words",children:e("howItWorksStep3Description")})]})]})]})]})})}let f=[{icon:"link",titleKey:"featureUnifiedEndpointTitle",descKey:"featureUnifiedEndpointDesc",colors:{border:"hover:border-blue-500/50",bg:"hover:bg-blue-500/5",iconBg:"bg-blue-500/10",iconText:"text-blue-500",titleHover:"group-hover:text-blue-400"}},{icon:"bolt",titleKey:"featureEasySetupTitle",descKey:"featureEasySetupDesc",colors:{border:"hover:border-orange-500/50",bg:"hover:bg-orange-500/5",iconBg:"bg-orange-500/10",iconText:"text-orange-500",titleHover:"group-hover:text-orange-400"}},{icon:"shield_with_heart",titleKey:"featureModelFallbackTitle",descKey:"featureModelFallbackDesc",colors:{border:"hover:border-rose-500/50",bg:"hover:bg-rose-500/5",iconBg:"bg-rose-500/10",iconText:"text-rose-500",titleHover:"group-hover:text-rose-400"}},{icon:"monitoring",titleKey:"featureUsageTrackingTitle",descKey:"featureUsageTrackingDesc",colors:{border:"hover:border-purple-500/50",bg:"hover:bg-purple-500/5",iconBg:"bg-purple-500/10",iconText:"text-purple-500",titleHover:"group-hover:text-purple-400"}},{icon:"key",titleKey:"featureOAuthApiKeysTitle",descKey:"featureOAuthApiKeysDesc",colors:{border:"hover:border-amber-500/50",bg:"hover:bg-amber-500/5",iconBg:"bg-amber-500/10",iconText:"text-amber-500",titleHover:"group-hover:text-amber-400"}},{icon:"cloud_sync",titleKey:"featureCloudSyncTitle",descKey:"featureCloudSyncDesc",colors:{border:"hover:border-sky-500/50",bg:"hover:bg-sky-500/5",iconBg:"bg-sky-500/10",iconText:"text-sky-500",titleHover:"group-hover:text-sky-400"}},{icon:"terminal",titleKey:"featureCliSupportTitle",descKey:"featureCliSupportDesc",colors:{border:"hover:border-emerald-500/50",bg:"hover:bg-emerald-500/5",iconBg:"bg-emerald-500/10",iconText:"text-emerald-500",titleHover:"group-hover:text-emerald-400"}},{icon:"dashboard",titleKey:"featureDashboardTitle",descKey:"featureDashboardDesc",colors:{border:"hover:border-fuchsia-500/50",bg:"hover:bg-fuchsia-500/5",iconBg:"bg-fuchsia-500/10",iconText:"text-fuchsia-500",titleHover:"group-hover:text-fuchsia-400"}}];function g(){let e=(0,i.c)("landing");return(0,r.jsx)("section",{className:"py-24 px-6",id:"features",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:e("powerfulFeatures")}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:e("featuresSubtitle")})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:f.map(t=>(0,r.jsxs)("div",{className:`p-6 rounded-xl bg-[#23180f] border border-[#3a2f27] ${t.colors.border} ${t.colors.bg} transition-all duration-300 group`,children:[(0,r.jsx)("div",{className:`w-10 h-10 rounded-lg ${t.colors.iconBg} flex items-center justify-center mb-4 ${t.colors.iconText} group-hover:scale-110 transition-transform duration-300`,children:(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:t.icon})}),(0,r.jsx)("h3",{className:`text-lg font-bold mb-2 break-words ${t.colors.titleHover} transition-colors`,children:e(t.titleKey)}),(0,r.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed break-words",children:e(t.descKey)})]},t.titleKey))})]})})}function b(){let e=(0,i.c)("landing"),[t,s]=(0,n.useState)(!1),a="http://localhost:20128",l=`${a}/dashboard`,o="npx omniroute";return(0,r.jsx)("section",{className:"py-24 px-6 bg-[#080A0F]",children:(0,r.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-16 items-start",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:e("getStartedIn30Seconds")}),(0,r.jsx)("p",{className:"text-gray-400 text-lg mb-8",children:e("getStartedDescription")}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex gap-4 min-w-0",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#E54D5E]/20 text-[#E54D5E] flex items-center justify-center font-bold",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:e("installOmniRoute")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e("installStepDescription")})]})]}),(0,r.jsxs)("div",{className:"flex gap-4 min-w-0",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#E54D5E]/20 text-[#E54D5E] flex items-center justify-center font-bold",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:e("openDashboard")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e("openDashboardStepDescription")})]})]}),(0,r.jsxs)("div",{className:"flex gap-4 min-w-0",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#E54D5E]/20 text-[#E54D5E] flex items-center justify-center font-bold",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:e("routeRequests")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e("routeRequestsStepDescription",{endpoint:a})})]})]})]})]}),(0,r.jsx)("div",{className:"flex-1 w-full",children:(0,r.jsxs)("div",{className:"rounded-xl overflow-hidden bg-[#161B22] border border-[#2D333B] shadow-2xl",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-[#111520] border-b border-gray-700",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-green-500"}),(0,r.jsx)("div",{className:"ml-2 text-xs text-gray-500 font-mono",children:e("terminal")})]}),(0,r.jsxs)("div",{className:"p-6 font-mono text-sm leading-relaxed overflow-x-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 group cursor-pointer min-w-0",onClick:()=>{navigator.clipboard.writeText(o),s(!0),setTimeout(()=>s(!1),2e3)},children:[(0,r.jsx)("span",{className:"text-green-400",children:"$"}),(0,r.jsx)("span",{className:"text-white break-all",children:o}),(0,r.jsx)("span",{className:"ml-auto text-gray-500 text-xs opacity-0 group-hover:opacity-100",children:e(t?"copied":"copy")})]}),(0,r.jsxs)("div",{className:"text-gray-400 mb-6",children:[(0,r.jsx)("span",{className:"text-[#E54D5E]",children:">"})," ",e("startingOmniRoute"),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#E54D5E]",children:">"})," ",e("serverRunningOnLabel")," ",(0,r.jsx)("span",{className:"text-blue-400 break-all",children:a}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#E54D5E]",children:">"})," ",e("dashboardLabel"),":"," ",(0,r.jsx)("span",{className:"text-blue-400 break-all",children:l}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-green-400",children:">"})," ",e("readyToRoute")]}),(0,r.jsx)("div",{className:"text-xs text-gray-500 mb-2 border-t border-gray-700 pt-4",children:e("configureProvidersNote")}),(0,r.jsxs)("div",{className:"text-gray-400 text-xs",children:[(0,r.jsx)("span",{className:"text-purple-400",children:e("dataLocation")}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:e("dataLocationMacLinux")})," ",(0,r.jsx)("span",{className:"break-all",children:"~/.omniroute/db.json"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:e("dataLocationWindows")})," ",(0,r.jsx)("span",{className:"break-all",children:"%APPDATA%/omniroute/db.json"})]})]})]})})]})})})}function p(){let e=(0,i.c)("landing"),t=new Date().getFullYear();return(0,r.jsx)("footer",{className:"border-t border-[#2D333B] bg-[#080A0F] pt-16 pb-8 px-6",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 mb-16",children:[(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,r.jsx)("div",{className:"size-6 rounded bg-[#E54D5E] flex items-center justify-center text-white",children:(0,r.jsx)(d.A,{size:16,className:"text-white"})}),(0,r.jsx)("h3",{className:"text-white text-lg font-bold",children:e("brandName")})]}),(0,r.jsx)("p",{className:"text-gray-500 text-sm max-w-xs mb-6 break-words",children:e("footerTagline")}),(0,r.jsx)("div",{className:"flex gap-4",children:(0,r.jsx)("a",{className:"text-gray-400 hover:text-white transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:"code"})})})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:e("product")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"#features",children:e("featuresLink")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"/dashboard",children:e("dashboardLink")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute/releases",target:"_blank",rel:"noopener noreferrer",children:e("changelog")})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:e("resources")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"/docs",children:e("documentation")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:e("github")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://www.npmjs.com/package/omniroute",target:"_blank",rel:"noopener noreferrer",children:e("npm")})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:e("legal")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:e("mitLicense")})]})]}),(0,r.jsxs)("div",{className:"border-t border-[#2D333B] pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,r.jsx)("p",{className:"text-gray-600 text-sm break-words text-center md:text-left",children:e("copyright",{year:t})}),(0,r.jsxs)("div",{className:"flex gap-6",children:[(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:e("github")}),(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://www.npmjs.com/package/omniroute",target:"_blank",rel:"noopener noreferrer",children:e("npm")})]})]})]})})}function j(){let e=(0,i.c)("landing"),t=(0,o.useRouter)();return(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 relative text-white font-sans overflow-x-hidden antialiased selection:bg-[#E54D5E] selection:text-white",children:[(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 fixed inset-0 z-0 overflow-hidden pointer-events-none bg-[#0B0E14]",children:[(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(to right, #E54D5E 1px, transparent 1px), linear-gradient(to bottom, #E54D5E 1px, transparent 1px)",backgroundSize:"50px 50px"},className:"jsx-3ff9ed3cf43389 absolute inset-0 opacity-[0.06]"}),(0,r.jsx)("div",{className:"jsx-3ff9ed3cf43389 absolute top-0 left-1/4 w-[700px] h-[700px] bg-[#E54D5E]/12 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"2s",animationDuration:"22s"},className:"jsx-3ff9ed3cf43389 absolute top-1/3 right-1/4 w-[600px] h-[600px] bg-purple-500/10 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"4s",animationDuration:"25s"},className:"jsx-3ff9ed3cf43389 absolute bottom-0 left-1/2 w-[650px] h-[650px] bg-blue-500/8 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{background:"radial-gradient(circle at center, transparent 0%, rgba(11, 14, 20, 0.4) 100%)"},className:"jsx-3ff9ed3cf43389 absolute inset-0"})]}),(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 relative z-10",children:[(0,r.jsx)(c,{}),(0,r.jsxs)("main",{className:"jsx-3ff9ed3cf43389",children:[(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 relative",children:[(0,r.jsx)(x,{}),(0,r.jsx)("div",{className:"jsx-3ff9ed3cf43389 flex justify-center pb-20",children:(0,r.jsx)(h,{})})]}),(0,r.jsx)(b,{}),(0,r.jsx)(u,{}),(0,r.jsx)(g,{}),(0,r.jsxs)("section",{className:"jsx-3ff9ed3cf43389 py-24 sm:py-32 px-4 sm:px-6 relative overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-3ff9ed3cf43389 absolute inset-0 bg-linear-to-t from-[#E54D5E]/5 to-transparent pointer-events-none"}),(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 max-w-4xl mx-auto text-center relative z-10",children:[(0,r.jsx)("h2",{className:"jsx-3ff9ed3cf43389 text-3xl sm:text-4xl md:text-5xl font-black mb-6 break-words",children:e("ctaTitle")}),(0,r.jsx)("p",{className:"jsx-3ff9ed3cf43389 text-lg sm:text-xl text-gray-400 mb-10 max-w-2xl mx-auto break-words",children:e("ctaDescription")}),(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 flex flex-col sm:flex-row items-center justify-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>t.push("/dashboard"),className:"jsx-3ff9ed3cf43389 w-full sm:w-auto h-14 px-10 rounded-lg bg-[#E54D5E] hover:bg-[#C93D4E] text-white text-lg font-bold transition-all shadow-[0_0_20px_rgba(229,77,94,0.5)]",children:e("startFree")}),(0,r.jsx)("button",{onClick:()=>t.push("/docs"),className:"jsx-3ff9ed3cf43389 w-full sm:w-auto h-14 px-10 rounded-lg border border-[#2D333B] hover:bg-[#111520] text-white text-lg font-bold transition-all",children:e("readDocumentation")})]})]})]})]}),(0,r.jsx)(p,{})]}),(0,r.jsx)(l(),{id:"3ff9ed3cf43389",children:"@keyframes float{0%,100%{transform:translatey(0)}50%{transform:translatey(-10px)}}@keyframes dash{to{stroke-dashoffset:-20}}@keyframes blob{0%,100%{transform:translate(0,0)scale(1)}33%{transform:translate(30px,-50px)scale(1.1)}66%{transform:translate(-20px,20px)scale(.9)}}.animate-blob{animation:blob 20s ease-in-out infinite}"})]})}},33637:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(95155),a=s(14051),l=s.n(a);function o({size:e=20,className:t=""}){return(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,r.jsx)("circle",{cx:"16",cy:"16",r:"3",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"24",cy:"8",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"8",cy:"24",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"24",cy:"24",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"5",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"27",r:"1.5",fill:"currentColor"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"8",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"24",y2:"8",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"19",x2:"8",y2:"24",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"19",x2:"24",y2:"24",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"16",y2:"5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"19",x2:"16",y2:"27",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}o.propTypes={size:l().number,className:l().string}},91621:(e,t,s)=>{Promise.resolve().then(s.bind(s,22857))}},e=>{e.O(0,[3418,8055,2065,8441,3794,7358],()=>e(e.s=91621)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1022,3716,5494,7388,8438,8647,8977,8985,9012],{32701:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=32701)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4345],{10520:(e,t,r)=>{Promise.resolve().then(r.bind(r,37145))},37145:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var o=r(95155),n=r(98500),a=r.n(n);function s(){return(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-screen p-6 bg-bg text-text-main text-center",role:"main","aria-labelledby":"not-found-title",children:[(0,o.jsx)("div",{className:"text-[96px] font-extrabold leading-none mb-2 bg-gradient-to-br from-primary to-primary-hover bg-clip-text text-transparent","aria-hidden":"true",children:"404"}),(0,o.jsx)("h1",{id:"not-found-title",className:"text-2xl font-semibold mb-2",children:"Page not found"}),(0,o.jsx)("p",{className:"text-[15px] text-text-muted max-w-[400px] leading-relaxed mb-8",children:"The page you're looking for doesn't exist or has been moved."}),(0,o.jsxs)("div",{className:"flex flex-col sm:flex-row items-center gap-3",children:[(0,o.jsx)(a(),{href:"/dashboard",className:"px-8 py-3 rounded-xl text-white text-sm font-medium no-underline transition-all duration-200 motion-reduce:transition-none shadow-warm hover:-translate-y-0.5 bg-gradient-to-br from-primary to-primary-hover hover:shadow-elevated focus:outline-2 focus:outline-offset-2 focus:outline-primary","aria-label":"Return to dashboard",children:"Go to Dashboard"}),(0,o.jsx)(a(),{href:"/status",className:"px-8 py-3 rounded-xl text-sm font-medium no-underline border border-border hover:bg-bg-alt transition-colors duration-200 motion-reduce:transition-none focus:outline-2 focus:outline-offset-2 focus:outline-primary","aria-label":"Open system status page",children:"System Status"})]})]})}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=10520)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9734],{37249:(e,t,n)=>{Promise.resolve().then(n.bind(n,92042))},92042:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(95155),i=n(12115),o=n(98500),s=n.n(o);function a(){let[e,t]=(0,i.useState)(()=>"u"<typeof navigator||navigator.onLine);return(0,i.useEffect)(()=>{let e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e),window.addEventListener("offline",n),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}},[]),(0,r.jsx)("main",{className:"min-h-screen bg-bg text-text-main flex items-center justify-center p-6",children:(0,r.jsxs)("section",{className:"w-full max-w-xl rounded-2xl border border-border bg-surface p-8 shadow-soft text-center",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-5xl text-primary mb-3","aria-hidden":"true",children:"wifi_off"}),(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:"Connectivity Issue"}),(0,r.jsx)("p",{className:"mt-3 text-text-muted leading-relaxed",children:"OmniRoute cannot reach the network right now. Check your internet, VPN, or proxy settings."}),(0,r.jsxs)("div",{className:`mt-6 inline-flex items-center gap-2 rounded-full px-3 py-1.5 text-sm border ${e?"border-green-500/30 text-green-600 dark:text-green-400 bg-green-500/10":"border-amber-500/30 text-amber-600 dark:text-amber-400 bg-amber-500/10"}`,"aria-live":"polite",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-base","aria-hidden":"true",children:e?"wifi":"wifi_off"}),(0,r.jsx)("span",{children:e?"Connection restored":"Offline mode detected"})]}),(0,r.jsxs)("div",{className:"mt-8 flex flex-col sm:flex-row gap-3",children:[(0,r.jsx)("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center justify-center px-6 py-3 rounded-lg text-white text-sm font-semibold bg-gradient-to-br from-primary to-primary-hover hover:shadow-elevated transition-all duration-200 motion-reduce:transition-none",children:"Retry Connection"}),(0,r.jsx)(s(),{href:"/status",className:"inline-flex items-center justify-center px-6 py-3 rounded-lg text-sm font-semibold border border-border hover:bg-bg-alt transition-colors duration-200 motion-reduce:transition-none",children:"Open Status Page"})]})]})})}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=37249)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9557],{10294:(e,t,s)=>{Promise.resolve().then(s.bind(s,26289))},26289:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(95155),a=s(12115),n=s(98500),l=s.n(n),i=s(92542);function d(){let[e,t]=(0,a.useState)(!0),[s,n]=(0,a.useState)(null),[d,c]=(0,a.useState)(null);async function o(){t(!0),c(null);try{let e=await fetch("/api/monitoring/health",{cache:"no-store"}),t=await e.json();if(!e.ok){c(t.error||"Failed to load system health."),n(null);return}n(t)}catch{c("Unable to reach health endpoint. Check connectivity and retry."),n(null)}finally{t(!1)}}(0,a.useEffect)(()=>{o()},[]);let m=(0,a.useMemo)(()=>{let e=Object.entries(s?.providerHealth||{}),t=e.filter(([,e])=>"OPEN"===e.state).length,r=e.filter(([,e])=>"HALF_OPEN"===e.state).length,a=e.filter(([,e])=>"CLOSED"===e.state).length;return{total:e.length,open:t,halfOpen:r,closed:a}},[s]);return(0,r.jsx)("main",{className:"min-h-screen bg-bg text-text-main p-6 sm:p-10",children:(0,r.jsxs)("section",{className:"max-w-4xl mx-auto space-y-6",children:[(0,r.jsxs)("header",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-3xl font-bold tracking-tight",children:"System Status"}),(0,r.jsx)("p",{className:"text-text-muted mt-1",children:"Live operational snapshot for OmniRoute core services."})]}),(0,r.jsx)("button",{onClick:()=>void o(),className:"inline-flex items-center justify-center px-4 py-2 rounded-lg text-sm font-semibold bg-gradient-to-br from-primary to-primary-hover text-white transition-all duration-200 motion-reduce:transition-none",children:"Refresh"})]}),e&&(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-6 flex items-center gap-3",role:"status","aria-live":"polite",children:[(0,r.jsx)(i.Spinner,{size:"md"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Loading health metrics..."})]}),!e&&d&&(0,r.jsxs)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-6",role:"alert",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-red-600 dark:text-red-400",children:"Health Check Failed"}),(0,r.jsx)("p",{className:"mt-2 text-sm text-text-muted",children:d}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,r.jsx)(l(),{href:"/offline",className:"px-3 py-2 rounded-lg border border-border text-sm font-medium hover:bg-bg-alt transition-colors",children:"Open Connectivity Help"}),(0,r.jsx)(l(),{href:"/maintenance",className:"px-3 py-2 rounded-lg border border-border text-sm font-medium hover:bg-bg-alt transition-colors",children:"Maintenance Info"})]})]}),!e&&s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-4",children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Service"}),(0,r.jsx)("p",{className:"mt-2 text-xl font-semibold",children:s.status||"unknown"})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-4",children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Version"}),(0,r.jsx)("p",{className:"mt-2 text-xl font-semibold",children:s.system?.version||"n/a"})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-4",children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Uptime"}),(0,r.jsx)("p",{className:"mt-2 text-xl font-semibold",children:function(e){if(!e||e<=0)return"0m";let t=Math.floor(e),s=Math.floor(t/3600),r=Math.floor(t%3600/60);return s>0?`${s}h ${r}m`:`${r}m`}(s.system?.uptime)})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-4",children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Providers Tracked"}),(0,r.jsx)("p",{className:"mt-2 text-xl font-semibold",children:m.total})]})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Provider Circuit Breaker State"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mt-1",children:["OPEN: ",m.open," \xb7 HALF_OPEN: ",m.halfOpen," \xb7 CLOSED:"," ",m.closed]}),(0,r.jsxs)("p",{className:"mt-4 text-xs text-text-muted",children:["Last update:"," ",s.timestamp?new Date(s.timestamp).toLocaleString():"n/a"]})]})]})]})})}},67040:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},92542:(e,t,s)=>{"use strict";s.d(t,{CardSkeleton:()=>c,PageLoading:()=>i,Skeleton:()=>d,Spinner:()=>l,default:()=>o});var r=s(95155),a=s(67040);let n={sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"};function l({size:e="md",className:t,label:s="Loading"}){return(0,r.jsxs)("span",{role:"status","aria-live":"polite","aria-label":s,className:(0,a.cn)("inline-flex",t),children:[(0,r.jsx)("span",{className:"sr-only",children:s}),(0,r.jsx)("span",{"aria-hidden":"true",className:(0,a.cn)("material-symbols-outlined text-primary animate-spin motion-reduce:animate-none",n[e]),children:"progress_activity"})]})}function i({message:e="Loading...",className:t}){return(0,r.jsxs)("div",{className:(0,a.cn)("fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg px-6",t),role:"status","aria-live":"polite","aria-busy":"true",children:[(0,r.jsx)(l,{size:"xl"}),(0,r.jsx)("p",{className:"mt-4 text-text-muted text-center",children:e})]})}function d({className:e,...t}){return(0,r.jsx)("div",{"aria-hidden":"true",className:(0,a.cn)("animate-pulse motion-reduce:animate-none rounded-lg bg-border",e),...t})}function c(){return(0,r.jsxs)("div",{className:"p-6 rounded-xl border border-border bg-surface","aria-hidden":"true",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 gap-4",children:[(0,r.jsx)(d,{className:"h-4 w-24"}),(0,r.jsx)(d,{className:"size-10 rounded-lg"})]}),(0,r.jsx)(d,{className:"h-8 w-16 mb-2"}),(0,r.jsx)(d,{className:"h-3 w-20"})]})}function o({type:e="spinner",className:t,message:s,size:a,label:n,...o}){switch(e){case"page":return(0,r.jsx)(i,{message:s,className:t});case"skeleton":return(0,r.jsx)(d,{className:t,...o});case"card":return(0,r.jsx)(c,{});default:return(0,r.jsx)(l,{size:a,className:t,label:n})}}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=10294)),_N_E=e.O()}]);