zevairouter 1.0.119 → 1.0.121

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 (703) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +13 -13
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +4 -4
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  63. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  65. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  66. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  67. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  71. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  72. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  73. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  75. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  76. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  77. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  78. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  79. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  80. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  81. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  82. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  91. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  357. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  360. package/cli/app/.next-cli-build/server/app/callback.rsc +4 -4
  361. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  362. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  363. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  364. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  365. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  366. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  367. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  368. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
  369. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  370. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  371. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  372. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  373. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
  374. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  375. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +4 -4
  376. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
  377. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  378. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  379. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  380. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  381. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  382. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  383. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  384. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  385. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  386. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  387. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  388. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  389. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  390. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  391. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  392. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  393. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  394. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  395. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  396. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  397. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  398. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  399. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  400. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  401. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  402. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  403. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  404. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  405. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  406. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  407. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  408. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +6 -6
  409. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  410. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  411. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  412. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  413. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +6 -6
  414. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  415. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +4 -4
  416. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
  417. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  418. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  419. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  420. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  421. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  422. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  423. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  424. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  425. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  426. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  427. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  428. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  429. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  430. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  431. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  432. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  433. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  434. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  435. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  436. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  437. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  438. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  439. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  440. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  441. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  442. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  443. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  444. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  445. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  446. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  447. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  448. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  449. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +6 -6
  450. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  451. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  452. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  453. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  454. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +6 -6
  455. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  456. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +4 -4
  457. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
  458. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  459. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  460. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  461. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  462. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  463. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  464. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  465. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  466. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  467. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  468. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  469. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  470. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  471. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  472. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  473. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  475. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  476. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  477. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  478. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  479. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  480. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  481. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  482. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  483. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  484. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  485. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  486. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  487. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  488. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  489. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  490. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  491. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  492. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  493. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  494. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  495. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  496. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  497. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  498. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  499. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  500. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  501. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  502. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  503. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  504. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  505. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  506. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  507. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  508. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  509. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  510. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  511. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  512. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  513. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  514. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  515. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  516. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  517. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  518. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  519. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  520. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  521. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  522. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  523. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  524. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  525. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  526. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  527. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  528. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  529. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  530. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  531. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  532. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  533. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  534. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  535. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  536. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  537. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  538. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  539. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  540. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  541. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  542. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  543. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  544. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  545. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  546. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  547. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  548. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  549. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  550. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  551. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  552. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  553. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  554. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  555. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  556. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  557. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  558. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  559. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  560. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  561. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  562. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  563. package/cli/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  564. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  565. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  567. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  568. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  569. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  570. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  571. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  572. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  573. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  574. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  575. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  576. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  577. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  578. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  579. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  580. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  581. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  582. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  583. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  584. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  585. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  586. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  587. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  588. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  589. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  590. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  591. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  592. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  593. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  594. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  595. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  596. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  597. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  598. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  599. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  600. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  601. package/cli/app/.next-cli-build/server/app-paths-manifest.json +13 -13
  602. package/cli/app/.next-cli-build/server/chunks/1656.js +1 -0
  603. package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
  604. package/cli/app/.next-cli-build/server/chunks/3407.js +1 -1
  605. package/cli/app/.next-cli-build/server/chunks/412.js +2 -2
  606. package/cli/app/.next-cli-build/server/chunks/415.js +1 -1
  607. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  608. package/cli/app/.next-cli-build/server/chunks/4765.js +1 -1
  609. package/cli/app/.next-cli-build/server/chunks/5469.js +1 -1
  610. package/cli/app/.next-cli-build/server/chunks/6269.js +1 -1
  611. package/cli/app/.next-cli-build/server/chunks/8157.js +1 -1
  612. package/cli/app/.next-cli-build/server/chunks/8242.js +2 -2
  613. package/cli/app/.next-cli-build/server/chunks/8450.js +1 -1
  614. package/cli/app/.next-cli-build/server/chunks/8895.js +1 -1
  615. package/cli/app/.next-cli-build/server/chunks/915.js +1 -1
  616. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  617. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  618. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  619. package/cli/app/.next-cli-build/static/chunks/1992-b492aa3235a8c259.js +1 -0
  620. package/cli/app/.next-cli-build/static/chunks/523-81108e84df92e883.js +3 -0
  621. package/cli/app/.next-cli-build/static/chunks/5472-544ea4e7aa338d84.js +1 -0
  622. package/cli/app/.next-cli-build/static/chunks/5497-b25ed8039d5058b3.js +7 -0
  623. package/cli/app/.next-cli-build/static/chunks/85-db69928a84a17025.js +1 -0
  624. package/cli/app/.next-cli-build/static/chunks/9126-3c87cb0aee89bca5.js +1 -0
  625. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/{page-d41499964854d23d.js → page-a3939b72418749b7.js} +1 -1
  626. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-fa9d3452d69f2fc7.js +1 -0
  627. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-307e7a994072d3fe.js → page-2361fd82cdac58f9.js} +1 -1
  628. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-c99774d53ed03829.js → page-0186f028c4f68aa9.js} +1 -1
  629. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-a80bc0ef9e6c1e11.js → page-81c25ef219dfc38b.js} +1 -1
  630. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-b055dfe6fb0c0172.js +1 -0
  631. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/context/{page-f654f75ab4d3b2b4.js → page-fb93d56bfaccdc19.js} +1 -1
  632. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-09e6213a0742752b.js +1 -0
  633. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-e9f89f6f7f2695ac.js → page-0fafff8a72986a98.js} +1 -1
  634. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-0546fd3c6b301483.js → page-7b6e1ef525e44bd1.js} +1 -1
  635. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-59911fe6fc9fbfc8.js → page-85e7b6f5b4af1dd4.js} +1 -1
  636. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-2744a3a7ee2b2f3b.js → page-29893b095259085d.js} +1 -1
  637. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-f11795f09a7e359c.js → page-c03ae64868d6bc4d.js} +1 -1
  638. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-fd2453044462eb4f.js +1 -0
  639. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-13833a8f417b8d7e.js +1 -0
  640. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-da5d11d26f23d010.js → page-e95034d5b34bc360.js} +1 -1
  641. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-e8bec03d8a8df237.js → page-6deaa1a0e3ad0eb6.js} +2 -2
  642. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-0d7a893a9acb3db1.js → page-c38381db33d5aafc.js} +1 -1
  643. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-a2d55f0103564e42.js → page-5ab697596491a658.js} +1 -1
  644. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-b4c7d4b4ec9ecdc8.js → page-eb11e852f7a314c9.js} +1 -1
  645. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-d10896022aaed6ef.js → page-f1c47c7778f23895.js} +1 -1
  646. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-f3b77e4749e85bd8.js → page-ac445dab96ac6223.js} +1 -1
  647. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/terminal/page-a3689f5a124bc27a.js +4 -0
  648. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-1fa380d58608995a.js → page-26d372726ae6df38.js} +1 -1
  649. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-7d617ed8a6c73a39.js → page-a408f0954e4812ab.js} +1 -1
  650. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-a57ed10cad355f8f.js → page-2de7b12af94b8721.js} +1 -1
  651. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-d5ac11eba9159f43.js → layout-2ae824d2d09c81ea.js} +1 -1
  652. package/cli/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-1ea7bc18570814a7.js +1 -0
  653. package/cli/app/.next-cli-build/static/chunks/app/layout-2aaca42ecdf3a056.js +1 -0
  654. package/cli/app/.next-cli-build/static/chunks/app/login/{page-b47f2bec3372a1a3.js → page-b5822dd005b1f5c2.js} +1 -1
  655. package/cli/app/.next-cli-build/static/css/479786e77e87b74c.css +1 -0
  656. package/cli/app/.openclaude/worktrees/agent-a54d8692/.next/standalone/src/lib/terminal/ptyBridge.py +163 -0
  657. package/cli/app/.openclaude/worktrees/agent-a54d8692/src/lib/terminal/ptyBridge.py +163 -0
  658. package/cli/app/.openclaude/worktrees/agent-aa0a3950/src/lib/terminal/ptyBridge.py +163 -0
  659. package/cli/app/.openclaude/worktrees/agent-aeb70241/src/lib/terminal/ptyBridge.py +163 -0
  660. package/cli/app/CHANGELOG.md +48 -0
  661. package/cli/app/package.json +1 -1
  662. package/cli/app/public/favicon.svg +11 -7
  663. package/cli/app/public/icons/icon-192.svg +11 -7
  664. package/cli/app/public/icons/icon-512.svg +11 -7
  665. package/cli/package.json +1 -1
  666. package/cli/src/cli/tray/icon.ico +0 -0
  667. package/cli/src/cli/tray/icon.png +0 -0
  668. package/open-sse/services/accountFallback.js +30 -0
  669. package/package.json +1 -1
  670. package/public/favicon.svg +11 -7
  671. package/public/icons/icon-192.svg +11 -7
  672. package/public/icons/icon-512.svg +11 -7
  673. package/src/app/(dashboard)/dashboard/basic-chat/BasicChatPageClient.js +49 -10
  674. package/src/app/(dashboard)/dashboard/console-log/ConsoleLogClient.js +76 -49
  675. package/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js +74 -41
  676. package/src/app/(dashboard)/dashboard/providers/[id]/ConnectionRow.js +10 -0
  677. package/src/app/(dashboard)/dashboard/terminal/TerminalPageClient.js +60 -47
  678. package/src/app/api/providers/[id]/test/testUtils.js +11 -5
  679. package/src/shared/components/Button.js +4 -3
  680. package/src/shared/components/Card.js +2 -2
  681. package/src/shared/components/Header.js +1 -1
  682. package/src/shared/components/Input.js +15 -4
  683. package/src/shared/components/Modal.js +55 -16
  684. package/src/shared/components/SegmentedControl.js +6 -1
  685. package/src/shared/components/Sidebar.js +6 -7
  686. package/src/shared/components/Toggle.js +14 -4
  687. package/src/shared/components/layouts/DashboardLayout.js +6 -3
  688. package/src/sse/services/auth.js +51 -9
  689. package/cli/app/.next-cli-build/static/chunks/3702-5f52882fbc19ed29.js +0 -1
  690. package/cli/app/.next-cli-build/static/chunks/523-4021d26bfc04bcf5.js +0 -3
  691. package/cli/app/.next-cli-build/static/chunks/5497-54c8b503897135ae.js +0 -7
  692. package/cli/app/.next-cli-build/static/chunks/9126-2efa8985d72b10b7.js +0 -1
  693. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-d021e06a6f101f16.js +0 -1
  694. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-51791daa7ebe6710.js +0 -1
  695. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-6a64fa03d091fe28.js +0 -1
  696. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-8912f47631cdced9.js +0 -1
  697. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-42a74aa05fd08ed9.js +0 -1
  698. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/terminal/page-1f6733fa5712fc3d.js +0 -4
  699. package/cli/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-d886f4bea6d1980a.js +0 -1
  700. package/cli/app/.next-cli-build/static/chunks/app/layout-66d404d6c5a82e5c.js +0 -1
  701. package/cli/app/.next-cli-build/static/css/3b43d9c2833b7940.css +0 -1
  702. /package/cli/app/.next-cli-build/static/{EsPNkWozNCaNTZu9U2Fs3 → edIIBLHejtiMImOMvHpmV}/_buildManifest.js +0 -0
  703. /package/cli/app/.next-cli-build/static/{EsPNkWozNCaNTZu9U2Fs3 → edIIBLHejtiMImOMvHpmV}/_ssgManifest.js +0 -0
@@ -0,0 +1,4 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3570],{1620:(e,t,r)=>{"use strict";r.d(t,{D:()=>c});var n=r(12115),a=r(90085);function s(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function l(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function c(){let{theme:e,setTheme:t,toggleTheme:r,initTheme:c}=(0,a.A)(),o=(0,n.useSyncExternalStore)(s,l,i);(0,n.useEffect)(()=>{c()},[c]),(0,n.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>c();return t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[e,c]);let d="dark"===e||"system"===e&&o;return{theme:e,setTheme:t,toggleTheme:r,isDark:d}}},35765:(e,t,r)=>{"use strict";r.d(t,{default:()=>u});var n=r(95155),a=r(12115),s=r(8422),l=r(63606),i=r(52414),c=r(1620);r(82407);let o="#E56A4A",d={light:{background:"#f7f7f6",foreground:"#262626",cursor:o,cursorAccent:"#f7f7f6",selectionBackground:"rgba(229, 106, 74, 0.25)",black:"#262626",red:"#b91c1c",green:"#15803d",yellow:"#a16207",blue:"#1d4ed8",magenta:"#7e22ce",cyan:"#0e7490",white:"#e5e5e5",brightBlack:"#737373",brightRed:"#dc2626",brightGreen:"#16a34a",brightYellow:"#ca8a04",brightBlue:"#2563eb",brightMagenta:"#9333ea",brightCyan:"#0891b2",brightWhite:"#fafafa"},dark:{background:"#0d0d0d",foreground:"#e8e8e8",cursor:o,cursorAccent:"#0d0d0d",selectionBackground:"rgba(229, 106, 74, 0.35)",black:"#1a1a1a",red:"#f87171",green:"#4ade80",yellow:"#fbbf24",blue:"#60a5fa",magenta:"#c084fc",cyan:"#22d3ee",white:"#e5e5e5",brightBlack:"#737373",brightRed:"#fca5a5",brightGreen:"#86efac",brightYellow:"#fde68a",brightBlue:"#93c5fd",brightMagenta:"#d8b4fe",brightCyan:"#67e8f9",brightWhite:"#fafafa"}};function u(){let{isDark:e}=(0,c.D)(),t=(0,a.useRef)(e),r=(0,a.useRef)(null),o=(0,a.useRef)(null),u=(0,a.useRef)(null),m=(0,a.useRef)(""),h=(0,a.useRef)(""),b=(0,a.useRef)(null),f=(0,a.useRef)([]),x=(0,a.useRef)(null),p=(0,a.useRef)(!1),g=(0,a.useRef)(""),[w,y]=(0,a.useState)("checking"),[k,v]=(0,a.useState)(""),[j,N]=(0,a.useState)(!1),[E,C]=(0,a.useState)(""),[S,A]=(0,a.useState)(""),[L,T]=(0,a.useState)("connecting"),[R,O]=(0,a.useState)("Starting shell…"),[F,$]=(0,a.useState)({shell:"",mode:""}),D=(0,a.useCallback)(async()=>{v("");try{let e=await fetch("/api/terminal/auth/status",{cache:"no-store",credentials:"same-origin"}),t=await e.json().catch(()=>({}));if(403===e.status){v(t?.error||"Access forbidden."),y("unlock");return}if(401===e.status){v("Log in to the dashboard first."),y("unlock");return}if(!t.configured)return void y("setup");if(t.unlocked)return void y("open");y("unlock")}catch(e){v(e?.message||"Failed to check terminal lock"),y("unlock")}},[]);(0,a.useEffect)(()=>{D()},[D]);let M=async e=>{e.preventDefault(),N(!0),v("");try{let e=await fetch("/api/terminal/auth/setup",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({password:E,confirm:S})}),t=await e.json().catch(()=>({}));if(!e.ok)return void v(t.error||"Setup failed");C(""),A(""),y("open")}catch(e){v(e?.message||"Setup failed")}finally{N(!1)}},z=async e=>{e.preventDefault(),N(!0),v("");try{let e=await fetch("/api/terminal/auth/unlock",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({password:E})}),t=await e.json().catch(()=>({}));if(!e.ok)return void v(t.error||"Unlock failed");C(""),y("open")}catch(e){v(e?.message||"Unlock failed")}finally{N(!1)}},P=async()=>{try{await fetch("/api/terminal/auth/unlock",{method:"DELETE",credentials:"same-origin"})}catch{}let e=m.current;if(m.current="",e&&fetch(`/api/terminal/session/${e}`,{method:"DELETE",credentials:"same-origin",keepalive:!0}).catch(()=>{}),b.current){try{b.current.close()}catch{}b.current=null}C(""),y("unlock")},B=(0,a.useCallback)(async()=>{let e=m.current;if(!e||0===f.current.length)return;let t=f.current.join("");f.current=[];try{let r=await fetch(`/api/terminal/session/${e}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:t}),cache:"no-store",credentials:"same-origin"});!r.ok&&o.current&&(423===r.status?(o.current.write("\r\n\x1b[31m[terminal locked]\x1b[0m\r\n"),y("unlock")):(403===r.status||401===r.status)&&o.current.write(`\r
2
+ \x1b[31m[input blocked: ${r.status}]\x1b[0m\r
3
+ `))}catch{}},[]),U=(0,a.useCallback)(e=>{e&&m.current&&(f.current.push(e),x.current||(x.current=setTimeout(()=>{x.current=null,B()},8)))},[B]),q=(0,a.useCallback)(e=>{let t=o.current;if(!t)return;let r=h.current;if(!("pipe"===r||!r))return void U(e);if("\x03"===e){g.current="",t.write("^C\r\n"),U("\x03\n");return}if("\r"===e||"\n"===e||"\r\n"===e){let e=g.current;g.current="",t.write("\r\n"),U(`${e}
4
+ `);return}if(""===e||"\b"===e){g.current.length>0&&(g.current=g.current.slice(0,-1),t.write("\b \b"));return}32>e.charCodeAt(0)||e.startsWith("\x1b")||(g.current+=e,t.write(e))},[U]),J=(0,a.useCallback)(async()=>{let e=m.current,t=o.current;if(e&&t)try{await fetch(`/api/terminal/session/${e}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cols:t.cols,rows:t.rows}),cache:"no-store",credentials:"same-origin"})}catch{}},[]),_=(0,a.useCallback)(()=>{try{o.current?.focus()}catch{}},[]),I=(0,a.useCallback)((e,t)=>{if(b.current)try{b.current.close()}catch{}let r=new EventSource(`/api/terminal/session/${e}/stream`,{withCredentials:!0});b.current=r,r.onopen=()=>{p.current||(T("ready"),O("Connected — click terminal & type"),_())},r.onmessage=e=>{let r;if(!p.current){try{r=JSON.parse(e.data)}catch{return}"data"===r.type&&"string"==typeof r.data?t.write(r.data):"ready"===r.type?(h.current=r.mode||h.current,$({shell:r.shell||"",mode:r.mode||""}),T(!1===r.alive?"closed":"ready"),O(!1===r.alive?"Shell exited":"Connected — click terminal & type"),_()):"exit"===r.type&&(T("closed"),O("Shell exited"),t.write("\r\n\x1b[90m[session ended]\x1b[0m\r\n"))}},r.onerror=()=>{p.current||(T(e=>"ready"===e?"connecting":e),O("Reconnecting…"))}},[_]),W=(0,a.useCallback)(async(e,t)=>{let r;T("connecting"),O("Starting shell…"),g.current="";try{t.fit()}catch{}let n=e.cols||120,a=e.rows||40;try{r=await fetch("/api/terminal/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cols:n,rows:a}),cache:"no-store",credentials:"same-origin"})}catch(t){T("error"),O(t?.message||"Failed to reach server"),e.writeln(`\x1b[31mFailed to create session: ${t?.message||"network error"}\x1b[0m`);return}if(403===r.status){T("forbidden"),O("Forbidden"),e.writeln("\x1b[33mTerminal access forbidden.\x1b[0m");return}if(401===r.status){T("error"),O("Unauthorized"),e.writeln("\x1b[31mUnauthorized — log in to the dashboard first.\x1b[0m");return}if(423===r.status){T("error"),O("Locked"),y("unlock");return}let s=await r.json().catch(()=>({}));if(!r.ok||!s?.session?.id){T("error"),O(s?.error||"Create failed"),e.writeln(`\x1b[31m${s?.error||"Failed to create terminal session"}\x1b[0m`);return}m.current=s.session.id,h.current=s.session.mode||"pipe",$({shell:s.session.shell||"",mode:s.session.mode||""}),I(s.session.id,e),_()},[I,_]),Y=(0,a.useCallback)(async()=>{let e=m.current;if(m.current="",h.current="",g.current="",f.current=[],b.current){try{b.current.close()}catch{}b.current=null}e&&fetch(`/api/terminal/session/${e}`,{method:"DELETE",credentials:"same-origin"}).catch(()=>{});let t=o.current,r=u.current;t&&r&&(t.reset(),t.clear(),await W(t,r))},[W]);if((0,a.useEffect)(()=>{if("open"!==w)return;p.current=!1;let e=r.current;if(!e)return;let n=new s.B({cursorBlink:!0,cursorStyle:"bar",fontSize:13,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',lineHeight:1.25,scrollback:5e3,allowProposedApi:!0,disableStdin:!1,theme:d[t.current?"dark":"light"]}),a=new l.Y,c=new i.c;n.loadAddon(a),n.loadAddon(c),n.open(e);try{e.tabIndex=0;let t=e.querySelector("textarea");t&&(t.tabIndex=0,t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false"))}catch{}o.current=n,u.current=a;try{a.fit()}catch{}let h=n.onData(e=>q(e)),f=()=>{try{a.fit(),J()}catch{}},g=()=>_();e.addEventListener("mousedown",g),e.addEventListener("click",g),e.addEventListener("focus",_);let y="u">typeof ResizeObserver?new ResizeObserver(f):null;return y?.observe(e),window.addEventListener("resize",f),requestAnimationFrame(()=>{try{a.fit()}catch{}_()}),W(n,a),()=>{p.current=!0,y?.disconnect(),window.removeEventListener("resize",f),e.removeEventListener("mousedown",g),e.removeEventListener("click",g),e.removeEventListener("focus",_);try{h.dispose()}catch{}if(x.current&&(clearTimeout(x.current),x.current=null),b.current){try{b.current.close()}catch{}b.current=null}let t=m.current;m.current="",t&&fetch(`/api/terminal/session/${t}`,{method:"DELETE",keepalive:!0,credentials:"same-origin"}).catch(()=>{});try{n.dispose()}catch{}o.current=null,u.current=null}},[w,q,J,W,_]),(0,a.useEffect)(()=>{t.current=e,o.current&&(o.current.options.theme=d[e?"dark":"light"])},[e]),"checking"===w)return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full items-center justify-center bg-bg text-sm text-text-muted",children:"Checking terminal lock…"});if("setup"===w||"unlock"===w){let e="setup"===w;return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full flex-col items-center justify-center bg-bg px-4",children:(0,n.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-border-subtle bg-surface p-6 shadow-xl",children:[(0,n.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex size-10 items-center justify-center rounded-xl bg-[color:var(--brand,#E56A4A)]/15 text-[color:var(--brand,#E56A4A)]",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e?"key":"lock"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-base font-semibold text-text-main",children:e?"Set terminal password":"Unlock terminal"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:e?"First time — pick a password different from dashboard login.":"Dashboard login is not enough. Enter your terminal password."})]})]}),(0,n.jsxs)("form",{onSubmit:e?M:z,className:"space-y-3",children:[e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"New terminal password"}),(0,n.jsx)("input",{type:"password",autoFocus:!0,autoComplete:"new-password",value:E,onChange:e=>C(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--brand,#E56A4A)]/60",placeholder:"Min 6 characters",required:!0,minLength:6})]}),(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Confirm"}),(0,n.jsx)("input",{type:"password",autoComplete:"new-password",value:S,onChange:e=>A(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--brand,#E56A4A)]/60",placeholder:"Repeat password",required:!0,minLength:6})]}),(0,n.jsxs)("p",{className:"text-[11px] leading-relaxed text-text-muted",children:["Must ",(0,n.jsx)("strong",{className:"text-text-main",children:"not"})," match the dashboard password. Unlock lasts ~4 hours on this browser."]})]}):(0,n.jsxs)("label",{className:"block space-y-1",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Terminal password"}),(0,n.jsx)("input",{type:"password",autoFocus:!0,autoComplete:"current-password",value:E,onChange:e=>C(e.target.value),className:"w-full rounded-lg border border-border-subtle bg-bg-alt px-3 py-2.5 text-sm text-text-main outline-none focus:border-[color:var(--brand,#E56A4A)]/60",placeholder:"••••••••",required:!0})]}),k?(0,n.jsx)("p",{role:"alert",className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-700 dark:text-red-300",children:k}):null,(0,n.jsx)("button",{type:"submit",disabled:j,className:"w-full rounded-lg bg-[color:var(--brand,#E56A4A)] px-3 py-2.5 text-sm font-semibold text-white transition hover:brightness-110 disabled:opacity-50",children:j?"Please wait…":e?"Save & open terminal":"Unlock"})]}),"unlock"===w?(0,n.jsxs)("p",{className:"mt-3 text-center text-[11px] leading-relaxed text-text-muted",children:["Forgot terminal password? On the host run CLI →"," ",(0,n.jsx)("code",{className:"text-text-main",children:"Settings → Clear Terminal Password"})," ","then set a new one here. Reset is not available in the browser."]}):null,(0,n.jsx)("p",{className:"mt-4 text-center text-[11px] text-text-muted",children:"Protected by dashboard login + terminal password"})]})})}return(0,n.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-col bg-bg",children:[(0,n.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border-subtle px-4 py-2.5",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:`inline-block size-2 rounded-full ${"ready"===L?"bg-emerald-500":"connecting"===L?"bg-amber-400 animate-pulse":"forbidden"===L?"bg-amber-500":"bg-red-500"}`}),(0,n.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Terminal"})]}),(0,n.jsxs)("span",{role:"status","aria-live":"polite",className:"truncate text-xs text-text-muted",children:[R,F.shell?` \xb7 ${F.shell}`:"",F.mode?` \xb7 ${F.mode}`:""]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:P,className:"rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-xs font-medium text-text-muted transition hover:border-border hover:text-text-main",title:"Lock terminal (require password again)",children:"Lock"}),(0,n.jsx)("button",{type:"button",onClick:Y,className:"rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-xs font-medium text-text-main transition hover:border-[color:var(--brand,#E56A4A)]/50 hover:bg-bg-alt",children:"New session"})]})]}),(0,n.jsx)("div",{className:"relative min-h-0 flex-1",onMouseDown:_,children:(0,n.jsx)("div",{ref:r,className:"absolute inset-0 px-2 py-2 outline-none"})}),(0,n.jsx)("div",{className:"shrink-0 border-t border-border-subtle px-4 py-1.5 text-[11px] text-text-muted",children:"Dashboard login + terminal password \xb7 click the black area then type \xb7 idle sessions close after 30m"})]})}},63133:(e,t,r)=>{Promise.resolve().then(r.bind(r,35765))}},e=>{e.O(0,[1838,1507,5472,85,8441,3794,7358],()=>e(e.s=63133)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{525:(e,t,a)=>{Promise.resolve().then(a.bind(a,70323))},70323:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006);let o=["zh-CN","zh-TW"],c=[{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}],d=[{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"}];function x(){let[e,t]=(0,l.useState)(!0),[a,x]=(0,l.useState)(!1),[m,h]=(0,l.useState)("http://localhost:8787"),[p,u]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[f,g]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[y,v]=(0,l.useState)(""),[N,w]=(0,l.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[k,C]=(0,l.useState)([]),[S,E]=(0,l.useState)(!1),[P,T]=(0,l.useState)(""),[$,I]=(0,l.useState)(null),[R,O]=(0,l.useState)(""),[L,U]=(0,l.useState)(null),[H,M]=(0,l.useState)(!1),[_,A]=(0,l.useState)(!0),[D,F]=(0,l.useState)(!1),B=(0,l.useRef)(null),[J,W]=(0,l.useState)(!1),[z,G]=(0,l.useState)("full"),[K,X]=(0,l.useState)(!1),[q,Y]=(0,l.useState)("full"),[Z,Q]=(0,l.useState)(!1),[V,ee]=(0,l.useState)(25e3),[et,ea]=(0,l.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[es,el]=(0,l.useState)(null),[er,en]=(0,l.useState)(!1),[ei,eo]=(0,l.useState)(!1),[ec,ed]=(0,l.useState)(""),[ex,em]=(0,l.useState)("en"),{copied:eh,copy:ep}=(0,n.C)();(0,l.useEffect)(()=>(em((0,i.kk)()),(0,i.oQ)(()=>em((0,i.kk)()))),[]);let eu=o.includes(ex),ef=eu?c:c.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.find(e=>e.id===z);e?.wenyan&&!eu&&(G("ultra"),eg({cavemanLevel:"ultra"}))},[eu,z]);let eg=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)}},eb=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)}},ej=async()=>{let e=m.trim()||"http://localhost:8787";h(e),await eg({headroomUrl:e}),ey()},ey=(0,l.useCallback)(async()=>{u(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(u({...t,loading:!1}),!t?.installed){w({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([]);return}try{let e=await fetch("/api/headroom/extras",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error("extras status failed");let t=await e.json();w(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),C([])}catch{w({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([])}}catch{u({installed:!1,running:!1,python:null,loading:!1}),w({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([])}},[]),ev=(0,l.useCallback)(async()=>{v(""),j(!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 ey()}catch(e){v(e.message)}finally{j(!1)}},[ey]),eN=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await ey()}finally{j(!1)}},[ey]),ew=(0,l.useCallback)(()=>{O(""),B.current&&clearInterval(B.current);let e=async()=>{try{let e=await fetch("/api/headroom/extras?log=1",{headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));"string"==typeof t.log&&O(t.log)}catch{}};e(),B.current=setInterval(e,1500)},[]),ek=(0,l.useCallback)(()=>{B.current&&(clearInterval(B.current),B.current=null)},[]);(0,l.useEffect)(()=>()=>ek(),[ek]);let eC=(0,l.useCallback)(async()=>{if(0!==k.length){E(!0),T(""),ew();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:k})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");w(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),C([])}catch(e){T(e.message)}finally{ek(),E(!1)}}},[k,ew,ek]),eS=(0,l.useCallback)(async e=>{I(e),T(""),ew();try{let t=await fetch("/api/headroom/extras",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:[e]})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||"Remove failed");w(e=>({...e,version:a.version??e.version,extras:a.extras||e.extras}))}catch(e){T(e.message)}finally{ek(),I(null)}},[ew,ek]),eE=(0,l.useCallback)(()=>{if(0!==k.length){if(k.includes("ml"))return void U({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:eC});eC()}},[k,eC]),eP=(0,l.useCallback)(e=>{U({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eS(e)})},[eS]),eT=(0,l.useCallback)(async(e,t)=>{if(T(""),"code"===e&&M(t),"ml"===e&&A(t),await eg({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),p.running){F(!0);try{let e=await fetch("/api/headroom/restart",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Restart failed");await ey()}catch(e){T(e.message)}finally{F(!1)}}},[p.running,ey]),e$=(0,l.useCallback)(async()=>{ea(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();ea({...t,loading:!1}),"number"==typeof t.minChars&&ee(t.minChars)}catch{ea({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eI=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});el(await e.json())}catch(e){el({healthy:!1,checks:[],error:e.message})}},[]),eR=(0,l.useCallback)(async e=>{ed(""),eo(!0);try{let t=await fetch(`/api/pxpipe/${e}`,{method:"POST"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||`PXPIPE ${e} failed`);await e$(),await eI()}catch(e){ed(e.message)}finally{eo(!1)}},[e$,eI]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),x(!!a.headroomEnabled),h(a.headroomUrl||"http://localhost:8787"),M(!0===a.headroomCodeAware),A(!1!==a.headroomKompress),W(!!a.cavemanEnabled),G(a.cavemanLevel||"full"),X(!!a.ponytailEnabled),Y(a.ponytailLevel||"full"),Q(!!a.pxpipeEnabled),"number"==typeof a.pxpipeMinChars&&ee(a.pxpipeMinChars),ey(),e$().then(eI)}}catch{}})()},[ey,e$,eI]);let eO=!!p.running,eL=p.loading?"Checking…":eO?"Running":!1===p.localUrl||p.installed?!1!==p.localUrl?"Stopped":"External":"Not installed",eU=!1!==p.localUrl,eH=!!p.canStart,eM=eU&&!!p.managedPid,e_=es?.healthy===!0,eA=et.loading?"Checking…":et.installing?"Installing…":et.installed?e_?"Healthy":et.running?"Running":"Stopped":"Not installed";return e_||et.running,(0,s.jsxs)("div",{className:"space-y-6 p-6",children:[(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:()=>eb(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 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 ${eO?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:eL}),(0,s.jsx)("button",{type:"button",onClick:()=>g(!0),className:"text-xs text-primary underline hover:opacity-80",children:eO?"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&&eO,disabled:!eO,onChange:()=>{var e;let t;return e=!a,void(h(t=m.trim()||"http://localhost:8787"),x(e),eg({headroomEnabled:e,headroomUrl:t}))}})]}),p.installed&&(0,s.jsxs)("div",{className:"mb-3 ml-1 pl-3 pb-4 border-l-2 border-border",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Compression extras",N.version?` \xb7 v${N.version}`:"",":"]}),N.available.map(e=>{let t=!!N.extras[e],a=k.includes(e),l="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?H:_;return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs px-2 py-1 rounded border border-success/40 bg-success/5 text-text",title:l,children:[(0,s.jsx)(r.lM,{size:"sm",checked:t,disabled:D,onChange:()=>eT(e,!t)}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("button",{type:"button",onClick:()=>eP(e),disabled:$===e,className:"ml-1 text-error underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:$===e?"Uninstalling…":"Uninstall"})]},e)}return(0,s.jsxs)("label",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded border cursor-pointer transition-colors ${a?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:bg-surface-2"}`,title:l,children:[(0,s.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:a,onChange:()=>{C(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("span",{className:"opacity-70",children:"not installed"})]},e)}),k.length>0&&(0,s.jsx)("button",{onClick:eE,disabled:S,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:S?"Installing…":`Install [proxy,${k.join(",")}]`})]}),P&&(0,s.jsx)("p",{className:"text-xs text-error mt-1",children:P}),D&&(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Restarting proxy…"}),(S||$)&&R&&(0,s.jsx)("pre",{className:"mt-2 max-h-32 overflow-auto rounded bg-surface-2 p-2 text-[10px] leading-tight text-text-muted whitespace-pre-wrap",children:R}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Installing adds the package; use ",(0,s.jsx)("code",{children:"on"}),"/",(0,s.jsx)("code",{children:"off"})," ","to activate it (restarts the proxy). Default install is"," ",(0,s.jsx)("code",{children:"[proxy]"})," only (SmartCrusher for JSON). Adding"," ",(0,s.jsx)("code",{children:"[code]"})," enables AST compression (Python/JS/TS/Go/Rust/Java/C/C++/Perl). Adding ",(0,s.jsx)("code",{children:"[ml]"})," ","enables the Kompress-v2 HF model for prose/agentic traces but adds ~1 GB (torch + huggingface-hub)."]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-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:["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:ef.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;G(t=e.id),eg({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${z===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:c.find(e=>e.id===z)?.desc})]}),(0,s.jsx)(r.lM,{checked:J,onChange:()=>{var e;W(e=!J),eg({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:[K&&(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:d.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;Y(t=e.id),eg({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${q===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:d.find(e=>e.id===q)?.desc})]}),(0,s.jsx)(r.lM,{checked:K,onChange:()=>{var e;X(e=!K),eg({ponytailEnabled:e})}})]})]}),!1]}),(0,s.jsx)(r.aF,{isOpen:f,title:eO?"Headroom":"Setup Headroom",onClose:()=>g(!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:eO?"text-success":"text-warning",children:eL})]}),eO&&(0,s.jsx)("a",{href:"/api/headroom/proxy/dashboard",target:"_blank",rel:"noreferrer",className:"w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Headroom Dashboard"}),(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:m,onChange:e=>h(e.target.value),onBlur:ej,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."})]}),eM?(0,s.jsx)(r.$n,{onClick:eN,variant:"ghost",fullWidth:!0,disabled:b,children:b?"Stopping…":"Stop Headroom"}):eO?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):eH?(0,s.jsx)(r.$n,{onClick:ev,fullWidth:!0,disabled:b,children:b?"Starting…":"Start Headroom"}):eU?p.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:()=>ep('pip install "headroom-ai[proxy]"'),children:eh?"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."}),y&&(0,s.jsx)("p",{className:"text-sm text-warning",children:y}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>ey(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>g(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.aF,{isOpen:!1,title:et.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>en(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Compress prompts using multimodal encoding. Runs in-process — no extra server or environment variables required."}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsxs)("span",{className:e_||et.running?"text-success":"text-warning",children:[eA,et.version?` \xb7 v${et.version}`:""]})]}),es?.checks?.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded border border-border p-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-1",children:"Health check"}),es.checks.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,s.jsxs)("span",{className:e.ok?"text-success":"text-warning",children:[e.ok?"●":"○"," ",e.label]}),e.detail&&(0,s.jsx)("span",{className:"text-text-muted font-mono truncate max-w-[50%]",children:e.detail})]},e.id)),es.error&&(0,s.jsx)("p",{className:"text-xs text-warning mt-1",children:es.error})]}),et.installed?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[et.running?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.$n,{onClick:()=>eR("restart"),variant:"ghost",disabled:ei,children:"Restart"}),(0,s.jsx)(r.$n,{onClick:()=>eR("stop"),variant:"ghost",disabled:ei,children:"Stop"})]}):(0,s.jsx)(r.$n,{onClick:()=>eR("start"),disabled:ei,children:ei?"Starting…":"Start"}),(0,s.jsx)(r.$n,{onClick:()=>eR("install"),variant:"ghost",disabled:ei,children:"Repair"}),(0,s.jsx)("a",{href:"/dashboard/pxpipe#logs",className:"col-span-2 rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Logs"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-warning",children:"PXPIPE is not installed."}),(0,s.jsx)(r.$n,{onClick:()=>eR("install"),fullWidth:!0,disabled:ei||et.installing,children:ei||et.installing?"Installing…":"Install"}),(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Installs the npm package ",(0,s.jsx)("code",{className:"font-mono",children:"pxpipe-proxy"})," into the ZevaiRouter data directory. May take a few minutes."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Minimum prompt size (chars)"}),(0,s.jsx)(r.pd,{value:String(V),onChange:e=>ee(e.target.value),onBlur:()=>{let e=Math.max(0,Number(V)||25e3);ee(e),eg({pxpipeMinChars:e})},placeholder:"25000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Requests smaller than this bypass PXPIPE and are sent as-is."})]}),ec&&(0,s.jsx)("p",{className:"text-sm text-warning",children:ec}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>e$().then(eI),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>en(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.uo,{isOpen:!!L,onClose:()=>U(null),onConfirm:()=>{let e=L?.onConfirm;U(null),e?.()},title:L?.title,message:L?.message,confirmText:L?.confirmText,variant:L?.variant})]})}}},e=>{e.O(0,[2574,3862,4343,3702,5497,8441,3794,7358],()=>e(e.s=525)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{525:(e,t,a)=>{Promise.resolve().then(a.bind(a,70323))},70323:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006);let o=["zh-CN","zh-TW"],c=[{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}],d=[{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"}];function x(){let[e,t]=(0,l.useState)(!0),[a,x]=(0,l.useState)(!1),[m,h]=(0,l.useState)("http://localhost:8787"),[p,u]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[f,g]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[y,v]=(0,l.useState)(""),[N,w]=(0,l.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[k,C]=(0,l.useState)([]),[S,E]=(0,l.useState)(!1),[P,T]=(0,l.useState)(""),[$,I]=(0,l.useState)(null),[R,O]=(0,l.useState)(""),[L,U]=(0,l.useState)(null),[H,M]=(0,l.useState)(!1),[_,A]=(0,l.useState)(!0),[D,F]=(0,l.useState)(!1),B=(0,l.useRef)(null),[J,W]=(0,l.useState)(!1),[z,G]=(0,l.useState)("full"),[K,X]=(0,l.useState)(!1),[q,Y]=(0,l.useState)("full"),[Z,Q]=(0,l.useState)(!1),[V,ee]=(0,l.useState)(25e3),[et,ea]=(0,l.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[es,el]=(0,l.useState)(null),[er,en]=(0,l.useState)(!1),[ei,eo]=(0,l.useState)(!1),[ec,ed]=(0,l.useState)(""),[ex,em]=(0,l.useState)("en"),{copied:eh,copy:ep}=(0,n.C)();(0,l.useEffect)(()=>(em((0,i.kk)()),(0,i.oQ)(()=>em((0,i.kk)()))),[]);let eu=o.includes(ex),ef=eu?c:c.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.find(e=>e.id===z);e?.wenyan&&!eu&&(G("ultra"),eg({cavemanLevel:"ultra"}))},[eu,z]);let eg=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)}},eb=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)}},ej=async()=>{let e=m.trim()||"http://localhost:8787";h(e),await eg({headroomUrl:e}),ey()},ey=(0,l.useCallback)(async()=>{u(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(u({...t,loading:!1}),!t?.installed){w({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([]);return}try{let e=await fetch("/api/headroom/extras",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error("extras status failed");let t=await e.json();w(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),C([])}catch{w({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([])}}catch{u({installed:!1,running:!1,python:null,loading:!1}),w({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),C([])}},[]),ev=(0,l.useCallback)(async()=>{v(""),j(!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 ey()}catch(e){v(e.message)}finally{j(!1)}},[ey]),eN=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await ey()}finally{j(!1)}},[ey]),ew=(0,l.useCallback)(()=>{O(""),B.current&&clearInterval(B.current);let e=async()=>{try{let e=await fetch("/api/headroom/extras?log=1",{headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));"string"==typeof t.log&&O(t.log)}catch{}};e(),B.current=setInterval(e,1500)},[]),ek=(0,l.useCallback)(()=>{B.current&&(clearInterval(B.current),B.current=null)},[]);(0,l.useEffect)(()=>()=>ek(),[ek]);let eC=(0,l.useCallback)(async()=>{if(0!==k.length){E(!0),T(""),ew();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:k})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");w(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),C([])}catch(e){T(e.message)}finally{ek(),E(!1)}}},[k,ew,ek]),eS=(0,l.useCallback)(async e=>{I(e),T(""),ew();try{let t=await fetch("/api/headroom/extras",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:[e]})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||"Remove failed");w(e=>({...e,version:a.version??e.version,extras:a.extras||e.extras}))}catch(e){T(e.message)}finally{ek(),I(null)}},[ew,ek]),eE=(0,l.useCallback)(()=>{if(0!==k.length){if(k.includes("ml"))return void U({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:eC});eC()}},[k,eC]),eP=(0,l.useCallback)(e=>{U({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eS(e)})},[eS]),eT=(0,l.useCallback)(async(e,t)=>{if(T(""),"code"===e&&M(t),"ml"===e&&A(t),await eg({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),p.running){F(!0);try{let e=await fetch("/api/headroom/restart",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Restart failed");await ey()}catch(e){T(e.message)}finally{F(!1)}}},[p.running,ey]),e$=(0,l.useCallback)(async()=>{ea(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();ea({...t,loading:!1}),"number"==typeof t.minChars&&ee(t.minChars)}catch{ea({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eI=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});el(await e.json())}catch(e){el({healthy:!1,checks:[],error:e.message})}},[]),eR=(0,l.useCallback)(async e=>{ed(""),eo(!0);try{let t=await fetch(`/api/pxpipe/${e}`,{method:"POST"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||`PXPIPE ${e} failed`);await e$(),await eI()}catch(e){ed(e.message)}finally{eo(!1)}},[e$,eI]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),x(!!a.headroomEnabled),h(a.headroomUrl||"http://localhost:8787"),M(!0===a.headroomCodeAware),A(!1!==a.headroomKompress),W(!!a.cavemanEnabled),G(a.cavemanLevel||"full"),X(!!a.ponytailEnabled),Y(a.ponytailLevel||"full"),Q(!!a.pxpipeEnabled),"number"==typeof a.pxpipeMinChars&&ee(a.pxpipeMinChars),ey(),e$().then(eI)}}catch{}})()},[ey,e$,eI]);let eO=!!p.running,eL=p.loading?"Checking…":eO?"Running":!1===p.localUrl||p.installed?!1!==p.localUrl?"Stopped":"External":"Not installed",eU=!1!==p.localUrl,eH=!!p.canStart,eM=eU&&!!p.managedPid,e_=es?.healthy===!0,eA=et.loading?"Checking…":et.installing?"Installing…":et.installed?e_?"Healthy":et.running?"Running":"Stopped":"Not installed";return e_||et.running,(0,s.jsxs)("div",{className:"space-y-6 p-6",children:[(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:()=>eb(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 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 ${eO?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:eL}),(0,s.jsx)("button",{type:"button",onClick:()=>g(!0),className:"text-xs text-primary underline hover:opacity-80",children:eO?"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&&eO,disabled:!eO,onChange:()=>{var e;let t;return e=!a,void(h(t=m.trim()||"http://localhost:8787"),x(e),eg({headroomEnabled:e,headroomUrl:t}))}})]}),p.installed&&(0,s.jsxs)("div",{className:"mb-3 ml-1 pl-3 pb-4 border-l-2 border-border",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Compression extras",N.version?` \xb7 v${N.version}`:"",":"]}),N.available.map(e=>{let t=!!N.extras[e],a=k.includes(e),l="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?H:_;return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs px-2 py-1 rounded border border-success/40 bg-success/5 text-text",title:l,children:[(0,s.jsx)(r.lM,{size:"sm",checked:t,disabled:D,onChange:()=>eT(e,!t)}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("button",{type:"button",onClick:()=>eP(e),disabled:$===e,className:"ml-1 text-error underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:$===e?"Uninstalling…":"Uninstall"})]},e)}return(0,s.jsxs)("label",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded border cursor-pointer transition-colors ${a?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:bg-surface-2"}`,title:l,children:[(0,s.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:a,onChange:()=>{C(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("span",{className:"opacity-70",children:"not installed"})]},e)}),k.length>0&&(0,s.jsx)("button",{onClick:eE,disabled:S,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:S?"Installing…":`Install [proxy,${k.join(",")}]`})]}),P&&(0,s.jsx)("p",{className:"text-xs text-error mt-1",children:P}),D&&(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Restarting proxy…"}),(S||$)&&R&&(0,s.jsx)("pre",{className:"mt-2 max-h-32 overflow-auto rounded bg-surface-2 p-2 text-[10px] leading-tight text-text-muted whitespace-pre-wrap",children:R}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Installing adds the package; use ",(0,s.jsx)("code",{children:"on"}),"/",(0,s.jsx)("code",{children:"off"})," ","to activate it (restarts the proxy). Default install is"," ",(0,s.jsx)("code",{children:"[proxy]"})," only (SmartCrusher for JSON). Adding"," ",(0,s.jsx)("code",{children:"[code]"})," enables AST compression (Python/JS/TS/Go/Rust/Java/C/C++/Perl). Adding ",(0,s.jsx)("code",{children:"[ml]"})," ","enables the Kompress-v2 HF model for prose/agentic traces but adds ~1 GB (torch + huggingface-hub)."]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-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:["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:ef.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;G(t=e.id),eg({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${z===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:c.find(e=>e.id===z)?.desc})]}),(0,s.jsx)(r.lM,{checked:J,onChange:()=>{var e;W(e=!J),eg({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:[K&&(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:d.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;Y(t=e.id),eg({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${q===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:d.find(e=>e.id===q)?.desc})]}),(0,s.jsx)(r.lM,{checked:K,onChange:()=>{var e;X(e=!K),eg({ponytailEnabled:e})}})]})]}),!1]}),(0,s.jsx)(r.aF,{isOpen:f,title:eO?"Headroom":"Setup Headroom",onClose:()=>g(!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:eO?"text-success":"text-warning",children:eL})]}),eO&&(0,s.jsx)("a",{href:"/api/headroom/proxy/dashboard",target:"_blank",rel:"noreferrer",className:"w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Headroom Dashboard"}),(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:m,onChange:e=>h(e.target.value),onBlur:ej,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."})]}),eM?(0,s.jsx)(r.$n,{onClick:eN,variant:"ghost",fullWidth:!0,disabled:b,children:b?"Stopping…":"Stop Headroom"}):eO?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):eH?(0,s.jsx)(r.$n,{onClick:ev,fullWidth:!0,disabled:b,children:b?"Starting…":"Start Headroom"}):eU?p.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:()=>ep('pip install "headroom-ai[proxy]"'),children:eh?"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."}),y&&(0,s.jsx)("p",{className:"text-sm text-warning",children:y}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>ey(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>g(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.aF,{isOpen:!1,title:et.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>en(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Compress prompts using multimodal encoding. Runs in-process — no extra server or environment variables required."}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsxs)("span",{className:e_||et.running?"text-success":"text-warning",children:[eA,et.version?` \xb7 v${et.version}`:""]})]}),es?.checks?.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded border border-border p-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-1",children:"Health check"}),es.checks.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,s.jsxs)("span",{className:e.ok?"text-success":"text-warning",children:[e.ok?"●":"○"," ",e.label]}),e.detail&&(0,s.jsx)("span",{className:"text-text-muted font-mono truncate max-w-[50%]",children:e.detail})]},e.id)),es.error&&(0,s.jsx)("p",{className:"text-xs text-warning mt-1",children:es.error})]}),et.installed?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[et.running?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.$n,{onClick:()=>eR("restart"),variant:"ghost",disabled:ei,children:"Restart"}),(0,s.jsx)(r.$n,{onClick:()=>eR("stop"),variant:"ghost",disabled:ei,children:"Stop"})]}):(0,s.jsx)(r.$n,{onClick:()=>eR("start"),disabled:ei,children:ei?"Starting…":"Start"}),(0,s.jsx)(r.$n,{onClick:()=>eR("install"),variant:"ghost",disabled:ei,children:"Repair"}),(0,s.jsx)("a",{href:"/dashboard/pxpipe#logs",className:"col-span-2 rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Logs"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-warning",children:"PXPIPE is not installed."}),(0,s.jsx)(r.$n,{onClick:()=>eR("install"),fullWidth:!0,disabled:ei||et.installing,children:ei||et.installing?"Installing…":"Install"}),(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Installs the npm package ",(0,s.jsx)("code",{className:"font-mono",children:"pxpipe-proxy"})," into the ZevaiRouter data directory. May take a few minutes."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Minimum prompt size (chars)"}),(0,s.jsx)(r.pd,{value:String(V),onChange:e=>ee(e.target.value),onBlur:()=>{let e=Math.max(0,Number(V)||25e3);ee(e),eg({pxpipeMinChars:e})},placeholder:"25000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Requests smaller than this bypass PXPIPE and are sent as-is."})]}),ec&&(0,s.jsx)("p",{className:"text-sm text-warning",children:ec}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>e$().then(eI),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>en(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.uo,{isOpen:!!L,onClose:()=>U(null),onConfirm:()=>{let e=L?.onConfirm;U(null),e?.()},title:L?.title,message:L?.message,confirmText:L?.confirmText,variant:L?.variant})]})}}},e=>{e.O(0,[2574,3862,4343,85,5497,8441,3794,7358],()=>e(e.s=525)),_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)},7849:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},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)},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 o},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 l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new s}function i(e){return l?l.bind(e):s.bind(e)}function d(){return l?l.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 l(e){return{default:e&&"default"in e?e.default:e}}n(21957);let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},i=function(e){let t={...o,...e},n=(0,a.lazy)(()=>t.loader().then(l)),i=t.loading;function d(e){let l=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?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,{...o?{fallback:l}:{},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),l=n(11059),o=n(75707);let i=n.n(o)()(()=>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,o]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),h=(e,n)=>t(t=>({...t,[e]:n})),b=e=>o(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?(h(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);h(3,s),b(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};h(4,JSON.stringify(s,null,2)),b(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 l=s.body.getReader(),o=new TextDecoder,i="";for(;;){let{done:e,value:t}=await l.read();if(e)break;i+=o.decode(t,{stream:!0})}h(5,i),b(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,l.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"p-8 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Translator Debug"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Replay request flow — matches log files"})]}),m&&(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap justify-end",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 l=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,o(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)}),l]})]}),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=>{h(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]);h(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"}),l]})]})]})},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,4343,3702,5497,8441,3794,7358],()=>e(e.s=7849)),_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)},7849:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},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)},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 o},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 l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new s}function i(e){return l?l.bind(e):s.bind(e)}function d(){return l?l.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 l(e){return{default:e&&"default"in e?e.default:e}}n(21957);let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},i=function(e){let t={...o,...e},n=(0,a.lazy)(()=>t.loader().then(l)),i=t.loading;function d(e){let l=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?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,{...o?{fallback:l}:{},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),l=n(11059),o=n(75707);let i=n.n(o)()(()=>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,o]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),h=(e,n)=>t(t=>({...t,[e]:n})),b=e=>o(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?(h(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);h(3,s),b(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};h(4,JSON.stringify(s,null,2)),b(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 l=s.body.getReader(),o=new TextDecoder,i="";for(;;){let{done:e,value:t}=await l.read();if(e)break;i+=o.decode(t,{stream:!0})}h(5,i),b(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,l.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"p-8 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Translator Debug"}),(0,r.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Replay request flow — matches log files"})]}),m&&(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap justify-end",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 l=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,o(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)}),l]})]}),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=>{h(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]);h(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"}),l]})]})]})},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,4343,85,5497,8441,3794,7358],()=>e(e.s=7849)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{30906:(e,t,s)=>{Promise.resolve().then(s.bind(s,73314))},73314:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>N});var a=s(95155),l=s(12115),r=s(73321),n=s(35497),i=s(84588),o=s(92542),d=s(31474);function c({isOpen:e,onClose:t,title:s,children:r,width:n="md",className:i}){let o={sm:"w-[400px]",md:"w-[500px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-full"};return((0,l.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,l.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,a.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:(0,d.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,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border-subtle flex-shrink-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:s&&(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})}),(0,a.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:r})]})]}):null}var x=s(50378),m=s(52679);let p=null,u=null;async function h(){if(p&&u)return{providerNameCache:p,providerNodesCache:u};let e=await fetch("/api/provider-nodes"),t=(await e.json()).nodes||[];for(let e of(u={},t))u[e.id]=e.name;return{providerNameCache:p={...m.Q2,...u},providerNodesCache:u}}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 a=(0,m.zt)(e)||m.Q2[e];return a?.name||e}function b({title:e,children:t,defaultOpen:s=!1,icon:r=null}){let[n,i]=(0,l.useState)(s);return(0,a.jsxs)("div",{className:"border border-black/5 dark:border-white/5 rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"w-full flex items-center justify-between p-3 bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[r&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:r}),(0,a.jsx)("span",{className:"font-semibold text-sm text-text-main",children:e})]}),(0,a.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[20px] text-text-muted transition-transform duration-200",n?"rotate-90":""),children:"chevron_right"})]}),n&&(0,a.jsx)("div",{className:"p-4 border-t border-black/5 dark:border-white/5",children:t})]})}function g(e){let t=e?.prompt_tokens||e?.input_tokens||0,s=e?.cached_tokens||e?.cache_read_input_tokens||0;return t<s?s:t}function j(){let[e,t]=(0,l.useState)([]),[s,r]=(0,l.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[n,m]=(0,l.useState)(!1),[p,u]=(0,l.useState)(null),[j,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)([]),[k,y]=(0,l.useState)(null),[S,D]=(0,l.useState)({provider:"",startDate:"",endDate:""}),C=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/usage/providers"),t=await e.json();w(t.providers||[]);let s=await h();y(s.providerNameCache)}catch(e){console.error("Failed to fetch providers:",e)}},[]),P=(0,l.useCallback)(async()=>{m(!0);try{let e=new URLSearchParams({page:s.page.toString(),pageSize:s.pageSize.toString()});S.provider&&e.append("provider",S.provider),S.startDate&&e.append("startDate",S.startDate),S.endDate&&e.append("endDate",S.endDate);let a=await fetch(`/api/usage/request-details?${e}`),l=await a.json();t(l.details||[]),r(e=>({...e,...l.pagination}))}catch(e){console.error("Failed to fetch request details:",e)}finally{m(!1)}},[s.page,s.pageSize,S]);return(0,l.useEffect)(()=>{C()},[C]),(0,l.useEffect)(()=>{P()},[P]),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(i.default,{padding:"md",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"provider-filter",className:"text-sm font-medium text-text-main",children:"Provider"}),(0,a.jsxs)("select",{id:"provider-filter",value:S.provider,onChange:e=>D({...S,provider:e.target.value}),className:(0,d.cn)("h-9 px-3 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","w-full min-w-0 cursor-pointer"),style:{colorScheme:"auto"},children:[(0,a.jsx)("option",{value:"",children:"All Providers"}),N.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"start-date-filter",className:"text-sm font-medium text-text-main",children:"Start Date"}),(0,a.jsx)("input",{id:"start-date-filter",type:"datetime-local",value:S.startDate,onChange:e=>D({...S,startDate:e.target.value}),className:(0,d.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"end-date-filter",className:"text-sm font-medium text-text-main",children:"End Date"}),(0,a.jsx)("input",{id:"end-date-filter",type:"datetime-local",value:S.endDate,onChange:e=>D({...S,endDate:e.target.value}),className:(0,d.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:col-span-2 lg:col-span-1",children:[(0,a.jsx)("span",{className:"hidden text-sm font-medium text-text-main opacity-0 lg:block","aria-hidden":"true",children:"Clear"}),(0,a.jsx)(o.default,{variant:"ghost",onClick:()=>{D({provider:"",startDate:"",endDate:""})},disabled:!S.provider&&!S.startDate&&!S.endDate,className:"w-full",children:"Clear Filters"})]})]})}),(0,a.jsxs)(i.default,{padding:"none",children:[(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[880px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5",children:[(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Input Tokens"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Output Tokens"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Latency"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Action"})]})}),(0,a.jsx)("tbody",{children:n?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading..."]})})}):0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:"No request details found"})}):e.map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,a.jsx)("td",{className:"max-w-[260px] truncate p-4 font-mono text-sm text-text-main",children:e.model}),(0,a.jsx)("td",{className:"max-w-[180px] truncate p-4 text-sm text-text-main",children:(0,a.jsx)("span",{className:"font-medium",children:f(e.provider,k)})}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:g(e.tokens).toLocaleString()}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:e.tokens?.completion_tokens?.toLocaleString()||0}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-muted",children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsxs)("div",{children:["TTFT: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.ttft||0,"ms"]})]}),(0,a.jsxs)("div",{children:["Total: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.total||0,"ms"]})]})]})}),(0,a.jsx)("td",{className:"p-4 text-center",children:(0,a.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>{u(e),v(!0)},children:"Detail"})})]},`${e.id}-${t}`))})]})}),!n&&e.length>0&&(0,a.jsx)("div",{className:"border-t border-black/5 dark:border-white/5",children:(0,a.jsx)(x.default,{currentPage:s.page,pageSize:s.pageSize,totalItems:s.totalItems,onPageChange:e=>{r(t=>({...t,page:e}))},onPageSizeChange:e=>{r(t=>({...t,pageSize:e,page:1}))}})})]}),(0,a.jsx)(c,{isOpen:j,onClose:()=>v(!1),title:"Request Details",width:"lg",children:p&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 text-sm sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"ID:"})," ",(0,a.jsx)("span",{className:"break-all font-mono text-text-main",children:p.id})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Timestamp:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:new Date(p.timestamp).toLocaleString()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Provider:"})," ",(0,a.jsx)("span",{className:"text-text-main font-medium",children:f(p.provider,k)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Model:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:p.model})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,a.jsx)("span",{className:(0,d.cn)("font-medium","success"===p.status?"text-green-600":"text-red-600"),children:p.status})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"})," ",(0,a.jsxs)("span",{className:"text-text-main font-mono",children:["TTFT ",p.latency?.ttft||0,"ms / Total ",p.latency?.total||0,"ms"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Input Tokens:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:g(p.tokens).toLocaleString()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Output Tokens:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:p.tokens?.completion_tokens?.toLocaleString()||0})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(b,{title:"1. Client Request (Input)",defaultOpen:!0,icon:"input",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:JSON.stringify(p.request,null,2)})}),p.providerRequest&&(0,a.jsx)(b,{title:"2. Provider Request (Translated)",icon:"translate",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:JSON.stringify(p.providerRequest,null,2)})}),p.providerResponse&&(0,a.jsx)(b,{title:"3. Provider Response (Raw)",icon:"data_object",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:"object"==typeof p.providerResponse?JSON.stringify(p.providerResponse,null,2):p.providerResponse})}),(0,a.jsxs)(b,{title:"4. Client Response (Final)",defaultOpen:!0,icon:"output",children:[p.response?.thinking&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"font-semibold text-text-main mb-2 flex items-center gap-2 text-xs uppercase tracking-wide opacity-70",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"psychology"}),"Thinking Process"]}),(0,a.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:p.response.thinking})]}),(0,a.jsx)("h4",{className:"font-semibold text-text-main mb-2 text-xs uppercase tracking-wide opacity-70",children:"Content"}),(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:p.response?.content||"[No content]"})]})]})]})})]})}let v=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function N(){return(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(n.Qv,{}),children:(0,a.jsx)(w,{})})}function w(){let e=(0,r.useSearchParams)(),t=(0,r.useRouter)(),[s,i]=(0,l.useState)("today"),o=e.get("tab"),d=o&&["overview","logs","details"].includes(o)?o:"overview";return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(n.Iz,{options:[{value:"overview",label:"Overview"},{value:"details",label:"Details"}],value:d,onChange:s=>{if(s===d)return;let a=new URLSearchParams(e);a.set("tab",s),t.push(`/dashboard/usage?${a.toString()}`,{scroll:!1})},className:"w-full sm:w-auto"}),"overview"===d&&(0,a.jsx)(n.Iz,{options:v,value:s,onChange:i,size:"sm",className:"w-full sm:w-auto"})]}),"overview"===d&&(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(n.Qv,{}),children:(0,a.jsx)(n.jK,{period:s,setPeriod:i,hidePeriodSelector:!0})}),"logs"===d&&(0,a.jsx)(n.gM,{}),"details"===d&&(0,a.jsx)(j,{})]})}}},e=>{e.O(0,[2574,3862,4343,3702,5497,8441,3794,7358],()=>e(e.s=30906)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{30906:(e,t,s)=>{Promise.resolve().then(s.bind(s,73314))},73314:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>N});var a=s(95155),l=s(12115),r=s(73321),n=s(35497),i=s(84588),o=s(92542),d=s(31474);function c({isOpen:e,onClose:t,title:s,children:r,width:n="md",className:i}){let o={sm:"w-[400px]",md:"w-[500px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-full"};return((0,l.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,l.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,a.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:(0,d.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,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border-subtle flex-shrink-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:s&&(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})}),(0,a.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:r})]})]}):null}var x=s(50378),m=s(52679);let p=null,u=null;async function h(){if(p&&u)return{providerNameCache:p,providerNodesCache:u};let e=await fetch("/api/provider-nodes"),t=(await e.json()).nodes||[];for(let e of(u={},t))u[e.id]=e.name;return{providerNameCache:p={...m.Q2,...u},providerNodesCache:u}}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 a=(0,m.zt)(e)||m.Q2[e];return a?.name||e}function b({title:e,children:t,defaultOpen:s=!1,icon:r=null}){let[n,i]=(0,l.useState)(s);return(0,a.jsxs)("div",{className:"border border-black/5 dark:border-white/5 rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"w-full flex items-center justify-between p-3 bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[r&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:r}),(0,a.jsx)("span",{className:"font-semibold text-sm text-text-main",children:e})]}),(0,a.jsx)("span",{className:(0,d.cn)("material-symbols-outlined text-[20px] text-text-muted transition-transform duration-200",n?"rotate-90":""),children:"chevron_right"})]}),n&&(0,a.jsx)("div",{className:"p-4 border-t border-black/5 dark:border-white/5",children:t})]})}function g(e){let t=e?.prompt_tokens||e?.input_tokens||0,s=e?.cached_tokens||e?.cache_read_input_tokens||0;return t<s?s:t}function j(){let[e,t]=(0,l.useState)([]),[s,r]=(0,l.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[n,m]=(0,l.useState)(!1),[p,u]=(0,l.useState)(null),[j,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)([]),[k,y]=(0,l.useState)(null),[S,D]=(0,l.useState)({provider:"",startDate:"",endDate:""}),C=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/usage/providers"),t=await e.json();w(t.providers||[]);let s=await h();y(s.providerNameCache)}catch(e){console.error("Failed to fetch providers:",e)}},[]),P=(0,l.useCallback)(async()=>{m(!0);try{let e=new URLSearchParams({page:s.page.toString(),pageSize:s.pageSize.toString()});S.provider&&e.append("provider",S.provider),S.startDate&&e.append("startDate",S.startDate),S.endDate&&e.append("endDate",S.endDate);let a=await fetch(`/api/usage/request-details?${e}`),l=await a.json();t(l.details||[]),r(e=>({...e,...l.pagination}))}catch(e){console.error("Failed to fetch request details:",e)}finally{m(!1)}},[s.page,s.pageSize,S]);return(0,l.useEffect)(()=>{C()},[C]),(0,l.useEffect)(()=>{P()},[P]),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(i.default,{padding:"md",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"provider-filter",className:"text-sm font-medium text-text-main",children:"Provider"}),(0,a.jsxs)("select",{id:"provider-filter",value:S.provider,onChange:e=>D({...S,provider:e.target.value}),className:(0,d.cn)("h-9 px-3 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","w-full min-w-0 cursor-pointer"),style:{colorScheme:"auto"},children:[(0,a.jsx)("option",{value:"",children:"All Providers"}),N.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"start-date-filter",className:"text-sm font-medium text-text-main",children:"Start Date"}),(0,a.jsx)("input",{id:"start-date-filter",type:"datetime-local",value:S.startDate,onChange:e=>D({...S,startDate:e.target.value}),className:(0,d.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"end-date-filter",className:"text-sm font-medium text-text-main",children:"End Date"}),(0,a.jsx)("input",{id:"end-date-filter",type:"datetime-local",value:S.endDate,onChange:e=>D({...S,endDate:e.target.value}),className:(0,d.cn)("h-9 px-3 rounded-lg border border-black/10 dark:border-white/10 bg-surface","w-full min-w-0 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:col-span-2 lg:col-span-1",children:[(0,a.jsx)("span",{className:"hidden text-sm font-medium text-text-main opacity-0 lg:block","aria-hidden":"true",children:"Clear"}),(0,a.jsx)(o.default,{variant:"ghost",onClick:()=>{D({provider:"",startDate:"",endDate:""})},disabled:!S.provider&&!S.startDate&&!S.endDate,className:"w-full",children:"Clear Filters"})]})]})}),(0,a.jsxs)(i.default,{padding:"none",children:[(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[880px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5",children:[(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Input Tokens"}),(0,a.jsx)("th",{className:"text-right p-4 text-sm font-semibold text-text-main",children:"Output Tokens"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Latency"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Action"})]})}),(0,a.jsx)("tbody",{children:n?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading..."]})})}):0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"7",className:"p-8 text-center text-text-muted",children:"No request details found"})}):e.map((e,t)=>(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,a.jsx)("td",{className:"max-w-[260px] truncate p-4 font-mono text-sm text-text-main",children:e.model}),(0,a.jsx)("td",{className:"max-w-[180px] truncate p-4 text-sm text-text-main",children:(0,a.jsx)("span",{className:"font-medium",children:f(e.provider,k)})}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:g(e.tokens).toLocaleString()}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-main text-right font-mono",children:e.tokens?.completion_tokens?.toLocaleString()||0}),(0,a.jsx)("td",{className:"p-4 text-sm text-text-muted",children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsxs)("div",{children:["TTFT: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.ttft||0,"ms"]})]}),(0,a.jsxs)("div",{children:["Total: ",(0,a.jsxs)("span",{className:"font-mono",children:[e.latency?.total||0,"ms"]})]})]})}),(0,a.jsx)("td",{className:"p-4 text-center",children:(0,a.jsx)(o.default,{variant:"outline",size:"sm",onClick:()=>{u(e),v(!0)},children:"Detail"})})]},`${e.id}-${t}`))})]})}),!n&&e.length>0&&(0,a.jsx)("div",{className:"border-t border-black/5 dark:border-white/5",children:(0,a.jsx)(x.default,{currentPage:s.page,pageSize:s.pageSize,totalItems:s.totalItems,onPageChange:e=>{r(t=>({...t,page:e}))},onPageSizeChange:e=>{r(t=>({...t,pageSize:e,page:1}))}})})]}),(0,a.jsx)(c,{isOpen:j,onClose:()=>v(!1),title:"Request Details",width:"lg",children:p&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 text-sm sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"ID:"})," ",(0,a.jsx)("span",{className:"break-all font-mono text-text-main",children:p.id})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Timestamp:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:new Date(p.timestamp).toLocaleString()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Provider:"})," ",(0,a.jsx)("span",{className:"text-text-main font-medium",children:f(p.provider,k)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Model:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:p.model})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,a.jsx)("span",{className:(0,d.cn)("font-medium","success"===p.status?"text-green-600":"text-red-600"),children:p.status})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"})," ",(0,a.jsxs)("span",{className:"text-text-main font-mono",children:["TTFT ",p.latency?.ttft||0,"ms / Total ",p.latency?.total||0,"ms"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Input Tokens:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:g(p.tokens).toLocaleString()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Output Tokens:"})," ",(0,a.jsx)("span",{className:"text-text-main font-mono",children:p.tokens?.completion_tokens?.toLocaleString()||0})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(b,{title:"1. Client Request (Input)",defaultOpen:!0,icon:"input",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:JSON.stringify(p.request,null,2)})}),p.providerRequest&&(0,a.jsx)(b,{title:"2. Provider Request (Translated)",icon:"translate",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:JSON.stringify(p.providerRequest,null,2)})}),p.providerResponse&&(0,a.jsx)(b,{title:"3. Provider Response (Raw)",icon:"data_object",children:(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:"object"==typeof p.providerResponse?JSON.stringify(p.providerResponse,null,2):p.providerResponse})}),(0,a.jsxs)(b,{title:"4. Client Response (Final)",defaultOpen:!0,icon:"output",children:[p.response?.thinking&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"font-semibold text-text-main mb-2 flex items-center gap-2 text-xs uppercase tracking-wide opacity-70",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"psychology"}),"Thinking Process"]}),(0,a.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:p.response.thinking})]}),(0,a.jsx)("h4",{className:"font-semibold text-text-main mb-2 text-xs uppercase tracking-wide opacity-70",children:"Content"}),(0,a.jsx)("pre",{className:"max-h-[300px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs text-text-main dark:border-white/5 dark:bg-white/5 sm:p-4",children:p.response?.content||"[No content]"})]})]})]})})]})}let v=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function N(){return(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(n.Qv,{}),children:(0,a.jsx)(w,{})})}function w(){let e=(0,r.useSearchParams)(),t=(0,r.useRouter)(),[s,i]=(0,l.useState)("today"),o=e.get("tab"),d=o&&["overview","logs","details"].includes(o)?o:"overview";return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(n.Iz,{options:[{value:"overview",label:"Overview"},{value:"details",label:"Details"}],value:d,onChange:s=>{if(s===d)return;let a=new URLSearchParams(e);a.set("tab",s),t.push(`/dashboard/usage?${a.toString()}`,{scroll:!1})},className:"w-full sm:w-auto"}),"overview"===d&&(0,a.jsx)(n.Iz,{options:v,value:s,onChange:i,size:"sm",className:"w-full sm:w-auto"})]}),"overview"===d&&(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(n.Qv,{}),children:(0,a.jsx)(n.jK,{period:s,setPeriod:i,hidePeriodSelector:!0})}),"logs"===d&&(0,a.jsx)(n.gM,{}),"details"===d&&(0,a.jsx)(j,{})]})}}},e=>{e.O(0,[2574,3862,4343,85,5497,8441,3794,7358],()=>e(e.s=30906)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{93224:(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,39835)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,40197)),Promise.resolve().then(n.bind(n,50382)),Promise.resolve().then(n.bind(n,21286)),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,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,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,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,50378)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,23615)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,92622)),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,97677)),Promise.resolve().then(n.bind(n,4809))}},e=>{e.O(0,[2574,3862,4343,3702,5497,8441,3794,7358],()=>e(e.s=93224)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{93224:(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,39835)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,84588)),Promise.resolve().then(n.bind(n,40197)),Promise.resolve().then(n.bind(n,50382)),Promise.resolve().then(n.bind(n,21286)),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,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,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,4823)),Promise.resolve().then(n.bind(n,90882)),Promise.resolve().then(n.bind(n,50378)),Promise.resolve().then(n.bind(n,51825)),Promise.resolve().then(n.bind(n,23615)),Promise.resolve().then(n.bind(n,28067)),Promise.resolve().then(n.bind(n,98)),Promise.resolve().then(n.bind(n,92622)),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,97677)),Promise.resolve().then(n.bind(n,4809))}},e=>{e.O(0,[2574,3862,4343,85,5497,8441,3794,7358],()=>e(e.s=93224)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7370],{31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},59539:(e,t,s)=>{Promise.resolve().then(s.bind(s,87304))},73321:(e,t,s)=>{"use strict";var r=s(74645);s.o(r,"notFound")&&s.d(t,{notFound:function(){return r.notFound}}),s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},84588:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(95155),a=s(31474);function n({children:e,title:t,subtitle:s,icon:i,action:l,padding:c="md",hover:d=!1,elev:o=!1,className:x,...m}){return(0,r.jsxs)("div",{className:(0,a.cn)("card-3d border border-border-subtle rounded-[14px] transition-[border-color,box-shadow,transform] duration-200",o&&"card-3d-elev",d&&"hover:-translate-y-0.5 hover:border-brand-500/30 hover:shadow-[var(--shadow-warm)] cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[c],x),...m,children:[(t||l)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,r.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),l]}),e]})}n.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...s,children:e})},n.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...s,children:e})},n.ListItem=function({children:e,actions:t,className:s,...n}){return(0,r.jsxs)("div",{className:(0,a.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",s),...n,children:[(0,r.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},87304:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(95155),a=s(12115),n=s(73321),i=s(84588);let l={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}}};function c({isOpen:e,onClose:t,onSave:s}){let[n,i]=(0,a.useState)({}),[d,o]=(0,a.useState)(!0),[x,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&u()},[e]);let u=async()=>{o(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();i(t)}else i(l)}catch(e){console.error("Failed to load pricing:",e),i(l)}finally{o(!1)}},h=async()=>{m(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(e.ok)s?.(),t();else{let t=await e.json();alert(`Failed to save pricing: ${t.error}`)}}catch(e){console.error("Failed to save pricing:",e),alert("Failed to save pricing")}finally{m(!1)}},p=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&i(l)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let b=Object.keys(n).sort(),j=["input","output","cached","reasoning","cache_creation"];return(0,r.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,r.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,r.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,r.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,r.jsx)("div",{className:"flex-1 overflow-auto p-4",children:d?(0,r.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,r.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,r.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,r.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),b.map(e=>{let t=Object.keys(n[e]).sort();return(0,r.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,r.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm",children:[(0,r.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,r.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),j.map(s=>(0,r.jsx)("td",{className:"px-3 py-2",children:(0,r.jsx)("input",{type:"number",step:"0.01",min:"0",value:n[e][t][s]||0,onChange:r=>{let a;!isNaN(a=parseFloat(r.target.value))&&!(a<0)&&i(r=>{let n={...r};return n[e]||(n[e]={}),n[e][t]||(n[e][t]={}),n[e][t][s]=a,n})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},s))]},t))})]})})]},e)}),0===b.length&&(0,r.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,r.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,r.jsx)("button",{onClick:p,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:x,children:"Reset to Defaults"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:x,children:"Cancel"}),(0,r.jsx)("button",{onClick:h,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:x,children:x?"Saving...":"Save Changes"})]})]})]})})}function d(){(0,n.useRouter)();let[e,t]=(0,a.useState)(!1),[s,l]=(0,a.useState)(null),[d,o]=(0,a.useState)(!0);(0,a.useEffect)(()=>{x()},[]);let x=async()=>{o(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();l(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{o(!1)}};return(0,r.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-3xl font-bold",children:"Pricing Settings"}),(0,r.jsx)("p",{className:"text-text-muted mt-1",children:"Configure pricing rates for cost tracking and calculations"})]}),(0,r.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:"Edit Pricing"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,r.jsxs)(i.default,{className:"p-4",children:[(0,r.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Models"}),(0,r.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(()=>{if(!s)return 0;let e=0;for(let t in s)e+=Object.keys(s[t]).length;return e})()})]}),(0,r.jsxs)(i.default,{className:"p-4",children:[(0,r.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Providers"}),(0,r.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(!s?[]:Object.keys(s).sort()).length})]}),(0,r.jsxs)(i.default,{className:"p-4",children:[(0,r.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Status"}),(0,r.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:d?"...":"Active"})]})]}),(0,r.jsxs)(i.default,{className:"p-6",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"How Pricing Works"}),(0,r.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Cost Calculation:"}),"Costs are calculated based on token usage and pricing rates. Each request's cost is determined by: (input_tokens \xd7 input_rate) + (output_tokens \xd7 output_rate) + (cached_tokens \xd7 cached_rate)"]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Pricing Format:"})," All rates are in ",(0,r.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: An input rate of 2.50 means $2.50 per 1,000,000 input tokens."]}),(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Token Types:"})}),(0,r.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Input:"})," Standard prompt tokens"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Output:"})," Completion/response tokens"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Cached:"})," Cached input tokens (typically 50% of input rate)"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Reasoning:"})," Special reasoning/thinking tokens (fallback to output rate)"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Cache Creation:"})," Tokens used to create cache entries (fallback to input rate)"]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Custom Pricing:"})," You can override default pricing for specific models. Reset to defaults anytime to restore standard rates."]})]})]}),(0,r.jsxs)(i.default,{className:"p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Current Pricing Overview"}),(0,r.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:"View Full Details"})]}),d?(0,r.jsx)("div",{className:"text-center py-4 text-text-muted",children:"Loading pricing data..."}):s?(0,r.jsxs)("div",{className:"space-y-3",children:[Object.keys(s).slice(0,5).map(e=>(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,r.jsxs)("span",{className:"text-text-muted",children:[Object.keys(s[e]).length," models"]})]},e)),Object.keys(s).length>5&&(0,r.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",Object.keys(s).length-5," more providers"]})]}):(0,r.jsx)("div",{className:"text-text-muted",children:"No pricing data available"})]}),e&&(0,r.jsx)(c,{isOpen:e,onClose:()=>t(!1),onSave:()=>{x()}})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=59539)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1934:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(12115);let o=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e))},i=t=e(n,o,a);return a},a=e=>{let t=e?o(e):o,r=e=>(function(e,t=e=>e){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},i=e=>e?a(e):a},5887:()=>{},11065:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,35154,23)),Promise.resolve().then(r.t.bind(r,5887,23)),Promise.resolve().then(r.t.bind(r,51743,23)),Promise.resolve().then(r.bind(r,94635)),Promise.resolve().then(r.bind(r,21110))},21110:(e,t,r)=>{"use strict";r.d(t,{ThemeProvider:()=>i});var n=r(95155),o=r(12115),a=r(90085);function i({children:e}){let{initTheme:t}=(0,a.A)();return(0,o.useEffect)(()=>{t()},[t]),(0,n.jsx)(n.Fragment,{children:e})}},31692:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>o});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},o=(e,t)=>(r,o,a)=>{let i,u={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),o=null!=(r=t.getItem(e))?r:null;return o instanceof Promise?o.then(n):n(o)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=0,c=new Set,d=new Set,f=u.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),r(...e)},o,a);let m=()=>{let e=u.partialize({...o()});return f.setItem(u.name,{state:e,version:u.version})},h=a.setState;a.setState=(e,t)=>(h(e,t),m());let p=e((...e)=>(r(...e),m()),o,a);a.getInitialState=()=>p;let v=()=>{var e,t;if(!f)return;let a=++l;s=!1,c.forEach(e=>{var t;return e(null!=(t=o())?t:p)});let h=(null==(t=u.onRehydrateStorage)?void 0:t.call(u,null!=(e=o())?e:p))||void 0;return n(f.getItem.bind(f))(u.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===u.version)return[!1,e.state];else{if(u.migrate){let t=u.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(a!==l)return;let[n,s]=e;if(r(i=u.merge(s,null!=(t=o())?t:p),!0),n)return m()}).then(()=>{a===l&&(null==h||h(o(),void 0),i=o(),s=!0,d.forEach(e=>e(i)))}).catch(e=>{a===l&&(null==h||h(void 0,e))})};return a.persist={setOptions:e=>{u={...u,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},u.skipHydration||v(),i||p}},35154:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},51743:()=>{},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},73006:(e,t,r)=>{"use strict";r.d(t,{FE:()=>h,Tl:()=>l,kk:()=>c,oQ:()=>d,wn:()=>p});var n=r(93308);let o={},a=n.Xn,i=[];function u(){if("u"<typeof document)return n.Xn;let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):n.Xn;return(0,n.QC)(t)}async function s(e){if("en"===e){o={};return}try{let t=await fetch(`/i18n/literals/${e}.json`);o=await t.json()}catch(e){console.error("Failed to load translations:",e),o={}}}function l(e){if(!e||"string"!=typeof e)return e;let t=e.trim();return t&&"en"!==a&&o[t]||e}function c(){return a}function d(e){return i.push(e),()=>{i=i.filter(t=>t!==e)}}function f(e){if(!e.nodeValue||!e.nodeValue.trim())return;let t=e.parentElement;if(!t)return;let r=t;for(;r;){if(r.hasAttribute&&r.hasAttribute("data-i18n-skip"))return;r=r.parentElement}if(["script","style","code","pre","colgroup","table","thead","tbody","tfoot","tr","select","datalist","optgroup"].includes(t.tagName?.toLowerCase()))return;e._originalText||(e._originalText=e.nodeValue);let n=l(e._originalText);n!==e.nodeValue&&(e.nodeValue=n)}function m(e){let t;if(!e)return;let r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),n=[];for(;t=r.nextNode();)n.push(t);n.forEach(f)}async function h(){a=u(),await s(a),m(document.body),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE?m(e):e.nodeType===Node.TEXT_NODE&&f(e)})})}).observe(document.body,{childList:!0,subtree:!0})}async function p(){a=u(),await s(a),i.forEach(e=>e()),m(document.body)}},73321:(e,t,r)=>{"use strict";var n=r(74645);r.o(n,"notFound")&&r.d(t,{notFound:function(){return n.notFound}}),r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},93308:(e,t,r)=>{"use strict";r.d(t,{CL:()=>a,QC:()=>i,Xn:()=>o,YZ:()=>n});let n=["en","vi","zh-CN","zh-TW","ja","pt-BR","pt-PT","ko","es","de","fr","he","ar","ru","pl","cs","nl","tr","uk","tl","id","th","hi","bn","ur","ro","sv","it","el","hu","fi","da","no"],o="en",a="locale";function i(e){return"zh"===e||"zh-CN"===e?"zh-CN":"en"===e?"en":"vi"===e?"vi":"zh-TW"===e?"zh-TW":"ja"===e?"ja":"pt-BR"===e?"pt-BR":"pt-PT"===e?"pt-PT":"ko"===e?"ko":"es"===e?"es":"de"===e?"de":"fr"===e?"fr":"he"===e?"he":"ar"===e?"ar":"ru"===e?"ru":"pl"===e?"pl":"cs"===e?"cs":"nl"===e?"nl":"tr"===e?"tr":"uk"===e?"uk":"tl"===e?"tl":"id"===e?"id":"th"===e?"th":"hi"===e?"hi":"bn"===e?"bn":"ur"===e?"ur":"ro"===e?"ro":"sv"===e?"sv":"it"===e?"it":"el"===e?"el":"hu"===e?"hu":"fi"===e?"fi":"da"===e?"da":"no"===e?"no":o}},94635:(e,t,r)=>{"use strict";r.d(t,{RuntimeI18nProvider:()=>u});var n=r(95155),o=r(12115),a=r(73321),i=r(73006);function u({children:e}){let t=(0,a.usePathname)();return(0,o.useEffect)(()=>{(0,i.FE)()},[]),(0,o.useEffect)(()=>{t&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,i.wn)()})})},[t]),(0,n.jsx)(n.Fragment,{children:e})}}},e=>{e.O(0,[3970,3334,85,8441,3794,7358],()=>e(e.s=11065)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{7911:(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),l=s(73321);function n(){let[e,t]=(0,r.useState)(""),[s,n]=(0,r.useState)(""),[d,o]=(0,r.useState)(""),[c,x]=(0,r.useState)(0),[u,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(null),[b,f]=(0,r.useState)("password"),[j,w]=(0,r.useState)(!1),[g,N]=(0,r.useState)("Sign in with OIDC"),v=(0,l.useRouter)();(0,r.useEffect)(()=>{if(c<=0)return;let e=setInterval(()=>x(e=>e>0?e-1:0),1e3);return()=>clearInterval(e)},[c]),(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){v.push("/dashboard"),v.refresh();return}p(!!e.hasPassword),f(e.authMode||"password"),w(!0===e.oidcConfigured),N(e.oidcLoginLabel||"Sign in with OIDC")}else p(!0)}catch(e){clearTimeout(t),p(!0)}}()},[v]);let y=async t=>{t.preventDefault(),h(!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)v.push("/dashboard"),v.refresh();else{let e=await t.json();n(e.error||"Invalid password"),e.resetHint&&o(e.resetHint),e.retryAfter&&x(Number(e.retryAfter))}}catch(e){n("An error occurred. Please try again.")}finally{h(!1)}},S=j&&["oidc","both"].includes(b),C="oidc"!==b||!j;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:"ZevaiRouter"}),(0,a.jsx)("p",{className:"text-text-muted",children:"oidc"===b&&j?"Sign in with your OIDC provider to access the dashboard":"Enter your password to access the dashboard"})]}),(0,a.jsx)(i.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[S&&(0,a.jsx)(i.$n,{type:"button",variant:"primary",className:"w-full",onClick:()=>{window.location.href="/api/auth/oidc/start"},children:g}),S&&C&&(0,a.jsx)("div",{className:"h-px bg-border/60"}),C?(0,a.jsxs)("form",{onSubmit:y,className:"flex flex-col gap-4",children:[("oidc"===b&&!j||"both"===b&&!j)&&(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"===b&&j&&(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:!S}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s}),c>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:[c,"s"]}),"."]}),d&&(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:"zevai"})," 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:u,disabled:c>0,children:c>0?`Wait ${c}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-text-muted",children:"No custom password is set yet. The default password above will work until you change it."})]}):s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]})})]})]})}}},e=>{e.O(0,[2574,3862,4343,3702,5497,8441,3794,7358],()=>e(e.s=7911)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{7911:(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),l=s(73321);function n(){let[e,t]=(0,r.useState)(""),[s,n]=(0,r.useState)(""),[d,o]=(0,r.useState)(""),[c,x]=(0,r.useState)(0),[u,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(null),[b,f]=(0,r.useState)("password"),[j,w]=(0,r.useState)(!1),[g,N]=(0,r.useState)("Sign in with OIDC"),v=(0,l.useRouter)();(0,r.useEffect)(()=>{if(c<=0)return;let e=setInterval(()=>x(e=>e>0?e-1:0),1e3);return()=>clearInterval(e)},[c]),(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){v.push("/dashboard"),v.refresh();return}p(!!e.hasPassword),f(e.authMode||"password"),w(!0===e.oidcConfigured),N(e.oidcLoginLabel||"Sign in with OIDC")}else p(!0)}catch(e){clearTimeout(t),p(!0)}}()},[v]);let y=async t=>{t.preventDefault(),h(!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)v.push("/dashboard"),v.refresh();else{let e=await t.json();n(e.error||"Invalid password"),e.resetHint&&o(e.resetHint),e.retryAfter&&x(Number(e.retryAfter))}}catch(e){n("An error occurred. Please try again.")}finally{h(!1)}},S=j&&["oidc","both"].includes(b),C="oidc"!==b||!j;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:"ZevaiRouter"}),(0,a.jsx)("p",{className:"text-text-muted",children:"oidc"===b&&j?"Sign in with your OIDC provider to access the dashboard":"Enter your password to access the dashboard"})]}),(0,a.jsx)(i.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[S&&(0,a.jsx)(i.$n,{type:"button",variant:"primary",className:"w-full",onClick:()=>{window.location.href="/api/auth/oidc/start"},children:g}),S&&C&&(0,a.jsx)("div",{className:"h-px bg-border/60"}),C?(0,a.jsxs)("form",{onSubmit:y,className:"flex flex-col gap-4",children:[("oidc"===b&&!j||"both"===b&&!j)&&(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"===b&&j&&(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:!S}),s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s}),c>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:[c,"s"]}),"."]}),d&&(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:"zevai"})," 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:u,disabled:c>0,children:c>0?`Wait ${c}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-text-muted",children:"No custom password is set yet. The default password above will work until you change it."})]}):s&&(0,a.jsx)("p",{className:"text-xs text-red-500",children:s})]})})]})]})}}},e=>{e.O(0,[2574,3862,4343,85,5497,8441,3794,7358],()=>e(e.s=7911)),_N_E=e.O()}]);