omniroute 2.5.3 → 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (670) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +42 -42
  3. package/app/.next/build-manifest.json +3 -3
  4. package/app/.next/prerender-manifest.json +3 -3
  5. package/app/.next/required-server-files.json +3 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js +2 -2
  7. package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/agents/page.js +2 -2
  10. package/app/.next/server/app/(dashboard)/dashboard/agents/page.js.nft.json +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
  13. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +2 -2
  16. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +2 -2
  19. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js +2 -2
  22. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js.nft.json +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +4 -4
  25. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  28. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +2 -2
  31. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  34. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/health/page.js +2 -2
  37. package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +2 -2
  40. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
  43. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js +2 -2
  46. package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/media/page.js +2 -2
  49. package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
  50. package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
  52. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/(dashboard)/dashboard/playground/page.js +3 -3
  58. package/app/.next/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  61. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  64. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  67. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  70. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +2 -2
  73. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
  74. package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
  76. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  77. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +3 -3
  79. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  80. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  81. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  82. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  83. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/.well-known/agent.json/route.js +1 -1
  85. package/app/.next/server/app/.well-known/agent.json/route_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/400/page.js +2 -2
  87. package/app/.next/server/app/400/page.js.nft.json +1 -1
  88. package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
  89. package/app/.next/server/app/401/page.js +2 -2
  90. package/app/.next/server/app/401/page.js.nft.json +1 -1
  91. package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
  92. package/app/.next/server/app/403/page.js +2 -2
  93. package/app/.next/server/app/403/page.js.nft.json +1 -1
  94. package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
  95. package/app/.next/server/app/408/page.js +2 -2
  96. package/app/.next/server/app/408/page.js.nft.json +1 -1
  97. package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
  98. package/app/.next/server/app/429/page.js +2 -2
  99. package/app/.next/server/app/429/page.js.nft.json +1 -1
  100. package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
  101. package/app/.next/server/app/500/page.js +2 -2
  102. package/app/.next/server/app/500/page.js.nft.json +1 -1
  103. package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
  104. package/app/.next/server/app/502/page.js +2 -2
  105. package/app/.next/server/app/502/page.js.nft.json +1 -1
  106. package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
  107. package/app/.next/server/app/503/page.js +2 -2
  108. package/app/.next/server/app/503/page.js.nft.json +1 -1
  109. package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
  110. package/app/.next/server/app/_global-error/page.js +3 -3
  111. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  112. package/app/.next/server/app/_global-error.html +2 -2
  113. package/app/.next/server/app/_global-error.rsc +5 -5
  114. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +5 -5
  115. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  116. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  117. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  118. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +4 -4
  119. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  120. package/app/.next/server/app/_not-found/page.js +2 -2
  121. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  122. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  123. package/app/.next/server/app/a2a/route.js +2 -2
  124. package/app/.next/server/app/a2a/route_client-reference-manifest.js +1 -1
  125. package/app/.next/server/app/api/a2a/status/route.js +1 -1
  126. package/app/.next/server/app/api/a2a/status/route_client-reference-manifest.js +1 -1
  127. package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route.js +1 -1
  128. package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route_client-reference-manifest.js +1 -1
  129. package/app/.next/server/app/api/a2a/tasks/[id]/route.js +1 -1
  130. package/app/.next/server/app/api/a2a/tasks/[id]/route_client-reference-manifest.js +1 -1
  131. package/app/.next/server/app/api/a2a/tasks/route.js +1 -1
  132. package/app/.next/server/app/api/a2a/tasks/route_client-reference-manifest.js +1 -1
  133. package/app/.next/server/app/api/acp/agents/route.js +1 -1
  134. package/app/.next/server/app/api/acp/agents/route.js.nft.json +1 -1
  135. package/app/.next/server/app/api/acp/agents/route_client-reference-manifest.js +1 -1
  136. package/app/.next/server/app/api/auth/login/route.js +1 -1
  137. package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  138. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  139. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  140. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  141. package/app/.next/server/app/api/auth/status/route.js +1 -1
  142. package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  143. package/app/.next/server/app/api/cache/route.js +1 -1
  144. package/app/.next/server/app/api/cache/route.js.nft.json +1 -1
  145. package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
  146. package/app/.next/server/app/api/cache/stats/route.js +1 -1
  147. package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
  148. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  149. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  150. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  151. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  152. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  153. package/app/.next/server/app/api/cli-tools/backups/route.js +2 -2
  154. package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
  155. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
  156. package/app/.next/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  157. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  158. package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
  159. package/app/.next/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  160. package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  161. package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  162. package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
  163. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
  164. package/app/.next/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  165. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  166. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
  167. package/app/.next/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  168. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  169. package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js +1 -1
  170. package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
  171. package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  172. package/app/.next/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  173. package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  174. package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route.js +1 -1
  175. package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route_client-reference-manifest.js +1 -1
  176. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  177. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  178. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  179. package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
  180. package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
  181. package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
  182. package/app/.next/server/app/api/cli-tools/status/route.js.nft.json +1 -1
  183. package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
  184. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  185. package/app/.next/server/app/api/cloud/auth/route.js.nft.json +1 -1
  186. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  187. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  188. package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +1 -1
  189. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  190. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  191. package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +1 -1
  192. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  193. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  194. package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +1 -1
  195. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  196. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  197. package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
  198. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  199. package/app/.next/server/app/api/combos/auto/route.js +1 -1
  200. package/app/.next/server/app/api/combos/auto/route_client-reference-manifest.js +1 -1
  201. package/app/.next/server/app/api/combos/metrics/route.js +1 -1
  202. package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
  203. package/app/.next/server/app/api/combos/route.js +1 -1
  204. package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
  205. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  206. package/app/.next/server/app/api/combos/test/route.js +1 -1
  207. package/app/.next/server/app/api/combos/test/route.js.nft.json +1 -1
  208. package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
  209. package/app/.next/server/app/api/compliance/audit-log/route.js +1 -1
  210. package/app/.next/server/app/api/compliance/audit-log/route.js.nft.json +1 -1
  211. package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
  212. package/app/.next/server/app/api/db-backups/export/route.js +1 -1
  213. package/app/.next/server/app/api/db-backups/export/route.js.nft.json +1 -1
  214. package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
  215. package/app/.next/server/app/api/db-backups/exportAll/route.js +1 -1
  216. package/app/.next/server/app/api/db-backups/exportAll/route.js.nft.json +1 -1
  217. package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
  218. package/app/.next/server/app/api/db-backups/import/route.js +1 -1
  219. package/app/.next/server/app/api/db-backups/import/route.js.nft.json +1 -1
  220. package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
  221. package/app/.next/server/app/api/db-backups/route.js +1 -1
  222. package/app/.next/server/app/api/db-backups/route.js.nft.json +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.js.nft.json +1 -1
  230. package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
  231. package/app/.next/server/app/api/init/route.js +1 -1
  232. package/app/.next/server/app/api/init/route.js.nft.json +1 -1
  233. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  234. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  235. package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
  236. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  237. package/app/.next/server/app/api/keys/route.js +1 -1
  238. package/app/.next/server/app/api/keys/route.js.nft.json +1 -1
  239. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  240. package/app/.next/server/app/api/logs/console/route.js +1 -1
  241. package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
  242. package/app/.next/server/app/api/mcp/audit/route.js +2 -2
  243. package/app/.next/server/app/api/mcp/audit/route.js.nft.json +1 -1
  244. package/app/.next/server/app/api/mcp/audit/route_client-reference-manifest.js +1 -1
  245. package/app/.next/server/app/api/mcp/audit/stats/route.js +2 -2
  246. package/app/.next/server/app/api/mcp/audit/stats/route.js.nft.json +1 -1
  247. package/app/.next/server/app/api/mcp/audit/stats/route_client-reference-manifest.js +1 -1
  248. package/app/.next/server/app/api/mcp/sse/route.js +1 -1
  249. package/app/.next/server/app/api/mcp/sse/route.js.nft.json +1 -1
  250. package/app/.next/server/app/api/mcp/sse/route_client-reference-manifest.js +1 -1
  251. package/app/.next/server/app/api/mcp/status/route.js +1 -1
  252. package/app/.next/server/app/api/mcp/status/route.js.nft.json +1 -1
  253. package/app/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  254. package/app/.next/server/app/api/mcp/stream/route.js +1 -1
  255. package/app/.next/server/app/api/mcp/stream/route.js.nft.json +1 -1
  256. package/app/.next/server/app/api/mcp/stream/route_client-reference-manifest.js +1 -1
  257. package/app/.next/server/app/api/mcp/tools/route.js +1 -1
  258. package/app/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
  259. package/app/.next/server/app/api/models/alias/route.js +1 -1
  260. package/app/.next/server/app/api/models/alias/route.js.nft.json +1 -1
  261. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  262. package/app/.next/server/app/api/models/availability/route.js +1 -1
  263. package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  264. package/app/.next/server/app/api/models/catalog/route.js +1 -1
  265. package/app/.next/server/app/api/models/catalog/route.js.nft.json +1 -1
  266. package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
  267. package/app/.next/server/app/api/models/openrouter-catalog/route.js +1 -1
  268. package/app/.next/server/app/api/models/openrouter-catalog/route.js.nft.json +1 -1
  269. package/app/.next/server/app/api/models/openrouter-catalog/route_client-reference-manifest.js +1 -1
  270. package/app/.next/server/app/api/models/route.js +1 -1
  271. package/app/.next/server/app/api/models/route.js.nft.json +1 -1
  272. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  273. package/app/.next/server/app/api/monitoring/health/route.js +1 -1
  274. package/app/.next/server/app/api/monitoring/health/route.js.nft.json +1 -1
  275. package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
  276. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  277. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  278. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  279. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  280. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  281. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  282. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  283. package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  284. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  285. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  286. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  287. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  288. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  289. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  290. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  291. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  292. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  293. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  294. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  295. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  296. package/app/.next/server/app/api/policies/route.js +2 -2
  297. package/app/.next/server/app/api/policies/route.js.nft.json +1 -1
  298. package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
  299. package/app/.next/server/app/api/pricing/defaults/route.js +1 -1
  300. package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
  301. package/app/.next/server/app/api/pricing/models/route.js +1 -1
  302. package/app/.next/server/app/api/pricing/models/route.js.nft.json +1 -1
  303. package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
  304. package/app/.next/server/app/api/pricing/route.js +1 -1
  305. package/app/.next/server/app/api/pricing/route.js.nft.json +1 -1
  306. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  307. package/app/.next/server/app/api/pricing/sync/route.js +1 -1
  308. package/app/.next/server/app/api/pricing/sync/route.js.nft.json +1 -1
  309. package/app/.next/server/app/api/pricing/sync/route_client-reference-manifest.js +1 -1
  310. package/app/.next/server/app/api/provider-metrics/route.js +2 -2
  311. package/app/.next/server/app/api/provider-metrics/route.js.nft.json +1 -1
  312. package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
  313. package/app/.next/server/app/api/provider-models/route.js +1 -1
  314. package/app/.next/server/app/api/provider-models/route.js.nft.json +1 -1
  315. package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
  316. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  317. package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  318. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  319. package/app/.next/server/app/api/provider-nodes/route.js +2 -2
  320. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  321. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  322. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  323. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  324. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  325. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  326. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  327. package/app/.next/server/app/api/providers/[id]/refresh/route.js +1 -1
  328. package/app/.next/server/app/api/providers/[id]/refresh/route.js.nft.json +1 -1
  329. package/app/.next/server/app/api/providers/[id]/refresh/route_client-reference-manifest.js +1 -1
  330. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  331. package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
  332. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  333. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  334. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  335. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  336. package/app/.next/server/app/api/providers/client/route.js +1 -1
  337. package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
  338. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  339. package/app/.next/server/app/api/providers/route.js +1 -1
  340. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  341. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  342. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  343. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  344. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  345. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  346. package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
  347. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  348. package/app/.next/server/app/api/rate-limit/route.js +1 -1
  349. package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
  350. package/app/.next/server/app/api/rate-limits/route.js +1 -1
  351. package/app/.next/server/app/api/rate-limits/route.js.nft.json +1 -1
  352. package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
  353. package/app/.next/server/app/api/resilience/reset/route.js +1 -1
  354. package/app/.next/server/app/api/resilience/reset/route.js.nft.json +1 -1
  355. package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
  356. package/app/.next/server/app/api/resilience/route.js +1 -1
  357. package/app/.next/server/app/api/resilience/route.js.nft.json +1 -1
  358. package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
  359. package/app/.next/server/app/api/restart/route.js +1 -1
  360. package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  361. package/app/.next/server/app/api/sessions/route.js +1 -1
  362. package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  363. package/app/.next/server/app/api/settings/background-degradation/route.js +1 -1
  364. package/app/.next/server/app/api/settings/background-degradation/route.js.nft.json +1 -1
  365. package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -1
  366. package/app/.next/server/app/api/settings/codex-service-tier/route.js +1 -1
  367. package/app/.next/server/app/api/settings/codex-service-tier/route.js.nft.json +1 -1
  368. package/app/.next/server/app/api/settings/codex-service-tier/route_client-reference-manifest.js +1 -1
  369. package/app/.next/server/app/api/settings/combo-defaults/route.js +1 -1
  370. package/app/.next/server/app/api/settings/combo-defaults/route.js.nft.json +1 -1
  371. package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
  372. package/app/.next/server/app/api/settings/ip-filter/route.js +1 -1
  373. package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
  374. package/app/.next/server/app/api/settings/model-aliases/route.js +1 -1
  375. package/app/.next/server/app/api/settings/model-aliases/route.js.nft.json +1 -1
  376. package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -1
  377. package/app/.next/server/app/api/settings/proxy/route.js +1 -1
  378. package/app/.next/server/app/api/settings/proxy/route.js.nft.json +1 -1
  379. package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
  380. package/app/.next/server/app/api/settings/proxy/test/route.js +1 -1
  381. package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
  382. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  383. package/app/.next/server/app/api/settings/require-login/route.js.nft.json +1 -1
  384. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  385. package/app/.next/server/app/api/settings/route.js +1 -1
  386. package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
  387. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  388. package/app/.next/server/app/api/settings/system-prompt/route.js +1 -1
  389. package/app/.next/server/app/api/settings/system-prompt/route.js.nft.json +1 -1
  390. package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
  391. package/app/.next/server/app/api/settings/task-routing/route.js +1 -1
  392. package/app/.next/server/app/api/settings/task-routing/route.js.nft.json +1 -1
  393. package/app/.next/server/app/api/settings/task-routing/route_client-reference-manifest.js +1 -1
  394. package/app/.next/server/app/api/settings/thinking-budget/route.js +1 -1
  395. package/app/.next/server/app/api/settings/thinking-budget/route.js.nft.json +1 -1
  396. package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
  397. package/app/.next/server/app/api/shutdown/route.js +1 -1
  398. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  399. package/app/.next/server/app/api/storage/health/route.js +1 -1
  400. package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
  401. package/app/.next/server/app/api/sync/cloud/route.js +1 -1
  402. package/app/.next/server/app/api/sync/cloud/route.js.nft.json +1 -1
  403. package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
  404. package/app/.next/server/app/api/sync/initialize/route.js +1 -1
  405. package/app/.next/server/app/api/sync/initialize/route.js.nft.json +1 -1
  406. package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
  407. package/app/.next/server/app/api/tags/route.js +1 -1
  408. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  409. package/app/.next/server/app/api/telemetry/summary/route.js +1 -1
  410. package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
  411. package/app/.next/server/app/api/token-health/route.js +1 -1
  412. package/app/.next/server/app/api/token-health/route.js.nft.json +1 -1
  413. package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
  414. package/app/.next/server/app/api/translator/detect/route.js +1 -1
  415. package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
  416. package/app/.next/server/app/api/translator/history/route.js +1 -1
  417. package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
  418. package/app/.next/server/app/api/translator/load/route.js +1 -1
  419. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  420. package/app/.next/server/app/api/translator/save/route.js +1 -1
  421. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  422. package/app/.next/server/app/api/translator/send/route.js +1 -1
  423. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  424. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  425. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  426. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  427. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  428. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  429. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  430. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  431. package/app/.next/server/app/api/usage/analytics/route.js +1 -1
  432. package/app/.next/server/app/api/usage/analytics/route.js.nft.json +1 -1
  433. package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
  434. package/app/.next/server/app/api/usage/budget/route.js +2 -2
  435. package/app/.next/server/app/api/usage/budget/route.js.nft.json +1 -1
  436. package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
  437. package/app/.next/server/app/api/usage/call-logs/[id]/route.js +1 -1
  438. package/app/.next/server/app/api/usage/call-logs/[id]/route.js.nft.json +1 -1
  439. package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
  440. package/app/.next/server/app/api/usage/call-logs/route.js +1 -1
  441. package/app/.next/server/app/api/usage/call-logs/route.js.nft.json +1 -1
  442. package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
  443. package/app/.next/server/app/api/usage/history/route.js +1 -1
  444. package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
  445. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  446. package/app/.next/server/app/api/usage/logs/route.js +1 -1
  447. package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
  448. package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  449. package/app/.next/server/app/api/usage/proxy-logs/route.js +1 -1
  450. package/app/.next/server/app/api/usage/proxy-logs/route.js.nft.json +1 -1
  451. package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
  452. package/app/.next/server/app/api/usage/quota/route.js +1 -1
  453. package/app/.next/server/app/api/usage/quota/route.js.nft.json +1 -1
  454. package/app/.next/server/app/api/usage/quota/route_client-reference-manifest.js +1 -1
  455. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  456. package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  457. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  458. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  459. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  460. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  461. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  462. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  463. package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  464. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
  465. package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  466. package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  467. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  468. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  469. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  470. package/app/.next/server/app/api/v1/completions/route.js +1 -1
  471. package/app/.next/server/app/api/v1/completions/route.js.nft.json +1 -1
  472. package/app/.next/server/app/api/v1/completions/route_client-reference-manifest.js +1 -1
  473. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  474. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  475. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  476. package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
  477. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  478. package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  479. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  480. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  481. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  482. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  483. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  484. package/app/.next/server/app/api/v1/models/route.js +1 -1
  485. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  486. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  487. package/app/.next/server/app/api/v1/moderations/route.js +1 -1
  488. package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
  489. package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
  490. package/app/.next/server/app/api/v1/music/generations/route.js +1 -1
  491. package/app/.next/server/app/api/v1/music/generations/route.js.nft.json +1 -1
  492. package/app/.next/server/app/api/v1/music/generations/route_client-reference-manifest.js +1 -1
  493. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
  494. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js.nft.json +1 -1
  495. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
  496. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +1 -1
  497. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js.nft.json +1 -1
  498. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
  499. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +1 -1
  500. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
  501. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
  502. package/app/.next/server/app/api/v1/rerank/route.js +1 -1
  503. package/app/.next/server/app/api/v1/rerank/route.js.nft.json +1 -1
  504. package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
  505. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  506. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  507. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  508. package/app/.next/server/app/api/v1/route.js +1 -1
  509. package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
  510. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  511. package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
  512. package/app/.next/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  513. package/app/.next/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -1
  514. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  515. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  516. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  517. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  518. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  519. package/app/.next/server/app/callback/page.js +2 -2
  520. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  521. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  522. package/app/.next/server/app/docs/page.js +3 -3
  523. package/app/.next/server/app/docs/page.js.nft.json +1 -1
  524. package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  525. package/app/.next/server/app/forbidden/page.js +2 -2
  526. package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
  527. package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
  528. package/app/.next/server/app/forgot-password/page.js +2 -2
  529. package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
  530. package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
  531. package/app/.next/server/app/landing/page.js +2 -2
  532. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  533. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  534. package/app/.next/server/app/login/page.js +2 -2
  535. package/app/.next/server/app/login/page.js.nft.json +1 -1
  536. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  537. package/app/.next/server/app/maintenance/page.js +2 -2
  538. package/app/.next/server/app/maintenance/page.js.nft.json +1 -1
  539. package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
  540. package/app/.next/server/app/offline/page.js +2 -2
  541. package/app/.next/server/app/offline/page.js.nft.json +1 -1
  542. package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  543. package/app/.next/server/app/page.js +2 -2
  544. package/app/.next/server/app/page.js.nft.json +1 -1
  545. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  546. package/app/.next/server/app/privacy/page.js +2 -2
  547. package/app/.next/server/app/privacy/page.js.nft.json +1 -1
  548. package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  549. package/app/.next/server/app/status/page.js +2 -2
  550. package/app/.next/server/app/status/page.js.nft.json +1 -1
  551. package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
  552. package/app/.next/server/app/terms/page.js +2 -2
  553. package/app/.next/server/app/terms/page.js.nft.json +1 -1
  554. package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  555. package/app/.next/server/app-paths-manifest.json +42 -42
  556. package/app/.next/server/chunks/242.js +1 -1
  557. package/app/.next/server/chunks/2910.js +1 -1
  558. package/app/.next/server/chunks/3648.js +2 -2
  559. package/app/.next/server/chunks/438.js +1 -1
  560. package/app/.next/server/chunks/4488.js +1 -1
  561. package/app/.next/server/chunks/5248.js +1 -0
  562. package/app/.next/server/chunks/5979.js +1 -1
  563. package/app/.next/server/chunks/6743.js +1 -1
  564. package/app/.next/server/chunks/7109.js +1 -1
  565. package/app/.next/server/chunks/7327.js +1 -1
  566. package/app/.next/server/chunks/7889.js +2 -0
  567. package/app/.next/server/chunks/8020.js +3 -3
  568. package/app/.next/server/chunks/9548.js +1 -1
  569. package/app/.next/server/middleware-build-manifest.js +1 -1
  570. package/app/.next/server/middleware.js +2 -2
  571. package/app/.next/server/next-font-manifest.js +1 -1
  572. package/app/.next/server/next-font-manifest.json +1 -1
  573. package/app/.next/server/pages/500.html +2 -2
  574. package/app/.next/server/server-reference-manifest.js +1 -1
  575. package/app/.next/server/server-reference-manifest.json +1 -1
  576. package/app/.next/static/chunks/{5846-63e1f1f0bd63a6ad.js → 5846-df4fe851d063cfee.js} +1 -1
  577. package/app/.next/static/chunks/{647-bf8bc535ac3648d0.js → 647-62acab8e8736396d.js} +2 -2
  578. package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-43d6fa6b75cca497.js +1 -0
  579. package/app/.next/static/chunks/app/(dashboard)/dashboard/agents/{page-576b27a05c09fba5.js → page-94aa33336637e74c.js} +1 -1
  580. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-49ae846d72948391.js +1 -0
  581. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-6ab7701da3357bb9.js → page-bef5c045e7eae657.js} +1 -1
  582. package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-71f65a8c11e24ee8.js +1 -0
  583. package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-e5bf8955e7b9a4f5.js +1 -0
  584. package/app/.next/static/chunks/app/(dashboard)/dashboard/auto-combo/{page-799e2f96e9af3fd9.js → page-fbf2315ef6ecc87a.js} +1 -1
  585. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-1d9c62ff735ac65a.js +15 -0
  586. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-4e4d823fdc8705f5.js +1 -0
  587. package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-8f6233f59f5277e9.js → page-7a233357dfbd2e05.js} +1 -1
  588. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-81a6632af8c82919.js +1 -0
  589. package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-1e1eb2f79d606ab2.js → page-66ee4e631429e0d8.js} +1 -1
  590. package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-5ace323bdf990976.js +1 -0
  591. package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-2d456b7ddbf3d41e.js → page-f08daa44ccbeb258.js} +1 -1
  592. package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-8e35334b9f393139.js +1 -0
  593. package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-4e1629fc8404b3b9.js +1 -0
  594. package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-5378e9473a20cd6a.js → page-d424641c7e428be9.js} +1 -1
  595. package/app/.next/static/chunks/app/(dashboard)/dashboard/{page-799001b6cea7d5bc.js → page-fc5b6d46662747df.js} +1 -1
  596. package/app/.next/static/chunks/app/(dashboard)/dashboard/playground/{page-0fff47edc56250ea.js → page-6d988d37ce3b0e60.js} +1 -1
  597. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f248c93328119230.js +1 -0
  598. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-a5ae03ba05400b04.js → error-0400f175dd1372fa.js} +1 -1
  599. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-9552383fd2e11282.js +1 -0
  600. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-d57908b59d4b482c.js +1 -0
  601. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-fbf74ae2f3206efe.js → page-adbd858f2a6cd352.js} +1 -1
  602. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-ec9643134a96bbcd.js → error-c39d18f10fb7d3f6.js} +1 -1
  603. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-3519a633b514f31a.js → loading-b5faf05c78a2cc54.js} +1 -1
  604. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-28ee6d0fc27b6ffe.js +1 -0
  605. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-aab023f14c6ff966.js → page-0325206d05e6f375.js} +1 -1
  606. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-8d6f629e0e29e796.js → page-f761c3ff75d56636.js} +2 -2
  607. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-9e20463252daf023.js +1 -0
  608. package/app/.next/static/chunks/app/(dashboard)/{layout-7ae0c66c22bee8a1.js → layout-6d0afc53f5f2a538.js} +1 -1
  609. package/app/.next/static/chunks/app/400/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
  610. package/app/.next/static/chunks/app/401/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
  611. package/app/.next/static/chunks/app/403/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
  612. package/app/.next/static/chunks/app/408/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
  613. package/app/.next/static/chunks/app/429/page-3b77bf358909019a.js +1 -0
  614. package/app/.next/static/chunks/app/500/page-3b77bf358909019a.js +1 -0
  615. package/app/.next/static/chunks/app/502/page-3b77bf358909019a.js +1 -0
  616. package/app/.next/static/chunks/app/503/page-3b77bf358909019a.js +1 -0
  617. package/app/.next/static/chunks/app/callback/{page-0f0ebc0820dd18a5.js → page-585a53f7dc6a30f1.js} +1 -1
  618. package/app/.next/static/chunks/app/docs/{page-dc88e0a01d291518.js → page-9624e5fb8cabf7d8.js} +1 -1
  619. package/app/.next/static/chunks/app/{error-32c03f14529d3920.js → error-f7f595c541537e63.js} +1 -1
  620. package/app/.next/static/chunks/app/forbidden/page-b33079c1573b0bfa.js +1 -0
  621. package/app/.next/static/chunks/app/forgot-password/page-90cd6259c75badfc.js +1 -0
  622. package/app/.next/static/chunks/app/global-error-1dfd1c91ad5199fe.js +1 -0
  623. package/app/.next/static/chunks/app/landing/page-90df98c27fe0b5d9.js +1 -0
  624. package/app/.next/static/chunks/app/{layout-070972eb026af319.js → layout-108592eafb959363.js} +1 -1
  625. package/app/.next/static/chunks/app/{loading-da2f6e1471afc070.js → loading-e063375d5b12a2f7.js} +1 -1
  626. package/app/.next/static/chunks/app/login/page-c5dc0a31f8dc566f.js +1 -0
  627. package/app/.next/static/chunks/app/maintenance/page-3b77bf358909019a.js +1 -0
  628. package/app/.next/static/chunks/app/not-found-511518956bcae7bc.js +1 -0
  629. package/app/.next/static/chunks/app/offline/page-9d6ea493783a0219.js +1 -0
  630. package/app/.next/static/chunks/app/privacy/{page-dc88e0a01d291518.js → page-9624e5fb8cabf7d8.js} +1 -1
  631. package/app/.next/static/chunks/app/status/page-4e5e9b5a513aa474.js +1 -0
  632. package/app/.next/static/chunks/app/terms/{page-dc88e0a01d291518.js → page-9624e5fb8cabf7d8.js} +1 -1
  633. package/app/.next/static/chunks/{main-app-ae230f6bf51a5edb.js → main-app-c9da11a8061df107.js} +1 -1
  634. package/app/package.json +1 -1
  635. package/app/server.js +1 -1
  636. package/package.json +1 -1
  637. package/app/.env +0 -122
  638. package/app/.next/server/chunks/1909.js +0 -2
  639. package/app/.next/server/chunks/7167.js +0 -1
  640. package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-ed1f5b1ae0e01c02.js +0 -1
  641. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6a2bb3ad980b05b9.js +0 -1
  642. package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-8ee341b662a845dc.js +0 -1
  643. package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c9b98846b8479f3f.js +0 -1
  644. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-3c3f3b0b558e9302.js +0 -15
  645. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-3ed193e882fc0438.js +0 -1
  646. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-8b96e2f6d76d6f2d.js +0 -1
  647. package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-ddce876357cb3ada.js +0 -1
  648. package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-d9b5c3282ec5d809.js +0 -1
  649. package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-5ed5bdc9e926936c.js +0 -1
  650. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-389538ee27f0e405.js +0 -1
  651. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-7deaa9f550841465.js +0 -1
  652. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-3ef302da4b756e50.js +0 -1
  653. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-df62bcc49944269c.js +0 -1
  654. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-8c8f2d59d0cbb516.js +0 -1
  655. package/app/.next/static/chunks/app/429/page-3b9079ea400ca287.js +0 -1
  656. package/app/.next/static/chunks/app/500/page-3b9079ea400ca287.js +0 -1
  657. package/app/.next/static/chunks/app/502/page-3b9079ea400ca287.js +0 -1
  658. package/app/.next/static/chunks/app/503/page-3b9079ea400ca287.js +0 -1
  659. package/app/.next/static/chunks/app/forbidden/page-8d8e1709a1e32585.js +0 -1
  660. package/app/.next/static/chunks/app/forgot-password/page-d5c9b77748aa9deb.js +0 -1
  661. package/app/.next/static/chunks/app/global-error-5840b1caa830f2ec.js +0 -1
  662. package/app/.next/static/chunks/app/landing/page-8f652c1fbc33efd2.js +0 -1
  663. package/app/.next/static/chunks/app/login/page-26d717c652d56032.js +0 -1
  664. package/app/.next/static/chunks/app/maintenance/page-3b9079ea400ca287.js +0 -1
  665. package/app/.next/static/chunks/app/not-found-faf36d2a9a452506.js +0 -1
  666. package/app/.next/static/chunks/app/offline/page-bf68bf461af876a3.js +0 -1
  667. package/app/.next/static/chunks/app/status/page-29a433b40631ce12.js +0 -1
  668. package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  669. /package/app/.next/static/{O9lSHUzWYvY1bYZSFuKAJ → qGXBolOylWgE1zjkbpj9E}/_buildManifest.js +0 -0
  670. /package/app/.next/static/{O9lSHUzWYvY1bYZSFuKAJ → qGXBolOylWgE1zjkbpj9E}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2791],{13908:(e,t,s)=>{Promise.resolve().then(s.bind(s,97702))},40993:(e,t,s)=>{"use strict";s.d(t,{Ex:()=>c.default,$n:()=>a.default,Zp:()=>i.default,Qv:()=>d.CardSkeleton,G9:()=>j.default,bQ:()=>k.default,pp:()=>v.default,Qn:()=>N.default,pd:()=>l.default,Mh:()=>f.default,uR:()=>u.default,aF:()=>n.default,rq:()=>x.default,LF:()=>m.default,KN:()=>b.default,Lo:()=>g.default,y7:()=>p.default,Iz:()=>y.default,l6:()=>r.default,lM:()=>o.default,cn:()=>h.default});var a=s(35806),l=s(34422),r=s(42994),i=s(81060),n=s(71361),d=s(92542);s(17705);var c=s(80927),o=s(19790);s(6261),s(55846),s(34243),s(89938),s(99023);var m=s(80178),x=s(85444),u=s(91961);s(25112);var h=s(45624),p=s(37415),b=s(48643),g=s(8287);s(1652);var f=s(92701);s(18150);var j=s(71689),y=s(33709);s(76332);var v=s(66200);s(61580);var N=s(51503);s(54128);var k=s(44638);s(21720),s(97050)},97702:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>H});var a=s(95155),l=s(12115),r=s(73321),i=s(67040),n=s(52529),d=s(50910),c=s(40993),o=s(33418);function m(){let[e,t]=(0,l.useState)([]),[s,r]=(0,l.useState)(!1),[i,n]=(0,l.useState)(!1),[m,x]=(0,l.useState)({type:"",message:""}),[u,h]=(0,l.useState)(null),[p,b]=(0,l.useState)(null),[g,f]=(0,l.useState)(!1),[j,y]=(0,l.useState)({type:"",message:""}),[v,N]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)({type:"",message:""}),[D,P]=(0,l.useState)(!1),[$,A]=(0,l.useState)(null),T=(0,l.useRef)(null),L=(0,o.Ym)(),M=(0,d.c)("settings"),E=(0,d.c)("common"),[O,F]=(0,l.useState)({driver:"sqlite",dbPath:"~/.omniroute/storage.sqlite",sizeBytes:0,retentionDays:90,lastBackupAt:null}),K=async()=>{r(!0);try{let e=await fetch("/api/db-backups"),s=await e.json();t(s.backups||[])}catch(e){console.error("Failed to fetch backups:",e)}finally{r(!1)}},_=async()=>{try{let e=await fetch("/api/storage/health");if(!e.ok)return;let t=await e.json();F(e=>({...e,...t}))}catch(e){console.error("Failed to fetch storage health:",e)}},B=async()=>{f(!0),y({type:"",message:""});try{let e=await fetch("/api/db-backups",{method:"PUT"}),t=await e.json();e.ok?(t.filename?y({type:"success",message:M("backupCreated",{file:t.filename})}):y({type:"info",message:t.message||M("noChangesSinceBackup")}),await _(),i&&await K()):y({type:"error",message:t.error||M("backupFailed")})}catch{y({type:"error",message:M("errorOccurred")})}finally{f(!1)}},z=async e=>{h(e),x({type:"",message:""});try{let t=await fetch("/api/db-backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backupId:e})}),s=await t.json();t.ok?(x({type:"success",message:M("restoreSuccess",{connections:s.connectionCount,nodes:s.nodeCount,combos:s.comboCount,apiKeys:s.apiKeyCount})}),await K(),await _()):x({type:"error",message:s.error||M("restoreFailed")})}catch{x({type:"error",message:M("errorDuringRestore")})}finally{h(null),b(null)}};(0,l.useEffect)(()=>{_()},[]);let R=async()=>{N(!0);try{let e=await fetch("/api/db-backups/export");if(!e.ok){let t=await e.json();throw Error(t.error||M("exportFailed"))}let t=await e.blob(),s=URL.createObjectURL(t),a=(e.headers.get("Content-Disposition")||"").match(/filename="(.+)"/),l=a?a[1]:`omniroute-backup-${new Date().toISOString().replace(/[:.]/g,"-")}.sqlite`,r=document.createElement("a");r.href=s,r.download=l,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s)}catch(e){console.error("Export failed:",e),S({type:"error",message:M("exportFailedWithError",{error:e.message})})}finally{N(!1)}},I=async()=>{if($){w(!0),S({type:"",message:""}),P(!1);try{let e=new FormData;e.append("file",$);let t=await fetch("/api/db-backups/import",{method:"POST",body:e}),s=await t.json();t.ok?(S({type:"success",message:M("importSuccess",{connections:s.connectionCount,nodes:s.nodeCount,combos:s.comboCount,apiKeys:s.apiKeyCount})}),await _(),i&&await K()):S({type:"error",message:s.error||M("importFailed")})}catch{S({type:"error",message:M("errorDuringImport")})}finally{w(!1),A(null)}}},q=e=>e&&0!==e?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`:"0 B";return(0,a.jsxs)(c.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-green-500/10 text-green-500",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)("h3",{className:"text-lg font-semibold",children:M("systemStorage")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:M("allDataLocal")})]}),(0,a.jsx)(c.Ex,{variant:"success",size:"sm",children:O.driver||"json"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-4",children:[(0,a.jsxs)("div",{className:"p-3 rounded-lg bg-bg border border-border",children:[(0,a.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wide mb-1",children:M("databasePath")}),(0,a.jsx)("p",{className:"text-sm font-mono text-text-main break-all",children:O.dbPath||"~/.omniroute/storage.sqlite"})]}),(0,a.jsxs)("div",{className:"p-3 rounded-lg bg-bg border border-border",children:[(0,a.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wide mb-1",children:M("databaseSize")}),(0,a.jsx)("p",{className:"text-sm font-mono text-text-main",children:q(O.sizeBytes)})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[(0,a.jsxs)(c.$n,{variant:"outline",size:"sm",onClick:R,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"download"}),M("exportDatabase")]}),(0,a.jsxs)(c.$n,{variant:"outline",size:"sm",onClick:async()=>{N(!0);try{let e=await fetch("/api/db-backups/exportAll");if(!e.ok)throw Error(M("exportFailed"));let t=await e.blob(),s=(e.headers.get("Content-Disposition")||"").match(/filename="?([^"]+)"?/),a=s?.[1]||"omniroute-full-backup.tar.gz",l=URL.createObjectURL(t),r=document.createElement("a");r.href=l,r.download=a,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(l)}catch(e){S({type:"error",message:M("fullExportFailedWithError",{error:e.message})})}finally{N(!1)}},loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"folder_zip"}),M("exportAll")]}),(0,a.jsxs)(c.$n,{variant:"outline",size:"sm",onClick:()=>{T.current?.click()},loading:k,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"upload"}),M("importDatabase")]}),(0,a.jsx)("input",{ref:T,type:"file",accept:".sqlite",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(t){if(!t.name.endsWith(".sqlite"))return void S({type:"error",message:M("invalidFileType")});A(t),P(!0),T.current&&(T.current.value="")}}})]}),D&&$&&(0,a.jsx)("div",{className:"p-4 rounded-lg mb-4 bg-amber-500/10 border border-amber-500/30",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-amber-500 mt-0.5","aria-hidden":"true",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-500 mb-1",children:M("confirmDbImport")}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:M("confirmDbImportDesc",{file:$.name})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(c.$n,{variant:"primary",size:"sm",onClick:I,className:"!bg-amber-500 hover:!bg-amber-600",children:M("yesImport")}),(0,a.jsx)(c.$n,{variant:"outline",size:"sm",onClick:()=>{P(!1),A(null)},children:E("cancel")})]})]})]})}),C.message&&(0,a.jsx)("div",{className:`p-3 rounded-lg mb-4 text-sm ${"success"===C.type?"bg-green-500/10 text-green-500 border border-green-500/20":"bg-red-500/10 text-red-500 border border-red-500/20"}`,role:"alert",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"success"===C.type?"check_circle":"error"}),C.message]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-bg border border-border mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-amber-500","aria-hidden":"true",children:"schedule"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:M("lastBackup")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:O.lastBackupAt?`${new Date(O.lastBackupAt).toLocaleString(L)} (${(e=>{if(!e)return null;let t=Math.floor((new Date-new Date(e))/6e4);if(t<1)return M("justNow");if(t<60)return M("minutesAgo",{count:t});let s=Math.floor(t/60);return s<24?M("hoursAgo",{count:s}):M("daysAgo",{count:Math.floor(s/24)})})(O.lastBackupAt)})`:M("noBackupYet")})]})]}),(0,a.jsxs)(c.$n,{variant:"outline",size:"sm",onClick:B,loading:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"backup"}),M("backupNow")]})]}),j.message&&(0,a.jsx)("div",{className:`p-3 rounded-lg mb-4 text-sm ${"success"===j.type?"bg-green-500/10 text-green-500 border border-green-500/20":"info"===j.type?"bg-blue-500/10 text-blue-500 border border-blue-500/20":"bg-red-500/10 text-red-500 border border-red-500/20"}`,role:"alert",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"success"===j.type?"check_circle":"info"===j.type?"info":"error"}),j.message]})}),(0,a.jsxs)("div",{className:"pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-amber-500","aria-hidden":"true",children:"restore"}),(0,a.jsx)("p",{className:"font-medium",children:M("backupRestore")})]}),(0,a.jsx)(c.$n,{variant:"outline",size:"sm",onClick:()=>{n(!i),i||0!==e.length||K()},children:i?M("hide"):M("viewBackups")})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-3",children:M("backupRetentionDesc")}),m.message&&(0,a.jsx)("div",{className:`p-3 rounded-lg mb-3 text-sm ${"success"===m.type?"bg-green-500/10 text-green-500 border border-green-500/20":"bg-red-500/10 text-red-500 border border-red-500/20"}`,role:"alert",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"success"===m.type?"check_circle":"error"}),m.message]})}),i&&(0,a.jsx)("div",{className:"flex flex-col gap-2",children:s?(0,a.jsxs)("div",{className:"flex items-center justify-center py-6 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px] mr-2","aria-hidden":"true",children:"progress_activity"}),M("loadingBackups")]}):0===e.length?(0,a.jsxs)("div",{className:"text-center py-6 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] mb-2 block opacity-40","aria-hidden":"true",children:"folder_off"}),M("noBackupsYet")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:M("backupsAvailable",{count:e.length})}),(0,a.jsxs)("button",{onClick:K,className:"text-xs text-primary hover:underline flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]","aria-hidden":"true",children:"refresh"}),M("refresh")]})]}),e.map(e=>{var t;return(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02] border border-border/50 hover:border-border transition-colors",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-amber-500","aria-hidden":"true",children:"description"}),(0,a.jsx)("span",{className:"text-sm font-medium truncate",children:new Date(e.createdAt).toLocaleString(L)}),(0,a.jsx)(c.Ex,{variant:"pre-restore"===e.reason?"warning":"manual"===e.reason?"success":"default",size:"sm",children:"manual"===(t=e.reason)?M("backupReasonManual"):"pre-restore"===t?M("backupReasonPreRestore"):t})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted ml-6",children:[(0,a.jsx)("span",{children:M("connectionsCount",{count:e.connectionCount})}),(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{children:q(e.size)})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 ml-3",children:p===e.id?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-xs text-amber-500 font-medium",children:M("confirm")}),(0,a.jsx)(c.$n,{variant:"primary",size:"sm",onClick:()=>z(e.id),loading:u===e.id,className:"!bg-amber-500 hover:!bg-amber-600",children:M("yes")}),(0,a.jsx)(c.$n,{variant:"outline",size:"sm",onClick:()=>b(null),children:M("no")})]}):(0,a.jsxs)(c.$n,{variant:"outline",size:"sm",onClick:()=>b(e.id),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"restore"}),M("restore")]})})]},e.id)})]})})]})]})}var x=s(20909);let u=[{value:"disabled",labelKey:"ipModeDisabled",icon:"block"},{value:"blacklist",labelKey:"ipModeBlacklist",icon:"do_not_disturb"},{value:"whitelist",labelKey:"ipModeWhitelist",icon:"verified_user"},{value:"whitelist-priority",labelKey:"ipModeWhitelistPriority",icon:"priority_high"}];function h(){let[e,t]=(0,l.useState)({enabled:!1,mode:"blacklist",blacklist:[],whitelist:[],tempBans:[]}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(""),[o,m]=(0,l.useState)("blacklist"),x=(0,d.c)("settings");(0,l.useEffect)(()=>{h()},[]);let h=async()=>{try{let e=await fetch("/api/settings/ip-filter");e.ok&&t(await e.json())}catch{}finally{r(!1)}},p=async e=>{try{let s=await fetch("/api/settings/ip-filter",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});s.ok&&t(await s.json())}catch{}},b=()=>{i.trim()&&(p({["blacklist"===o?"addBlacklist":"addWhitelist"]:i.trim()}),n(""))},g=(e,t)=>{p({["blacklist"===t?"removeBlacklist":"removeWhitelist"]:e})},f=e.enabled?e.mode:"disabled";return(0,a.jsxs)(c.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-red-500/10 text-red-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"security"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:x("ipAccessControl")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x("ipAccessControlDesc")})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-2 mb-5",children:u.map(e=>(0,a.jsxs)("button",{onClick:()=>{var t;"disabled"===(t=e.value)?p({enabled:!1}):p({enabled:!0,mode:t})},disabled:s,className:`flex flex-col items-center gap-1.5 p-3 rounded-lg border text-center transition-all ${f===e.value?"border-red-500/50 bg-red-500/5 ring-1 ring-red-500/20":"border-border/50 hover:border-border hover:bg-surface/30"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] ${f===e.value?"text-red-400":"text-text-muted"}`,children:e.icon}),(0,a.jsx)("span",{className:`text-xs font-medium ${f===e.value?"text-red-400":"text-text-muted"}`,children:x(e.labelKey)})]},e.value))}),e.enabled&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-stretch sm:items-end",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(c.pd,{label:x("addIpAddress"),placeholder:x("ipAddressPlaceholder"),value:i,onChange:e=>n(e.target.value),onKeyDown:e=>"Enter"===e.key&&b()})}),(0,a.jsxs)("div",{className:"flex gap-1 pb-[2px]",children:[(0,a.jsx)(c.$n,{size:"sm",variant:"blacklist"===o?"danger":"secondary",onClick:()=>{m("blacklist"),i.trim()&&b()},children:x("block")}),(0,a.jsx)(c.$n,{size:"sm",variant:"whitelist"===o?"primary":"secondary",onClick:()=>{m("whitelist"),i.trim()&&b()},children:x("allow")})]})]}),e.blacklist.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:x("blocked",{count:e.blacklist.length})}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.blacklist.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-mono bg-red-500/10 text-red-400 border border-red-500/20",children:[e,(0,a.jsx)("button",{onClick:()=>g(e,"blacklist"),className:"hover:text-red-300",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e))})]}),e.whitelist.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:x("allowed",{count:e.whitelist.length})}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.whitelist.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-mono bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[e,(0,a.jsx)("button",{onClick:()=>g(e,"whitelist"),className:"hover:text-emerald-300",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e))})]}),e.tempBans.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:x("temporaryBans",{count:e.tempBans.length})}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:e.tempBans.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2 rounded-lg bg-orange-500/5 border border-orange-500/20 text-sm",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-orange-400 shrink-0",children:e.ip}),(0,a.jsxs)("span",{className:"text-xs text-text-muted truncate",children:["— ",e.reason]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted tabular-nums",children:x("minLeft",{min:Math.ceil(e.remainingMs/6e4)})}),(0,a.jsx)("button",{onClick:()=>p({removeBan:e.ip}),className:"text-text-muted hover:text-orange-400",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]},e.ip))})]})]})]})}function p(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!0),i=(0,d.c)("settings");(0,l.useEffect)(()=>{let e=!1;return async function(){let s=sessionStorage.getItem("omniroute_login_time"),a=Date.now(),l=i("unknown");if(s){let e=a-parseInt(s,10),t=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4);l=t>0?`${t}h ${r}m`:`${r}m`}let n=!1;try{let e=await fetch("/api/auth/status",{method:"GET",cache:"no-store"});if(e.ok){let t=await e.json();n=!0===t.authenticated}}catch{}e||(t({authenticated:n,loginTime:s?new Date(parseInt(s,10)).toLocaleString():null,sessionAge:l,ipAddress:"—",userAgent:navigator.userAgent.split(" ").slice(-2).join(" ")||i("unknown")}),r(!1))}(),()=>{e=!0}},[]);let n=async()=>{try{await fetch("/api/auth/logout",{method:"POST"}),sessionStorage.removeItem("omniroute_login_time"),window.location.href="/"}catch{window.location.href="/"}};return s?(0,a.jsx)(c.Zp,{children:(0,a.jsx)("div",{className:"animate-pulse h-32 bg-black/5 dark:bg-white/5 rounded-lg"})}):(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"person"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:i("session")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",role:"list","aria-label":i("sessionDetailsAria"),children:[(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:i("status")}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:`w-2 h-2 rounded-full ${e?.authenticated?"bg-green-500":"bg-yellow-500"}`,"aria-hidden":"true"}),e?.authenticated?i("authenticated"):i("guest")]})]}),e?.loginTime&&(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:i("loginTime")}),(0,a.jsx)("span",{className:"font-mono text-xs",children:e.loginTime})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:i("sessionAge")}),(0,a.jsx)("span",{className:"font-mono text-xs",children:e?.sessionAge})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:i("browser")}),(0,a.jsx)("span",{className:"font-mono text-xs truncate max-w-[200px]",children:e?.userAgent})]})]}),(0,a.jsxs)("div",{className:"flex gap-3 mt-4 pt-4 border-t border-border/50",children:[(0,a.jsx)(c.$n,{variant:"secondary",onClick:()=>{confirm(i("clearLocalDataConfirm"))&&(localStorage.clear(),sessionStorage.clear(),window.location.reload())},children:i("clearLocalData")}),e?.authenticated&&(0,a.jsx)(c.$n,{variant:"danger",onClick:n,children:i("logout")})]})]})}function b(){let[e,t]=(0,l.useState)({requireLogin:!1,hasPassword:!1}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)({current:"",new:"",confirm:""}),[o,m]=(0,l.useState)({type:"",message:""}),[u,b]=(0,l.useState)(!1),g=(0,d.c)("settings");(0,l.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{t(e),r(!1)}).catch(()=>r(!1))},[]);let f=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&t(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},j=async(e,s)=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:s})})).ok&&t(t=>({...t,[e]:s}))}catch(t){console.error(`Failed to update ${e}:`,t)}},y=async e=>{if(e.preventDefault(),i.new!==i.confirm)return void m({type:"error",message:g("passwordsNoMatch")});b(!0),m({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:i.current,newPassword:i.new})}),t=await e.json();e.ok?(m({type:"success",message:g("passwordUpdated")}),n({current:"",new:"",confirm:""})):m({type:"error",message:t.error||g("failedUpdatePassword")})}catch{m({type:"error",message:g("errorOccurred")})}finally{b(!1)}},v=e.blockedProviders||[];return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"shield"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:g("security")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:g("requireLogin")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:g("requireLoginDesc")})]}),(0,a.jsx)(c.lM,{checked:!0===e.requireLogin,onChange:()=>f(!e.requireLogin),disabled:s})]}),!0===e.requireLogin&&(0,a.jsxs)("form",{onSubmit:y,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[e.hasPassword&&(0,a.jsx)(c.pd,{label:g("currentPassword"),type:"password",placeholder:g("enterCurrentPassword"),value:i.current,onChange:e=>n({...i,current:e.target.value}),required:!0}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsx)(c.pd,{label:g("newPassword"),type:"password",placeholder:g("enterNewPassword"),value:i.new,onChange:e=>n({...i,new:e.target.value}),required:!0}),(0,a.jsx)(c.pd,{label:g("confirmPassword"),type:"password",placeholder:g("confirmPasswordPlaceholder"),value:i.confirm,onChange:e=>n({...i,confirm:e.target.value}),required:!0})]}),o.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===o.type?"text-red-500":"text-green-500"}`,children:o.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(c.$n,{type:"submit",variant:"primary",loading:u,children:e.hasPassword?g("updatePassword"):g("setPassword")})})]})]})]}),(0,a.jsxs)(c.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-amber-500/10 text-amber-600 dark:text-amber-400",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"api"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:g("apiEndpointProtection")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:g("requireAuthModels")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:g("requireAuthModelsDesc")})]}),(0,a.jsx)(c.lM,{checked:!0===e.requireAuthForModels,onChange:()=>j("requireAuthForModels",!e.requireAuthForModels),disabled:s})]}),(0,a.jsxs)("div",{className:"pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{className:"font-medium",children:g("blockedProviders")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:g("blockedProvidersDesc")})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.values(x.Q2).map(t=>{let l=v.includes(t.id);return(0,a.jsxs)("button",{onClick:()=>{var s;let a;return s=t.id,void j("blockedProviders",(a=e.blockedProviders||[]).includes(s)?a.filter(e=>e!==s):[...a,s])},disabled:s,className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-all border ${l?"bg-red-500/10 border-red-500/30 text-red-600 dark:text-red-400":"bg-black/[0.02] dark:bg-white/[0.02] border-transparent text-text-muted hover:bg-black/[0.05] dark:hover:bg-white/[0.05]"}`,title:l?g("unblockProviderTitle",{provider:t.name}):g("blockProviderTitle",{provider:t.name}),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:l?void 0:t.color},children:l?"block":t.icon}),t.name,l&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] text-red-500",children:"close"})]},t.id)})}),v.length>0&&(0,a.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400 mt-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),g("providersBlocked",{count:v.length})]})]})]})]}),(0,a.jsx)(p,{}),(0,a.jsx)(h,{})]})}var g=s(67671);let f=["#6366f1","#22c55e","#f59e0b","#ef4444","#8b5cf6","#06b6d4","#ec4899","#14b8a6"];function j(){let[e,t]=(0,l.useState)({}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[o,m]=(0,l.useState)(""),[x,u]=(0,l.useState)(""),[h,p]=(0,l.useState)(!1),b=(0,g.i)(),j=(0,d.c)("settings"),y=(0,d.c)("common"),v=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/fallback/chains");if(e.ok){let s=await e.json();t(s.chains||s||{})}}catch{}finally{r(!1)}},[]);(0,l.useEffect)(()=>{v()},[v]);let N=async()=>{if(!o.trim()||!x.trim())return void b.warning(j("fillModelAndProviders"));let e=x.split(",").map(e=>e.trim()).filter(Boolean).map((e,t)=>({provider:e,priority:t+1,enabled:!0}));if(0===e.length)return void b.warning(j("addAtLeastOneProvider"));p(!0);try{(await fetch("/api/fallback/chains",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:o.trim(),chain:e})})).ok?(b.success(j("chainCreated",{model:o.trim()})),m(""),u(""),n(!1),await v()):b.error(j("failedCreateChain"))}catch{b.error(j("failedCreateChain"))}finally{p(!1)}},k=async e=>{if(confirm(j("deleteChainConfirm",{model:e})))try{(await fetch("/api/fallback/chains",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})})).ok?(b.success(j("chainDeleted",{model:e})),await v()):b.error(j("failedDeleteChain"))}catch{b.error(j("failedDeleteChain"))}};if(s)return(0,a.jsx)(c.Zp,{className:"p-6 mt-6",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted animate-pulse",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"timeline"}),j("loadingFallbackChains")]})});let w=Object.entries(e);return(0,a.jsxs)(c.Zp,{className:"mt-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4 p-6 pb-0",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]",children:"timeline"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:j("fallbackChainsTitle")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:j("fallbackChainsDesc")})]}),(0,a.jsx)(c.$n,{size:"sm",variant:"primary",onClick:()=>n(!i),children:i?y("cancel"):j("addChain")})]}),i&&(0,a.jsxs)("div",{className:"mx-6 p-4 rounded-lg border border-border/30 bg-surface/20 mb-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-3",children:[(0,a.jsx)(c.pd,{label:j("modelName"),placeholder:j("modelNamePlaceholder"),value:o,onChange:e=>m(e.target.value)}),(0,a.jsx)(c.pd,{label:j("providersCommaSeparated"),placeholder:j("providersCommaSeparatedPlaceholder"),value:x,onChange:e=>u(e.target.value)})]}),(0,a.jsx)(c.$n,{variant:"primary",size:"sm",onClick:N,loading:h,children:j("createChain")})]}),(0,a.jsx)("div",{className:"px-6 pb-6",children:0===w.length?(0,a.jsx)(c.pp,{icon:"timeline",title:j("noFallbackChains"),description:j("noFallbackChainsDesc")}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:w.map(([e,t])=>(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 rounded-lg border border-border/20 bg-surface/20 hover:bg-surface/40 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"font-mono text-sm text-text-main truncate max-w-[200px]",children:e}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"arrow_forward"}),(0,a.jsx)("div",{className:"flex gap-1.5 flex-wrap",children:(Array.isArray(t)?t:[]).map((e,t)=>(0,a.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:`${f[t%f.length]}20`,color:f[t%f.length],border:`1px solid ${f[t%f.length]}40`},children:[t+1,". ",e.provider]},`${e.provider}-${t}`))})]}),(0,a.jsx)("button",{onClick:()=>k(e),className:"text-text-muted hover:text-red-400 transition-colors ml-2",title:j("deleteChain"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},e))})})]})}let y=[{value:"fill-first",labelKey:"fillFirst",descKey:"fillFirstDesc",icon:"vertical_align_top"},{value:"round-robin",labelKey:"roundRobin",descKey:"roundRobinDesc",icon:"loop"},{value:"p2c",labelKey:"p2c",descKey:"p2cDesc",icon:"balance"},{value:"random",labelKey:"random",descKey:"randomDesc",icon:"shuffle"},{value:"least-used",labelKey:"leastUsed",descKey:"leastUsedDesc",icon:"low_priority"},{value:"cost-optimized",labelKey:"costOpt",descKey:"costOptDesc",icon:"savings"}];function v(){let[e,t]=(0,l.useState)({fallbackStrategy:"fill-first"}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)([]),[o,m]=(0,l.useState)(""),[x,u]=(0,l.useState)(""),h=(0,d.c)("settings");(0,l.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{t(e),n(e.wildcardAliases||[]),r(!1)}).catch(()=>r(!1))},[]);let p=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&t(t=>({...t,...e}))}catch(e){console.error("Failed to update settings:",e)}},b=async()=>{if(!o.trim()||!x.trim())return;let e=[...i,{pattern:o.trim(),target:x.trim()}];await p({wildcardAliases:e}),n(e),m(""),u("")},g=async e=>{let t=i.filter((t,s)=>s!==e);await p({wildcardAliases:t}),n(t)};return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"route"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:h("routingStrategy")})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-2 mb-4",style:{gridAutoRows:"1fr"},children:y.map(t=>(0,a.jsxs)("button",{onClick:()=>p({fallbackStrategy:t.value}),disabled:s,className:`flex flex-col items-center gap-2 p-4 rounded-lg border text-center transition-all ${e.fallbackStrategy===t.value?"border-blue-500/50 bg-blue-500/5 ring-1 ring-blue-500/20":"border-border/50 hover:border-border hover:bg-surface/30"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[24px] ${e.fallbackStrategy===t.value?"text-blue-400":"text-text-muted"}`,children:t.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:`text-sm font-medium ${e.fallbackStrategy===t.value?"text-blue-400":""}`,children:h(t.labelKey)}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:h(t.descKey)})]})]},t.value))}),"round-robin"===e.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3 border-t border-border/30",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:h("stickyLimit")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:h("stickyLimitDesc")})]}),(0,a.jsx)(c.pd,{type:"number",min:"1",max:"10",value:e.stickyRoundRobinLimit||3,onChange:e=>p({stickyRoundRobinLimit:parseInt(e.target.value)}),disabled:s,className:"w-20 text-center"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-3 border-t border-border/30 mt-3",children:h({"fill-first":"fillFirstDesc","round-robin":"roundRobinDesc",p2c:"p2cDesc",random:"randomDesc","least-used":"leastUsedDesc","cost-optimized":"costOptDesc"}[e.fallbackStrategy]||"fillFirstDesc")})]}),(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"alt_route"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:h("modelAliases")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:h("modelAliasesDesc")})]})]}),i.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-1.5 mb-4",children:i.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2 rounded-lg bg-surface/30 border border-border/20",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[(0,a.jsx)("span",{className:"font-mono text-purple-400 break-all",children:e.pattern}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"arrow_forward"}),(0,a.jsx)("span",{className:"font-mono text-text-main break-all",children:e.target})]}),(0,a.jsx)("button",{onClick:()=>g(t),className:"shrink-0 text-text-muted hover:text-red-400 transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t))}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 items-stretch sm:items-end",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(c.pd,{label:h("pattern"),placeholder:h("aliasPatternPlaceholder"),value:o,onChange:e=>m(e.target.value)})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(c.pd,{label:h("targetModel"),placeholder:h("aliasTargetPlaceholder"),value:x,onChange:e=>u(e.target.value)})}),(0,a.jsx)(c.$n,{size:"sm",variant:"primary",onClick:b,className:"mb-[2px] sm:w-auto w-full",children:h("add")})]})]}),(0,a.jsx)(j,{})]})}function N(){let[e,t]=(0,l.useState)({strategy:"priority",maxRetries:1,retryDelayMs:2e3,timeoutMs:12e4,healthCheckEnabled:!0,healthCheckTimeoutMs:3e3,maxComboDepth:3,trackMetrics:!0}),[s,r]=(0,l.useState)({}),[n,o]=(0,l.useState)(""),[m,x]=(0,l.useState)(!1),u=(0,d.c)("settings"),h=(0,d.c)("common"),p=[{value:"priority",label:u("priority"),icon:"sort"},{value:"weighted",label:u("weighted"),icon:"percent"},{value:"round-robin",label:u("roundRobin"),icon:"autorenew"},{value:"random",label:u("random"),icon:"shuffle"},{value:"least-used",label:u("leastUsed"),icon:"low_priority"},{value:"cost-optimized",label:u("costOpt"),icon:"savings"}],b=[{key:"maxRetries",label:u("maxRetriesLabel"),min:0,max:5},{key:"retryDelayMs",label:u("retryDelayLabel"),min:500,max:1e4,step:500},{key:"timeoutMs",label:u("timeoutLabel"),min:5e3,max:3e5,step:5e3},{key:"maxComboDepth",label:u("maxNestingDepth"),min:1,max:10}];(0,l.useEffect)(()=>{fetch("/api/settings/combo-defaults").then(e=>e.json()).then(e=>{e.comboDefaults&&t(e.comboDefaults),e.providerOverrides&&r(e.providerOverrides)}).catch(e=>console.error("Failed to fetch combo defaults:",e))},[]);let g=async()=>{x(!0);try{await fetch("/api/settings/combo-defaults",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboDefaults:e,providerOverrides:s})})}catch(e){console.error("Failed to save combo defaults:",e)}finally{x(!1)}},f=()=>{let e=n.trim().toLowerCase();e&&!s[e]&&(r(t=>({...t,[e]:{maxRetries:1,timeoutMs:12e4}})),o(""))};return(0,a.jsxs)(c.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-amber-500/10 text-amber-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"tune"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:u("comboDefaultsTitle")}),(0,a.jsx)("span",{className:"text-xs text-text-muted ml-auto",children:u("globalComboConfig")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:u("defaultStrategy")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:u("defaultStrategyDesc")})]}),(0,a.jsx)("div",{role:"tablist","aria-label":u("comboStrategyAria"),className:"grid grid-cols-3 gap-1 p-0.5 rounded-md bg-black/5 dark:bg-white/5",children:p.map(s=>(0,a.jsxs)("button",{role:"tab","aria-selected":e.strategy===s.value,onClick:()=>t(e=>({...e,strategy:s.value})),className:(0,i.cn)("px-2 py-1 rounded text-xs font-medium transition-all flex items-center justify-center gap-0.5",e.strategy===s.value?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s.icon}),s.label]},s.value))})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 pt-3 border-t border-border/50",children:b.map(({key:s,label:l,min:r,max:i,step:n})=>(0,a.jsx)(c.pd,{label:l,type:"number",min:r,max:i,step:n||1,value:e[s]??"",onChange:e=>t(t=>({...t,[s]:parseInt(e.target.value)||0})),className:"text-sm"},s))}),"round-robin"===e.strategy&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-3 border-t border-border/50",children:[(0,a.jsx)(c.pd,{label:u("concurrencyPerModel"),type:"number",min:1,max:20,value:e.concurrencyPerModel??"",placeholder:"3",onChange:e=>t(t=>({...t,concurrencyPerModel:parseInt(e.target.value)||0})),className:"text-sm"}),(0,a.jsx)(c.pd,{label:u("queueTimeout"),type:"number",min:1e3,max:12e4,step:1e3,value:e.queueTimeoutMs??"",placeholder:"30000",onChange:e=>t(t=>({...t,queueTimeoutMs:parseInt(e.target.value)||0})),className:"text-sm"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:u("healthCheck")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:u("healthCheckDesc")})]}),(0,a.jsx)(c.lM,{checked:!1!==e.healthCheckEnabled,onChange:()=>t(e=>({...e,healthCheckEnabled:!e.healthCheckEnabled}))})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:u("trackMetrics")}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:u("trackMetricsDesc")})]}),(0,a.jsx)(c.lM,{checked:!1!==e.trackMetrics,onChange:()=>t(e=>({...e,trackMetrics:!e.trackMetrics}))})]})]}),(0,a.jsxs)("div",{className:"pt-3 border-t border-border/50",children:[(0,a.jsx)("p",{className:"font-medium text-sm mb-2",children:u("providerOverrides")}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-3",children:u("providerOverridesDesc")}),Object.entries(s).map(([e,t])=>(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs font-mono font-medium min-w-[80px]",children:e}),(0,a.jsx)(c.pd,{type:"number",min:"0",max:"5",value:t.maxRetries??1,onChange:t=>r(s=>({...s,[e]:{...s[e],maxRetries:parseInt(t.target.value)||0}})),className:"text-xs w-16","aria-label":u("providerMaxRetriesAria",{provider:e})}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:u("retries")}),(0,a.jsx)(c.pd,{type:"number",min:"5000",max:"300000",step:"5000",value:t.timeoutMs??12e4,onChange:t=>r(s=>({...s,[e]:{...s[e],timeoutMs:parseInt(t.target.value)||12e4}})),className:"text-xs w-24","aria-label":u("providerTimeoutAria",{provider:e})}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:u("ms")}),(0,a.jsx)("button",{onClick:()=>{r(t=>{let s={...t};return delete s[e],s})},className:"ml-auto text-red-400 hover:text-red-500 transition-colors","aria-label":u("removeProviderOverrideAria",{provider:e}),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"close"})})]},e)),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,a.jsx)(c.pd,{type:"text",placeholder:u("newProviderNamePlaceholder"),value:n,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),className:"text-xs flex-1","aria-label":u("newProviderNameAria")}),(0,a.jsx)(c.$n,{variant:"outline",size:"sm",onClick:f,disabled:!n.trim(),children:h("add")})]})]}),(0,a.jsx)("div",{className:"pt-3 border-t border-border/50",children:(0,a.jsx)(c.$n,{variant:"primary",size:"sm",onClick:g,loading:m,children:u("saveComboDefaults")})})]})]})}function k(){let[e,t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(null),i=(0,l.useRef)(!0),n=(0,d.c)("settings"),o=(0,d.c)("common"),m=async()=>{try{let e=await fetch("/api/settings/proxy?level=global");if(e.ok){let t=await e.json();r(t.proxy||null)}}catch{}};return(0,l.useEffect)(()=>(i.current=!0,async function(){try{let e=await fetch("/api/settings/proxy?level=global");if(!i.current)return;if(e.ok){let t=await e.json();i.current&&r(t.proxy||null)}}catch{}}(),()=>{i.current=!1}),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"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-xl text-primary","aria-hidden":"true",children:"vpn_lock"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:n("globalProxy")})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:n("globalProxyDesc")}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[s?(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("span",{className:"px-2.5 py-1 rounded text-xs font-bold uppercase bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",children:[s.type,"://",s.host,":",s.port]})}):(0,a.jsx)("span",{className:"text-sm text-text-muted",children:n("noGlobalProxy")}),(0,a.jsx)(c.$n,{size:"sm",variant:s?"secondary":"primary",icon:"settings",onClick:()=>{m(),t(!0)},children:s?o("edit"):n("configure")})]})]})}),(0,a.jsx)(c.KN,{isOpen:e,onClose:()=>t(!1),level:"global",levelLabel:n("globalLabel"),onSaved:m})]})}var w=s(97550),C=s(76851);function S(){let{theme:e,setTheme:t,isDark:s}=(0,w.D)(),{colorTheme:r,customColor:n,setColorTheme:o,setCustomColorTheme:m}=(0,C.A)(),x=(0,d.c)("settings"),[u,h]=(0,l.useState)({}),[p,b]=(0,l.useState)(!0),[g,f]=(0,l.useState)(n||"#3b82f6"),j=/^#([0-9a-fA-F]{6})$/.test(g.startsWith("#")?g:`#${g}`);(0,l.useEffect)(()=>C.A.subscribe(e=>{e.customColor&&e.customColor!==g&&f(e.customColor)}),[]);let y={light:x("themeLight"),dark:x("themeDark"),system:x("themeSystem")};(0,l.useEffect)(()=>{fetch("/api/settings").then(e=>{if(!e.ok)throw Error(`HTTP error ${e.status}`);return e.json()}).then(e=>{h(e),b(!1)}).catch(()=>b(!1))},[]);let v=async(e,t)=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:t})})).ok&&h(s=>({...s,[e]:t}))}catch(t){console.error(`Failed to update ${e}:`,t)}},N=[{id:"coral",color:C.F.coral,label:x("themeCoral")},{id:"blue",color:C.F.blue,label:x("themeBlue")},{id:"red",color:C.F.red,label:x("themeRed")},{id:"green",color:C.F.green,label:x("themeGreen")},{id:"violet",color:C.F.violet,label:x("themeViolet")},{id:"orange",color:C.F.orange,label:x("themeOrange")},{id:"cyan",color:C.F.cyan,label:x("themeCyan")}];return(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"palette"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:x("appearance")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:x("darkMode")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x("switchThemes")})]}),(0,a.jsx)(c.lM,{checked:s,onChange:()=>t(s?"light":"dark")})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsx)("div",{role:"tablist","aria-label":x("themeSelectionAria"),className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{role:"tab","aria-selected":e===s,onClick:()=>t(s),className:(0,i.cn)("flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-all",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{children:y[s]||s})]},s))})}),(0,a.jsxs)("div",{className:"pt-4 border-t border-border",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:x("themeAccent")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-3",children:x("themeAccentDesc")}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 mb-3",children:N.map(e=>{let t=r===e.id;return(0,a.jsx)("button",{onClick:()=>o(e.id),className:(0,i.cn)("flex items-center justify-between gap-2 p-2 rounded-lg border transition-colors",t?"border-primary bg-primary/10 text-primary":"border-border hover:bg-surface/50 text-text-main"),children:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"size-4 rounded-full border border-black/10 dark:border-white/20",style:{backgroundColor:e.color}}),(0,a.jsx)("span",{className:"text-sm font-medium",children:e.label})]})},e.id)})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"color",value:g,onChange:e=>f(e.target.value),className:"h-10 w-12 rounded border border-border bg-surface cursor-pointer","aria-label":x("themeCustom")}),(0,a.jsx)("input",{type:"text",value:g,onChange:e=>f(e.target.value),placeholder:"#3b82f6",maxLength:7,className:`flex-1 h-10 px-3 rounded-lg bg-surface border text-sm text-text-main focus:outline-none ${j?"border-border focus:border-primary":"border-red-400 focus:border-red-500"}`}),(0,a.jsx)(c.$n,{onClick:()=>m(g),disabled:!j,children:x("themeCreate")})]})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:x("hideHealthLogs")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x("hideHealthLogsDesc")})]}),(0,a.jsx)(c.lM,{checked:!0===u.hideHealthCheckLogs,onChange:()=>v("hideHealthCheckLogs",!u.hideHealthCheckLogs),disabled:p})]})})]})]})}let D=[{value:"passthrough",labelKey:"passthrough",descKey:"passthroughDesc",icon:"arrow_forward"},{value:"auto",labelKey:"auto",descKey:"autoDesc",icon:"auto_awesome"},{value:"custom",labelKey:"custom",descKey:"customDesc",icon:"tune"},{value:"adaptive",labelKey:"adaptive",descKey:"adaptiveDesc",icon:"trending_up"}],P=[{value:"none",labelKey:"effortNone"},{value:"low",labelKey:"effortLow"},{value:"medium",labelKey:"effortMedium"},{value:"high",labelKey:"effortHigh"}];function $(){let[e,t]=(0,l.useState)({mode:"passthrough",customBudget:10240,effortLevel:"medium"}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[o,m]=(0,l.useState)(""),x=(0,d.c)("settings");(0,l.useEffect)(()=>{fetch("/api/settings/thinking-budget").then(e=>e.json()).then(e=>{t(e),r(!1)}).catch(()=>r(!1))},[]);let u=async s=>{let a={...e,...s};t(a),n(!0),m("");try{(await fetch("/api/settings/thinking-budget",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok?(m("saved"),setTimeout(()=>m(""),2e3)):m("error")}catch{m("error")}finally{n(!1)}};return(0,a.jsxs)(c.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-violet-500/10 text-violet-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"psychology"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:x("thinkingBudgetTitle")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x("thinkingBudgetDesc")})]}),"saved"===o&&(0,a.jsxs)("span",{className:"ml-auto text-xs font-medium text-emerald-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"})," ",x("saved")]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2 mb-5",children:D.map(t=>(0,a.jsxs)("button",{onClick:()=>u({mode:t.value}),disabled:s||i,className:`flex items-start gap-3 p-3 rounded-lg border text-left transition-all ${e.mode===t.value?"border-violet-500/50 bg-violet-500/5 ring-1 ring-violet-500/20":"border-border/50 hover:border-border hover:bg-surface/30"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] mt-0.5 ${e.mode===t.value?"text-violet-500":"text-text-muted"}`,children:t.icon}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-sm font-medium ${e.mode===t.value?"text-violet-400":""}`,children:x(t.labelKey)}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5 leading-relaxed",children:x(t.descKey)})]})]},t.value))}),"custom"===e.mode&&(0,a.jsxs)("div",{className:"p-4 rounded-lg bg-surface/30 border border-border/30 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:x("tokenBudget")}),(0,a.jsxs)("span",{className:"text-sm font-mono tabular-nums text-violet-400",children:[e.customBudget.toLocaleString()," ",x("tokens")]})]}),(0,a.jsx)("input",{type:"range",min:"0",max:"131072",step:"1024",value:e.customBudget,onChange:e=>u({customBudget:parseInt(e.target.value)}),className:"w-full accent-violet-500"}),(0,a.jsxs)("div",{className:"flex justify-between text-xs text-text-muted mt-1",children:[(0,a.jsx)("span",{children:x("off")}),(0,a.jsx)("span",{children:"1K"}),(0,a.jsx)("span",{children:"10K"}),(0,a.jsx)("span",{children:"64K"}),(0,a.jsx)("span",{children:"128K"})]})]}),"adaptive"===e.mode&&(0,a.jsxs)("div",{className:"p-4 rounded-lg bg-surface/30 border border-border/30",children:[(0,a.jsx)("p",{className:"text-sm font-medium mb-3",children:x("baseEffortLevel")}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-3",children:x("adaptiveHint")}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:P.map(t=>(0,a.jsx)("button",{onClick:()=>u({effortLevel:t.value}),disabled:s||i,className:`px-3 py-2 rounded-lg text-xs font-medium border transition-all ${e.effortLevel===t.value?"border-violet-500/50 bg-violet-500/10 text-violet-400":"border-border/50 text-text-muted hover:border-border"}`,children:x(t.labelKey)},t.value))})]})]})}function A(){let[e,t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[d,o]=(0,l.useState)("");(0,l.useEffect)(()=>{fetch("/api/settings/codex-service-tier").then(e=>e.json()).then(e=>{t(!!e.enabled),r(!1)}).catch(()=>r(!1))},[]);let m=async e=>{t(e),n(!0),o("");try{(await fetch("/api/settings/codex-service-tier",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})).ok?(o("saved"),setTimeout(()=>o(""),2e3)):(o("error"),t(!e))}catch{o("error"),t(!e)}finally{n(!1)}};return(0,a.jsxs)(c.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-sky-500/10 text-sky-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"bolt"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Codex Fast Service Tier"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Inject `service_tier=fast` into Codex requests when the client leaves it unset."})]}),"saved"===d&&(0,a.jsxs)("span",{className:"text-xs font-medium text-emerald-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),"Saved"]}),"error"===d&&(0,a.jsxs)("span",{className:"text-xs font-medium text-rose-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),"Failed to save"]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-lg bg-surface/30 border border-border/30",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Force fast tier for Codex"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Off by default. Applies only to Codex requests and does not override an explicit tier."})]}),(0,a.jsx)("button",{onClick:()=>m(!e),disabled:s||i,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e?"bg-sky-500":"bg-white/10"}`,children:(0,a.jsx)("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${e?"translate-x-6":"translate-x-1"}`})})]})]})}function T(){let[e,t]=(0,l.useState)({enabled:!1,prompt:""}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(""),[o,m]=(0,l.useState)(null),x=(0,d.c)("settings");(0,l.useEffect)(()=>{fetch("/api/settings/system-prompt").then(e=>e.json()).then(e=>{t(e),r(!1)}).catch(()=>r(!1))},[]);let u=async s=>{let a={...e,...s};t(a),n("");try{(await fetch("/api/settings/system-prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(n("saved"),setTimeout(()=>n(""),2e3))}catch{n("error")}};return(0,a.jsxs)(c.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-amber-500/10 text-amber-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"edit_note"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:x("globalSystemPrompt")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x("systemPromptDesc")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:["saved"===i&&(0,a.jsxs)("span",{className:"text-xs font-medium text-emerald-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"})," ",x("saved")]}),(0,a.jsx)(c.lM,{checked:e.enabled,onChange:()=>u({enabled:!e.enabled}),disabled:s})]})]}),e.enabled&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{value:e.prompt,onChange:e=>{var s;return s=e.target.value,void(t(e=>({...e,prompt:s})),o&&clearTimeout(o),m(setTimeout(()=>{u({prompt:s})},800)))},placeholder:x("systemPromptPlaceholder"),rows:5,className:"w-full px-4 py-3 rounded-lg border border-border/50 bg-surface/30 text-sm placeholder:text-text-muted/50 resize-y min-h-[120px] focus:outline-none focus:ring-1 focus:ring-amber-500/30 focus:border-amber-500/50 transition-colors",disabled:s}),(0,a.jsx)("div",{className:"absolute bottom-2 right-3 text-xs text-text-muted/60 tabular-nums",children:x("chars",{count:e.prompt.length})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted/70 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"}),x("systemPromptHint")]})]})]})}function L(){let[e,t]=(0,l.useState)({}),[s,r]=(0,l.useState)({}),[i,n]=(0,l.useState)(!0),[o,m]=(0,l.useState)(!1),[x,u]=(0,l.useState)(""),[h,p]=(0,l.useState)(""),[b,g]=(0,l.useState)(""),f=(0,d.c)("settings");(0,l.useEffect)(()=>{fetch("/api/settings/model-aliases").then(e=>e.json()).then(e=>{t(e.builtIn||{}),r(e.custom||{}),n(!1)}).catch(()=>n(!1))},[]);let j=async()=>{if(h.trim()&&b.trim()){m(!0);try{let e=await fetch("/api/settings/model-aliases",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:h.trim(),to:b.trim()})});if(e.ok){let t=await e.json();r(t.custom),p(""),g(""),u("saved"),setTimeout(()=>u(""),2e3)}}catch{u("error")}finally{m(!1)}}},y=async e=>{m(!0);try{let t=await fetch("/api/settings/model-aliases",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:e})});if(t.ok){let e=await t.json();r(e.custom),u("saved"),setTimeout(()=>u(""),2e3)}}catch{u("error")}finally{m(!1)}},v=Object.entries(e),N=Object.entries(s);return(0,a.jsxs)(c.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-amber-500/10 text-amber-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"swap_horiz"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:f("modelAliasesTitle")||"Model Aliases"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:f("modelAliasesDesc")||"Auto-forward deprecated model IDs to their replacements"})]}),"saved"===x&&(0,a.jsxs)("span",{className:"ml-auto text-xs font-medium text-emerald-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"})," ",f("saved")||"Saved"]})]}),(0,a.jsxs)("div",{className:"p-4 rounded-lg bg-surface/30 border border-border/30 mb-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium mb-3",children:f("addCustomAlias")||"Add Custom Alias"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",placeholder:f("deprecatedModelId")||"Deprecated model ID",value:h,onChange:e=>p(e.target.value),className:"flex-1 px-3 py-2 rounded-lg text-sm bg-surface border border-border/50 focus:border-amber-500/50 focus:outline-none"}),(0,a.jsx)("span",{className:"text-text-muted text-lg",children:"→"}),(0,a.jsx)("input",{type:"text",placeholder:f("newModelId")||"New model ID",value:b,onChange:e=>g(e.target.value),className:"flex-1 px-3 py-2 rounded-lg text-sm bg-surface border border-border/50 focus:border-amber-500/50 focus:outline-none"}),(0,a.jsx)("button",{onClick:j,disabled:o||!h.trim()||!b.trim(),className:"px-4 py-2 rounded-lg text-sm font-medium bg-amber-500/10 text-amber-500 hover:bg-amber-500/20 disabled:opacity-50 transition-all",children:f("add")||"Add"})]})]}),N.length>0&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-text-muted uppercase tracking-wider mb-2",children:f("customAliases")||"Custom Aliases"}),(0,a.jsx)("div",{className:"rounded-lg border border-border/30 divide-y divide-border/20",children:N.map(([e,t])=>(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,a.jsx)("code",{className:"text-xs text-red-400/80 flex-1 truncate",children:e}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"arrow_forward"}),(0,a.jsx)("code",{className:"text-xs text-emerald-400/80 flex-1 truncate",children:t}),(0,a.jsx)("button",{onClick:()=>y(e),disabled:o,className:"p-1 rounded hover:bg-red-500/10 text-text-muted hover:text-red-400 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},e))})]}),(0,a.jsxs)("details",{className:"group",children:[(0,a.jsxs)("summary",{className:"text-xs font-medium text-text-muted uppercase tracking-wider cursor-pointer flex items-center gap-1 mb-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] group-open:rotate-90 transition-transform",children:"chevron_right"}),f("builtInAliases")||"Built-in Aliases"," (",v.length,")"]}),(0,a.jsx)("div",{className:"rounded-lg border border-border/30 divide-y divide-border/20 max-h-60 overflow-y-auto",children:v.map(([e,t])=>(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2 opacity-60",children:[(0,a.jsx)("code",{className:"text-xs text-red-400/60 flex-1 truncate",children:e}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"arrow_forward"}),(0,a.jsx)("code",{className:"text-xs text-emerald-400/60 flex-1 truncate",children:t}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"lock"})]},e))})]})]})}function M(){let[e,t]=(0,l.useState)({enabled:!1,degradationMap:{},detectionPatterns:[],stats:{detected:0,tokensSaved:0}}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[o,m]=(0,l.useState)(""),[x,u]=(0,l.useState)(""),[h,p]=(0,l.useState)(""),[b,g]=(0,l.useState)(""),f=(0,d.c)("settings");(0,l.useEffect)(()=>{fetch("/api/settings/background-degradation").then(e=>e.json()).then(e=>{t(e),r(!1)}).catch(()=>r(!1))},[]);let j=async s=>{let a={...e,...s};t(a),n(!0),m("");try{let{stats:e,...s}=a,l=await fetch("/api/settings/background-degradation",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(l.ok){let e=await l.json();t(e),m("saved"),setTimeout(()=>m(""),2e3)}else m("error")}catch{m("error")}finally{n(!1)}},y=Object.entries(e.degradationMap||{});return(0,a.jsxs)(c.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-sky-500/10 text-sky-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"speed"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:f("backgroundDegradationTitle")||"Background Task Degradation"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:f("backgroundDegradationDesc")||"Auto-redirect background requests (titles, summaries) to cheaper models"})]}),"saved"===o&&(0,a.jsxs)("span",{className:"text-xs font-medium text-emerald-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"})," ",f("saved")||"Saved"]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-lg bg-surface/30 border border-border/30 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:f("enableDegradation")||"Enable Background Degradation"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:f("enableDegradationHint")||"Automatically use cheaper models for background utility tasks"})]}),(0,a.jsx)("button",{onClick:()=>j({enabled:!e.enabled}),disabled:s||i,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e.enabled?"bg-sky-500":"bg-white/10"}`,children:(0,a.jsx)("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${e.enabled?"translate-x-6":"translate-x-1"}`})})]}),e.stats&&e.stats.detected>0&&(0,a.jsx)("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-sky-500/5 border border-sky-500/20 mb-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-sky-400",children:"analytics"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[f("tasksDetected")||"Tasks detected",":"]}),(0,a.jsx)("span",{className:"text-sm font-mono font-semibold text-sky-400",children:e.stats.detected})]})}),e.enabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-text-muted uppercase tracking-wider mb-2",children:f("degradationMap")||"Model Degradation Map"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("input",{type:"text",placeholder:f("premiumModel")||"Premium model",value:x,onChange:e=>u(e.target.value),className:"flex-1 px-3 py-2 rounded-lg text-sm bg-surface border border-border/50 focus:border-sky-500/50 focus:outline-none"}),(0,a.jsx)("span",{className:"text-text-muted text-lg",children:"→"}),(0,a.jsx)("input",{type:"text",placeholder:f("cheapModel")||"Cheap model",value:h,onChange:e=>p(e.target.value),className:"flex-1 px-3 py-2 rounded-lg text-sm bg-surface border border-border/50 focus:border-sky-500/50 focus:outline-none"}),(0,a.jsx)("button",{onClick:()=>{x.trim()&&h.trim()&&(j({degradationMap:{...e.degradationMap,[x.trim()]:h.trim()}}),u(""),p(""))},disabled:i||!x.trim()||!h.trim(),className:"px-3 py-2 rounded-lg text-sm font-medium bg-sky-500/10 text-sky-500 hover:bg-sky-500/20 disabled:opacity-50 transition-all",children:f("add")||"Add"})]}),y.length>0&&(0,a.jsx)("div",{className:"rounded-lg border border-border/30 divide-y divide-border/20 max-h-48 overflow-y-auto",children:y.map(([t,s])=>(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2",children:[(0,a.jsx)("code",{className:"text-xs text-orange-400/80 flex-1 truncate",children:t}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"arrow_forward"}),(0,a.jsx)("code",{className:"text-xs text-sky-400/80 flex-1 truncate",children:s}),(0,a.jsx)("button",{onClick:()=>{let s;return s={...e.degradationMap},void(delete s[t],j({degradationMap:s}))},disabled:i,className:"p-1 rounded hover:bg-red-500/10 text-text-muted hover:text-red-400 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t))})]}),(0,a.jsxs)("details",{className:"group",children:[(0,a.jsxs)("summary",{className:"text-xs font-medium text-text-muted uppercase tracking-wider cursor-pointer flex items-center gap-1 mb-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] group-open:rotate-90 transition-transform",children:"chevron_right"}),f("detectionPatterns")||"Detection Patterns"," (",e.detectionPatterns?.length||0,")"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("input",{type:"text",placeholder:f("newPattern")||'e.g. "generate a title"',value:b,onChange:e=>g(e.target.value),className:"flex-1 px-3 py-2 rounded-lg text-sm bg-surface border border-border/50 focus:border-sky-500/50 focus:outline-none"}),(0,a.jsx)("button",{onClick:()=>{b.trim()&&(j({detectionPatterns:[...e.detectionPatterns,b.trim()]}),g(""))},disabled:i||!b.trim(),className:"px-3 py-2 rounded-lg text-sm font-medium bg-sky-500/10 text-sky-500 hover:bg-sky-500/20 disabled:opacity-50 transition-all",children:f("add")||"Add"})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(e.detectionPatterns||[]).map((t,s)=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs bg-sky-500/10 text-sky-400 border border-sky-500/20",children:[t,(0,a.jsx)("button",{onClick:()=>{j({detectionPatterns:e.detectionPatterns.filter((e,t)=>t!==s)})},className:"hover:text-red-400 transition-colors",disabled:i,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},s))})]})]})]})}function E(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!1),i=(0,d.c)("settings"),n=()=>{fetch("/api/cache/stats").then(e=>e.json()).then(t).catch(()=>{})};(0,l.useEffect)(n,[]);let o=async()=>{r(!0);try{await fetch("/api/cache/stats",{method:"DELETE"}),n()}finally{r(!1)}};return(0,a.jsxs)(c.Zp,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"cached"}),i("promptCache")]}),(0,a.jsx)("button",{onClick:o,disabled:s,className:"px-3 py-1.5 text-xs rounded-lg bg-red-500/10 text-red-400 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:i(s?"flushing":"flushCache")})]}),e?(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:i("size")}),(0,a.jsxs)("p",{className:"font-mono text-lg text-text-main",children:[e.size,"/",e.maxSize]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:i("hitRate")}),(0,a.jsxs)("p",{className:"font-mono text-lg text-text-main",children:[e.hitRate?.toFixed(1)??0,"%"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:i("hits")}),(0,a.jsx)("p",{className:"font-mono text-text-main",children:e.hits??0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:i("evictions")}),(0,a.jsx)("p",{className:"font-mono text-text-main",children:e.evictions??0})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:i("loadingCacheStats")})]})}let O={CLOSED:{bg:"bg-emerald-500/15",text:"text-emerald-400",border:"border-emerald-500/30",icon:"check_circle"},OPEN:{bg:"bg-red-500/15",text:"text-red-400",border:"border-red-500/30",icon:"error"},HALF_OPEN:{bg:"bg-amber-500/15",text:"text-amber-400",border:"border-amber-500/30",icon:"warning"}},F={closed:{icon:"check_circle",color:"#22c55e"},"half-open":{icon:"pending",color:"#f59e0b"},open:{icon:"error",color:"#ef4444"}};function K(e,t){let s=String(e||"closed").toLowerCase().replaceAll("_","-");return t("open"===s?"breakerStateOpen":"half-open"===s?"breakerStateHalfOpen":"breakerStateClosed")}function _(e){return!e||e<=0?"—":e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}function B(e,t){return e instanceof Error&&e.message?e.message:t}function z({profiles:e,onSave:t,saving:s}){let[r,i]=(0,l.useState)(!1),[n,o]=(0,l.useState)(e),m=(0,d.c)("settings"),x=(0,d.c)("common");(0,l.useEffect)(()=>{o(e)},[e]);let u=e=>null==e?"—":`${e}${m("ms")}`,h=[{key:"transientCooldown",label:m("transientCooldown"),format:u},{key:"rateLimitCooldown",label:m("rateLimitCooldown"),format:u},{key:"maxBackoffLevel",label:m("maxBackoffLevel")},{key:"circuitBreakerThreshold",label:m("cbThreshold"),format:e=>null==e?"—":m("failures",{count:e})},{key:"circuitBreakerReset",label:m("cbResetTime"),format:u}];return(0,a.jsx)(c.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"tune"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:m("providerProfiles")})]}),r?(0,a.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",onClick:()=>i(!1),children:x("cancel")}),(0,a.jsx)(c.$n,{size:"sm",variant:"primary",icon:"save",onClick:()=>{t(n),i(!1)},disabled:s,children:x("save")})]}):(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>i(!0),children:x("edit")})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:m("providerProfilesDesc")}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:["oauth","apikey"].map(t=>(0,a.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-bold uppercase tracking-wider mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base","aria-hidden":"true",children:"oauth"===t?"lock":"key"}),"oauth"===t?m("oauthProviders"):m("apiKeyProviders")]}),(0,a.jsx)("div",{className:"space-y-2",children:h.map(({key:s,label:l,format:i})=>(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:l}),r?(0,a.jsx)("input",{type:"number",min:"0",value:n?.[t]?.[s]??0,onChange:e=>o({...n,[t]:{...n[t],[s]:Number(e.target.value)}}),className:"w-24 px-2 py-1 text-xs rounded bg-white/10 border border-white/20 text-right"}):(0,a.jsx)("span",{className:"text-sm font-mono",children:i?i(e?.[t]?.[s]):e?.[t]?.[s]??"—"})]},s))})]},t))})]})})}function R({rateLimitStatus:e,defaults:t,onSaveDefaults:s,saving:r}){let[i,n]=(0,l.useState)(!1),[o,m]=(0,l.useState)(t||{}),x=(0,d.c)("settings"),u=(0,d.c)("common");return(0,l.useEffect)(()=>{t&&m(t)},[t]),(0,a.jsx)(c.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"speed"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:x("rateLimiting")})]}),i?(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",onClick:()=>n(!1),children:u("cancel")}),(0,a.jsx)(c.$n,{size:"sm",variant:"primary",icon:"save",onClick:()=>{s(o),n(!1)},disabled:r,children:u("save")})]}):(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>n(!0),children:u("edit")})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:x("rateLimitingDesc")}),(0,a.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 p-4 mb-4",children:[(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider mb-3 text-text-muted",children:x("defaultSafetyNet")}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[{key:"requestsPerMinute",label:x("rpm")},{key:"minTimeBetweenRequests",label:x("minGap"),format:_},{key:"concurrentRequests",label:x("maxConcurrent")}].map(({key:e,label:s,format:l})=>(0,a.jsxs)("div",{children:[i?(0,a.jsx)("input",{type:"number",min:"1",value:o[e]??0,onChange:t=>m(s=>({...s,[e]:parseInt(t.target.value)||0})),className:"w-full px-2 py-1 text-lg font-bold rounded bg-white/10 border border-white/20"}):(0,a.jsx)("div",{className:"text-lg font-bold",children:l?l(t?.[e]):t?.[e]??"—"}),(0,a.jsx)("div",{className:"text-xs text-text-muted",children:s})]},e))})]}),e&&e.length>0?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider text-text-muted",children:x("activeLimiters")}),e.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-black/5 dark:bg-white/5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:e.provider||e.key}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[null!=e.reservoir&&(0,a.jsxs)("span",{children:[x("reservoir"),": ",e.reservoir]}),null!=e.running&&(0,a.jsxs)("span",{children:[x("running"),": ",e.running]}),null!=e.queued&&(0,a.jsxs)("span",{children:[x("queued"),": ",e.queued]})]})]},t))]}):(0,a.jsx)("p",{className:"text-xs text-text-muted",children:x("noActiveLimiters")})]})})}function I({breakers:e,onReset:t,loading:s}){let l=e.filter(e=>"CLOSED"!==e.state),r=e.length,i=(0,d.c)("settings");return(0,a.jsx)(c.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"electrical_services"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:i("circuitBreakers")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:l.length>0?i("tripped",{count:l.length}):i("healthy",{count:r})}),l.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"danger",icon:"restart_alt",onClick:t,disabled:s,children:i("resetAll")})]})]}),0===e.length?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:i("noCircuitBreakers")}):(0,a.jsx)("div",{className:"space-y-2",children:e.map(e=>{let t=O[e.state]||O.CLOSED;return(0,a.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-black/5 dark:bg-white/5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-base ${t.text}`,"aria-hidden":"true",children:t.icon}),(0,a.jsx)("span",{className:"text-sm font-medium",children:e.name.replace("combo:","")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[e.failureCount>0&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:i("failures",{count:e.failureCount})}),(0,a.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-bold uppercase ${t.bg} ${t.text} border ${t.border}`,children:K(e.state,i)})]})]},e.name)})})]})})}function q(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(null),m=(0,g.i)(),x=(0,o.Ym)(),u=(0,d.c)("settings"),h=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/policies");if(e.ok){let s=await e.json();t(s)}}catch{}finally{r(!1)}},[]);(0,l.useEffect)(()=>{h();let e=setInterval(h,15e3);return()=>clearInterval(e)},[h]);let p=async e=>{n(e);try{(await fetch("/api/policies",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"unlock",identifier:e})})).ok?(m.success(u("unlockedIdentifier",{identifier:e})),await h()):m.error(u("failedUnlock"))}catch{m.error(u("failedUnlock"))}finally{n(null)}},b=e?.circuitBreakers||[],f=e?.lockedIdentifiers||[],j=b.some(e=>"closed"!==e.state)||f.length>0;return s?(0,a.jsx)(c.Zp,{className:"p-6",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted animate-pulse",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"policy"}),u("loadingPolicies")]})}):(0,a.jsx)(c.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"policy"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:u("policiesLocked")})]}),j&&(0,a.jsx)(c.$n,{size:"sm",variant:"ghost",onClick:h,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"refresh"})})]}),j?(0,a.jsxs)(a.Fragment,{children:[b.filter(e=>"closed"!==e.state).length>0&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-muted mb-2",children:u("circuitBreakers")}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:b.filter(e=>"closed"!==e.state).map((e,t)=>{let s=F[e.state]||F.open;return(0,a.jsx)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg bg-surface/30 border border-border/20",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:s.color},children:s.icon}),(0,a.jsx)("span",{className:"text-sm text-text-main font-medium",children:e.name||e.provider||u("unknown")}),(0,a.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded-full",style:{backgroundColor:`${s.color}15`,color:s.color},children:K(e.state,u)}),e.failures>0&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:u("failures",{count:e.failures})})]})},e.name||t)})})]}),f.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-muted mb-2",children:u("lockedIdentifiers")}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:f.map((e,t)=>{let s="string"==typeof e?e:e.identifier||e.id;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg bg-surface/30 border border-border/20",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-red-400",children:"lock"}),(0,a.jsx)("span",{className:"font-mono text-sm text-text-main",children:s}),"object"==typeof e&&e.lockedAt&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:u("sinceDate",{date:new Date(e.lockedAt).toLocaleString(x)})})]}),(0,a.jsx)(c.$n,{size:"sm",variant:"ghost",onClick:()=>p(s),disabled:i===s,className:"text-xs",children:i===s?u("unlocking"):u("forceUnlock")})]},s||t)})})]})]}):(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-emerald-500/10 text-emerald-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"verified_user"})}),(0,a.jsx)("div",{children:(0,a.jsx)("p",{className:"text-sm text-text-muted",children:u("allOperational")})})]})]})})}function Z(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[o,m]=(0,l.useState)(null),x=(0,d.c)("settings"),u=(0,l.useCallback)(async()=>{try{r(!0);let e=await fetch("/api/resilience");if(!e.ok)throw Error(x("failedLoadWithStatus",{status:e.status}));let s=await e.json();t(s),m(null)}catch(e){m(B(e,x("failedLoadResilience")))}finally{r(!1)}},[x]);(0,l.useEffect)(()=>{u();let e=setInterval(u,1e4);return()=>clearInterval(e)},[u]);let h=async()=>{try{if(r(!0),!(await fetch("/api/resilience/reset",{method:"POST"})).ok)throw Error(x("resetFailed"));await u()}catch(e){m(B(e,x("resetFailed")))}finally{r(!1)}},p=async e=>{try{if(n(!0),!(await fetch("/api/resilience",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({profiles:e})})).ok)throw Error(x("saveFailed"));await u()}catch(e){m(B(e,x("saveFailed")))}finally{n(!1)}},b=async e=>{try{if(n(!0),!(await fetch("/api/resilience",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaults:e})})).ok)throw Error(x("saveFailed"));await u()}catch(e){m(B(e,x("saveFailed")))}finally{n(!1)}};return s&&!e?(0,a.jsxs)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"hourglass_empty"}),x("loadingResilience")]}):o&&!e?(0,a.jsxs)(c.Zp,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"error"}),(0,a.jsx)("span",{className:"text-sm",children:o})]}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:u,className:"mt-3",children:x("retry")})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(z,{profiles:e?.profiles||{},onSave:p,saving:i}),(0,a.jsx)(R,{rateLimitStatus:e?.rateLimitStatus||[],defaults:e?.defaults||{},onSaveDefaults:b,saving:i}),(0,a.jsx)(I,{breakers:e?.circuitBreakers||[],onReset:h,loading:s}),(0,a.jsx)(q,{})]})}let U=[{id:"general",labelKey:"general",icon:"settings"},{id:"ai",labelKey:"ai",icon:"smart_toy"},{id:"security",labelKey:"security",icon:"shield"},{id:"routing",labelKey:"routing",icon:"route"},{id:"resilience",labelKey:"resilience",icon:"electrical_services"},{id:"advanced",labelKey:"advanced",icon:"tune"}];function H(){let e=(0,d.c)("settings"),t=(0,r.useSearchParams)().get("tab"),[s,c]=(0,l.useState)(null),o=s||U.find(e=>e.id===t)?.id||"general";return(0,a.jsx)("div",{className:"max-w-2xl mx-auto min-w-0",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)("div",{className:"w-full overflow-x-auto pb-1",children:(0,a.jsx)("div",{role:"tablist","aria-label":e("settingsSectionsAria"),className:"inline-flex items-center p-1 rounded-lg bg-black/5 dark:bg-white/5 min-w-max",children:U.map(t=>(0,a.jsxs)("button",{role:"tab","aria-selected":o===t.id,tabIndex:o===t.id?0:-1,onClick:()=>c(t.id),className:(0,i.cn)("flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-all text-sm",o===t.id?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]","aria-hidden":"true",children:t.icon}),(0,a.jsx)("span",{className:"hidden sm:inline whitespace-nowrap",children:e(t.labelKey)})]},t.id))})}),(0,a.jsxs)("div",{role:"tabpanel","aria-label":e(U.find(e=>e.id===o)?.labelKey||"general"),children:["general"===o&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(m,{}),(0,a.jsx)(S,{})]})}),"ai"===o&&(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)($,{}),(0,a.jsx)(A,{}),(0,a.jsx)(T,{}),(0,a.jsx)(E,{})]}),"security"===o&&(0,a.jsx)(b,{}),"routing"===o&&(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(v,{}),(0,a.jsx)(N,{}),(0,a.jsx)(L,{}),(0,a.jsx)(M,{})]}),"resilience"===o&&(0,a.jsx)(Z,{}),"advanced"===o&&(0,a.jsx)(k,{})]}),(0,a.jsxs)("div",{className:"text-center text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[n.vQ.name," v",n.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:e("localMode")})]})]})})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=13908)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{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)},83268:(e,a,l)=>{Promise.resolve().then(l.bind(l,97449))},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=83268)),_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],{33425:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=33425)),_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],{33425:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=33425)),_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],{33425:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=33425)),_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],{33425:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=33425)),_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)},61563:(e,t,r)=>{Promise.resolve().then(r.bind(r,62128))},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")})]})}}},e=>{e.O(0,[8500,3418,8441,3794,7358],()=>e(e.s=61563)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2162],{39477:(e,t,s)=>{Promise.resolve().then(s.bind(s,40182))},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)}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=39477)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{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"})]})]})})})}},44508:(e,t,r)=>{Promise.resolve().then(r.bind(r,26719))}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=44508)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7018],{1809:(e,t,s)=>{Promise.resolve().then(s.bind(s,22857))},22857:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s(95155),a=s(39092),l=s.n(a),o=s(73321),i=s(50910),n=s(12115),c=s(33637);function d(){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)(c.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 b(){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))})]})})}var g=s(32661);function p(){let e=(0,i.c)("landing"),[t,s]=(0,n.useState)(!1),a="http://localhost:20128",l=`${a}/dashboard`,o="npx omniroute",c=async e=>{await (0,g.l)(e),s(!0),setTimeout(()=>s(!1),2e3)};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:()=>c(o),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 j(){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)(c.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 v(){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)(d,{}),(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)(p,{}),(0,r.jsx)(u,{}),(0,r.jsx)(b,{}),(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)(j,{})]}),(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}"})]})}},32661:(e,t,s)=>{"use strict";async function r(e){if("u">typeof navigator&&navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch{}if("u">typeof document&&document.body){let t=document.createElement("textarea");t.value=e,t.style.cssText="position:fixed;top:0;left:-9999px;opacity:0;pointer-events:none;";let s=!1;try{return document.body.appendChild(t),s=!0,t.focus(),t.select(),document.execCommand("copy")}catch{}finally{s&&document.body.contains(t)&&document.body.removeChild(t)}}return!1}s.d(t,{l:()=>r})},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}}},e=>{e.O(0,[3418,8055,2065,8441,3794,7358],()=>e(e.s=1809)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{13504:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(50910),i=s(12115),l=s(40993),n=s(73321);function d(){let e=(0,r.c)("auth"),[t,s]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),[o,m]=(0,i.useState)(!1),[x,u]=(0,i.useState)(null),[h,f]=(0,i.useState)(null),[p,b]=(0,i.useState)(!1),j=(0,n.useRouter)();(0,i.useEffect)(()=>{b(!0),async function(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3),s=window.location.origin;try{let a=await fetch(`${s}/api/settings`,{signal:e.signal});if(clearTimeout(t),a.ok){let e=await a.json();if(!1===e.requireLogin){j.push("/dashboard"),j.refresh();return}u(!!e.hasPassword),f(!!e.setupComplete)}else u(!0),f(!0)}catch(e){clearTimeout(t),u(!0),f(!0)}}()},[j]);let y=async s=>{s.preventDefault(),m(!0),c("");try{let s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:t})});if(s.ok)sessionStorage.setItem("omniroute_login_time",String(Date.now())),j.push("/dashboard"),j.refresh();else{let t=await s.json();c(t.error||e("invalidPassword"))}}catch(t){c(e("errorOccurredRetry"))}finally{m(!1)}};return null===x||null===h?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-10 h-10 border-2 border-primary/20 rounded-full"}),(0,a.jsx)("div",{className:"absolute inset-0 w-10 h-10 border-2 border-primary border-t-transparent rounded-full animate-spin"})]}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:e("loading")})]})}):x||h?!x&&h?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-md transition-all duration-700 ease-out ${p?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"text-center mb-10",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-3xl bg-gradient-to-br from-amber-500/10 to-amber-500/5 border border-amber-500/10 mb-6",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-amber-500 text-[40px]",children:"shield_person"})}),(0,a.jsx)("h1",{className:"text-3xl font-bold text-text-main tracking-tight",children:e("secureYourInstance")}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:e("passwordNotEnabled")})]}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-2xl p-8 shadow-soft",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-text-muted leading-relaxed mb-6",children:e("setPasswordDescription")}),(0,a.jsx)(l.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>j.push("/dashboard/settings?tab=security"),children:e("configurePassword")})]})}),(0,a.jsxs)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:["OmniRoute — ",e("unifiedAiApiProxy")]})]})}):(0,a.jsxs)("div",{className:"min-h-screen flex bg-bg",children:[(0,a.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-sm transition-all duration-700 ease-out ${p?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"mb-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-8",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-primary-hover flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,a.jsx)("span",{className:"text-xl font-semibold text-text-main tracking-tight",children:"OmniRoute"})]}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main tracking-tight",children:e("signIn")}),(0,a.jsx)("p",{className:"text-text-muted mt-1.5",children:e("enterPassword")})]}),(0,a.jsxs)("form",{onSubmit:y,className:"space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:e("password")}),(0,a.jsx)(l.pd,{type:"password",placeholder:e("enterPassword"),value:t,onChange:e=>s(e.target.value),required:!0,autoFocus:!0,className:"h-11"}),d&&(0,a.jsxs)("p",{className:"text-sm text-red-500 flex items-center gap-1.5 pt-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"error"}),d]})]}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",className:"w-full h-11 text-sm font-medium",loading:o,children:e("continue")})]}),(0,a.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:(0,a.jsx)("a",{href:"/forgot-password",className:"text-sm text-text-muted hover:text-primary transition-colors",children:e("forgotPassword")})})]})}),(0,a.jsx)("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-primary/5 via-primary/3 to-transparent items-center justify-center p-12",children:(0,a.jsx)("div",{className:`max-w-md transition-all duration-700 delay-200 ease-out ${p?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-2xl font-bold text-text-main mb-3",children:e("unifiedAiApiProxy")}),(0,a.jsx)("p",{className:"text-text-muted leading-relaxed",children:e("unifiedAiApiProxyDesc")})]}),(0,a.jsx)("div",{className:"space-y-4",children:[{icon:"swap_horiz",title:e("featureMultiProviderTitle"),desc:e("featureMultiProviderDesc")},{icon:"speed",title:e("featureLoadBalancingTitle"),desc:e("featureLoadBalancingDesc")},{icon:"analytics",title:e("featureUsageTrackingTitle"),desc:e("featureUsageTrackingDesc")}].map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-surface/50 border border-border",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:e.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-medium text-text-main",children:e.title}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e.desc})]})]},e.icon))})]})})})]}):(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-md transition-all duration-700 ease-out ${p?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"text-center mb-10",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-3xl bg-gradient-to-br from-primary/10 to-primary/5 border border-primary/10 mb-6",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[40px]",children:"rocket_launch"})}),(0,a.jsx)("h1",{className:"text-3xl font-bold text-text-main tracking-tight",children:e("welcome")}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:e("configureInstance")})]}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-2xl p-8 shadow-soft",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-text-muted leading-relaxed mb-6",children:e("runOnboardingWizard")}),(0,a.jsx)(l.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>j.push("/dashboard/onboarding"),children:e("startOnboarding")})]})}),(0,a.jsxs)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:["OmniRoute — ",e("unifiedProxy")]})]})})}},40993:(e,t,s)=>{"use strict";s.d(t,{Ex:()=>c.default,$n:()=>a.default,Zp:()=>l.default,Qv:()=>d.CardSkeleton,G9:()=>y.default,bQ:()=>w.default,pp:()=>N.default,Qn:()=>v.default,pd:()=>r.default,Mh:()=>j.default,uR:()=>u.default,aF:()=>n.default,rq:()=>x.default,LF:()=>m.default,KN:()=>p.default,Lo:()=>b.default,y7:()=>f.default,Iz:()=>g.default,l6:()=>i.default,lM:()=>o.default,cn:()=>h.default});var a=s(35806),r=s(34422),i=s(42994),l=s(81060),n=s(71361),d=s(92542);s(17705);var c=s(80927),o=s(19790);s(6261),s(55846),s(34243),s(89938),s(99023);var m=s(80178),x=s(85444),u=s(91961);s(25112);var h=s(45624),f=s(37415),p=s(48643),b=s(8287);s(1652);var j=s(92701);s(18150);var y=s(71689),g=s(33709);s(76332);var N=s(66200);s(61580);var v=s(51503);s(54128);var w=s(44638);s(21720),s(97050)},77463:(e,t,s)=>{Promise.resolve().then(s.bind(s,13504))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=77463)),_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],{33425:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,98500,23))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=33425)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4345],{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"})]})]})}},88860:(e,t,r)=>{Promise.resolve().then(r.bind(r,37145))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=88860)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9734],{6437:(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=6437)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9557],{3450:(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=3450)),_N_E=e.O()}]);