@rsalmn/extremerouter 0.6.3 → 0.6.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 (595) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +1 -1
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  91. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  92. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  94. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  97. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  213. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  291. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  293. package/app/.next-cli-build/server/app/callback.html +1 -1
  294. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  295. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  296. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  297. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  298. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  299. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  300. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  301. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  302. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -8
  303. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  304. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  305. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  306. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  307. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -8
  308. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  309. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
  310. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -3
  311. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  312. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -8
  313. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  314. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  315. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  316. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  317. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -8
  318. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  319. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
  320. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -3
  321. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  322. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -8
  323. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  324. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  325. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  326. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  327. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -8
  328. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  329. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
  330. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -3
  331. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  332. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -8
  333. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  334. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  335. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  336. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  337. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -8
  338. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
  340. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -3
  341. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -8
  343. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  344. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  347. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  348. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -8
  349. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  350. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
  351. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -3
  352. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  353. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -8
  354. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  355. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  356. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  358. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -8
  359. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
  361. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -3
  362. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -8
  364. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  365. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  368. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -8
  369. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
  371. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -3
  372. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -8
  374. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  375. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  379. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -8
  380. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
  382. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -3
  383. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -8
  385. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  389. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -8
  390. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
  392. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -3
  393. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -8
  395. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  396. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  399. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -8
  400. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
  402. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -3
  403. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  404. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -9
  405. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  406. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  409. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -9
  410. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
  412. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -3
  413. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  418. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  419. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  421. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -8
  428. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  432. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -8
  433. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
  435. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -3
  436. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -8
  438. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  442. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -8
  443. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
  445. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -3
  446. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -8
  448. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  452. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -8
  453. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
  455. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -3
  456. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  458. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +3 -2
  459. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  462. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
  465. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  467. package/app/.next-cli-build/server/app/dashboard.rsc +7 -8
  468. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -3
  471. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -8
  472. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
  474. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -3
  475. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  476. package/app/.next-cli-build/server/app/index.html +1 -1
  477. package/app/.next-cli-build/server/app/index.rsc +5 -5
  478. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  480. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  482. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  483. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  484. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  486. package/app/.next-cli-build/server/app/landing.html +1 -1
  487. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  488. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  489. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  491. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  492. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  494. package/app/.next-cli-build/server/app/login/page.js +1 -1
  495. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  496. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  497. package/app/.next-cli-build/server/app/login.html +1 -1
  498. package/app/.next-cli-build/server/app/login.rsc +6 -7
  499. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -7
  500. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  502. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -3
  503. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -3
  504. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  506. package/app/.next-cli-build/server/app/page.js +1 -1
  507. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  508. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  509. package/app/.next-cli-build/server/app-paths-manifest.json +1 -1
  510. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  511. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  512. package/app/.next-cli-build/server/chunks/318.js +16 -5
  513. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  514. package/app/.next-cli-build/server/chunks/4055.js +1 -1
  515. package/app/.next-cli-build/server/chunks/412.js +2 -2
  516. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  517. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  518. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  519. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  520. package/app/.next-cli-build/server/chunks/4884.js +4 -2
  521. package/app/.next-cli-build/server/chunks/507.js +1 -1
  522. package/app/.next-cli-build/server/chunks/5217.js +1 -1
  523. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  524. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  525. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  526. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  527. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  528. package/app/.next-cli-build/server/chunks/615.js +1 -1
  529. package/app/.next-cli-build/server/chunks/6316.js +1 -1
  530. package/app/.next-cli-build/server/chunks/698.js +1 -1
  531. package/app/.next-cli-build/server/chunks/788.js +1 -0
  532. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  533. package/app/.next-cli-build/server/chunks/8000.js +64 -0
  534. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  535. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  536. package/app/.next-cli-build/server/chunks/8497.js +1 -0
  537. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  538. package/app/.next-cli-build/server/chunks/8895.js +4 -4
  539. package/app/.next-cli-build/server/chunks/9630.js +1 -1
  540. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  541. package/app/.next-cli-build/server/pages/404.html +1 -1
  542. package/app/.next-cli-build/server/pages/500.html +1 -1
  543. package/app/.next-cli-build/static/chunks/1321-063dbf2b0db9ec56.js +1 -0
  544. package/app/.next-cli-build/static/chunks/1636-47ea773ffa2d3a4b.js +1 -0
  545. package/app/.next-cli-build/static/chunks/27-a63677413de6d402.js +64 -0
  546. package/app/.next-cli-build/static/chunks/5497-e8e1e33b585b7c3e.js +7 -0
  547. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-cd844c9e8ab2fc27.js → page-76e413764f752c03.js} +1 -1
  548. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-6a176bdbfba2621c.js → page-4efb04e1eca7f27c.js} +1 -1
  549. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-873634a244c17d3f.js → page-f6cb00bfa1358617.js} +1 -1
  550. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-08645a1d2433efa1.js → page-bb8f74eb19be72b4.js} +1 -1
  551. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-d0e88224a81a3ddc.js → page-18b262b802c95472.js} +1 -1
  552. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cb5d0aca5faba3b4.js +1 -0
  553. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-67bf9d70a075636b.js → page-6d0b92899909f933.js} +1 -1
  554. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-dc4b71f3a3b382b6.js → page-04df212b392a7049.js} +1 -1
  555. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-78d8c7c0b1e500fc.js → page-6ff0b7ef268b9f96.js} +1 -1
  556. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-444400de4c1d5f76.js → page-a6ff642180bb6c33.js} +1 -1
  557. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-2750e3fcd71856e0.js → page-325de46b5cec5533.js} +1 -1
  558. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-3538bc80a52010ff.js +1 -0
  559. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-3963f4a54f708ed7.js → page-1b18b64a9ced4e9f.js} +1 -1
  560. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-fddc095ae22690a0.js → page-81c19a6fe2231d96.js} +1 -1
  561. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-4e64bdba71a84aa7.js → page-f2075be55913fe76.js} +1 -1
  562. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-d70dcc6c9a151a80.js +1 -0
  563. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-5fd1c281eaa9e772.js → page-964ac16d6816983d.js} +1 -1
  564. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-1b66539173748945.js +1 -0
  565. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-dab3abccf166aced.js → page-6c82876d3dc71dfb.js} +1 -1
  566. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-519d79be7c6523e4.js → page-d1f50f77018f738e.js} +1 -1
  567. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-c854e381afc6b069.js → page-422974480d3bd378.js} +1 -1
  568. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-933a4cc7d2dae064.js +1 -0
  569. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-ac93a6a5df6b898f.js +1 -0
  570. package/app/.next-cli-build/static/chunks/app/login/{page-237285b5f30b330a.js → page-f9cc5c6db5a0cf57.js} +1 -1
  571. package/app/.next-cli-build/static/css/57a0456cd89c95aa.css +1 -0
  572. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.6.2-to-0.6.3-0.6.3-20260704-134754/data.sqlite +0 -0
  573. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.6.3-to-0.6.4-0.6.4-20260705-031259/data.sqlite +0 -0
  574. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  575. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  576. package/app/package.json +1 -1
  577. package/app/public/providers/cody.svg +17 -0
  578. package/app/public/providers/trae.svg +13 -0
  579. package/app/public/providers/windsurf.svg +18 -0
  580. package/package.json +1 -1
  581. package/app/.next-cli-build/server/chunks/1228.js +0 -1
  582. package/app/.next-cli-build/server/chunks/1315.js +0 -64
  583. package/app/.next-cli-build/server/chunks/4485.js +0 -1
  584. package/app/.next-cli-build/static/chunks/1321-ff2073ad3d1126ca.js +0 -1
  585. package/app/.next-cli-build/static/chunks/3807-1f60b140ccc35641.js +0 -64
  586. package/app/.next-cli-build/static/chunks/5497-470badc121d94683.js +0 -7
  587. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-80672ae92687edc6.js +0 -1
  588. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-4c3fed899c4023c4.js +0 -1
  589. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9b3ba2db1b90f552.js +0 -1
  590. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-beb433ec82a84fb3.js +0 -1
  591. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-2175023d6eabf14c.js +0 -1
  592. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-1bb0b613c562d507.js +0 -1
  593. package/app/.next-cli-build/static/css/87588eca18fba81a.css +0 -1
  594. /package/app/.next-cli-build/static/{RPDQBYxJJwcxTCmP2fmVI → wmMfolDh46kO-VuBq1X-C}/_buildManifest.js +0 -0
  595. /package/app/.next-cli-build/static/{RPDQBYxJJwcxTCmP2fmVI → wmMfolDh46kO-VuBq1X-C}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{60922:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[2574,3862,3807,1321,705,5497,8441,3794,7358],()=>e(e.s=60922)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{60922:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=60922)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,a)=>{"use strict";a.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>d,Nv:()=>x,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>s,oX:()=>l,t6:()=>o});let s=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],x=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006),o=a(15536);function c(){let[e,t]=(0,l.useState)(!0),[a,c]=(0,l.useState)(!1),[d,m]=(0,l.useState)("http://localhost:8787"),[x,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!1),[g,y]=(0,l.useState)(""),[j,v]=(0,l.useState)(!1),[N,k]=(0,l.useState)("full"),[w,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[L,U]=(0,l.useState)("en"),{copied:T,copy:P}=(0,n.C)();(0,l.useEffect)(()=>(U((0,i.kk)()),(0,i.oQ)(()=>U((0,i.kk)()))),[]);let H=o.hT.includes(L),_=H?o.ev:o.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=o.ev.find(e=>e.id===N);e?.wenyan&&!H&&(k("ultra"),A({cavemanLevel:"ultra"}))},[H,N]);let A=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},O=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},R=async()=>{let e=d.trim()||"http://localhost:8787";m(e),await A({headroomUrl:e}),$()},$=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),I=(0,l.useCallback)(async()=>{y(""),b(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await $()}catch(e){y(e.message)}finally{b(!1)}},[$]),M=(0,l.useCallback)(async()=>{b(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await $()}finally{b(!1)}},[$]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),c(!!a.headroomEnabled),m(a.headroomUrl||"http://localhost:8787"),v(!!a.cavemanEnabled),k(a.cavemanLevel||"full"),C(!!a.ponytailEnabled),E(a.ponytailLevel||"full"),$()}}catch{}})()},[$]);let z=!!x.running,D=x.loading?"Checking…":z?"Running":!1===x.localUrl||x.installed?!1!==x.localUrl?"Stopped":"External":"Not installed",F=!1!==x.localUrl,W=!!x.canStart,B=F&&!!x.managedPid;return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(r.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,s.jsxs)(r.Zp,{id:"rtk",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,s.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,s.jsx)(r.lM,{checked:e,onChange:()=>O(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,s.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${z?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:D}),(0,s.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:z?"Manage":"Setup"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,s.jsx)(r.lM,{checked:a&&z,disabled:!z,onChange:()=>{var e;let t;return e=!a,void(m(t=d.trim()||"http://localhost:8787"),c(e),A({headroomEnabled:e,headroomUrl:t}))}})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,s.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[j&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:_.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;k(t=e.id),A({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,s.jsx)("p",{className:"text-xs text-primary",children:o.ev.find(e=>e.id===N)?.desc})]}),(0,s.jsx)(r.lM,{checked:j,onChange:()=>{var e;v(e=!j),A({cavemanEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,s.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[w&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:o.Nv.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;E(t=e.id),A({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,s.jsx)("p",{className:"text-xs text-primary",children:o.Nv.find(e=>e.id===S)?.desc})]}),(0,s.jsx)(r.lM,{checked:w,onChange:()=>{var e;C(e=!w),A({ponytailEnabled:e})}})]})]})]}),(0,s.jsx)(r.aF,{isOpen:p,title:z?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsx)("span",{className:z?"text-success":"text-warning",children:D})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,s.jsx)(r.pd,{value:d,onChange:e=>m(e.target.value),onBlur:R,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),B?(0,s.jsx)(r.$n,{onClick:M,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):z?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):W?(0,s.jsx)(r.$n,{onClick:I,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):F?x.python?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,s.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>P('pip install "headroom-ai[proxy]"'),children:T?"Copied":"Copy"})]})]}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),g&&(0,s.jsx)("p",{className:"text-sm text-warning",children:g}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>$(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,a)=>{Promise.resolve().then(a.bind(a,61203))}},e=>{e.O(0,[2574,3862,3807,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,a)=>{"use strict";a.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>d,Nv:()=>x,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>s,oX:()=>l,t6:()=>o});let s=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],x=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006),o=a(15536);function c(){let[e,t]=(0,l.useState)(!0),[a,c]=(0,l.useState)(!1),[d,m]=(0,l.useState)("http://localhost:8787"),[x,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!1),[g,y]=(0,l.useState)(""),[j,v]=(0,l.useState)(!1),[N,k]=(0,l.useState)("full"),[w,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[L,U]=(0,l.useState)("en"),{copied:T,copy:P}=(0,n.C)();(0,l.useEffect)(()=>(U((0,i.kk)()),(0,i.oQ)(()=>U((0,i.kk)()))),[]);let H=o.hT.includes(L),_=H?o.ev:o.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=o.ev.find(e=>e.id===N);e?.wenyan&&!H&&(k("ultra"),A({cavemanLevel:"ultra"}))},[H,N]);let A=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},O=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},R=async()=>{let e=d.trim()||"http://localhost:8787";m(e),await A({headroomUrl:e}),$()},$=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),I=(0,l.useCallback)(async()=>{y(""),b(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await $()}catch(e){y(e.message)}finally{b(!1)}},[$]),M=(0,l.useCallback)(async()=>{b(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await $()}finally{b(!1)}},[$]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),c(!!a.headroomEnabled),m(a.headroomUrl||"http://localhost:8787"),v(!!a.cavemanEnabled),k(a.cavemanLevel||"full"),C(!!a.ponytailEnabled),E(a.ponytailLevel||"full"),$()}}catch{}})()},[$]);let z=!!x.running,D=x.loading?"Checking…":z?"Running":!1===x.localUrl||x.installed?!1!==x.localUrl?"Stopped":"External":"Not installed",F=!1!==x.localUrl,W=!!x.canStart,B=F&&!!x.managedPid;return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(r.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,s.jsxs)(r.Zp,{id:"rtk",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,s.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,s.jsx)(r.lM,{checked:e,onChange:()=>O(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,s.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${z?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:D}),(0,s.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:z?"Manage":"Setup"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,s.jsx)(r.lM,{checked:a&&z,disabled:!z,onChange:()=>{var e;let t;return e=!a,void(m(t=d.trim()||"http://localhost:8787"),c(e),A({headroomEnabled:e,headroomUrl:t}))}})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,s.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[j&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:_.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;k(t=e.id),A({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,s.jsx)("p",{className:"text-xs text-primary",children:o.ev.find(e=>e.id===N)?.desc})]}),(0,s.jsx)(r.lM,{checked:j,onChange:()=>{var e;v(e=!j),A({cavemanEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,s.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[w&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:o.Nv.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;E(t=e.id),A({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,s.jsx)("p",{className:"text-xs text-primary",children:o.Nv.find(e=>e.id===S)?.desc})]}),(0,s.jsx)(r.lM,{checked:w,onChange:()=>{var e;C(e=!w),A({ponytailEnabled:e})}})]})]})]}),(0,s.jsx)(r.aF,{isOpen:p,title:z?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsx)("span",{className:z?"text-success":"text-warning",children:D})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,s.jsx)(r.pd,{value:d,onChange:e=>m(e.target.value),onBlur:R,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),B?(0,s.jsx)(r.$n,{onClick:M,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):z?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):W?(0,s.jsx)(r.$n,{onClick:I,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):F?x.python?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,s.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>P('pip install "headroom-ai[proxy]"'),children:T?"Copied":"Copy"})]})]}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),g&&(0,s.jsx)("p",{className:"text-sm text-warning",children:g}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>$(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,a)=>{Promise.resolve().then(a.bind(a,61203))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(5214),n(2451),n(53887)},32930:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},41112:(e,t,n)=>{"use strict";function r({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return d}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let o="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return o?new o:new s}function i(e){return o?o.bind(e):s.bind(e)}function d(){return o?o.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),a=n(12115),s=n(41112);function o(e){return{default:e&&"default"in e?e.default:e}}n(21957);let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},n=(0,a.lazy)(()=>t.loader().then(o)),i=t.loading;function d(e){let o=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:o}:{},children:c})}return d.displayName="LoadableComponent",d}},69472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(95155),a=n(12115),s=n(35497),o=n(11059),l=n(75707);let i=n.n(l)()(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),d=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],c={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function u(){let[e,t]=(0,a.useState)({}),[n,l]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),b=(e,n)=>t(t=>({...t,[e]:n})),h=e=>l(t=>{let n={};return d.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),y=async e=>{let t=d.find(t=>t.id===e);g(`load-${e}`,!0);try{let n=await fetch(`/api/translator/load?file=${t.file}`),r=await n.json();r.success?(b(e,r.content),1===e&&await j(r.content)):alert(r.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),r=await n.json();r.success&&x(r.result)}catch{}},_=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),v=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);_("1_req_client.json",t),_("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:n.body||n},null,2));let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:n})}),a=await r.json();if(!a.success)return void alert(a.error);let s=JSON.stringify(a.result.body,null,2);b(3,s),h(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},O=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);_("3_req_openai.json",t);let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...n,provider:m?.provider,model:m?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let s={...a.result,provider:m?.provider,model:m?.model};b(4,JSON.stringify(s,null,2)),h(4)}catch(e){alert(e.message)}g("toTarget",!1)},S=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);_("4_req_target.json",t);let r=n.provider||m?.provider,a=n.model||m?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let s=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!s.ok){let e=await s.json().catch(()=>({error:s.statusText}));alert(e.error||"Send failed");return}let o=s.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await o.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),h(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:w}=(0,o.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(s.zY,{title:"Translator",description:"Inspect format conversion between clients and providers",icon:"translate"}),m&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,r.jsx)(p,{label:"src",value:m.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(p,{label:"dst",value:m.targetFormat,color:"orange"}),(0,r.jsx)(p,{label:"provider",value:m.provider,color:"green"}),(0,r.jsx)(p,{label:"model",value:m.model,color:"purple"})]}),d.map(t=>{var a;let o=1===(a=t.id)?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toOpenAI,onClick:v,children:"→ OpenAI"}):3===a?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toTarget,onClick:O,children:"→ Target"}):4===a?(0,r.jsx)(s.$n,{size:"sm",icon:"send",loading:u.send,onClick:S,children:"Send"}):null,d=!!n[t.id],p=e[t.id]||"";return(0,r.jsx)(s.Zp,{children:(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>{let e;return e=t.id,l(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:d?"expand_more":"chevron_right"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,r.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),p&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",p.length," chars)"]})]}),!d&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id)}),o]})]}),d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(i,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:p,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:c})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id),children:"Load"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);b(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),o]})]})]})},t.id)})]})}function p({label:e,value:t,color:n}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[n]}`,children:[(0,r.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(73623)._(n(68635));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[2574,3862,3807,1321,705,5497,8441,3794,7358],()=>e(e.s=32930)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(5214),n(2451),n(53887)},32930:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},41112:(e,t,n)=>{"use strict";function r({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return d}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let o="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return o?new o:new s}function i(e){return o?o.bind(e):s.bind(e)}function d(){return o?o.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),a=n(12115),s=n(41112);function o(e){return{default:e&&"default"in e?e.default:e}}n(21957);let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},n=(0,a.lazy)(()=>t.loader().then(o)),i=t.loading;function d(e){let o=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:o}:{},children:c})}return d.displayName="LoadableComponent",d}},69472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(95155),a=n(12115),s=n(35497),o=n(11059),l=n(75707);let i=n.n(l)()(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),d=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],c={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function u(){let[e,t]=(0,a.useState)({}),[n,l]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),b=(e,n)=>t(t=>({...t,[e]:n})),h=e=>l(t=>{let n={};return d.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),y=async e=>{let t=d.find(t=>t.id===e);g(`load-${e}`,!0);try{let n=await fetch(`/api/translator/load?file=${t.file}`),r=await n.json();r.success?(b(e,r.content),1===e&&await j(r.content)):alert(r.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),r=await n.json();r.success&&x(r.result)}catch{}},_=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),v=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);_("1_req_client.json",t),_("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:n.body||n},null,2));let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:n})}),a=await r.json();if(!a.success)return void alert(a.error);let s=JSON.stringify(a.result.body,null,2);b(3,s),h(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},O=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);_("3_req_openai.json",t);let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...n,provider:m?.provider,model:m?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let s={...a.result,provider:m?.provider,model:m?.model};b(4,JSON.stringify(s,null,2)),h(4)}catch(e){alert(e.message)}g("toTarget",!1)},S=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);_("4_req_target.json",t);let r=n.provider||m?.provider,a=n.model||m?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let s=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!s.ok){let e=await s.json().catch(()=>({error:s.statusText}));alert(e.error||"Send failed");return}let o=s.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await o.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),h(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:w}=(0,o.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(s.zY,{title:"Translator",description:"Inspect format conversion between clients and providers",icon:"translate"}),m&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,r.jsx)(p,{label:"src",value:m.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(p,{label:"dst",value:m.targetFormat,color:"orange"}),(0,r.jsx)(p,{label:"provider",value:m.provider,color:"green"}),(0,r.jsx)(p,{label:"model",value:m.model,color:"purple"})]}),d.map(t=>{var a;let o=1===(a=t.id)?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toOpenAI,onClick:v,children:"→ OpenAI"}):3===a?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toTarget,onClick:O,children:"→ Target"}):4===a?(0,r.jsx)(s.$n,{size:"sm",icon:"send",loading:u.send,onClick:S,children:"Send"}):null,d=!!n[t.id],p=e[t.id]||"";return(0,r.jsx)(s.Zp,{children:(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>{let e;return e=t.id,l(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:d?"expand_more":"chevron_right"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,r.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),p&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",p.length," chars)"]})]}),!d&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id)}),o]})]}),d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(i,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:p,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:c})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id),children:"Load"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);b(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),o]})]})]})},t.id)})]})}function p({label:e,value:t,color:n}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[n]}`,children:[(0,r.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(73623)._(n(68635));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=32930)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{37925:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>e_});var r=s(95155),a=s(12115),l=s(73321),n=s(35497),i=s(84588),o=s(92542),c=s(31474);function d({isOpen:e,onClose:t,title:s,children:l,width:n="md",className:i}){let o={sm:"w-[400px]",md:"w-[500px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-full"};return((0,a.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,a.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:(0,c.cn)("absolute right-0 top-0 h-full bg-surface flex flex-col","shadow-[var(--shadow-elev)]","slide-in-right","border-l border-border-subtle",o[n]||o.md,i),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border-subtle flex-shrink-0",children:[(0,r.jsx)("div",{className:"flex items-center gap-3",children:s&&(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})}),(0,r.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:l})]})]}):null}function m({currentPage:e,pageSize:t,totalItems:s,onPageChange:a,onPageSizeChange:l,className:n}){let i=Math.ceil(s/t),d=s>0?(e-1)*t+1:0,x=Math.min(e*t,s),u=(()=>{let t=[],s=Math.max(1,e-2),r=Math.min(i,s+5-1);r-s+1<5&&(s=Math.max(1,r-5+1));for(let e=s;e<=r;e++)t.push(e);return t})();return(0,r.jsxs)("div",{className:(0,c.cn)("flex flex-col sm:flex-row items-center justify-between gap-4 py-4 px-2",n),children:[s>0&&(0,r.jsxs)("div",{className:"text-sm text-text-muted",children:["Showing ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:d})," to"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:x})," of"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[l&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,r.jsx)("select",{value:t,onChange:e=>l(Number(e.target.value)),className:(0,c.cn)("h-9 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","cursor-pointer"),style:{colorScheme:"auto"},children:[10,20,50].map(e=>(0,r.jsx)("option",{value:e,children:e},e))})]}),i>1&&(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>a(e-1),disabled:1===e,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),u[0]>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default,{variant:"ghost",size:"sm",onClick:()=>a(1),className:"w-9 px-0 hidden sm:inline-flex",children:"1"}),u[0]>2&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."})]}),u.map(t=>(0,r.jsx)(o.default,{variant:e===t?"primary":"ghost",size:"sm",onClick:()=>a(t),className:(0,c.cn)("w-9 px-0",e===t?"inline-flex":"hidden sm:inline-flex"),children:t},t)),u[u.length-1]<i&&(0,r.jsxs)(r.Fragment,{children:[u[u.length-1]<i-1&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."}),(0,r.jsx)(o.default,{variant:"ghost",size:"sm",onClick:()=>a(i),className:"w-9 px-0 hidden sm:inline-flex",children:i})]}),(0,r.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>a(e+1),disabled:e===i,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})]})]})}var x=s(88105);let u=null,p=null;async function h(){if(u&&p)return{providerNameCache:u,providerNodesCache:p};let e=await fetch("/api/provider-nodes"),t=(await e.json()).nodes||[];for(let e of(p={},t))p[e.id]=e.name;return{providerNameCache:u={...x.Q2,...p},providerNodesCache:p}}function f(e,t){if(!e||!t)return e;let s=t[e];if("string"==typeof s)return s;if(s?.name)return s.name;let r=(0,x.zt)(e)||x.Q2[e];return r?.name||e}function g({title:e,children:t,defaultOpen:s=!1,icon:l=null}){let[n,i]=(0,a.useState)(s);return(0,r.jsxs)("div",{className:"border border-border-subtle rounded-lg overflow-hidden",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"w-full flex items-center justify-between p-3 bg-surface-2 hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:l}),(0,r.jsx)("span",{className:"font-semibold text-sm text-text-main",children:e})]}),(0,r.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[20px] text-text-muted transition-transform duration-200",n?"rotate-90":""),children:"chevron_right"})]}),n&&(0,r.jsx)("div",{className:"p-4 border-t border-border-subtle",children:t})]})}function j(e){return e?.cached_tokens||e?.cache_read_input_tokens||0}function b(e){return e?.cache_creation_input_tokens||0}function v(e){let t=e?.prompt_tokens||e?.input_tokens||0,s=j(e);return t<s?s:t}function y(){let[e,t]=(0,a.useState)([]),[s,l]=(0,a.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[n,x]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),[y,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)([]),[C,S]=(0,a.useState)(null),[T,M]=(0,a.useState)({provider:"",startDate:"",endDate:""}),q=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/usage/providers"),t=await e.json();k(t.providers||[]);let s=await h();S(s.providerNameCache)}catch(e){console.error("Failed to fetch providers:",e)}},[]),R=(0,a.useCallback)(async()=>{x(!0);try{let e=new URLSearchParams({page:s.page.toString(),pageSize:s.pageSize.toString()});T.provider&&e.append("provider",T.provider),T.startDate&&e.append("startDate",T.startDate),T.endDate&&e.append("endDate",T.endDate);let r=await fetch(`/api/usage/request-details?${e}`),a=await r.json();t(a.details||[]),l(e=>({...e,...a.pagination}))}catch(e){console.error("Failed to fetch request details:",e)}finally{x(!1)}},[s.page,s.pageSize,T]);return(0,a.useEffect)(()=>{q()},[q]),(0,a.useEffect)(()=>{R()},[R]),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,r.jsx)(i.default,{padding:"md",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"provider-filter",className:"text-sm font-medium text-text-main",children:"Provider"}),(0,r.jsxs)("select",{id:"provider-filter",value:T.provider,onChange:e=>M({...T,provider:e.target.value}),className:(0,c.cn)("h-9 px-3 rounded-lg border border-border bg-surface-2","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","w-full min-w-0 cursor-pointer"),style:{colorScheme:"auto"},children:[(0,r.jsx)("option",{value:"",children:"All Providers"}),w.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"start-date-filter",className:"text-sm font-medium text-text-main",children:"Start Date"}),(0,r.jsx)("input",{id:"start-date-filter",type:"datetime-local",value:T.startDate,onChange:e=>M({...T,startDate:e.target.value}),className:(0,c.cn)("h-9 px-3 rounded-lg border border-border bg-surface-2","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"end-date-filter",className:"text-sm font-medium text-text-main",children:"End Date"}),(0,r.jsx)("input",{id:"end-date-filter",type:"datetime-local",value:T.endDate,onChange:e=>M({...T,endDate:e.target.value}),className:(0,c.cn)("h-9 px-3 rounded-lg border border-border bg-surface-2","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:col-span-2 lg:col-span-1",children:[(0,r.jsx)("span",{className:"hidden text-sm font-medium text-text-main opacity-0 lg:block","aria-hidden":"true",children:"Clear"}),(0,r.jsx)(o.default,{variant:"ghost",onClick:()=>{M({provider:"",startDate:"",endDate:""})},disabled:!T.provider&&!T.startDate&&!T.endDate,className:"w-full",children:"Clear Filters"})]})]})}),(0,r.jsxs)(i.default,{padding:"none",children:[(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[880px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Input Tokens"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Cached"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Cache Creation"}),(0,r.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Output Tokens"}),(0,r.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Latency"}),(0,r.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Action"})]})}),(0,r.jsx)("tbody",{children:n?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading..."]})})}):0===e.length?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:"No request details found"})}):e.map((e,t)=>(0,r.jsxs)("tr",{className:"border-b border-border-subtle last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,r.jsx)("td",{className:"max-w-[260px] truncate p-4 font-mono text-sm text-text-main",children:e.model}),(0,r.jsx)("td",{className:"max-w-[180px] truncate p-4 text-sm text-text-main",children:(0,r.jsx)("span",{className:"font-medium",children:f(e.provider,C)})}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:v(e.tokens).toLocaleString()}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:j(e.tokens)>0?j(e.tokens).toLocaleString():"—"}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:b(e.tokens)>0?b(e.tokens).toLocaleString():"—"}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:e.tokens?.completion_tokens?.toLocaleString()||0}),(0,r.jsx)("td",{className:"p-4 text-sm text-text-muted",children:(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsxs)("div",{children:["TTFT: ",(0,r.jsxs)("span",{className:"font-mono",children:[e.latency?.ttft||0,"ms"]})]}),(0,r.jsxs)("div",{children:["Total: ",(0,r.jsxs)("span",{className:"font-mono",children:[e.latency?.total||0,"ms"]})]})]})}),(0,r.jsx)("td",{className:"p-4 text-center",children:(0,r.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>{p(e),N(!0)},children:"Detail"})})]},`${e.id}-${t}`))})]})}),!n&&e.length>0&&(0,r.jsx)("div",{className:"border-t border-border-subtle",children:(0,r.jsx)(m,{currentPage:s.page,pageSize:s.pageSize,totalItems:s.totalItems,onPageChange:e=>{l(t=>({...t,page:e}))},onPageSizeChange:e=>{l(t=>({...t,pageSize:e,page:1}))}})})]}),(0,r.jsx)(d,{isOpen:y,onClose:()=>N(!1),title:"Request Details",width:"lg",children:u&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 text-sm sm:grid-cols-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"ID:"})," ",(0,r.jsx)("span",{className:"break-all font-mono text-text-main",children:u.id})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Timestamp:"})," ",(0,r.jsx)("span",{className:"text-text-main",children:new Date(u.timestamp).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Provider:"})," ",(0,r.jsx)("span",{className:"text-text-main font-medium",children:f(u.provider,C)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Model:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:u.model})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,r.jsx)("span",{className:(0,c.cn)("font-medium","success"===u.status?"text-green-600":"text-red-600"),children:u.status})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Latency:"})," ",(0,r.jsxs)("span",{className:"text-text-main font-mono",children:["TTFT ",u.latency?.ttft||0,"ms / Total ",u.latency?.total||0,"ms"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Input Tokens:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:v(u.tokens).toLocaleString()})]}),j(u.tokens)>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Cached Tokens:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:j(u.tokens).toLocaleString()})]}),b(u.tokens)>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Cache Creation:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:b(u.tokens).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Output Tokens:"})," ",(0,r.jsx)("span",{className:"text-text-main font-mono",children:u.tokens?.completion_tokens?.toLocaleString()||0})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(g,{title:"1. Client Request (Input)",defaultOpen:!0,icon:"input",children:(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:JSON.stringify(u.request,null,2)})}),u.providerRequest&&(0,r.jsx)(g,{title:"2. Provider Request (Translated)",icon:"translate",children:(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:JSON.stringify(u.providerRequest,null,2)})}),u.providerResponse&&(0,r.jsx)(g,{title:"3. Provider Response (Raw)",icon:"data_object",children:(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:"object"==typeof u.providerResponse?JSON.stringify(u.providerResponse,null,2):u.providerResponse})}),(0,r.jsxs)(g,{title:"4. Client Response (Final)",defaultOpen:!0,icon:"output",children:[u.response?.thinking&&(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h4",{className:"font-semibold text-text-main mb-2 flex items-center gap-2 text-xs uppercase tracking-wide opacity-70",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"psychology"}),"Thinking Process"]}),(0,r.jsx)("pre",{className:"max-h-[200px] max-w-full overflow-auto rounded-lg border border-amber-200 bg-amber-50 p-3 font-mono text-xs text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-100 sm:p-4",children:u.response.thinking})]}),(0,r.jsx)("h4",{className:"font-semibold text-text-main mb-2 text-xs uppercase tracking-wide opacity-70",children:"Content"}),(0,r.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-surface-2 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/0 sm:p-4",children:u.response?.content||"[No content]"})]})]})]})})]})}var N=s(14051),w=s.n(N),k=s(81750),C=s(6793);function S({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,c]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(k.h7,{type:"target",position:C.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"target",position:C.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"target",position:C.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"target",position:C.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>c(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function T({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(k.h7,{type:"source",position:C.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"source",position:C.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"source",position:C.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(k.h7,{type:"source",position:C.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"ExtremeRouter",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"ExtremeRouter"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(53255),S.propTypes={data:w().object.isRequired},T.propTypes={data:w().object.isRequired};let M={provider:S,router:T};function q({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let n=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),i=s?.toLowerCase()||"",o=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(n?n.split(","):[]),[n]),d=(0,a.useMemo)(()=>new Set(i?[i]:[]),[i]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),u=(0,a.useRef)({}),[p,h]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=u.current,t=Date.now();for(let s of c)e[s]||(e[s]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,a.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let f=(0,a.useMemo)(()=>{let e=Date.now(),t=new Set;for(let s of c){let r=u.current[s];(!r||e-r<6e4)&&t.add(s)}return t},[c,p]),{nodes:g,edges:j}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),n=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let i=[],o=[];return i.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var d,m;let u,p,h=(d=e.provider,x.Q2[d]||{color:"#6b7280",name:d}),f=t.has(e.provider?.toLowerCase()),g=!f&&s.has(e.provider?.toLowerCase()),j=!f&&r.has(e.provider?.toLowerCase()),b=`provider-${e.provider}`,v={label:(h.name!==e.provider?h.name:null)||e.nodeName||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(m=e.provider,`/providers/${m}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:f},y=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(y),w=n*Math.sin(y);Math.abs(y+Math.PI/2)<Math.PI/4||Math.abs(y-3*Math.PI/2)<Math.PI/4?(u="top",p="bottom"):Math.abs(y-Math.PI/2)<Math.PI/4?(u="bottom",p="top"):N>0?(u="right",p="left"):(u="left",p="right"),i.push({id:b,type:"provider",position:{x:N-90,y:w-15},data:v,draggable:!1}),o.push({id:`e-${b}`,source:"router",sourceHandle:u,target:b,targetHandle:p,animated:f,style:(h.color,j?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:f?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:g?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:i,edges:o}})(e,f,d,m),[e,f,i,o]),b=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,a.useRef)(null),y=(0,a.useRef)(null),N={padding:.2,duration:200},w=(0,a.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(N),50)},[]);return(0,a.useEffect)(()=>{let e=y.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(N)});return t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(N),50);return()=>clearTimeout(e)}},[g.length]),(0,r.jsx)("div",{ref:y,className:"h-[320px] w-full min-w-0 rounded-lg border border-border bg-bg-subtle/30 sm:h-[480px]",children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(k.Gc,{nodes:g,edges:j,nodeTypes:M,fitView:!0,fitViewOptions:N,minZoom:.1,maxZoom:2,onInit:w,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,r.jsx)(k.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},b)})}q.propTypes={providers:w().arrayOf(w().shape({id:w().string,provider:w().string,name:w().string})),activeRequests:w().arrayOf(w().shape({provider:w().string,model:w().string,account:w().string})),lastProvider:w().string,errorProvider:w().string};var R=s(21742),O=s(90639),L=s(59656),$=s(97779);let z={primary:"var(--color-primary)",info:"var(--color-info)",success:"var(--color-success)",warning:"var(--color-warning)",danger:"var(--color-danger)",cyan:"var(--color-cyan)"};function D({data:e=[],color:t="primary",height:s=36,className:a=""}){if(!e||0===e.length)return(0,r.jsx)("div",{style:{height:s},className:a,"aria-hidden":!0});let l=e.map((e,t)=>({i:t,v:Number(e)||0})),n=z[t]||z.primary,i=`spark-${t}`,o=function(e){let t=e.replace(/^var\(--(.*)\)$/,"$1");try{return getComputedStyle(document.documentElement).getPropertyValue(`--${t}`).trim()||e}catch{return e}}(n);return(0,r.jsx)("div",{className:a,style:{height:s,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:l,margin:{top:2,right:0,bottom:0,left:0},children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:i,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:o,stopOpacity:.35}),(0,r.jsx)("stop",{offset:"100%",stopColor:o,stopOpacity:0})]})}),(0,r.jsx)(L.h,{hide:!0,domain:["dataMin","dataMax"]}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:"v",stroke:o,strokeWidth:1.5,fill:`url(#${i})`,isAnimationActive:!1,dot:!1})]})})})}function E(e){return new Intl.NumberFormat().format(e||0)}function K(e){return`$${(e||0).toFixed(2)}`}function P(e){let t=Number(e||0);return t>=1e3?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}D.propTypes={data:w().arrayOf(w().number),color:w().oneOf(["primary","info","success","warning","danger","cyan"]),height:w().number,className:w().string};let _=(e,t)=>(e||[]).map(e=>Number(e?.[t])||0),I={primary:"bg-primary/12 text-primary ring-1 ring-primary/20",info:"bg-info/12 text-info ring-1 ring-info/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},A={primary:"text-primary",info:"text-info",success:"text-success",warning:"text-warning",cyan:"text-cyan"};function F({icon:e,color:t,label:s,value:a,sublabel:l,spark:n}){return(0,r.jsxs)(i.default,{padding:"sm",className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("span",{className:`flex size-9 shrink-0 items-center justify-center rounded-brand ${I[t]||I.primary}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e})}),(0,r.jsx)("span",{className:"truncate text-xs font-medium uppercase tracking-wide text-text-muted",children:s})]}),(0,r.jsx)("div",{className:"flex min-w-0 items-baseline gap-1",children:(0,r.jsx)("span",{className:`truncate text-2xl font-bold tracking-tight ${A[t]||A.primary}`,children:a})}),(0,r.jsx)(D,{data:n,color:t,height:32,className:"-mb-1"}),l&&(0,r.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:l})]})}function U({stats:e}){let t=e?.last10Minutes||[];return(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-2 gap-3 lg:grid-cols-5 lg:gap-4",children:[(0,r.jsx)(F,{icon:"bolt",color:"primary",label:"Total Requests",value:E(e?.totalRequests),spark:_(t,"requests")}),(0,r.jsx)(F,{icon:"input",color:"info",label:"Input Tokens",value:E(e?.totalPromptTokens),spark:_(t,"promptTokens")}),(0,r.jsx)(F,{icon:"output",color:"success",label:"Output Tokens",value:E(e?.totalCompletionTokens),spark:_(t,"completionTokens")}),(0,r.jsx)(F,{icon:"cached",color:"cyan",label:"Cache Saved",value:E(e?.totalCachedTokens),spark:t.length?t.map((s,r)=>r===t.length-1&&Number(e?.totalCachedTokens)||0):[Number(e?.totalCachedTokens)||0]}),(0,r.jsx)(F,{icon:"payments",color:"warning",label:"Est. Cost",value:`~${K(e?.totalCost)}`,sublabel:"Estimated, not actual billing",spark:_(t,"cost")})]})}F.propTypes={icon:w().string.isRequired,color:w().string.isRequired,label:w().string.isRequired,value:w().string.isRequired,sublabel:w().string,spark:w().arrayOf(w().number)},U.propTypes={stats:w().object.isRequired};var W=s(56061);function Q({req:e}){let t=!e.status||"ok"===e.status||"success"===e.status,s=e.model||"unknown",a=e.provider||"—",l=Number(e.promptTokens)||0,n=Number(e.completionTokens)||0;return(0,r.jsxs)("div",{className:"flex shrink-0 flex-col gap-1 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:`size-1.5 shrink-0 rounded-full ${t?"bg-success":"bg-danger"}`,title:t?"OK":"Error"}),(0,r.jsx)("span",{className:"max-w-[140px] truncate font-mono text-xs font-medium text-text-main",title:s,children:s})]}),(0,r.jsx)("div",{className:"flex items-center gap-1.5 text-[11px] text-text-muted",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",className:"!px-1.5",children:a})}),(0,r.jsxs)("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[(0,r.jsxs)("span",{className:"text-primary",children:[l.toLocaleString(),"↑"]}),(0,r.jsxs)("span",{className:"text-success",children:[n.toLocaleString(),"↓"]}),(0,r.jsx)("span",{className:"ml-auto whitespace-nowrap text-text-muted",children:function(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}(e.timestamp)})]})]})}function G({stats:e}){!function(e=3e4){let[,t]=(0,a.useState)(0);(0,a.useEffect)(()=>{let s=setInterval(()=>t(e=>e+1),e);return()=>clearInterval(s)},[e])}();let t=e?.activeRequests||[],s=(e?.recentRequests||[]).slice(0,10),l=t.reduce((e,t)=>e+(Number(t.count)||1),0)||t.length;return(0,r.jsxs)(i.default,{padding:"sm",className:"flex min-w-0 flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"relative flex size-2.5",children:[l>0&&(0,r.jsx)("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-success opacity-60"}),(0,r.jsx)("span",{className:`relative inline-flex size-2.5 rounded-full ${l>0?"bg-success":"bg-text-subtle"}`})]}),(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:l>0?`${l} active`:"No active requests"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"\xb7 recent activity"})]}),0===s.length?(0,r.jsx)("div",{className:"flex items-center justify-center py-3 text-sm text-text-muted",children:"No recent activity"}):(0,r.jsx)("div",{className:"-mx-1 flex gap-2 overflow-x-auto px-1 pb-1",children:s.map((e,t)=>(0,r.jsx)(Q,{req:e},`${e.timestamp}-${t}`))})]})}Q.propTypes={req:w().shape({status:w().string,model:w().string,provider:w().string,promptTokens:w().number,completionTokens:w().number,timestamp:w().oneOfType([w().string,w().number])}).isRequired},G.propTypes={stats:w().object};let J={primary:"var(--color-primary)",info:"var(--color-info)",success:"var(--color-success)",warning:"var(--color-warning)",danger:"var(--color-danger)",cyan:"var(--color-cyan)",muted:"var(--color-surface-3)"};function V({segments:e=[],size:t=140,thickness:s=14,centerLabel:a,centerValue:l,className:n=""}){let i=e.reduce((e,t)=>e+(Number(t.value)||0),0),o=(t-s)/2,c=2*Math.PI*o,d=t/2,m=t/2,x=0,u=e.map((e,t)=>{let s=Number(e.value)||0,r=(i>0?s/i:0)*c,a={key:t,color:J[e.color]||e.color||J.muted,dash:r,gap:c-r,offset:-x};return x+=r,a});return(0,r.jsxs)("div",{className:`relative inline-flex items-center justify-center ${n}`,style:{width:t,height:t},children:[(0,r.jsxs)("svg",{width:t,height:t,className:"-rotate-90",children:[(0,r.jsx)("circle",{cx:d,cy:m,r:o,fill:"none",stroke:"var(--color-surface-2)",strokeWidth:s}),i>0&&u.map(e=>(0,r.jsx)("circle",{cx:d,cy:m,r:o,fill:"none",stroke:e.color,strokeWidth:s,strokeDasharray:`${e.dash} ${e.gap}`,strokeDashoffset:e.offset,strokeLinecap:"butt",style:{transition:"stroke-dasharray 0.4s ease, stroke-dashoffset 0.4s ease"}},e.key))]}),(void 0!==l||a)&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[void 0!==l&&(0,r.jsx)("span",{className:"text-xl font-bold text-text-main leading-none",children:l}),a&&(0,r.jsx)("span",{className:"mt-0.5 text-[10px] uppercase tracking-wide text-text-muted",children:a})]})]})}V.propTypes={segments:w().arrayOf(w().shape({value:w().number.isRequired,color:w().oneOf(["primary","info","success","warning","danger","cyan","muted"]),label:w().string})),size:w().number,thickness:w().number,centerLabel:w().string,centerValue:w().string,className:w().string};var X=s(99312);let Z=new Set(["error","errors","failed","failure","fail","timeout","5xx","4xx"]);function B({stats:e}){let{segments:t,okCount:s,errCount:l,total:n,ratePct:o}=(0,a.useMemo)(()=>{let t=e?.statusCounts||{},s=0,r=0;for(let[e,a]of Object.entries(t)){let t=Number(a)||0;Z.has(String(e).toLowerCase())?r+=t:s+=t}let a=s+r;return{segments:[{value:s,color:"success",label:"Success"},{value:r,color:"danger",label:"Error"}],okCount:s,errCount:r,total:a,ratePct:a>0?r/a*100:0}},[e]),c=e?.errorRate,d=null!=c?`${(100*c).toFixed(1)}%`:`${o.toFixed(1)}%`;return(0,r.jsx)(i.default,{title:"Success Rate",icon:"check_circle",className:"flex h-full min-w-0 flex-col",children:0===n?(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center py-6",children:(0,r.jsx)(X.default,{icon:"sentiment_neutral",title:"No requests yet",description:"Request outcomes will appear here once traffic flows through.",className:"border-0 p-0"})}):(0,r.jsxs)("div",{className:"flex flex-col items-center gap-5",children:[(0,r.jsx)(V,{segments:t,size:150,thickness:16,centerValue:d,centerLabel:"error rate"}),(0,r.jsxs)("div",{className:"grid w-full grid-cols-2 gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsx)("span",{className:"size-2.5 rounded-full bg-success"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted",children:"Success"}),(0,r.jsx)("div",{className:"truncate text-sm font-semibold text-text-main",children:E(s)})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsx)("span",{className:"size-2.5 rounded-full bg-danger"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted",children:"Errors"}),(0,r.jsx)("div",{className:"truncate text-sm font-semibold text-text-main",children:E(l)})]})]})]})]})})}B.propTypes={stats:w().object};var H=s(25086),Y=s(28408),ee=s(32539),et=s(34430);let es=["var(--color-primary)","var(--color-cyan)","var(--color-info)","var(--color-success)","var(--color-warning)","#f472b6","#34d399","#a78bfa","var(--color-danger)"];function er({active:e,payload:t,label:s,providerMeta:a}){if(!e||!t||!t.length)return null;let l=[...t].sort((e,t)=>(t.value||0)-(e.value||0)),n=l.reduce((e,t)=>e+(t.value||0),0);return(0,r.jsxs)("div",{className:"rounded-brand border border-border bg-panel p-2.5 text-xs shadow-[var(--shadow-elev)]",children:[(0,r.jsx)("div",{className:"mb-1 font-medium text-text-main",children:s}),(0,r.jsxs)("div",{className:"space-y-0.5",children:[l.map(e=>{let t=a?.[e.dataKey];return(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5 text-text-muted",children:[(0,r.jsx)("span",{className:"size-2 rounded-full",style:{backgroundColor:e.color}}),t?.name||e.dataKey]}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:(e.value||0).toLocaleString()})]},e.dataKey)}),(0,r.jsxs)("div",{className:"mt-1 flex items-center justify-between gap-3 border-t border-border-subtle pt-1 font-medium",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Total"}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:n.toLocaleString()})]})]})]})}function ea({data:e=[],providers:t=[],height:s=260}){if(!e||0===e.length||0===t.length)return(0,r.jsx)("div",{className:"flex items-center justify-center text-sm text-text-muted",style:{height:s},children:"No provider breakdown for this period"});let a={};return t.forEach((e,t)=>{a[e.id]={name:e.name||e.id,color:es[t%es.length]}}),(0,r.jsx)("div",{style:{height:s,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:e,margin:{top:8,right:8,bottom:0,left:-16},children:[(0,r.jsx)("defs",{children:t.map((e,t)=>{let s=es[t%es.length],a=`stack-grad-${t}`;return(0,r.jsxs)("linearGradient",{id:a,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:s,stopOpacity:.7}),(0,r.jsx)("stop",{offset:"100%",stopColor:s,stopOpacity:.15})]},a)})}),(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:48,tickFormatter:e=>e>=1e3?`${(e/1e3).toFixed(0)}k`:e}),(0,r.jsx)(et.m,{content:(0,r.jsx)(er,{providerMeta:a})}),t.map((e,t)=>(0,r.jsx)($.Gk,{type:"monotone",dataKey:e.id,name:e.name||e.id,stackId:"1",stroke:es[t%es.length],strokeWidth:1.5,fill:`url(#stack-grad-${t})`,isAnimationActive:!1},e.id))]})})})}function el(e,{initial:t=null,deps:s=[]}={}){let[r,l]=(0,a.useState)(t),[n,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)(null),d=(0,a.useRef)(0);return(0,a.useEffect)(()=>{let s,r;return s=++d.current,r=!1,fetch(e).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{r||d.current!==s||(l(e??t),c(null),i(!1))}).catch(e=>{r||d.current!==s||(l(t),c(e),i(!1))}),()=>{r=!0}},[e,...s]),{data:r,loading:n,error:o}}function en({period:e}){let{data:t,loading:s}=el(`/api/usage/chart?view=stacked&period=${e}`,{initial:null,deps:[e]}),l=(0,a.useMemo)(()=>Array.isArray(t)?t:[],[t]),n=(0,a.useMemo)(()=>(function(e){if(!e||0===e.length)return[];let t={};for(let s of e)for(let[e,r]of Object.entries(s))"label"!==e&&(t[e]=(t[e]||0)+(Number(r)||0));return Object.keys(t).sort((e,s)=>t[s]-t[e]).map(e=>({id:e,name:x.Q2[e]?.name||e}))})(l),[l]),o=l.length>0&&n.length>0;return(0,r.jsx)(i.default,{title:"Token Share by Provider",subtitle:"Stacked token volume per provider over the selected period",icon:"stacked_bar_chart",children:s?(0,r.jsx)(H.CardSkeleton,{}):o?(0,r.jsx)(ea,{data:l,providers:n,height:280}):(0,r.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,r.jsx)(X.default,{icon:"stacked_bar_chart",title:"No provider breakdown",description:"No token volume recorded for this period yet.",className:"border-0 p-0"})})})}function ei({active:e,payload:t,label:s}){if(!e||!t||!t.length)return null;let a=t[0]?.payload||{};return(0,r.jsxs)("div",{className:"rounded-brand border border-border bg-panel p-2.5 text-xs shadow-[var(--shadow-elev)]",children:[(0,r.jsx)("div",{className:"mb-1 font-medium text-text-main",children:s}),(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"p95"}),(0,r.jsxs)("span",{className:"font-mono text-text-main",children:[(a.p95Ms||0).toLocaleString()," ms"]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"avg"}),(0,r.jsxs)("span",{className:"font-mono text-text-main",children:[(a.avgMs||0).toLocaleString()," ms"]})]}),a.samples>0&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4 border-t border-border-subtle pt-1 text-text-subtle",children:[(0,r.jsx)("span",{children:"samples"}),(0,r.jsx)("span",{className:"font-mono",children:a.samples})]})]})]})}function eo({data:e=[],height:t=220}){return e&&0!==e.length?(0,r.jsx)("div",{style:{height:t,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:e,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"lat-p95",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"var(--color-cyan)",stopOpacity:.4}),(0,r.jsx)("stop",{offset:"100%",stopColor:"var(--color-cyan)",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"lat-avg",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"var(--color-primary)",stopOpacity:.3}),(0,r.jsx)("stop",{offset:"100%",stopColor:"var(--color-primary)",stopOpacity:0})]})]}),(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:44,tickFormatter:e=>e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}),(0,r.jsx)(et.m,{content:(0,r.jsx)(ei,{})}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:"p95Ms",name:"p95",stroke:"var(--color-cyan)",strokeWidth:1.5,fill:"url(#lat-p95)",isAnimationActive:!1}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:"avgMs",name:"avg",stroke:"var(--color-primary)",strokeWidth:1.5,fill:"url(#lat-avg)",isAnimationActive:!1})]})})}):(0,r.jsx)("div",{className:"flex items-center justify-center text-sm text-text-muted",style:{height:t},children:"No latency data for this period"})}function ec({period:e,stats:t}){let{data:s,loading:l}=el(`/api/usage/chart?view=latency&period=${e}`,{initial:null,deps:[e]}),n=(0,a.useMemo)(()=>Array.isArray(s)?s:[],[s]),o=(0,a.useMemo)(()=>{if(t?.latency&&(null!=t.latency.avg||null!=t.latency.p95))return{avg:t.latency.avg,p50:t.latency.p50,p95:t.latency.p95,samples:t.latency.sampleCount};let e=n.length?n[n.length-1]:null;return e?{avg:e.avgMs,p50:null,p95:e.p95Ms,samples:e.samples}:null},[t,n]),c=n.length>0;return(0,r.jsx)(i.default,{title:"Latency (avg vs p95)",subtitle:"Response time distribution over the selected period",icon:"timer",children:l?(0,r.jsx)(H.CardSkeleton,{}):c?(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsxs)("div",{className:"mb-4 grid grid-cols-2 gap-2 sm:grid-cols-4",children:[(0,r.jsx)(ed,{label:"Avg",value:null!=o.avg?P(o.avg):"—"}),(0,r.jsx)(ed,{label:"p50",value:null!=o.p50?P(o.p50):"—"}),(0,r.jsx)(ed,{label:"p95",value:null!=o.p95?P(o.p95):"—",accent:!0}),(0,r.jsx)(ed,{label:"Samples",value:null!=o.samples?E(o.samples):"—"})]}),(0,r.jsx)(eo,{data:n,height:240})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,r.jsx)(X.default,{icon:"timer",title:"No latency data",description:"Latency samples will appear here once requests complete.",className:"border-0 p-0"})})})}function ed({label:e,value:t,accent:s=!1}){return(0,r.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted",children:e}),(0,r.jsx)("div",{className:`truncate text-sm font-semibold ${s?"text-cyan":"text-text-main"}`,children:t})]})}ea.propTypes={data:w().arrayOf(w().object),providers:w().arrayOf(w().shape({id:w().string,name:w().string})),height:w().number},en.propTypes={period:w().string},eo.propTypes={data:w().arrayOf(w().object),height:w().number},ed.propTypes={label:w().string.isRequired,value:w().string.isRequired,accent:w().bool},ec.propTypes={period:w().string,stats:w().object};var em=s(28067);let ex=e=>new Intl.NumberFormat().format(e||0),eu=e=>`$${(e||0).toFixed(2)}`;function ep(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function eh({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function ef({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":ex(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedTokens?ex(e.cachedTokens):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":ex(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:ex(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":eu(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedCost?eu(e.cachedCost):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":eu(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:eu(e.totalCost||e.cost)})]})}function eg({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:o,onToggleSort:c,viewMode:d,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:p}){let[h,f]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&f(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let g=(0,a.useCallback)(e=>{f(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),j=(0,a.useMemo)(()=>"tokens"===d?[{field:"promptTokens",label:"Input Tokens"},{field:"cachedTokens",label:"Cached"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"cachedCost",label:"Cached Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[d]),b=t.length+j.length;return(0,r.jsxs)(i.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>c(l,e.field),children:[e.label," ",(0,r.jsx)(eh,{field:e.field,currentSort:n,currentOrder:o})]},e.field)),j.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>c(l,e.field),children:[e.label," ",(0,r.jsx)(eh,{field:e.field,currentSort:n,currentOrder:o})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>g(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(ef,{item:e.summary,viewMode:d,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(ef,{item:e,viewMode:d})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:b,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}eh.propTypes={field:w().string.isRequired,currentSort:w().string.isRequired,currentOrder:w().string.isRequired},ef.propTypes={item:w().object.isRequired,viewMode:w().string.isRequired,isSummary:w().bool},eg.propTypes={title:w().string.isRequired,columns:w().arrayOf(w().shape({field:w().string.isRequired,label:w().string.isRequired,align:w().string})).isRequired,groupedData:w().array.isRequired,tableType:w().string.isRequired,sortBy:w().string.isRequired,sortOrder:w().string.isRequired,onToggleSort:w().func.isRequired,viewMode:w().string.isRequired,storageKey:w().string.isRequired,renderDetailCells:w().func.isRequired,renderSummaryCells:w().func.isRequired,emptyMessage:w().string.isRequired};let ej=[{value:"byModel",label:"Model",groupKey:"rawModel",storageKey:"ov-models"},{value:"byAccount",label:"Account",groupKey:"accountName",storageKey:"ov-accounts"},{value:"byApiKey",label:"API Key",groupKey:"keyName",storageKey:"ov-apikeys"},{value:"byEndpoint",label:"Endpoint",groupKey:"endpoint",storageKey:"ov-endpoints"}],eb=[{value:"tokens",label:"Tokens"},{value:"costs",label:"Cost"}],ev={byModel:[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],byAccount:[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],byApiKey:[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],byEndpoint:[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}]},ey={byModel:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})},byAccount:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.accountName||(e.connectionId?`Account ${String(e.connectionId).slice(0,8)}…`:"Unknown")}),(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})},byApiKey:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName||"Unknown Key"}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})},byEndpoint:{detail:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-mono text-sm font-medium",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(W.default,{variant:"default",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.lastUsed)})]}),summary:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:ex(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right whitespace-nowrap text-text-muted",children:ep(e.summary.lastUsed)})]})}},eN={byModel:"No model usage recorded yet.",byAccount:"No account usage recorded yet.",byApiKey:"No API key usage recorded yet.",byEndpoint:"No endpoint usage recorded yet."};function ew({stats:e}){let[t,s]=(0,a.useState)("byModel"),[l,n]=(0,a.useState)("tokens"),[i,o]=(0,a.useState)("rawModel"),[c,d]=(0,a.useState)("asc"),m=ej.find(e=>e.value===t),x=(0,a.useMemo)(()=>{var s;return e&&m?function(e,t){if(!Array.isArray(e))return[];let s={};for(let r of e){let e=r[t]||`Unknown ${t}`;s[e]||(s[e]={groupKey:e,summary:{requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,totalTokens:0,cost:0,inputCost:0,cachedCost:0,outputCost:0,lastUsed:null},items:[]});let a=s[e].summary;a.requests+=r.requests||0,a.promptTokens+=r.promptTokens||0,a.completionTokens+=r.completionTokens||0,a.cachedTokens+=r.cachedTokens||0,a.totalTokens+=r.totalTokens||0,a.cost+=r.cost||0,a.inputCost+=r.inputCost||0,a.cachedCost+=r.cachedCost||0,a.outputCost+=r.outputCost||0,r.lastUsed&&(!a.lastUsed||new Date(r.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=r.lastUsed),s[e].items.push(r)}return Object.values(s)}((s=e[t],Object.entries(s||{}).map(([e,t])=>{let s=(t.promptTokens||0)+(t.completionTokens||0),r=t.cost||0,a=t.cachedTokens||0,l=Math.max(0,(t.promptTokens||0)-a),n=s>0?(t.completionTokens||0)*(r/s):0;return{...t,key:e,totalTokens:s,totalCost:r,inputCost:s>0?r/s*l:0,cachedCost:s>0?r/s*a:0,outputCost:n}}).sort((e,t)=>{let s=e[i],r=t[i];return("string"==typeof s&&(s=s.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),s<r)?"asc"===c?-1:1:s>r?"asc"===c?1:-1:0})),m.groupKey):[]},[e,t,m,i,c]),u=(0,a.useCallback)((e,t)=>{o(e=>e===t?(d(e=>"asc"===e?"desc":"asc"),e):(d("asc"),t))},[]),p=(0,a.useCallback)(e=>{s(e);let t=ej.find(t=>t.value===e);o(t?.groupKey||"rawModel"),d("asc")},[]),h=ey[t],f=ej.find(e=>e.value===t);return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)(em.default,{options:ej.map(e=>({value:e.value,label:e.label})),value:t,onChange:p,size:"sm",className:"overflow-x-auto"}),(0,r.jsx)(em.default,{options:eb,value:l,onChange:n,size:"sm"})]}),(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)(eg,{title:`Usage by ${f?.label||"Dimension"}`,columns:ev[t],groupedData:x,tableType:t,sortBy:i,sortOrder:c,onToggleSort:u,viewMode:l,storageKey:m?.storageKey||"ov-default",renderDetailCells:h.detail,renderSummaryCells:h.summary,emptyMessage:eN[t]})})]})}ew.propTypes={stats:w().object,period:w().string};var ek=s(48035),eC=s(46357);function eS({active:e,payload:t,label:s}){if(!e||!t||!t.length)return null;let a=t[0]?.payload||{},l=(a.ok||0)+(a.error||0),n=l>0?(a.error/l*100).toFixed(1):"0.0";return(0,r.jsxs)("div",{className:"rounded-brand border border-border bg-panel p-2.5 text-xs shadow-[var(--shadow-elev)]",children:[(0,r.jsx)("div",{className:"mb-1 font-medium text-text-main",children:s}),(0,r.jsxs)("div",{className:"space-y-0.5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5 text-text-muted",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-success"})," OK"]}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:(a.ok||0).toLocaleString()})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5 text-text-muted",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-danger"})," Error"]}),(0,r.jsx)("span",{className:"font-mono text-text-main",children:(a.error||0).toLocaleString()})]}),(0,r.jsxs)("div",{className:"mt-1 flex items-center justify-between gap-4 border-t border-border-subtle pt-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"error rate"}),(0,r.jsxs)("span",{className:"font-mono font-medium text-danger",children:[n,"%"]})]})]})]})}function eT({data:e=[],height:t=180}){return e&&0!==e.length?(0,r.jsx)("div",{style:{height:t,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(ek.E,{data:e,margin:{top:8,right:8,bottom:0,left:-16},children:[(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:32,allowDecimals:!1}),(0,r.jsx)(et.m,{content:(0,r.jsx)(eS,{}),cursor:{fill:"var(--color-surface-2)",opacity:.5}}),(0,r.jsx)(eC.yP,{dataKey:"ok",stackId:"a",name:"OK",fill:"var(--color-success)",fillOpacity:.6,radius:[0,0,0,0],isAnimationActive:!1}),(0,r.jsx)(eC.yP,{dataKey:"error",stackId:"a",name:"Error",fill:"var(--color-danger)",fillOpacity:.85,radius:[2,2,0,0],isAnimationActive:!1})]})})}):(0,r.jsx)("div",{className:"flex items-center justify-center text-sm text-text-muted",style:{height:t},children:"No request data for this period"})}function eM(e){let t=x.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}eT.propTypes={data:w().arrayOf(w().object),height:w().number};let eq=[{value:"tokens",label:"Tokens"},{value:"cost",label:"Cost"},{value:"latency",label:"Latency"},{value:"errors",label:"Errors"}];function eR({data:e,dataKey:t,color:s}){let a=`main-${t}`,l=`var(--color-${s})`;return e&&e.some(e=>(Number(e?.[t])||0)>0)?(0,r.jsx)("div",{style:{height:260,width:"100%"},children:(0,r.jsx)(R.u,{width:"100%",height:"100%",children:(0,r.jsxs)(O.Q,{data:e,margin:{top:8,right:8,bottom:0,left:-8},children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:a,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:l,stopOpacity:.3}),(0,r.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:0})]})}),(0,r.jsx)(Y.d,{strokeDasharray:"3 3",stroke:"var(--color-border)",strokeOpacity:.4,vertical:!1}),(0,r.jsx)(ee.W,{dataKey:"label",tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,minTickGap:16}),(0,r.jsx)(L.h,{tick:{fontSize:10,fill:"var(--color-text-muted)"},tickLine:!1,axisLine:!1,width:48,tickFormatter:e=>"cost"===t?K(e):e>=1e3?`${(e/1e3).toFixed(0)}k`:String(e)}),(0,r.jsx)(et.m,{contentStyle:{backgroundColor:"var(--color-panel)",border:"1px solid var(--color-border-subtle)",borderRadius:"10px",fontSize:"12px"},formatter:e=>"cost"===t?[K(e),"Cost"]:[E(e),"Tokens"]}),(0,r.jsx)($.Gk,{type:"monotone",dataKey:t,stroke:l,strokeWidth:2,fill:`url(#${a})`,dot:!1,isAnimationActive:!1})]})})}):(0,r.jsx)("div",{className:"flex h-[260px] items-center justify-center text-sm text-text-muted",children:"No data for this period"})}function eO({period:e}){let[t,s]=(0,a.useState)(null),[l,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)([]),[d,m]=(0,a.useState)("tokens"),{data:u,loading:p}=el(`/api/usage/chart?view=${d}&period=${e}`,{initial:null,deps:[d,e]}),h=(0,a.useRef)(!1),f=(0,a.useRef)(0);(0,a.useEffect)(()=>{let e=!1;return Promise.all([fetch("/api/providers").then(e=>e.ok?e.json():null).catch(()=>null),fetch("/api/provider-nodes").then(e=>e.ok?e.json():null).catch(()=>null)]).then(([t,s])=>{if(e)return;let r={};for(let e of s?.nodes||[])r[e.id]=e.name;let a=new Set;c([...(t?.connections||[]).filter(e=>!1!==e.isActive&&eM(e.provider)&&!a.has(e.provider)&&a.add(e.provider)).map(e=>({...e,nodeName:r[e.provider]||null})),...Object.values(x.IS).filter(e=>e.noAuth&&!a.has(e.id)&&eM(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{}),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let t=++f.current,r=!1;return fetch(`/api/usage/stats?period=${e}`).then(e=>e.ok?e.json():null).then(e=>{r||f.current!==t||(e&&(h.current=!0,s(t=>({...t,...e}))),i(!1))}).catch(()=>{r||f.current!==t||i(!1)}),()=>{r=!0}},[e]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);s(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending,statusCounts:t.statusCounts??e.statusCounts,errorRate:t.errorRate??e.errorRate,errorCount:t.errorCount??e.errorCount,latency:t.latency??e.latency}:e),h.current&&i(!1)}catch{}},e.onerror=()=>{h.current&&i(!1)},()=>e.close()},[]);let g=(0,a.useCallback)(()=>{if(p||!u)return(0,r.jsx)(n.Qv,{});if(!u.length)return(0,r.jsx)("div",{className:"flex h-[260px] items-center justify-center",children:(0,r.jsx)(n.pp,{icon:"show_chart",title:"No chart data",description:"No requests recorded for this view in the selected period.",className:"border-0 p-0"})});switch(d){case"tokens":return(0,r.jsx)(eR,{data:u,dataKey:"tokens",color:"primary"});case"cost":return(0,r.jsx)(eR,{data:u,dataKey:"cost",color:"warning"});case"latency":return(0,r.jsx)(eo,{data:u,height:260});case"errors":return(0,r.jsx)(eT,{data:u,height:260});default:return null}},[u,p,d]),j=(0,a.useMemo)(()=>t?.recentRequests?.[0]?.provider||"",[t]);return l&&!t?(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsx)("div",{className:"grid min-w-0 grid-cols-2 gap-3 lg:grid-cols-5 lg:gap-4",children:Array.from({length:5}).map((e,t)=>(0,r.jsx)(n.Qv,{},t))}),(0,r.jsx)(n.Qv,{}),(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]})]}):t?(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4 lg:gap-6",children:[(0,r.jsx)(U,{stats:t}),(0,r.jsx)(G,{stats:t}),(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(300px,1fr)] lg:gap-6",children:[(0,r.jsx)(n.Zp,{title:"Usage Trend",icon:"monitoring",action:(0,r.jsx)(n.Iz,{options:eq,value:d,onChange:m,size:"sm"}),children:g()}),(0,r.jsx)(B,{stats:t})]}),(0,r.jsx)(en,{period:e}),(0,r.jsx)(ec,{period:e,stats:t}),(0,r.jsx)(ew,{stats:t,period:e}),(0,r.jsx)(n.Zp,{title:"Provider Topology",subtitle:"Live routing state across connected providers",icon:"hub",children:(0,r.jsx)(q,{providers:o,activeRequests:t.activeRequests||[],lastProvider:j,errorProvider:t.errorProvider||""})})]}):(0,r.jsx)(n.pp,{icon:"cloud_off",title:"Couldn't load usage",description:"We failed to fetch usage statistics. Please try again."})}eR.propTypes={data:w().arrayOf(w().object),dataKey:w().string.isRequired,color:w().string.isRequired},eO.propTypes={period:w().string};let eL=[{value:"all",label:"All",icon:"subject"},{value:"ok",label:"OK",icon:"check_circle"},{value:"errors",label:"Errors",icon:"error"}],e$=new Intl.NumberFormat,ez=e=>e$.format(e||0),eD=e=>`${e.timestamp??""}|${e.model??""}|${e.provider??""}`;function eE(){let[e,t]=(0,a.useState)([]),[s,l]=(0,a.useState)(!1),[i,o]=(0,a.useState)("all"),[d,m]=(0,a.useState)(""),[x,u]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onopen=()=>l(!0),e.onerror=()=>l(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data),r=Array.isArray(s.recentRequests)?s.recentRequests:[];if(0===r.length)return;t(e=>{let t=new Set(e.map(eD)),s=r.filter(e=>!t.has(eD(e)));return 0===s.length?e:[...s,...e].sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime()).slice(0,100)})}catch{}},()=>e.close()},[]),(0,a.useEffect)(()=>{let e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[]);let p=(0,a.useMemo)(()=>{let t=d.trim().toLowerCase();return e.filter(e=>{let s,r;return("ok"!==i||!!(!(s=e.status)||"ok"===s))&&("errors"!==i||!!(r=e.status)&&"ok"!==r)&&(!t||!!`${e.model??""} ${e.provider??""}`.toLowerCase().includes(t))&&!0})},[e,i,d]);return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.Zp,{padding:"sm",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,r.jsx)("span",{className:(0,c.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-warning")}),(0,r.jsx)("span",{className:(0,c.cn)("font-semibold",s?"text-success":"text-warning"),children:s?"Live":"Reconnecting"}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["\xb7 ",e.length,"/",100," buffered"]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.Iz,{options:eL,value:i,onChange:o,size:"sm"}),(0,r.jsx)(n.pd,{icon:"search",placeholder:"Filter by model or provider",value:d,onChange:e=>m(e.target.value),className:"sm:w-64"})]})]})}),(0,r.jsx)(n.Zp,{padding:"none",className:"overflow-hidden",children:0===p.length?(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(n.pp,{icon:0===e.length?"history":"search_off",title:0===e.length?"No requests yet":"No matching requests",description:0===e.length?"Live requests will appear here.":"Try adjusting your filters or search."})}):(0,r.jsxs)("div",{className:"max-h-[600px] overflow-y-auto",children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 grid grid-cols-[4.5rem_1fr_auto] items-center gap-3 border-b border-border-subtle bg-panel/95 px-4 py-2 text-[11px] font-semibold uppercase tracking-wide text-text-subtle backdrop-blur sm:grid-cols-[4.5rem_1fr_6rem_6rem_5rem_1.25rem]",children:[(0,r.jsx)("span",{children:"When"}),(0,r.jsx)("span",{children:"Model"}),(0,r.jsx)("span",{className:"hidden text-right sm:block",children:"In"}),(0,r.jsx)("span",{className:"hidden text-right sm:block",children:"Out"}),(0,r.jsx)("span",{className:"hidden sm:block",children:"Cache"}),(0,r.jsx)("span",{className:"text-right","aria-hidden":!0})]}),(0,r.jsx)("ul",{role:"list",className:"divide-y divide-border-subtle",children:p.map(e=>{let t,s=!(t=e.status)||"ok"===t,a=(e.cachedTokens??0)>0;return(0,r.jsxs)("li",{className:"fade-in grid grid-cols-[4.5rem_1fr_auto] items-center gap-3 px-4 py-2.5 transition-colors hover:bg-surface-2/70 sm:grid-cols-[4.5rem_1fr_6rem_6rem_5rem_1.25rem]",children:[(0,r.jsx)("span",{className:"truncate font-mono text-xs text-text-muted tabular-nums",title:e.timestamp?new Date(e.timestamp).toLocaleString():void 0,children:function(e,t){if(!e)return"—";let s=new Date(e).getTime();if(Number.isNaN(s))return"—";let r=t-s;return r<1e4?"just now":r<6e4?`${Math.floor(r/1e3)}s ago`:r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:new Date(s).toLocaleTimeString()}(e.timestamp,x)}),(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)("span",{className:"truncate text-sm font-medium text-text-main",title:e.model,children:e.model||"—"}),e.provider&&(0,r.jsx)(n.Ex,{variant:"default",size:"sm",className:"hidden shrink-0 sm:inline-flex",children:e.provider})]}),(0,r.jsxs)("span",{className:"hidden text-right font-mono text-xs text-primary tabular-nums sm:block",children:["↑ ",ez(e.promptTokens)]}),(0,r.jsxs)("span",{className:"hidden text-right font-mono text-xs text-success tabular-nums sm:block",children:["↓ ",ez(e.completionTokens)]}),(0,r.jsx)("span",{className:"hidden sm:block",children:a?(0,r.jsx)(n.Ex,{variant:"cyan",size:"sm",children:"cached"}):(0,r.jsx)("span",{className:"text-text-subtle",children:"—"})}),(0,r.jsx)("span",{className:"flex justify-end",children:(0,r.jsx)("span",{className:(0,c.cn)("size-2 rounded-full",s?"bg-success":"bg-danger"),role:"img","aria-label":s?"OK":"Error",title:s?"OK":e.status||"Error"})})]},eD(e))})})]})})]})}let eK=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"},{value:"all",label:"All"}],eP=[{value:"overview",label:"Overview"},{value:"logs",label:"Logs"},{value:"details",label:"Details"}];function e_(){return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(n.Qv,{}),children:(0,r.jsx)(eI,{})})}function eI(){let e=(0,l.useSearchParams)(),t=(0,l.useRouter)(),[s,i]=(0,a.useState)("today"),o=e.get("tab"),c=o&&["overview","logs","details"].includes(o)?o:"overview";return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Usage",description:"Requests, analytics, latency, and live activity",icon:"bar_chart"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)(n.Iz,{options:eP,value:c,onChange:s=>{if(s===c)return;let r=new URLSearchParams(e);r.set("tab",s),t.push(`/dashboard/usage?${r.toString()}`,{scroll:!1})},className:"w-full sm:w-auto"}),"overview"===c&&(0,r.jsx)(n.Iz,{options:eK,value:s,onChange:i,size:"sm",className:"w-full sm:w-auto"})]}),"overview"===c&&(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(n.Qv,{}),children:(0,r.jsx)(eO,{period:s})}),"logs"===c&&(0,r.jsx)(eE,{}),"details"===c&&(0,r.jsx)(y,{})]})}},86559:(e,t,s)=>{Promise.resolve().then(s.bind(s,37925))}},e=>{e.O(0,[2574,3862,27,1636,1321,705,5497,8441,3794,7358],()=>e(e.s=86559)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{66938:(e,s,n)=>{Promise.resolve().then(n.bind(n,96748)),Promise.resolve().then(n.bind(n,56319)),Promise.resolve().then(n.bind(n,56061)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,29366)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,40197)),Promise.resolve().then(n.bind(n,45455)),Promise.resolve().then(n.bind(n,30815)),Promise.resolve().then(n.bind(n,73579)),Promise.resolve().then(n.bind(n,99312)),Promise.resolve().then(n.bind(n,92173)),Promise.resolve().then(n.bind(n,95088)),Promise.resolve().then(n.bind(n,8823)),Promise.resolve().then(n.bind(n,80752)),Promise.resolve().then(n.bind(n,6587)),Promise.resolve().then(n.bind(n,23936)),Promise.resolve().then(n.bind(n,11910)),Promise.resolve().then(n.bind(n,61500)),Promise.resolve().then(n.bind(n,62899)),Promise.resolve().then(n.bind(n,94230)),Promise.resolve().then(n.bind(n,21931)),Promise.resolve().then(n.bind(n,91450)),Promise.resolve().then(n.bind(n,7648)),Promise.resolve().then(n.bind(n,25086)),Promise.resolve().then(n.bind(n,28815)),Promise.resolve().then(n.bind(n,28058)),Promise.resolve().then(n.bind(n,81127)),Promise.resolve().then(n.bind(n,72908)),Promise.resolve().then(n.bind(n,67968)),Promise.resolve().then(n.bind(n,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,54960)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,31852)),Promise.resolve().then(n.bind(n,21110)),Promise.resolve().then(n.bind(n,38587)),Promise.resolve().then(n.bind(n,98542)),Promise.resolve().then(n.bind(n,34325)),Promise.resolve().then(n.bind(n,97677))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=66938)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{51380:(e,t,s)=>{Promise.resolve().then(s.bind(s,83016))},83016:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(95155),r=s(12115),i=s(35497);function n(){let[e,t]=(0,r.useState)(""),[s,n]=(0,r.useState)(""),[l,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(0),[x,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null),[p,b]=(0,r.useState)("password"),[f,w]=(0,r.useState)(!1),[g,j]=(0,r.useState)("Sign in with OIDC"),[N,y]=(0,r.useState)(!1),[v,S]=(0,r.useState)("");(0,r.useEffect)(()=>{if(d<=0)return;let e=setInterval(()=>c(e=>e>0?e-1:0),1e3);return()=>clearInterval(e)},[d]),(0,r.useEffect)(()=>{!async function(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3),s=window.location.origin;try{let a=await fetch(`${s}/api/auth/status`,{signal:e.signal});if(clearTimeout(t),a.ok){let e=await a.json();if(!1===e.requireLogin)return void window.location.assign("/dashboard");h(!!e.hasPassword),b(e.authMode||"password"),w(!0===e.oidcConfigured),j(e.oidcLoginLabel||"Sign in with OIDC")}else h(!0)}catch(e){clearTimeout(t),h(!0)}}()},[]);let C=async t=>{t.preventDefault(),u(!0),n(""),o("");try{let t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(t.ok){if((await t.json()).mustChangePassword)return void y(!0);window.location.assign("/dashboard")}else{let e=await t.json();n(e.error||"Invalid password"),e.resetHint&&o(e.resetHint),e.retryAfter&&c(Number(e.retryAfter))}}catch(e){n("An error occurred. Please try again.")}finally{u(!1)}},k=async t=>{t.preventDefault(),u(!0),n("");try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:e,newPassword:v})});if(t.ok)window.location.assign("/dashboard");else{let e=await t.json();n(e.error||"Failed to set password")}}catch(e){n("An error occurred. Please try again.")}finally{u(!1)}},P=f&&["oidc","both"].includes(p),O="oidc"!==p||!f;return null===m?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),(0,a.jsx)("p",{className:"text-text-muted mt-4",children:"Loading..."})]})}):(0,a.jsxs)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4 relative overflow-hidden",children:[(0,a.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-primary mb-2",children:"ExtremeRouter"}),(0,a.jsx)("p",{className:"text-text-muted",children:"oidc"===p&&f?"Sign in with your OIDC provider to access the dashboard":"Enter your password to access the dashboard"})]}),(0,a.jsx)(i.Zp,{children:N?(0,a.jsxs)("form",{onSubmit:k,className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-amber-600 dark:text-amber-400 text-center",children:"Set a new password before accessing the dashboard remotely."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:v,onChange:e=>S(e.target.value),required:!0,autoFocus:!0}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",className:"w-full",loading:x,disabled:!v,children:"Set password"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[P&&(0,a.jsx)(i.$n,{type:"button",variant:"primary",className:"w-full",onClick:()=>{window.location.href="/api/auth/oidc/start"},children:g}),P&&O&&(0,a.jsx)("div",{className:"h-px bg-border/60"}),O?(0,a.jsxs)("form",{onSubmit:C,className:"flex flex-col gap-4",children:[("oidc"===p&&!f||"both"===p&&!f)&&(0,a.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-400 text-center",children:"OIDC login is enabled, but the issuer/client fields are not configured yet. Password login is still available for recovery."}),"both"===p&&f&&(0,a.jsx)("p",{className:"text-xs text-text-muted text-center",children:"Password and OIDC login are both enabled."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter password",value:e,onChange:e=>t(e.target.value),required:!0,autoFocus:!P}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s}),d>0&&(0,a.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["Locked. Retry in ",(0,a.jsxs)("span",{className:"font-mono",children:[d,"s"]}),"."]}),l&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Forgot password? Open ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"extremerouter"})," CLI on the host → ",(0,a.jsx)("b",{children:"Settings"})," → ",(0,a.jsx)("b",{children:"Reset Password to Default"}),"."]})]}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",className:"w-full",loading:x,disabled:d>0,children:d>0?`Wait ${d}s`:"Login"}),(0,a.jsxs)("p",{className:"text-xs text-center text-text-muted mt-2",children:["Default password is ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"123456"})]}),!1===m&&(0,a.jsx)("p",{className:"text-xs text-center text-amber-600 dark:text-amber-400",children:"Security risk: no password set. You will be asked to set one when logging in remotely."})]}):s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]})})]})]})}}},e=>{e.O(0,[2574,3862,3807,1321,705,5497,8441,3794,7358],()=>e(e.s=51380)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{51380:(e,t,s)=>{Promise.resolve().then(s.bind(s,83016))},83016:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(95155),r=s(12115),i=s(35497);function n(){let[e,t]=(0,r.useState)(""),[s,n]=(0,r.useState)(""),[l,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(0),[x,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null),[p,b]=(0,r.useState)("password"),[f,w]=(0,r.useState)(!1),[g,j]=(0,r.useState)("Sign in with OIDC"),[N,y]=(0,r.useState)(!1),[v,S]=(0,r.useState)("");(0,r.useEffect)(()=>{if(d<=0)return;let e=setInterval(()=>c(e=>e>0?e-1:0),1e3);return()=>clearInterval(e)},[d]),(0,r.useEffect)(()=>{!async function(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3),s=window.location.origin;try{let a=await fetch(`${s}/api/auth/status`,{signal:e.signal});if(clearTimeout(t),a.ok){let e=await a.json();if(!1===e.requireLogin)return void window.location.assign("/dashboard");h(!!e.hasPassword),b(e.authMode||"password"),w(!0===e.oidcConfigured),j(e.oidcLoginLabel||"Sign in with OIDC")}else h(!0)}catch(e){clearTimeout(t),h(!0)}}()},[]);let C=async t=>{t.preventDefault(),u(!0),n(""),o("");try{let t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(t.ok){if((await t.json()).mustChangePassword)return void y(!0);window.location.assign("/dashboard")}else{let e=await t.json();n(e.error||"Invalid password"),e.resetHint&&o(e.resetHint),e.retryAfter&&c(Number(e.retryAfter))}}catch(e){n("An error occurred. Please try again.")}finally{u(!1)}},k=async t=>{t.preventDefault(),u(!0),n("");try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:e,newPassword:v})});if(t.ok)window.location.assign("/dashboard");else{let e=await t.json();n(e.error||"Failed to set password")}}catch(e){n("An error occurred. Please try again.")}finally{u(!1)}},P=f&&["oidc","both"].includes(p),O="oidc"!==p||!f;return null===m?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),(0,a.jsx)("p",{className:"text-text-muted mt-4",children:"Loading..."})]})}):(0,a.jsxs)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4 relative overflow-hidden",children:[(0,a.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"relative z-10 w-full max-w-md",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-primary mb-2",children:"ExtremeRouter"}),(0,a.jsx)("p",{className:"text-text-muted",children:"oidc"===p&&f?"Sign in with your OIDC provider to access the dashboard":"Enter your password to access the dashboard"})]}),(0,a.jsx)(i.Zp,{children:N?(0,a.jsxs)("form",{onSubmit:k,className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-amber-600 dark:text-amber-400 text-center",children:"Set a new password before accessing the dashboard remotely."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:v,onChange:e=>S(e.target.value),required:!0,autoFocus:!0}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",className:"w-full",loading:x,disabled:!v,children:"Set password"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[P&&(0,a.jsx)(i.$n,{type:"button",variant:"primary",className:"w-full",onClick:()=>{window.location.href="/api/auth/oidc/start"},children:g}),P&&O&&(0,a.jsx)("div",{className:"h-px bg-border/60"}),O?(0,a.jsxs)("form",{onSubmit:C,className:"flex flex-col gap-4",children:[("oidc"===p&&!f||"both"===p&&!f)&&(0,a.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-400 text-center",children:"OIDC login is enabled, but the issuer/client fields are not configured yet. Password login is still available for recovery."}),"both"===p&&f&&(0,a.jsx)("p",{className:"text-xs text-text-muted text-center",children:"Password and OIDC login are both enabled."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter password",value:e,onChange:e=>t(e.target.value),required:!0,autoFocus:!P}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s}),d>0&&(0,a.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["Locked. Retry in ",(0,a.jsxs)("span",{className:"font-mono",children:[d,"s"]}),"."]}),l&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Forgot password? Open ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"extremerouter"})," CLI on the host → ",(0,a.jsx)("b",{children:"Settings"})," → ",(0,a.jsx)("b",{children:"Reset Password to Default"}),"."]})]}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",className:"w-full",loading:x,disabled:d>0,children:d>0?`Wait ${d}s`:"Login"}),(0,a.jsxs)("p",{className:"text-xs text-center text-text-muted mt-2",children:["Default password is ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"123456"})]}),!1===m&&(0,a.jsx)("p",{className:"text-xs text-center text-amber-600 dark:text-amber-400",children:"Security risk: no password set. You will be asked to set one when logging in remotely."})]}):s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]})})]})]})}}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=51380)),_N_E=e.O()}]);