zevairouter 1.0.185 → 1.0.187

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 (556) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +8 -8
  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.nft.json +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  61. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  63. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  64. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  65. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  66. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  67. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  72. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  73. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  74. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  75. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  76. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  77. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  78. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  79. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  80. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  81. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  82. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  91. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  287. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  288. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  289. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  290. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  291. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  292. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  293. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  294. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  295. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  296. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  297. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  298. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  299. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  300. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  301. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  302. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  303. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  304. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  305. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  306. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  307. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  308. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  309. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  310. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  311. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  312. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  313. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  314. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  315. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  316. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  317. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  318. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  319. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  320. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  321. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  322. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  323. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  324. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  325. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  326. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  327. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  328. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  329. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  330. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  331. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  332. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  333. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  334. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  335. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  336. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  337. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  338. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  339. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  340. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  341. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  342. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  343. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  344. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  345. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  346. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  347. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  348. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  349. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  350. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  351. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  352. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  353. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  354. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  355. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  356. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  357. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  358. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  359. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  360. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  361. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  362. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  363. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  364. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  365. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  366. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  367. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  368. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  369. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  370. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  371. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  372. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  373. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  374. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  375. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  376. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  377. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  378. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
  379. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  380. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  381. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  382. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  383. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
  384. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  385. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
  386. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  387. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  388. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  389. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  390. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  391. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  392. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  393. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  394. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  395. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  396. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  397. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  398. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  399. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  400. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  401. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  402. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  403. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  404. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  405. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  406. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  407. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  408. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  409. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  410. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  411. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  412. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  413. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  414. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  415. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  416. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  417. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  418. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  419. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  420. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  421. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  422. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  423. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  424. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  425. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  426. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  427. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  428. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  429. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  430. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  431. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  432. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  433. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  434. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  435. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  436. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  437. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  438. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  439. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  440. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  441. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  442. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  443. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  444. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  445. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  446. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  447. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  448. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  449. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  450. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  451. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  452. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  453. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  454. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  455. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  456. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  457. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  458. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  459. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  460. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  461. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  462. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  463. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  464. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  465. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  466. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  467. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  468. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  469. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  470. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  471. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  472. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  473. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  475. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  476. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  477. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  478. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  479. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  480. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  481. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  482. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  483. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  484. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  485. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  486. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  487. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  488. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  489. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  490. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  491. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  492. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  493. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  494. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  495. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  496. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  497. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  498. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  499. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  500. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  501. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  502. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  503. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  504. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  505. package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
  506. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  507. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  508. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  509. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  510. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  511. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  512. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  513. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  514. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  515. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  516. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  517. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  518. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  519. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  520. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  521. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  522. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  523. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  524. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  525. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  526. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  527. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  528. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  529. package/cli/app/.next-cli-build/server/app-paths-manifest.json +8 -8
  530. package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
  531. package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
  532. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  533. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -0
  534. package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
  535. package/cli/app/.next-cli-build/server/chunks/6457.js +4 -4
  536. package/cli/app/.next-cli-build/server/chunks/7239.js +4 -4
  537. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  538. package/cli/app/.next-cli-build/server/chunks/9621.js +1 -1
  539. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  540. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  541. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  542. package/cli/app/.next-cli-build/static/chunks/5497-6ca1837aad0c6a5d.js +7 -0
  543. package/cli/app/.next-cli-build/static/chunks/{620-fe0d2b5c7c66dcb0.js → 620-180a88d3d7810981.js} +1 -1
  544. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-be41e2947cffd2de.js +1 -0
  545. package/cli/app/.next-cli-build/static/chunks/app/landing/page-e65c4905b4bff9af.js +1 -0
  546. package/cli/app/CHANGELOG.md +14 -0
  547. package/cli/app/package.json +1 -1
  548. package/cli/app/src/lib/process/pidIdentity.js +237 -0
  549. package/cli/cli.js +60 -22
  550. package/cli/package.json +1 -1
  551. package/package.json +1 -1
  552. package/cli/app/.next-cli-build/static/chunks/5497-30373888abff3013.js +0 -7
  553. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-98cde94871a97a17.js +0 -1
  554. package/cli/app/.next-cli-build/static/chunks/app/landing/page-06b42dda19642072.js +0 -1
  555. /package/cli/app/.next-cli-build/static/{FPkvOng0x2firdw2nnquf → Xj98vqQWZlW-Y2R3CFpzC}/_buildManifest.js +0 -0
  556. /package/cli/app/.next-cli-build/static/{FPkvOng0x2firdw2nnquf → Xj98vqQWZlW-Y2R3CFpzC}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{5498:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>$});var a=r(95155),s=r(12115),n=r(57250),l=r(42793);function i(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function o(e){if(e?.unlimited===!0)return e?.remainingPercentage!==void 0&&Number.isFinite(Number(e.remainingPercentage))?Math.max(0,Math.min(100,Math.round(Number(e.remainingPercentage)))):100;if(e?.remainingPercentage!==void 0&&Number.isFinite(Number(e.remainingPercentage)))return Math.max(0,Math.min(100,Math.round(Number(e.remainingPercentage))));if(e?.remaining!==void 0&&Number.isFinite(Number(e.remaining))){let t=Number(e.remaining);if(t>=0&&t<=100&&!(e.total>100&&t<=100&&null!=e.used))return e.total>0?i(e.used,e.total):Math.round(t)}return i(e?.used,e?.total)}function d(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"autoclaw":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:"points"===e?"Points":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message&&!t.quotas?r.push({name:"error",isError:!0,used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=!0===t.unlimited||!(t.total>0)&&t.remainingPercentage>0;r.push({name:e,used:t.used||0,total:a?0:t.total||0,resetAt:t.resetAt||null,remainingPercentage:null!=t.remainingPercentage?t.remainingPercentage:a?100:void 0,unlimited:a})});break;case"cloudflare-ai":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=!0===t.unlimited||!(t.total>0);r.push({name:e,used:t.used||0,total:a?0:t.total||0,resetAt:t.resetAt||null,remainingPercentage:null!=t.remainingPercentage?t.remainingPercentage:100*!!a,unlimited:a})});break;default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,...null!=t.remainingPercentage?{remainingPercentage:t.remainingPercentage}:{},...!0===t.unlimited?{unlimited:!0}:{}})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,l.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}let c=["name","used","total","resetAt","remaining","remainingPercentage","unlimited","message","isError","unit","modelKey"];function u({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:n=!1,paginate:l=!0,totalCount:i}){let[d,m]=(0,s.useState)(1),[x,h]=(0,s.useState)(e);x===e||Array.isArray(x)&&Array.isArray(e)&&x.length===e.length&&x.every((t,r)=>{let a=e[r];return t&&a?c.every(e=>String(t[e]??null)===String(a[e]??null)):t===a})||h(e);let b=(0,s.useMemo)(()=>x.map((e,t)=>({...e,index:t,remaining:o(e)})),[x]),p=(0,s.useMemo)(()=>"remaining-asc"===r?[...b].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...b].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):b,[b,r]),g=l?Math.max(1,Math.ceil(p.length/10)):1;if((0,s.useEffect)(()=>{m(1)},[r,x]),(0,s.useEffect)(()=>{m(e=>Math.min(e,g))},[g]),!e||0===e.length)return null;let f=l?p.slice((d-1)*10,10*d):p,y=0===p.length?0:(d-1)*10+1,v=l?Math.min(10*d,p.length):p.length,k=Number.isFinite(i)?i:p.length,j=t?"py-1 px-1.5":"py-2 px-3",w=t?"text-[11px]":"text-sm",N=t?"text-[11px]":"text-sm",C=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[k," quota",k>1?"s":""]}),n&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:f.map(e=>{var r;if(e.isError)return(0,a.jsx)("tr",{className:"border-b border-black/5 dark:border-white/5",children:(0,a.jsx)("td",{colSpan:3,className:`${j}`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px] text-red-500",children:"error"}),(0,a.jsx)("span",{className:`${w} text-red-600 dark:text-red-400 truncate`,children:e.message||"Failed to load quota"})]})})},`error-${e.index}`);let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},n=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let n=Math.floor(s/60),l=s%60;if(n<24)return`${n}h ${l}m`;let i=Math.floor(n/24);return`${i}d ${n%24}h ${l}m`}catch(e){return"-"}}(e.resetAt),l=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let n="";n=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let l=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${n}, ${l}`}catch{return null}}(e.resetAt);return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${j} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${w} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${j} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsx)("span",{className:"text-text-muted",children:!0!==e.unlimited&&e.total>0?`${e.used.toLocaleString()} / ${e.total.toLocaleString()}`:!0===e.unlimited?"Included / ∞":`${e.used.toLocaleString()} / ∞`}),(0,a.jsx)("span",{className:`font-medium ${s.text}`,children:Number.isFinite(e.remaining)?`${e.remaining}%`:"—"})]})]})}),(0,a.jsx)("td",{className:`${j} w-[25%]`,children:"-"!==n||l?t?(0,a.jsx)("div",{className:`${N} text-text-primary font-medium truncate`,title:l||"",children:"-"!==n?`in ${n}`:l}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==n&&(0,a.jsxs)("div",{className:`${N} text-text-primary font-medium`,children:["in ",n]}),l&&(0,a.jsx)("div",{className:`${C} text-text-muted`,children:l})]}):(0,a.jsx)("div",{className:`${N} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),g>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",y,"-",v," of ",p.length]}),(0,a.jsxs)("span",{children:["Page ",d," / ",g]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>m(e=>Math.max(1,e-1)),disabled:1===d,className:"flex h-11 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-7 sm:rounded-md sm:px-2 sm:text-[10px]",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>m(e=>Math.min(g,e+1)),disabled:d===g,className:"flex h-11 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-7 sm:rounded-md sm:px-2 sm:text-[10px]",children:"Next"})]})]})]})}var m=r(98542),x=r(84588),h=r(35497),b=r(52679);function p(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function g(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function f(e){return b.Q2[e]?.name||e}function y(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function v(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function k(e,t){return await e(t)}let j="quotaAutoRefresh",w=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],N=[{value:"single",label:"Satuan",icon:"account_circle"},{value:"bulk",label:"Bulk",icon:"stacks"}],C=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],S=[10,20,50,100];function $(){let[e,t]=(0,s.useState)([]),[r,l]=(0,s.useState)({}),[c,$]=(0,s.useState)({}),[A,P]=(0,s.useState)({}),[q,E]=(0,s.useState)(!0),[M,T]=(0,s.useState)(null),[F,z]=(0,s.useState)(!1),[D,_]=(0,s.useState)(!1),[O,L]=(0,s.useState)(60),[I,R]=(0,s.useState)(!0),[U,H]=(0,s.useState)(null),[K,B]=(0,s.useState)(null),[J,Q]=(0,s.useState)(null),[W,Y]=(0,s.useState)(null),[G,V]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(null),[ee,et]=(0,s.useState)([]),[er,ea]=(0,s.useState)("all"),[es,en]=(0,s.useState)([]),[el,ei]=(0,s.useState)("single"),[eo,ed]=(0,s.useState)("all"),[ec,eu]=(0,s.useState)("default"),[em,ex]=(0,s.useState)(!1),[eh,eb]=(0,s.useState)(!1),[ep,eg]=(0,s.useState)(!1),[ef,ey]=(0,s.useState)({}),[ev,ek]=(0,s.useState)(!1),[ej,ew]=(0,s.useState)({}),[eN,eC]=(0,s.useState)({}),[eS,e$]=(0,s.useState)({}),[eA,eP]=(0,s.useState)(1),[eq,eE]=(0,s.useState)(20),[eM,eT]=(0,s.useState)(String(20)),[eF,ez]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eD,e_]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eO=(0,s.useRef)(null),eL=(0,s.useRef)(null),eI=(0,s.useRef)(null),eR=(0,s.useRef)(0),eU=(0,s.useCallback)(async(e=eA)=>{let r=++eR.current;try{var a,s;let n=new URLSearchParams({page:String(e),pageSize:String(eq),accountStatus:eo,sort:"priority"});"all"!==er&&n.set("provider",er);let l=await fetch(`/api/providers/client?${n.toString()}`);if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e.error||`Failed to fetch connections (HTTP ${l.status})`)}let i=await l.json();if(r!==eR.current)return[];let o=i.connections||[],d=(a=i.pagination,a||{page:1,pageSize:eq,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,o.length);return t(o),en(i.providerOptions||[]),ez(d),e_(c),eP((s=i.pagination,s?.page||e)),H(null),o}catch(e){if(console.error("Error fetching connections:",e),r!==eR.current)return[];return t([]),en([]),ez({page:1,pageSize:eq,total:0,totalPages:1}),e_({eligibleConnections:0,providerFilteredConnections:0}),H(e.message||"Failed to fetch connections"),[]}},[eo,eA,eq,er]),eH=(0,s.useCallback)(async(e,t,r=!1)=>{$(t=>({...t,[e]:!0})),P(t=>({...t,[e]:null}));try{let a=await fetch(`/api/usage/${e}${r?"?refresh=1":""}`);if(!a.ok){let r=(await a.json().catch(()=>({}))).error||a.statusText;if(404===a.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===a.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,r);let a={quotas:[],message:r};l(t=>({...t,[e]:a}));return}throw Error(`HTTP ${a.status}: ${r}`)}let s=await a.json(),n={quotas:d(t,s),plan:s.plan||null,message:s.message||null,raw:s};l(t=>({...t,[e]:n}))}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),P(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{$(t=>({...t,[e]:!1}))}},[]),eK=(0,s.useCallback)(async(e,t)=>{await eH(e,t,!0),T(new Date)},[eH]),eB=(0,s.useCallback)(async(e,t=!1)=>{if(e&&"all"!==e){eC(t=>({...t,[e]:!0})),e$(t=>({...t,[e]:!1}));try{let r=`/api/usage/aggregate?provider=${encodeURIComponent(e)}${t?"&refresh=1":""}`,a=await fetch(r);if(!a.ok)throw Error("Failed to fetch aggregate");let s=await a.json(),n=d(e,s);ew(t=>({...t,[e]:{quotas:n,plan:s.plan||null,accountCount:s.accountCount||0,accountsWithQuota:s.accountsWithQuota||0,deadCount:s.deadCount||0}}))}catch(t){console.error(`[ProviderLimits] Aggregate fetch error for ${e}:`,t),e$(t=>({...t,[e]:!0}))}finally{eC(t=>({...t,[e]:!1}))}}},[]),eJ=(0,s.useCallback)(async(e,t)=>{if("bulk"===el&&t){await eB(t,!0),T(new Date);return}e?.length&&($(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),await Promise.all(e.map(e=>eH(e,t,!0))),T(new Date))},[eH,el,eB]),eQ=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){Q(e),B(null);try{let t=await fetch(`/api/providers/${e}`,{method:"DELETE"});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status}`)}l(t=>{let r={...t};return delete r[e],r}),$(t=>{let r={...t};return delete r[e],r}),P(t=>{let r={...t};return delete r[e],r}),await k(eU,eA)}catch(e){console.error("Error deleting connection:",e),B({type:"error",message:e.message||"Failed to delete connection"})}finally{Q(null)}}},[eU,eA]),eW=(0,s.useCallback)(async(e,t)=>{Y(e),B(null);try{let r=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||`HTTP ${r.status}`)}await k(eU,eA)}catch(e){console.error("Error updating connection status:",e),await k(eU,eA),B({type:"error",message:e.message||"Failed to update connection status"})}finally{Y(null)}},[eU,eA]),eY=(0,s.useCallback)(async e=>{if(!X?.id)return;let t=X.id,r=X.provider;B(null);try{let a=await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error||`HTTP ${a.status}`)}await eU(),V(!1),Z(null),b.wb.includes(r)&&await eH(t,r)}catch(e){console.error("Error saving connection:",e),B({type:"error",message:e.message||"Failed to save connection"})}},[X,eU,eH]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&et(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eG=(0,s.useCallback)(async()=>{if(!D){_(!0),L(60);try{let e=await eU(eA);if($(y(e)),P(t=>v(t,e)),l(t=>v(t,e)),await Promise.all(e.map(e=>eH(e.id,e.provider,!0))),"bulk"===el){let e="all"!==er?[er]:es.map(e=>e.value||e).filter(e=>"all"!==e);await Promise.all(e.map(e=>eB(e,!0)))}T(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{_(!1)}}},[D,eU,eH,eA,el,er,es,eB]);(0,s.useEffect)(()=>{(async()=>{R(!0);let e=await eU(eA);R(!1),$(y(e)),P(t=>v(t,e)),l(t=>v(t,e)),await Promise.all(e.map(e=>eH(e.id,e.provider))),T(new Date)})()},[eU,eH,eA]),(0,s.useEffect)(()=>{"bulk"!==el||("all"!==er?[er]:es.map(e=>e.value||e).filter(e=>"all"!==e)).forEach(e=>eB(e))},[el,er,es,eB]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(j);E(null===e||"true"===e),z(!0)},[]),(0,s.useEffect)(()=>{F&&window.localStorage.setItem(j,String(q))},[q,F]),(0,s.useEffect)(()=>{eI.current=eG},[eG]);let eV=(0,s.useCallback)(()=>{eO.current&&(clearInterval(eO.current),eO.current=null),eL.current&&(clearInterval(eL.current),eL.current=null)},[]),eX=(0,s.useCallback)(()=>{eO.current||eL.current||(eO.current=setInterval(()=>{eI.current?.()},6e4),eL.current=setInterval(()=>{L(e=>e<=1?60:e-1)},1e3))},[]);(0,s.useEffect)(()=>F&&q?(document.hidden||eX(),eV):void eV(),[q,F,eX,eV]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?eV():q&&F&&eX()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[q,F,eX,eV]);let eZ=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=g(e,t),n=g(r,t),l="remaining-asc"===s?a-n:n-a;return 0!==l?l:(p(e)||"").localeCompare(p(r)||"")});if(!r)return e;let n=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=n(e)-n(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(p(e)||"").localeCompare(p(t)||"")})})(e,r,em,er,ec),[e,r,em,er,ec]),e0=(0,s.useMemo)(()=>{let e;return e=new Map,eZ.forEach(t=>{t.provider&&(e.has(t.provider)||e.set(t.provider,[]),e.get(t.provider).push(t))}),[...e.entries()].map(([e,t])=>(function(e,t,r,a,s){if(!t.length)return null;let n=[],l=[],i=null,o=!1;return t.forEach(e=>{let t=r[e.id];Array.isArray(t?.quotas)&&n.push(...t.quotas),t?.message&&!i&&(i=t.message),s[e.id]&&l.push(s[e.id]),a[e.id]&&(o=!0)}),{id:`${e}-aggregate`,provider:e,name:f(e),email:`${t.length} accounts`,isActive:t.some(e=>e.isActive??!0),isAggregate:!0,quota:{quotas:function(e=[]){let t=new Map;return e.forEach(e=>{if(!e?.name)return;let r=t.get(e.name)||{name:e.name,used:0,total:0,resetAt:e.resetAt||null,remainingPercentage:null,unlimited:!1,_pctSum:0,_pctCount:0};r.used+=Number(e.used)||0,r.total+=Number(e.total)||0,!0===e.unlimited&&(r.unlimited=!0),null!=e.remainingPercentage&&Number.isFinite(Number(e.remainingPercentage))&&(r._pctSum+=Number(e.remainingPercentage),r._pctCount+=1),e.resetAt&&(!r.resetAt||new Date(e.resetAt).getTime()<new Date(r.resetAt).getTime())&&(r.resetAt=e.resetAt),t.set(e.name,r)}),[...t.values()].map(e=>{let{_pctSum:t,_pctCount:r,...a}=e;return a.unlimited?(a.remainingPercentage=100,a.total=0):a.total>0?a.remainingPercentage=(a.total-a.used)/a.total*100:r>0?a.remainingPercentage=t/r:a.remainingPercentage=0,a})}(n),message:0===n.length&&i||null},isLoading:o,error:!n.length&&l.length>0?l[0]:null,connectionIds:t.map(e=>e.id)}})(e,t,r,c,A)).filter(Boolean)},[eZ,r,c,A]),e1=(0,s.useMemo)(()=>Object.keys(ej).length?e0.map(e=>{let t=ej[e.provider];return t&&t.quotas?.length?{...e,email:`${t.accountCount||e.connectionIds?.length||0} accounts`,quota:{...e.quota,quotas:t.quotas,message:null},isLoading:eN[e.provider]||!1}:e}):e0,[e0,ej,eN]),e5=(0,s.useMemo)(()=>"bulk"===el?e1:eZ,[el,e1,eZ]),e2=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=i(e.used,e.total))},e3=(0,s.useCallback)(async(e,t)=>{if(e.length&&!ev){ek(!0),B(null);try{let r=(await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})))).filter(e=>!e.ok).length;await k(eU,eA),r>0&&B({type:"error",message:`Failed to update ${r} of ${e.length} connections`})}catch(e){console.error("Error bulk toggling connections:",e),await k(eU,eA),B({type:"error",message:e.message||"Failed to update connections"})}finally{ek(!1)}}},[ev,eU,eA]),e4="all"===er?"All providers":er,e8=eD.eligibleConnections>0,e6=(0,s.useCallback)(async()=>{R(!0);let e=await eU(eA);R(!1),e.length&&($(y(e)),l(t=>v(t,e)),await Promise.all(e.map(e=>eH(e.id,e.provider))),T(new Date))},[eU,eH,eA]),e7=e5.length>0,e9=eD.eligibleConnections?eD.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===er?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eo?"turned off":"active"===eo?"active":"matching"} accounts found for ${er}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},te=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(eF),tt=!S.includes(eq);return I||e8?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsxs)("div",{className:"grid w-full grid-cols-[minmax(0,1fr)_minmax(0,1fr)_2.75rem] gap-2 sm:flex sm:w-auto sm:flex-wrap sm:items-center sm:gap-1.5",children:[(0,a.jsxs)("div",{className:"relative min-w-0",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eb(e=>!e),className:"flex h-11 w-full min-w-0 items-center justify-between gap-1 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:w-auto sm:rounded-lg sm:px-2","aria-haspopup":"menu","aria-expanded":eh,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===er?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(n.A,{src:`/providers/${er}.png`,alt:er,size:18,className:"size-[18px] rounded object-contain",fallbackText:er.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize",children:e4})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eh&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eb(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==er&&eP(1),ea("all"),eb(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===er?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===er&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:es.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{er!==e&&eP(1),ea(e),eb(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${er===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(n.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),er===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eo,onChange:e=>{let t=e.target.value;eo!==t&&eP(1),ed(t)},className:"h-11 min-w-0 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:rounded-lg sm:px-2","aria-label":"Filter accounts by status",children:w.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("button",{type:"button",onClick:eG,disabled:D,className:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-black/10 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Refresh all","aria-label":"Refresh all quotas",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] sm:text-[14px] ${D?"animate-spin":""}`,children:"refresh"})}),(0,a.jsx)("div",{className:"col-span-2 inline-flex min-h-11 min-w-0 overflow-hidden rounded-xl border border-black/10 bg-black/[0.02] dark:border-white/10 dark:bg-white/[0.03] sm:h-8 sm:min-h-0 sm:rounded-lg",children:N.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>ei(e.value),"aria-pressed":el===e.value,className:`flex min-h-11 flex-1 items-center justify-center gap-1.5 px-3 text-xs font-medium transition-colors sm:min-h-0 sm:flex-none sm:justify-start sm:px-2 sm:font-normal ${el===e.value?"bg-primary text-white":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,title:`Show quota in ${e.label} mode`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px] sm:text-[14px]",children:e.icon}),(0,a.jsx)("span",{children:e.label})]},e.value))}),(0,a.jsx)("button",{type:"button",onClick:()=>eg(e=>!e),"aria-expanded":ep,className:`flex size-11 items-center justify-center rounded-xl border text-text-primary transition-colors sm:hidden ${ep?"border-primary/30 bg-primary/10 text-primary":"border-black/10 hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,"aria-label":ep?"Hide more actions":"Show more actions",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"tune"})}),(0,a.jsxs)("div",{className:`${ep?"flex":"hidden"} col-span-3 flex-col gap-2 rounded-2xl border border-black/10 bg-black/[0.02] p-3 dark:border-white/10 dark:bg-white/[0.03] sm:contents`,children:["codex"===er&&(0,a.jsx)("select",{value:ec,onChange:e=>eu(e.target.value),className:"h-11 w-full rounded-xl border border-black/10 bg-surface px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/10 sm:h-8 sm:w-auto sm:rounded-lg sm:bg-black/[0.02] sm:px-2 dark:sm:bg-white/[0.03]","aria-label":"Sort Codex quotas by remaining",children:C.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>ex(e=>!e),"aria-pressed":em,className:`flex h-11 w-full shrink-0 items-center justify-between gap-2 rounded-xl border px-3 text-xs transition-colors sm:h-8 sm:w-auto sm:justify-start sm:rounded-lg sm:px-2 ${em?"border-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-400":"border-black/10 bg-surface text-text-primary hover:bg-black/5 dark:border-white/10 dark:bg-transparent dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{children:"Expiring first"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:hidden",children:em?"check_circle":"circle"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e3(eZ.filter(e=>(e.isActive??!0)&&e2(e)).map(e=>e.id),!1)},disabled:ev,className:"flex h-11 w-full shrink-0 items-center gap-2 rounded-xl border border-red-500/30 bg-surface px-3 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50 dark:bg-transparent sm:h-8 sm:w-auto sm:rounded-lg sm:px-2",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"block"}),(0,a.jsx)("span",{children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{e3(eZ.filter(e=>!(e.isActive??!0)&&!e2(e)).map(e=>e.id),!0)},disabled:ev,className:"flex h-11 w-full shrink-0 items-center gap-2 rounded-xl border border-emerald-500/30 bg-surface px-3 text-xs text-emerald-600 transition-colors hover:bg-emerald-500/10 disabled:opacity-50 dark:bg-transparent dark:text-emerald-400 sm:h-8 sm:w-auto sm:rounded-lg sm:px-2",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{children:"Turn on Available"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>E(e=>!e),className:"flex h-11 w-full shrink-0 items-center justify-between gap-2 rounded-xl border border-black/10 bg-surface px-3 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-transparent dark:hover:bg-white/5 sm:h-8 sm:w-auto sm:justify-start sm:rounded-lg sm:px-2",title:q?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-text-primary",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] sm:text-[14px] ${q?"text-primary":"text-text-muted"}`,children:q?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{children:"Auto-refresh"})]}),q&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",O,"s)"]})]})]})]})}),K&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-700 dark:text-red-300",role:"alert",children:[(0,a.jsx)("span",{children:K.message}),(0,a.jsx)("button",{type:"button",onClick:()=>B(null),"aria-label":"Dismiss",className:"shrink-0 text-red-500 hover:text-red-700 dark:hover:text-red-200",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}),!I&&U&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-700 dark:text-red-300",role:"alert",children:[(0,a.jsxs)("span",{children:["Failed to refresh providers: ",U]}),(0,a.jsx)("button",{type:"button",onClick:e6,className:"shrink-0 font-medium underline hover:no-underline",children:"Retry"})]}),"bulk"===el&&Object.values(eS).some(Boolean)&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",role:"status",children:"Couldn't load server-side totals for some providers — bulk cards show data for the current page only."}),e7?(0,a.jsxs)(a.Fragment,{children:[em&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e5.map(e=>{let t=!0===e.isAggregate,s=t?e.quota:r[e.id],l=t?e.isLoading:c[e.id],i=t?e.error:A[e.id],d=s?.quotas||[],h=!0===ef[e.id],b=h?d:function(e,t=3){return e.map((e,t)=>({quota:e,index:t})).sort((e,t)=>{let r=o(e.quota)-o(t.quota);if(0!==r)return r;let a=e.quota.resetAt?new Date(e.quota.resetAt).getTime():1/0,s=t.quota.resetAt?new Date(t.quota.resetAt).getTime():1/0;return a!==s?a-s:e.index-t.index}).slice(0,t).map(({quota:e})=>e)}(d),g=!1===e.isActive,y=!t&&(J===e.id||W===e.id);return(0,a.jsxs)(x.default,{padding:"none",className:`min-w-0 ${g?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"border-b border-black/10 px-3 py-2 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(n.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.name||f(e.provider)}),p(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:p(e)}):null]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>t?eJ(e.connectionIds,e.provider):eK(e.id,e.provider),disabled:l||y,"aria-label":"Refresh quota",className:"flex size-11 items-center justify-center rounded-xl transition-colors hover:bg-black/5 disabled:opacity-50 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${l?"animate-spin":""}`,children:"refresh"})}),!t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>{Z(e),V(!0)},disabled:y,"aria-label":"Edit connection",className:"flex size-11 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:opacity-50 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eQ(e.id),disabled:y,"aria-label":"Delete connection",className:"flex size-11 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50 sm:size-8 sm:rounded-lg",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${J===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex size-11 items-center justify-center sm:h-8 sm:w-auto sm:pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(m.default,{size:"sm",touchTarget:!0,checked:e.isActive??!0,disabled:y,onChange:t=>eW(e.id,t)})})]})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:l?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):i?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:i})]}):d.length>0?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"sm:hidden",children:[(0,a.jsx)(u,{quotas:b,totalCount:d.length,paginate:!1,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==ec}),d.length>3&&(0,a.jsxs)("button",{type:"button",onClick:()=>ey(t=>({...t,[e.id]:!h})),className:"mt-2 flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border border-black/10 bg-black/[0.02] text-xs font-medium text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/5","aria-expanded":h,children:[(0,a.jsx)("span",{children:h?"Show less":`Show ${d.length-b.length} more`}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:h?"expand_less":"expand_more"})]})]}),(0,a.jsx)("div",{className:"hidden sm:block",children:(0,a.jsx)(u,{quotas:d,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==ec})}),s?.message?(0,a.jsx)("p",{className:"px-1 text-[10px] text-text-muted",children:s.message}):null]}):s?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:s.message})}):(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("p",{className:"text-xs",children:"No quota data available"})})})]},e.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:te}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:tt?"custom":String(eq),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eP(1),eE(r),eT(String(r)))},className:"h-11 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:rounded-lg sm:px-2","aria-label":"Accounts per page",children:[S.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eM,onChange:e=>eT(e.target.value),onBlur:()=>{let e=Number.parseInt(eM,10);if(!Number.isFinite(e))return void eT(String(eq));let t=Math.min(500,Math.max(1,e));eP(1),eE(t),eT(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eM,10);if(!Number.isFinite(t))return void eT(String(eq));let r=Math.min(500,Math.max(1,t));eP(1),eE(r),eT(String(r))},className:"h-11 w-24 rounded-xl border border-black/10 bg-black/[0.02] px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10 sm:h-8 sm:w-20 sm:rounded-lg sm:px-2","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eF.page," / ",eF.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eP(1),disabled:eF.page<=1||I||D,className:"flex h-11 items-center rounded-xl border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-8 sm:rounded-lg",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eP(e=>Math.max(1,e-1)),disabled:eF.page<=1||I||D,className:"flex size-11 items-center justify-center rounded-xl border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eP(e=>Math.min(eF.totalPages,e+1)),disabled:eF.page>=eF.totalPages||I||D,className:"flex size-11 items-center justify-center rounded-xl border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eP(eF.totalPages),disabled:eF.page>=eF.totalPages||I||D,className:"flex h-11 items-center rounded-xl border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5 sm:h-8 sm:rounded-lg",children:"Last Page"})]})]})})]}):(0,a.jsx)(x.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:e9.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:e9.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:e9.description})]})}),(0,a.jsx)(h.wI,{isOpen:G,connection:X,proxyPools:ee,onSave:eY,onClose:()=>{V(!1),Z(null)}})]}):U?(0,a.jsx)(x.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-red-500 opacity-30",children:"error"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"Failed to Load Providers"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:U}),(0,a.jsxs)("button",{type:"button",onClick:e6,className:"mt-4 inline-flex items-center gap-2 rounded-xl border border-black/10 px-4 py-2 text-sm text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"}),"Retry"]})]})}):(0,a.jsx)(x.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=5498)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7018],{11059:(e,t,s)=>{"use strict";s.d(t,{C:()=>a});var r=s(12115);function a(e=2e3){let[t,s]=(0,r.useState)(null),i=(0,r.useRef)(null),n=(0,r.useRef)(!0);function o(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{return t.select(),document.execCommand("copy")}finally{document.body.removeChild(t)}}return(0,r.useEffect)(()=>(n.current=!0,()=>{n.current=!1,i.current&&clearTimeout(i.current)}),[]),{copied:t,copy:(0,r.useCallback)(async(t,r="default")=>{let a=!1;try{navigator?.clipboard?.writeText?(await navigator.clipboard.writeText(t),a=!0):a=o(t)}catch{try{a=o(t)}catch{a=!1}}return a&&n.current&&(s(r),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{n.current&&s(null)},e)),a},[e])}}},23333:()=>{},33345:(e,t,s)=>{Promise.resolve().then(s.bind(s,85941))},39092:(e,t,s)=>{"use strict";e.exports=s(73279).style},57250:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(95155),a=s(12115),i=s(14051),n=s.n(i);function o({src:e,alt:t,size:s=32,className:i="",fallbackText:n="?",fallbackColor:l}){let[d,c]=(0,a.useState)(!1),[h,x]=(0,a.useState)(e),[u,m]=(0,a.useState)(e);return(u!==e&&(m(e),c(!1),x(e)),!h||d)?(0,r.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${i}`.trim(),style:{width:s,height:s,color:l,fontSize:Math.max(10,Math.floor(.38*s))},children:n}):(0,r.jsx)("img",{src:h,alt:t,width:s,height:s,className:i,onError:()=>{"string"==typeof h&&h.endsWith(".png")?x(`${h.slice(0,-4)}.svg`):c(!0)}})}o.propTypes={src:n().string,alt:n().string,size:n().number,className:n().string,fallbackText:n().string,fallbackColor:n().string}},73279:(e,t,s)=>{"use strict";var r=s(41463);s(23333);var a=s(12115),i=a&&"object"==typeof a&&"default"in a?a:{default:a},n=void 0!==r&&r.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,s=t.name,r=void 0===s?"stylesheet":s,a=t.optimizeForSpeed,i=void 0===a?n:a;d(o(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",d("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t,s=e.prototype;return s.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},s.isOptimizeForSpeed=function(){return this._optimizeForSpeed},s.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(n||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},s.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},s.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},s.insertRule=function(e,t){if(d(o(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var s=this.getSheet();"number"!=typeof t&&(t=s.cssRules.length);try{s.insertRule(e,t)}catch(t){return n||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},s.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var s="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!s.cssRules[e])return e;s.deleteRule(e);try{s.insertRule(t,e)}catch(r){n||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),s.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];d(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},s.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];d(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},s.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},s.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,s){return s?t=t.concat(Array.prototype.map.call(e.getSheetForTag(s).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},s.makeStyleTag=function(e,t,s){t&&d(o(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return s?a.insertBefore(r,s):a.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function d(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,s=e.length;s;)t=33*t^e.charCodeAt(--s);return t>>>0},h={};function x(e,t){if(!t)return"jsx-"+e;var s=String(t),r=e+s;return h[r]||(h[r]="jsx-"+c(e+"-"+s)),h[r]}function u(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var s=e+t;return h[s]||(h[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[s]}var m=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,r=void 0===s?null:s,a=t.optimizeForSpeed,i=void 0!==a&&a;this._sheet=r||new l({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),r&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),r=s.styleId,a=s.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var i=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=i,this._instancesCounts[r]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var r=this._fromServer&&this._fromServer[s];r?(r.parentNode.removeChild(r),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],r=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,r=e.id;if(s){var a=x(r,s);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return u(a,e)}):[u(a,t)]}}return{styleId:x(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),f=a.createContext(null);f.displayName="StyleSheetContext";var p=i.default.useInsertionEffect||i.default.useLayoutEffect,b="u">typeof window?new m:void 0;function g(e){var t=b||a.useContext(f);return t&&("u"<typeof window?t.add(e):p(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}g.dynamic=function(e){return e.map(function(e){return x(e[0],e[1])}).join(" ")},t.style=g},85941:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_});var r=s(95155),a=s(39092),i=s.n(a),n=s(73321),o=s(12115);function l(){let[e,t]=(0,o.useState)(!1),s=(0,n.useRouter)();return(0,r.jsxs)("nav",{className:"fixed top-0 z-50 w-full bg-[#181411]/80 backdrop-blur-md border-b border-[#3a2f27]",children:[(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[(0,r.jsxs)("button",{type:"button",className:"flex items-center gap-3 cursor-pointer bg-transparent border-none p-0",onClick:()=>s.push("/"),"aria-label":"Navigate to home",children:[(0,r.jsx)("div",{className:"size-8 rounded bg-linear-to-br from-[#f97815] to-orange-700 flex items-center justify-center text-white",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"hub"})}),(0,r.jsx)("h2",{className:"text-white text-xl font-bold tracking-tight",children:"ZevaiRouter"})]}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-1 rounded-full border border-[#3a2f27]/80 bg-[#23180f]/55 p-1 shadow-[0_12px_35px_-25px_rgba(249,120,21,0.8)]",children:[(0,r.jsx)("a",{className:"rounded-full px-3 py-1.5 text-gray-300 hover:bg-[#3a2f27]/70 hover:text-white text-sm font-medium transition-colors",href:"#features",children:"Features"}),(0,r.jsx)("a",{className:"rounded-full px-3 py-1.5 text-gray-300 hover:bg-[#3a2f27]/70 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",children:"How it Works"}),(0,r.jsx)("a",{className:"rounded-full px-3 py-1.5 text-gray-300 hover:bg-[#3a2f27]/70 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/Verifiedlabs/zevairouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,r.jsxs)("a",{className:"rounded-full px-3 py-1.5 text-gray-300 hover:bg-[#3a2f27]/70 hover:text-white text-sm font-medium transition-colors flex items-center gap-1",href:"https://github.com/Verifiedlabs/zevairouter",target:"_blank",rel:"noopener noreferrer",children:["GitHub ",(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"open_in_new"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("button",{type:"button",onClick:()=>s.push("/dashboard"),className:"hidden sm:flex h-10 items-center justify-center rounded-xl px-5 bg-[#f97815] hover:bg-[#ff8a2f] transition-all text-[#181411] text-sm font-bold shadow-[0_8px_24px_-10px_rgba(249,120,21,0.8)] hover:-translate-y-0.5 hover:shadow-[0_12px_30px_-10px_rgba(249,120,21,0.9)]",children:"Get Started"}),(0,r.jsx)("button",{type:"button",className:"flex size-10 items-center justify-center rounded-lg text-white transition-colors hover:bg-[#3a2f27] md:hidden",onClick:()=>t(!e),"aria-label":e?"Close navigation menu":"Open navigation menu","aria-expanded":e,"aria-controls":"landing-mobile-navigation",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:e?"close":"menu"})})]})]}),e&&(0,r.jsx)("div",{id:"landing-mobile-navigation",className:"md:hidden border-t border-[#3a2f27] bg-[#181411]/95 backdrop-blur-md",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",onClick:()=>t(!1),children:"Features"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",onClick:()=>t(!1),children:"How it Works"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/Verifiedlabs/zevairouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/Verifiedlabs/zevairouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("button",{type:"button",onClick:()=>s.push("/dashboard"),className:"h-9 rounded-lg bg-[#f97815] hover:bg-[#e0650a] text-[#181411] text-sm font-bold",children:"Get Started"})]})})]})}var d=s(98500),c=s.n(d),h=s(90620);let x=[{icon:"route",label:"One /v1 endpoint",detail:"OpenAI compatible"},{icon:"hub",label:"20+ providers",detail:"One control plane"},{icon:"shield_lock",label:"Local-first",detail:"Your keys stay yours"}];function u(){return(0,r.jsxs)("section",{className:"relative pt-32 pb-20 px-6 min-h-[90vh] flex flex-col items-center justify-center overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-[#f97815]/10 rounded-full blur-[120px] pointer-events-none"}),(0,r.jsxs)("div",{className:"relative z-10 max-w-5xl w-full text-center flex flex-col items-center gap-8",children:[(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-[#3a2f27] bg-[#23180f]/50 px-3 py-1 text-xs font-medium text-[#f97815]",children:[(0,r.jsx)("span",{className:"flex h-2 w-2 rounded-full bg-[#f97815] animate-pulse"}),"v",h.vQ.version," is live"]}),(0,r.jsxs)("h1",{className:"text-5xl md:text-7xl font-black leading-[1.1] tracking-tight",children:["One Endpoint for ",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#f97815]",children:"All AI Providers"})]}),(0,r.jsx)("p",{className:"text-lg md:text-xl text-gray-400 max-w-2xl mx-auto font-light",children:"Self-hosted AI router with a web dashboard. One OpenAI-compatible endpoint for Claude Code, Codex, Cline, Cursor, and similar tools."}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4 w-full",children:[(0,r.jsxs)(c(),{href:"/dashboard",className:"h-12 px-8 rounded-lg bg-[#f97815] hover:bg-[#ff8a2f] text-[#181411] text-base font-bold transition-all duration-300 shadow-[0_0_15px_rgba(249,120,21,0.4)] hover:-translate-y-0.5 hover:shadow-[0_14px_32px_-12px_rgba(249,120,21,0.8)] flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined",children:"rocket_launch"}),"Get Started"]}),(0,r.jsxs)("a",{href:"https://github.com/Verifiedlabs/zevairouter",target:"_blank",rel:"noopener noreferrer",className:"h-12 px-8 rounded-lg border border-[#3a2f27] bg-[#23180f]/90 hover:bg-[#3a2f27] hover:border-[#6a4a34] text-white text-base font-bold transition-all duration-300 hover:-translate-y-0.5 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined",children:"code"}),"View on GitHub"]})]}),(0,r.jsx)("dl",{className:"hidden md:grid w-full max-w-3xl grid-cols-3 divide-x divide-[#3a2f27] overflow-hidden rounded-2xl border border-[#3a2f27] bg-[#1c1713]/75 p-1 shadow-[0_24px_70px_-45px_rgba(249,120,21,0.75)] backdrop-blur-xl",children:x.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-center gap-3 px-5 py-3 text-left",children:[(0,r.jsx)("span",{className:"material-symbols-outlined flex size-9 shrink-0 items-center justify-center rounded-xl bg-[#f97815]/10 text-[19px] text-[#f97815] ring-1 ring-[#f97815]/15",children:e.icon}),(0,r.jsxs)("div",{children:[(0,r.jsx)("dt",{className:"text-sm font-bold text-white",children:e.label}),(0,r.jsx)("dd",{className:"mt-0.5 text-[11px] text-gray-500",children:e.detail})]})]},e.label))})]})]})}var m=s(57250);let f=[{id:"claude",name:"Claude Code",image:"/providers/claude.png"},{id:"codex",name:"OpenAI Codex",image:"/providers/codex.png"},{id:"cline",name:"Cline",image:"/providers/cline.png"},{id:"cursor",name:"Cursor",image:"/providers/cursor.png"}],p=[{id:"openai",name:"OpenAI",color:"bg-emerald-500",textColor:"text-white"},{id:"anthropic",name:"Anthropic",color:"bg-orange-400",textColor:"text-white"},{id:"gemini",name:"Gemini",color:"bg-blue-500",textColor:"text-white"},{id:"github",name:"GitHub Copilot",color:"bg-gray-700",textColor:"text-white"}];function b(){let[e,t]=(0,o.useState)(0);return(0,o.useEffect)(()=>{let e=setInterval(()=>{t(e=>(e+1)%p.length)},2e3);return()=>clearInterval(e)},[]),(0,r.jsxs)("div",{className:"mt-16 w-full max-w-4xl relative h-[360px] hidden md:flex items-center justify-center animate-[float_6s_ease-in-out_infinite]",children:[(0,r.jsxs)("div",{className:"relative z-20 w-32 h-32 rounded-full bg-[#23180f] border-2 border-[#f97815] shadow-[0_0_40px_rgba(249,120,21,0.3)] flex flex-col items-center justify-center gap-1 group cursor-pointer hover:scale-105 transition-transform duration-500",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-[#f97815]",children:"hub"}),(0,r.jsx)("span",{className:"text-xs font-bold text-white tracking-widest uppercase",children:"ZevaiRouter"}),(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border border-[#f97815]/30 animate-ping opacity-20"})]}),(0,r.jsx)("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 flex flex-col gap-7",children:f.map(e=>(0,r.jsx)("div",{className:"flex items-center gap-3 opacity-70 hover:opacity-100 transition-opacity group",children:(0,r.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-[#23180f] border border-[#3a2f27] flex items-center justify-center overflow-hidden p-2 hover:border-[#f97815]/50 transition-all hover:scale-105",children:(0,r.jsx)(m.A,{src:e.image,alt:e.name,size:48,className:"object-contain rounded-xl max-w-[48px] max-h-[48px]",fallbackText:e.name.slice(0,2).toUpperCase()})})},e.id))}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none stroke-yellow-700",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 50 C 250 70, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 140 C 250 140, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 210 C 250 210, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 300 C 250 280, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"})]}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 50, 740 50",fill:"none",stroke:0===e?"#f97815":"rgb(75, 85, 99)",strokeWidth:0===e?"3":"2",className:0===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 130, 740 130",fill:"none",stroke:1===e?"#f97815":"rgb(75, 85, 99)",strokeWidth:1===e?"3":"2",className:1===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 230, 740 230",fill:"none",stroke:2===e?"#f97815":"rgb(75, 85, 99)",strokeWidth:2===e?"3":"2",className:2===e?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 310, 740 310",fill:"none",stroke:3===e?"#f97815":"rgb(75, 85, 99)",strokeWidth:3===e?"3":"2",className:3===e?"animate-pulse":""})]}),(0,r.jsx)("div",{className:"absolute right-0 top-0 bottom-0 flex flex-col justify-between py-6",children:p.map((t,s)=>(0,r.jsx)("div",{className:`px-4 py-2 rounded-lg ${t.color} ${t.textColor} flex items-center justify-center font-bold text-xs shadow-lg hover:scale-110 transition-all cursor-help min-w-[140px] ${e===s?"ring-4 ring-[#f97815]/50 scale-110":""}`,title:t.name,children:t.name},t.id))}),(0,r.jsx)("div",{className:"md:hidden mt-8 w-full p-4 rounded-lg bg-[#23180f] border border-[#3a2f27]",children:(0,r.jsx)("p",{className:"text-sm text-center text-gray-400",children:"Interactive diagram visible on desktop"})})]})}function g(){return(0,r.jsx)("section",{className:"py-24 border-y border-[#3a2f27] bg-[#23180f]/30",id:"how-it-works",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"How ZevaiRouter Works"}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:"Tools call one local endpoint. ZevaiRouter routes to the accounts you connected and can fall back when one hits a limit."})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 relative",children:[(0,r.jsx)("div",{className:"hidden md:block absolute top-12 left-[16%] right-[16%] h-[2px] bg-linear-to-r from-gray-700 via-[#f97815] to-gray-700 -z-10"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#181411] border border-[#3a2f27] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-gray-300",children:"terminal"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2",children:"1. CLI & SDKs"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"Your requests start from your favorite tools or our unified SDK. Just change the base URL."})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-center md:text-center",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#181411] border-2 border-[#f97815] flex items-center justify-center shadow-[0_0_30px_rgba(249,120,21,0.2)] z-10 mx-auto",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-[#f97815] animate-pulse",children:"hub"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 text-[#f97815]",children:"2. ZevaiRouter Hub"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"Routes to your connected providers using combos, strategies, and quota-aware fallback."})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-end md:text-right",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#181411] border border-[#3a2f27] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2",children:"3. AI Providers"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"The request is fulfilled by OpenAI, Anthropic, Gemini, or others instantly."})]})]})]})]})})}let v=[{icon:"link",title:"Unified Endpoint",desc:"Access all providers via a single standard API URL.",colors:{border:"hover:border-blue-500/50",bg:"hover:bg-blue-500/5",iconBg:"bg-blue-500/10",iconText:"text-blue-500",titleHover:"group-hover:text-blue-400"}},{icon:"bolt",title:"Easy Setup",desc:"Get up and running in minutes with npx command.",colors:{border:"hover:border-orange-500/50",bg:"hover:bg-orange-500/5",iconBg:"bg-orange-500/10",iconText:"text-orange-500",titleHover:"group-hover:text-orange-400"}},{icon:"shield_with_heart",title:"Model Fallback",desc:"Automatically switch providers on failure or high latency.",colors:{border:"hover:border-rose-500/50",bg:"hover:bg-rose-500/5",iconBg:"bg-rose-500/10",iconText:"text-rose-500",titleHover:"group-hover:text-rose-400"}},{icon:"monitoring",title:"Usage Tracking",desc:"Detailed analytics and cost monitoring across all models.",colors:{border:"hover:border-purple-500/50",bg:"hover:bg-purple-500/5",iconBg:"bg-purple-500/10",iconText:"text-purple-500",titleHover:"group-hover:text-purple-400"}},{icon:"key",title:"OAuth & API Keys",desc:"Securely manage credentials in one vault.",colors:{border:"hover:border-amber-500/50",bg:"hover:bg-amber-500/5",iconBg:"bg-amber-500/10",iconText:"text-amber-500",titleHover:"group-hover:text-amber-400"}},{icon:"cloud_sync",title:"Cloud Sync",desc:"Sync your configurations across devices instantly.",colors:{border:"hover:border-sky-500/50",bg:"hover:bg-sky-500/5",iconBg:"bg-sky-500/10",iconText:"text-sky-500",titleHover:"group-hover:text-sky-400"}},{icon:"terminal",title:"CLI Support",desc:"Works with Claude Code, Codex, Cline, Cursor, and more.",colors:{border:"hover:border-emerald-500/50",bg:"hover:bg-emerald-500/5",iconBg:"bg-emerald-500/10",iconText:"text-emerald-500",titleHover:"group-hover:text-emerald-400"}},{icon:"dashboard",title:"Dashboard",desc:"Visual dashboard for real-time traffic analysis.",colors:{border:"hover:border-fuchsia-500/50",bg:"hover:bg-fuchsia-500/5",iconBg:"bg-fuchsia-500/10",iconText:"text-fuchsia-500",titleHover:"group-hover:text-fuchsia-400"}}];function j(){return(0,r.jsx)("section",{className:"py-24 px-6",id:"features",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Features"}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:"Routing, dashboard, and tooling for the accounts you connect."})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:v.map(e=>(0,r.jsxs)("div",{className:`p-6 rounded-xl bg-[#23180f] border border-[#3a2f27] ${e.colors.border} ${e.colors.bg} transition-all duration-300 group`,children:[(0,r.jsx)("div",{className:`w-10 h-10 rounded-lg ${e.colors.iconBg} flex items-center justify-center mb-4 ${e.colors.iconText} group-hover:scale-110 transition-transform duration-300`,children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:e.icon})}),(0,r.jsx)("h3",{className:`text-lg font-bold mb-2 ${e.colors.titleHover} transition-colors`,children:e.title}),(0,r.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed",children:e.desc})]},e.title))})]})})}var y=s(11059);function N(){let{copied:e,copy:t}=(0,y.C)();return(0,r.jsx)("section",{className:"py-24 px-6 bg-[#120f0d]",children:(0,r.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-16 items-start",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"Get Started in 30 Seconds"}),(0,r.jsx)("p",{className:"text-gray-400 text-lg mb-8",children:"Install ZevaiRouter, configure your providers via web dashboard, and start routing AI requests."}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#f97815]/20 text-[#f97815] flex items-center justify-center font-bold",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Install ZevaiRouter"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Run npx command to start the server instantly"})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#f97815]/20 text-[#f97815] flex items-center justify-center font-bold",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Open Dashboard"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Configure providers and API keys via web interface"})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#f97815]/20 text-[#f97815] flex items-center justify-center font-bold",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:"Route Requests"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Point your CLI tools to http://localhost:1997"})]})]})]})]}),(0,r.jsx)("div",{className:"flex-1 w-full",children:(0,r.jsxs)("div",{className:"rounded-xl overflow-hidden bg-[#1e1e1e] border border-[#3a2f27] shadow-2xl",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-[#252526] border-b border-gray-700",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-green-500"}),(0,r.jsx)("div",{className:"ml-2 text-xs text-gray-500 font-mono",children:"terminal"})]}),(0,r.jsxs)("div",{className:"p-6 font-mono text-sm leading-relaxed overflow-x-auto",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 group cursor-pointer",onClick:()=>{t("npx zevairouter","landing")},children:[(0,r.jsx)("span",{className:"text-green-400",children:"$"}),(0,r.jsx)("span",{className:"text-white",children:"npx zevairouter"}),(0,r.jsx)("span",{className:"ml-auto text-gray-500 text-xs opacity-0 group-hover:opacity-100",children:"landing"===e?"✓ Copied":"Copy"})]}),(0,r.jsxs)("div",{className:"text-gray-400 mb-6",children:[(0,r.jsx)("span",{className:"text-[#f97815]",children:">"})," Starting ZevaiRouter...",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#f97815]",children:">"})," Server running on ",(0,r.jsx)("span",{className:"text-blue-400",children:"http://localhost:1997"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#f97815]",children:">"})," Dashboard: ",(0,r.jsx)("span",{className:"text-blue-400",children:"http://localhost:1997/dashboard"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-green-400",children:">"})," Ready to route! ✓"]}),(0,r.jsx)("div",{className:"text-xs text-gray-500 mb-2 border-t border-gray-700 pt-4",children:"\uD83D\uDCDD Configure providers in dashboard or use environment variables"}),(0,r.jsxs)("div",{className:"text-gray-400 text-xs",children:[(0,r.jsx)("span",{className:"text-purple-400",children:"Data Location:"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:" macOS/Linux:"})," ~/.zevai/db/data.sqlite",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:" Windows:"})," %APPDATA%/zevai/db/data.sqlite"]})]})]})})]})})})}function w(){return(0,r.jsx)("footer",{className:"border-t border-[#3a2f27] bg-[#120f0d] pt-16 pb-8 px-6",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 mb-16",children:[(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,r.jsx)("div",{className:"size-6 rounded bg-[#f97815] flex items-center justify-center text-white",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"hub"})}),(0,r.jsx)("h3",{className:"text-white text-lg font-bold",children:"ZevaiRouter"})]}),(0,r.jsx)("p",{className:"text-gray-500 text-sm max-w-xs mb-6",children:"The unified endpoint for AI generation. Connect, route, and manage your AI providers with ease."}),(0,r.jsx)("div",{className:"flex gap-4",children:(0,r.jsx)("a",{className:"text-gray-400 hover:text-white transition-colors",href:"https://github.com/Verifiedlabs/zevairouter",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"code"})})})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Product"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#f97815] text-sm transition-colors",href:"#features",children:"Features"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#f97815] text-sm transition-colors",href:"/dashboard",children:"Dashboard"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#f97815] text-sm transition-colors",href:"https://github.com/Verifiedlabs/zevairouter",target:"_blank",rel:"noopener noreferrer",children:"Changelog"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Resources"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#f97815] text-sm transition-colors",href:"https://github.com/Verifiedlabs/zevairouter#readme",target:"_blank",rel:"noopener noreferrer",children:"Documentation"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#f97815] text-sm transition-colors",href:"https://github.com/Verifiedlabs/zevairouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#f97815] text-sm transition-colors",href:"https://www.npmjs.com/package/zevairouter",target:"_blank",rel:"noopener noreferrer",children:"NPM"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:"Legal"}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#f97815] text-sm transition-colors",href:"https://github.com/Verifiedlabs/zevairouter/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:"MIT License"})]})]}),(0,r.jsxs)("div",{className:"border-t border-[#3a2f27] pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,r.jsx)("p",{className:"text-gray-600 text-sm",children:"\xa9 2025 ZevaiRouter. All rights reserved."}),(0,r.jsxs)("div",{className:"flex gap-6",children:[(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://github.com/Verifiedlabs/zevairouter",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://www.npmjs.com/package/zevairouter",target:"_blank",rel:"noopener noreferrer",children:"NPM"})]})]})]})})}function _(){let e=(0,n.useRouter)();return(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative text-white font-sans overflow-x-hidden antialiased selection:bg-[#f97815] selection:text-white",children:[(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 fixed inset-0 z-0 overflow-hidden pointer-events-none bg-[#181411]",children:[(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(to right, #f97815 1px, transparent 1px), linear-gradient(to bottom, #f97815 1px, transparent 1px)",backgroundSize:"50px 50px"},className:"jsx-3853dfda129ea3f2 absolute inset-0 opacity-[0.06]"}),(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 absolute top-0 left-1/4 w-[700px] h-[700px] bg-[#f97815]/12 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"2s",animationDuration:"22s"},className:"jsx-3853dfda129ea3f2 absolute top-1/3 right-1/4 w-[600px] h-[600px] bg-purple-500/10 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"4s",animationDuration:"25s"},className:"jsx-3853dfda129ea3f2 absolute bottom-0 left-1/2 w-[650px] h-[650px] bg-blue-500/8 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{background:"radial-gradient(circle at center, transparent 0%, rgba(24, 20, 17, 0.4) 100%)"},className:"jsx-3853dfda129ea3f2 absolute inset-0"})]}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative z-10",children:[(0,r.jsx)(l,{}),(0,r.jsxs)("main",{className:"jsx-3853dfda129ea3f2",children:[(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 relative",children:[(0,r.jsx)(u,{}),(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 flex justify-center pb-20",children:(0,r.jsx)(b,{})})]}),(0,r.jsx)(N,{}),(0,r.jsx)(g,{}),(0,r.jsx)(j,{}),(0,r.jsxs)("section",{className:"jsx-3853dfda129ea3f2 py-32 px-6 relative overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-3853dfda129ea3f2 absolute inset-0 bg-linear-to-t from-[#f97815]/5 to-transparent pointer-events-none"}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 max-w-4xl mx-auto text-center relative z-10",children:[(0,r.jsx)("h2",{className:"jsx-3853dfda129ea3f2 text-4xl md:text-5xl font-black mb-6",children:"Open the dashboard"}),(0,r.jsxs)("p",{className:"jsx-3853dfda129ea3f2 text-xl text-gray-400 mb-10 max-w-2xl mx-auto",children:["Self-hosted. Open source (MIT). Point your tools at ",(0,r.jsx)("code",{className:"jsx-3853dfda129ea3f2 text-sm text-gray-300",children:"http://localhost:1997/v1"}),"."]}),(0,r.jsxs)("div",{className:"jsx-3853dfda129ea3f2 flex flex-col sm:flex-row items-center justify-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>e.push("/dashboard"),className:"jsx-3853dfda129ea3f2 w-full sm:w-auto h-14 px-10 rounded-lg bg-[#f97815] hover:bg-[#e0650a] text-[#181411] text-lg font-bold transition-all shadow-[0_0_20px_rgba(249,120,21,0.5)]",children:"Open dashboard"}),(0,r.jsx)("button",{onClick:()=>window.open("https://github.com/Verifiedlabs/zevairouter#readme","_blank"),className:"jsx-3853dfda129ea3f2 w-full sm:w-auto h-14 px-10 rounded-lg border border-[#3a2f27] hover:bg-[#23180f] text-white text-lg font-bold transition-all",children:"Read Documentation"})]})]})]})]}),(0,r.jsx)(w,{})]}),(0,r.jsx)(i(),{id:"3853dfda129ea3f2",children:"@keyframes float{0%,100%{transform:translatey(0)}50%{transform:translatey(-10px)}}@keyframes dash{to{stroke-dashoffset:-20}}@keyframes blob{0%,100%{transform:translate(0,0)scale(1)}33%{transform:translate(30px,-50px)scale(1.1)}66%{transform:translate(-20px,20px)scale(.9)}}.animate-blob{animation:blob 20s ease-in-out infinite}"})]})}}},e=>{e.O(0,[3745,620,8441,3794,7358],()=>e(e.s=33345)),_N_E=e.O()}]);
@@ -1,5 +1,19 @@
1
1
  # Unreleased
2
2
 
3
+ # v1.0.187 (2026-08-02)
4
+
5
+ ## Fixes
6
+ - **Provider limits auto-refresh actually refreshes again**: the interval on `/dashboard/usage` was armed by an effect that depended on `refreshAll`, which is rebuilt on every refresh because it closes over `refreshingAll`. Each refresh therefore tore down and recreated the 60-second timer, so the countdown restarted from 60 without ever reaching zero and quota data only updated when refreshed by hand. The callback is now held in a ref so the timers keep a stable identity.
7
+ - **Auto-refresh timers no longer leak when the tab is hidden**: the same effect returned early on `document.hidden` without registering a cleanup, while the `visibilitychange` listener wrote new intervals into the same refs. Those intervals outlived the effect and kept polling after unmount. Arming and clearing are now shared helpers, and cleanup is registered on every path.
8
+ - **Copy buttons no longer claim success when the copy failed**: `useCopyToClipboard` never awaited the clipboard write, so a rejected `writeText` (denied permission, insecure context such as plain HTTP on a LAN address) still rendered a "copied" tick. `copy()` now resolves to whether the text reached the clipboard, falls back to `execCommand` once, and clears its pending timeout on unmount.
9
+ - **A failed copy no longer shuts the server down**: the sidebar's **Copy & Shutdown** update flow trusted that success flag, so when the copy silently failed it still stopped the server — leaving no running dashboard and no install command on the clipboard to bring it back. The shutdown countdown now starts only once the command is actually copied.
10
+
11
+ # v1.0.186 (2026-08-02)
12
+
13
+ ## Fixes
14
+ - **PID files can no longer make the app kill an unrelated process**: stopping the MITM proxy, the tunnel, or the app during an update read a PID from a file and signalled it after only checking that *some* process held that PID. A crash leaves the PID file behind (the cleanup paths only run on a graceful stop) and operating systems recycle PIDs, so once the counter wrapped, those paths signalled whatever process had inherited the number — with `sudo kill -9` in the MITM and updater paths, which could reach a root-owned process. Every PID is now persisted together with a start-time token (`/proc/<pid>/stat` field 22 on Linux, `ps -o lstart=` on macOS, `Process.StartTime` on Windows), and nothing is signalled unless that token still matches the live process. PID files written by earlier versions carry no token and are accepted only when the live process's command line still matches the expected program. Force-kill escalation re-proves identity immediately before each signal, since the wait after `SIGTERM` is itself long enough for a PID to be recycled.
15
+ - **MITM status no longer reports a stranger's process as the running proxy**: `startServer()` adopted any live PID found in `.mitm.pid` as "our" server and returned `running: true`, so after a crash and PID reuse the dashboard showed the proxy as up while nothing listened on port 443 — and the next stop signalled that unrelated process. Adoption now requires the same identity proof.
16
+
3
17
  # v1.0.185 (2026-08-02)
4
18
 
5
19
  ## Fixes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.0.185",
3
+ "version": "1.0.187",
4
4
  "description": "Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard",
5
5
  "bin": {
6
6
  "zevai": "cli/cli.js"
@@ -0,0 +1,237 @@
1
+ // A pid on its own is not proof of identity. Pids are recycled, and the cleanup
2
+ // that removes a pid file only runs on a graceful stop — a crash (SIGKILL, OOM,
3
+ // panic) leaves the file behind. Once the pid counter wraps, that file names a
4
+ // process which has nothing to do with us, and signalling it kills a bystander.
5
+ // The MITM stop paths escalate to `sudo kill -9`, so the bystander can be a root
6
+ // process.
7
+ //
8
+ // Every pid we persist is therefore stored together with a start-time token, and
9
+ // every signal is gated on that token still matching the live process. The token
10
+ // is the one identity fact about a process that a later pid reuse cannot forge:
11
+ // Linux exposes it as field 22 of /proc/<pid>/stat, other Unixes as `ps -o
12
+ // lstart=`, Windows as Process.StartTime.
13
+ //
14
+ // CommonJS on purpose: src/mitm/manager.js requires this, and the ESM callers
15
+ // (appUpdater, tunnel/cloudflare/pid) import it through normal CJS interop.
16
+
17
+ const fs = require("fs");
18
+ const { execFileSync } = require("child_process");
19
+
20
+ const IS_WIN = process.platform === "win32";
21
+ const IS_LINUX = process.platform === "linux";
22
+ const PROBE_TIMEOUT_MS = 5_000;
23
+
24
+ function isValidPid(value) {
25
+ // 2^22 is the ceiling Linux allows for pid_max; anything past it is corruption.
26
+ return Number.isInteger(value) && value > 0 && value <= 4_194_304;
27
+ }
28
+
29
+ function runProbe(file, args) {
30
+ try {
31
+ return execFileSync(file, args, {
32
+ encoding: "utf8",
33
+ stdio: ["ignore", "pipe", "ignore"],
34
+ timeout: PROBE_TIMEOUT_MS,
35
+ windowsHide: true,
36
+ });
37
+ } catch {
38
+ return null;
39
+ }
40
+ }
41
+
42
+ // Field 22 of /proc/<pid>/stat. The command name sits in parentheses and may
43
+ // itself contain spaces or parentheses, so index from the last ") " rather than
44
+ // splitting the whole line.
45
+ function parseLinuxStartTime(output, expectedPid) {
46
+ if (typeof output !== "string" || /[\r\n]/.test(output.trim())) return null;
47
+ const value = output.trim();
48
+ const openParen = value.indexOf(" (");
49
+ const closeParen = value.lastIndexOf(") ");
50
+ if (openParen < 1 || closeParen <= openParen + 2) return null;
51
+ if (Number(value.slice(0, openParen)) !== expectedPid) return null;
52
+ const fields = value.slice(closeParen + 2).split(/\s+/);
53
+ const startTime = fields[19];
54
+ if (fields.length < 20 || !/^\d+$/.test(startTime)) return null;
55
+ return startTime;
56
+ }
57
+
58
+ // A stable, opaque "this exact process incarnation" string, or null when the
59
+ // process is gone or unreadable. Callers must treat null as "cannot verify".
60
+ function readProcessStartToken(pid) {
61
+ if (!isValidPid(pid)) return null;
62
+
63
+ if (IS_LINUX) {
64
+ let raw = null;
65
+ try {
66
+ raw = fs.readFileSync(`/proc/${pid}/stat`, "utf8");
67
+ } catch {
68
+ return null;
69
+ }
70
+ const startTime = parseLinuxStartTime(raw, pid);
71
+ return startTime ? `${pid}:${startTime}` : null;
72
+ }
73
+
74
+ if (IS_WIN) {
75
+ const out = runProbe("powershell", [
76
+ "-NonInteractive",
77
+ "-NoProfile",
78
+ "-Command",
79
+ `(Get-Process -Id ${pid} -ErrorAction Stop).StartTime.Ticks`,
80
+ ]);
81
+ const ticks = String(out || "").trim();
82
+ return /^\d+$/.test(ticks) ? `${pid}:${ticks}` : null;
83
+ }
84
+
85
+ // macOS and other Unixes: lstart is the process start wall-clock, stable for
86
+ // the life of the process. ps is readable for processes owned by other users,
87
+ // which matters because the MITM server runs as root.
88
+ const out = runProbe("ps", ["-o", "lstart=", "-p", String(pid)]);
89
+ const lines = String(out || "").split(/\r?\n/).filter((line) => line.trim());
90
+ if (lines.length !== 1) return null;
91
+ const started = lines[0].trim();
92
+ return started ? `${pid}:${started}` : null;
93
+ }
94
+
95
+ // Full command line of a live process, used only as the fallback identity proof
96
+ // for legacy pid files that predate start tokens.
97
+ function readProcessCommand(pid) {
98
+ if (!isValidPid(pid)) return null;
99
+
100
+ if (IS_WIN) {
101
+ const out = runProbe("powershell", [
102
+ "-NonInteractive",
103
+ "-NoProfile",
104
+ "-Command",
105
+ `(Get-CimInstance Win32_Process -Filter "ProcessId=${pid}").CommandLine`,
106
+ ]);
107
+ const command = String(out || "").trim();
108
+ return command || null;
109
+ }
110
+
111
+ const out = runProbe("ps", ["-o", "command=", "-p", String(pid)]);
112
+ const lines = String(out || "").split(/\r?\n/).filter((line) => line.trim());
113
+ if (lines.length !== 1) return null;
114
+ const command = lines[0].trim();
115
+ return command || null;
116
+ }
117
+
118
+ // EPERM/EACCES mean the process exists but is owned by another user — the MITM
119
+ // server runs as root, so treating that as "dead" would orphan a live listener.
120
+ function isProcessAlive(pid) {
121
+ if (!isValidPid(pid)) return false;
122
+ try {
123
+ process.kill(pid, 0);
124
+ return true;
125
+ } catch (err) {
126
+ return err.code === "EPERM" || err.code === "EACCES";
127
+ }
128
+ }
129
+
130
+ function writePidFile(filePath, pid, { kind = "process" } = {}) {
131
+ const numericPid = Number(pid);
132
+ if (!isValidPid(numericPid)) return false;
133
+ const record = {
134
+ v: 1,
135
+ kind,
136
+ pid: numericPid,
137
+ // Captured now, while we know the process is the one we just spawned.
138
+ startToken: readProcessStartToken(numericPid),
139
+ platform: process.platform,
140
+ writtenAt: new Date().toISOString(),
141
+ };
142
+ try {
143
+ const tempPath = `${filePath}.${process.pid}.tmp`;
144
+ fs.writeFileSync(tempPath, JSON.stringify(record));
145
+ fs.renameSync(tempPath, filePath);
146
+ return true;
147
+ } catch {
148
+ return false;
149
+ }
150
+ }
151
+
152
+ // Accepts both the JSON record written above and the bare-integer files written
153
+ // by older versions, so an in-place upgrade can still stop a running server.
154
+ function readPidFile(filePath) {
155
+ let raw;
156
+ try {
157
+ raw = fs.readFileSync(filePath, "utf8").trim();
158
+ } catch {
159
+ return null;
160
+ }
161
+ if (!raw) return null;
162
+
163
+ if (/^\d+$/.test(raw)) {
164
+ const pid = Number(raw);
165
+ return isValidPid(pid) ? { pid, startToken: null, kind: null, legacy: true } : null;
166
+ }
167
+
168
+ try {
169
+ const parsed = JSON.parse(raw);
170
+ const pid = Number(parsed?.pid);
171
+ if (!isValidPid(pid)) return null;
172
+ return {
173
+ pid,
174
+ startToken: typeof parsed.startToken === "string" && parsed.startToken ? parsed.startToken : null,
175
+ kind: typeof parsed.kind === "string" ? parsed.kind : null,
176
+ legacy: false,
177
+ };
178
+ } catch {
179
+ return null;
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Resolve a pid file to a pid that is safe to signal.
185
+ *
186
+ * Returns { pid, reason } where a non-null pid means identity was proven. Any
187
+ * other outcome returns pid null with a reason, and callers must not signal.
188
+ *
189
+ * @param {string} filePath pid file to read
190
+ * @param {RegExp} [options.commandPattern] identity proof for legacy pid files
191
+ */
192
+ function resolveVerifiedPid(filePath, { commandPattern = null } = {}) {
193
+ const record = readPidFile(filePath);
194
+ if (!record) return { pid: null, reason: "no_pid_file" };
195
+ if (!isProcessAlive(record.pid)) return { pid: null, reason: "not_running", pidFileStale: true };
196
+
197
+ const liveToken = readProcessStartToken(record.pid);
198
+
199
+ if (record.startToken) {
200
+ if (!liveToken) return { pid: null, reason: "identity_unreadable" };
201
+ if (liveToken !== record.startToken) {
202
+ // Same pid number, different process incarnation: the pid was recycled.
203
+ return { pid: null, reason: "pid_recycled", pidFileStale: true };
204
+ }
205
+ return { pid: record.pid, reason: "verified_start_token" };
206
+ }
207
+
208
+ // Legacy file with no recorded token. The best available proof is that the
209
+ // live process still looks like the thing we were managing.
210
+ if (!commandPattern) return { pid: null, reason: "identity_unverifiable" };
211
+ const command = readProcessCommand(record.pid);
212
+ if (!command) return { pid: null, reason: "identity_unreadable" };
213
+ if (!commandPattern.test(command)) {
214
+ return { pid: null, reason: "command_mismatch", pidFileStale: true };
215
+ }
216
+ return { pid: record.pid, reason: "verified_command" };
217
+ }
218
+
219
+ function removePidFile(filePath) {
220
+ try {
221
+ fs.rmSync(filePath, { force: true });
222
+ } catch {
223
+ /* best effort */
224
+ }
225
+ }
226
+
227
+ module.exports = {
228
+ isValidPid,
229
+ isProcessAlive,
230
+ readProcessStartToken,
231
+ readProcessCommand,
232
+ writePidFile,
233
+ readPidFile,
234
+ resolveVerifiedPid,
235
+ removePidFile,
236
+ parseLinuxStartTime,
237
+ };
package/cli/cli.js CHANGED
@@ -51,6 +51,24 @@ function loadPkg() {
51
51
  return require("./package.json");
52
52
  }
53
53
  }
54
+
55
+ // Pid-file identity verification. In the published package this module ships
56
+ // under app/src/; in the repo it lives at ../src/. Returns null when neither
57
+ // resolves, and callers must then refuse to signal — killing an unverified pid
58
+ // is exactly the bug this module exists to prevent.
59
+ let pidIdentityCache;
60
+ function loadPidIdentity() {
61
+ if (pidIdentityCache !== undefined) return pidIdentityCache;
62
+ for (const candidate of ["./app/src/lib/process/pidIdentity", "../src/lib/process/pidIdentity"]) {
63
+ try {
64
+ pidIdentityCache = require(candidate);
65
+ return pidIdentityCache;
66
+ } catch { /* try next layout */ }
67
+ }
68
+ console.warn("⚠️ Pid verification module missing — skipping pid-file process cleanup to avoid killing an unrelated process.");
69
+ pidIdentityCache = null;
70
+ return pidIdentityCache;
71
+ }
54
72
  const pkg = loadPkg();
55
73
  const args = process.argv.slice(2);
56
74
 
@@ -790,28 +808,33 @@ function getAppDataDir() {
790
808
  : path.join(os.homedir(), ".zevai");
791
809
  }
792
810
 
793
- // Kill PID from file (best-effort, removes file after)
794
- function killByPidFile(pidFile) {
811
+ // Kill PID from file, but only once the pid is proven to still be the process we
812
+ // started. A pid file outlives a crash and pids get recycled, so an unverified
813
+ // pid here means SIGKILL lands on an unrelated process.
814
+ function killByPidFile(pidFile, commandPattern = null) {
795
815
  try {
796
- if (!fs.existsSync(pidFile)) return;
797
- const pid = parseInt(fs.readFileSync(pidFile, "utf8").trim(), 10);
798
- if (!pid) return;
799
- try {
800
- if (process.platform === "win32") {
801
- execSync(`taskkill /F /T /PID ${pid}`, { stdio: "ignore", windowsHide: true, timeout: 3000 });
802
- } else {
803
- process.kill(pid, "SIGKILL");
804
- }
805
- } catch { }
806
- try { fs.unlinkSync(pidFile); } catch { }
816
+ const pidIdentity = loadPidIdentity();
817
+ if (!pidIdentity) return;
818
+ const { resolveVerifiedPid, removePidFile } = pidIdentity;
819
+ const { pid } = resolveVerifiedPid(pidFile, { commandPattern });
820
+ if (pid) {
821
+ try {
822
+ if (process.platform === "win32") {
823
+ execSync(`taskkill /F /T /PID ${pid}`, { stdio: "ignore", windowsHide: true, timeout: 3000 });
824
+ } else {
825
+ process.kill(pid, "SIGKILL");
826
+ }
827
+ } catch { }
828
+ }
829
+ removePidFile(pidFile);
807
830
  } catch { }
808
831
  }
809
832
 
810
833
  // Kill tunnel processes (cloudflared/tailscale) by their PID files
811
834
  function killTunnelByPidFile() {
812
835
  const tunnelDir = path.join(getAppDataDir(), "tunnel");
813
- killByPidFile(path.join(tunnelDir, "cloudflared.pid"));
814
- killByPidFile(path.join(tunnelDir, "tailscale.pid"));
836
+ killByPidFile(path.join(tunnelDir, "cloudflared.pid"), /cloudflared/i);
837
+ killByPidFile(path.join(tunnelDir, "tailscale.pid"), /tailscale/i);
815
838
  }
816
839
 
817
840
  // Kill cloudflared whose --url targets this app's port (covers stale PID file case)
@@ -969,30 +992,45 @@ function waitForExit(pid, timeoutMs) {
969
992
  function killProxyByPidFile() {
970
993
  try {
971
994
  const pidFile = path.join(getAppDataDir(), "mitm", ".mitm.pid");
972
- if (!fs.existsSync(pidFile)) return;
973
- const pid = parseInt(fs.readFileSync(pidFile, "utf8").trim(), 10);
974
- if (!pid) return;
995
+ const pidIdentity = loadPidIdentity();
996
+ if (!pidIdentity) return;
997
+ const { resolveVerifiedPid, removePidFile, readProcessStartToken } = pidIdentity;
998
+ // This escalates to `sudo kill -9`, so an unverified pid could kill an
999
+ // unrelated root-owned process after the pid was recycled.
1000
+ const { pid } = resolveVerifiedPid(pidFile, {
1001
+ commandPattern: /(mitm[\\/]server\.js|mitm[\\/]+server\b)/i,
1002
+ });
1003
+ if (!pid) {
1004
+ removePidFile(pidFile);
1005
+ return;
1006
+ }
1007
+
1008
+ // Escalation waits seconds after SIGTERM — long enough for the process to
1009
+ // exit and its pid to be handed to something else. Re-prove identity right
1010
+ // before each force kill, the same way killVerifiedRouterOnPort does.
1011
+ const startToken = readProcessStartToken(pid);
1012
+ const stillSameProcess = () => readProcessStartToken(pid) === startToken;
975
1013
 
976
1014
  if (process.platform === "win32") {
977
1015
  // Graceful first (lets server cleanup hosts), then force
978
1016
  try { execSync(`taskkill /T /PID ${pid}`, { stdio: "ignore", windowsHide: true, timeout: 2000 }); } catch { }
979
- if (!waitForExit(pid, 1500)) {
1017
+ if (!waitForExit(pid, 1500) && stillSameProcess()) {
980
1018
  try { execSync(`taskkill /F /T /PID ${pid}`, { stdio: "ignore", windowsHide: true, timeout: 3000 }); } catch { }
981
1019
  }
982
1020
  // Last-resort: PowerShell Stop-Process (sometimes succeeds where taskkill fails on admin processes)
983
- if (!waitForExit(pid, 500)) {
1021
+ if (!waitForExit(pid, 500) && stillSameProcess()) {
984
1022
  try { execSync(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${pid} -Force"`, { stdio: "ignore", windowsHide: true, timeout: 3000 }); } catch { }
985
1023
  }
986
1024
  } else {
987
1025
  // SIGTERM via cached sudo token first
988
1026
  try { execSync(`sudo -n kill -TERM ${pid} 2>/dev/null`, { stdio: "ignore", timeout: 2000 }); }
989
1027
  catch { try { process.kill(pid, "SIGTERM"); } catch { } }
990
- if (!waitForExit(pid, 1500)) {
1028
+ if (!waitForExit(pid, 1500) && stillSameProcess()) {
991
1029
  try { execSync(`sudo -n kill -9 ${pid} 2>/dev/null`, { stdio: "ignore", timeout: 2000 }); }
992
1030
  catch { try { process.kill(pid, "SIGKILL"); } catch { } }
993
1031
  }
994
1032
  }
995
- try { fs.unlinkSync(pidFile); } catch { }
1033
+ removePidFile(pidFile);
996
1034
  } catch { }
997
1035
  }
998
1036
 
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter-cli",
3
- "version": "1.0.185",
3
+ "version": "1.0.187",
4
4
  "private": true,
5
5
  "description": "ZevaiRouter CLI - Start and manage ZevaiRouter server",
6
6
  "bin": {