@techysy/10router 1.0.7 → 1.1.1

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 (1047) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +13 -7
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +26 -26
  5. package/app/.next-cli-build/react-loadable-manifest.json +1540 -0
  6. package/app/.next-cli-build/routes-manifest.json +42 -8
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +28 -28
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +8 -8
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  77. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  89. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
  109. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -0
  115. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -0
  116. package/app/.next-cli-build/server/app/api/auth/verify-password/route_client-reference-manifest.js +1 -0
  117. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  118. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  126. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  138. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -0
  178. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -0
  179. package/app/.next-cli-build/server/app/api/keys/rotate/route_client-reference-manifest.js +1 -0
  180. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +4 -4
  187. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -0
  203. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -0
  204. package/app/.next-cli-build/server/app/api/models/custom/bulk/route_client-reference-manifest.js +1 -0
  205. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -0
  246. package/app/.next-cli-build/server/app/api/{providers/[id]/json-models → oauth/transfer/export}/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route_client-reference-manifest.js +1 -0
  248. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -0
  249. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -0
  250. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route_client-reference-manifest.js +1 -0
  251. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -0
  252. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -0
  253. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route_client-reference-manifest.js +1 -0
  254. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +4 -0
  255. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -0
  256. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route_client-reference-manifest.js +1 -0
  257. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  290. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  292. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  296. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  298. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  300. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  302. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  304. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  306. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  308. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  310. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  312. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  330. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  352. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  372. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  386. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  426. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  428. package/app/.next-cli-build/server/app/callback.html +1 -1
  429. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  430. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  431. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  433. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  435. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  436. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  437. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  438. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  440. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  441. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  442. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  443. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  445. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  446. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  447. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  450. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  451. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  452. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  455. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  456. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  457. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  460. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  461. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  462. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  463. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  465. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  466. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  467. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  470. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  471. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  472. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  473. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  475. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  476. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  477. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  480. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  481. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  483. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
  486. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  490. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  491. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  492. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  499. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  501. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  503. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  504. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  505. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  508. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  509. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  510. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  511. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  513. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  514. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  515. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  518. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  519. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  520. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  521. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  522. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  523. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  524. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  525. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  527. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/index.html +1 -1
  529. package/app/.next-cli-build/server/app/index.rsc +5 -5
  530. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  531. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  532. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  534. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  535. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  536. package/app/.next-cli-build/server/app/landing.html +1 -1
  537. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  538. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  539. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  540. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
  541. package/app/.next-cli-build/server/app/login/page.js +1 -1
  542. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  544. package/app/.next-cli-build/server/app/login.html +1 -1
  545. package/app/.next-cli-build/server/app/login.rsc +6 -6
  546. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  548. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  549. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  550. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/page.js +1 -1
  552. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  554. package/app/.next-cli-build/server/app-paths-manifest.json +13 -7
  555. package/app/.next-cli-build/server/chunks/1159.js +1 -0
  556. package/app/.next-cli-build/server/chunks/1260.js +1 -1
  557. package/app/.next-cli-build/server/chunks/1377.js +1 -1
  558. package/app/.next-cli-build/server/chunks/1937.js +1 -1
  559. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  560. package/app/.next-cli-build/server/chunks/2112.js +1 -0
  561. package/app/.next-cli-build/server/chunks/2120.js +1 -0
  562. package/app/.next-cli-build/server/chunks/2132.js +1 -0
  563. package/app/.next-cli-build/server/chunks/2179.js +1 -1
  564. package/app/.next-cli-build/server/chunks/2391.js +1 -1
  565. package/app/.next-cli-build/server/chunks/241.js +1 -1
  566. package/app/.next-cli-build/server/chunks/2732.js +1 -1
  567. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  568. package/app/.next-cli-build/server/chunks/3651.js +92 -0
  569. package/app/.next-cli-build/server/chunks/3662.js +1 -0
  570. package/app/.next-cli-build/server/chunks/3879.js +1 -0
  571. package/app/.next-cli-build/server/chunks/3901.js +1 -0
  572. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  573. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  574. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  575. package/app/.next-cli-build/server/chunks/4049.js +1 -1
  576. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  577. package/app/.next-cli-build/server/chunks/4152.js +1 -0
  578. package/app/.next-cli-build/server/chunks/4293.js +1 -1
  579. package/app/.next-cli-build/server/chunks/436.js +1 -0
  580. package/app/.next-cli-build/server/chunks/4755.js +1 -0
  581. package/app/.next-cli-build/server/chunks/4840.js +1 -0
  582. package/app/.next-cli-build/server/chunks/4862.js +1 -0
  583. package/app/.next-cli-build/server/chunks/4985.js +1 -1
  584. package/app/.next-cli-build/server/chunks/5182.js +1 -1
  585. package/app/.next-cli-build/server/chunks/5217.js +2 -2
  586. package/app/.next-cli-build/server/chunks/{318.js → 5330.js} +11 -11
  587. package/app/.next-cli-build/server/chunks/5433.js +1 -1
  588. package/app/.next-cli-build/server/chunks/{8363.js → 5485.js} +1 -1
  589. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  590. package/app/.next-cli-build/server/chunks/5615.js +3 -3
  591. package/app/.next-cli-build/server/chunks/5781.js +2 -2
  592. package/app/.next-cli-build/server/chunks/595.js +1 -1
  593. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  594. package/app/.next-cli-build/server/chunks/615.js +1 -1
  595. package/app/.next-cli-build/server/chunks/6212.js +1 -1
  596. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  597. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  598. package/app/.next-cli-build/server/chunks/6457.js +2 -2
  599. package/app/.next-cli-build/server/chunks/653.js +1 -1
  600. package/app/.next-cli-build/server/chunks/6844.js +1 -1
  601. package/app/.next-cli-build/server/chunks/6871.js +1 -0
  602. package/app/.next-cli-build/server/chunks/6960.js +7 -0
  603. package/app/.next-cli-build/server/chunks/7239.js +2 -2
  604. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  605. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  606. package/app/.next-cli-build/server/chunks/7774.js +3 -3
  607. package/app/.next-cli-build/server/chunks/7805.js +24 -0
  608. package/app/.next-cli-build/server/chunks/7843.js +51 -0
  609. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  610. package/app/.next-cli-build/server/chunks/8410.js +1 -0
  611. package/app/.next-cli-build/server/chunks/8499.js +5 -55
  612. package/app/.next-cli-build/server/chunks/8546.js +1 -0
  613. package/app/.next-cli-build/server/chunks/8635.js +3 -0
  614. package/app/.next-cli-build/server/chunks/869.js +1 -1
  615. package/app/.next-cli-build/server/chunks/877.js +65 -0
  616. package/app/.next-cli-build/server/chunks/8838.js +1 -1
  617. package/app/.next-cli-build/server/chunks/8895.js +9 -7
  618. package/app/.next-cli-build/server/chunks/8990.js +1 -0
  619. package/app/.next-cli-build/server/chunks/937.js +1 -0
  620. package/app/.next-cli-build/server/chunks/939.js +1 -0
  621. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  622. package/app/.next-cli-build/server/chunks/9679.js +1 -0
  623. package/app/.next-cli-build/server/chunks/9713.js +1 -0
  624. package/app/.next-cli-build/server/instrumentation.js +1 -1
  625. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  626. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  627. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  628. package/app/.next-cli-build/server/middleware.js +8 -8
  629. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  630. package/app/.next-cli-build/server/pages/404.html +1 -1
  631. package/app/.next-cli-build/server/pages/500.html +1 -1
  632. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  633. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  634. package/app/.next-cli-build/static/ZVF_AsRusUqo_O-OyJWPo/_buildManifest.js +1 -0
  635. package/app/.next-cli-build/static/chunks/1243-220f1fd87235cb92.js +3 -0
  636. package/app/.next-cli-build/static/chunks/1321-ad1ba3dfb4f417dd.js +1 -0
  637. package/app/.next-cli-build/static/chunks/1728-9783950fd2b6ad81.js +65 -0
  638. package/app/.next-cli-build/static/chunks/3170-8dc71548e5b2cbf9.js +1 -0
  639. package/app/.next-cli-build/static/chunks/5497-8b67dd598415a05b.js +7 -0
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-05baf24fe36fbd8f.js → page-5d45a84bf4178e23.js} +1 -1
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-272386fb26fd75c3.js → page-d9b185c845eb0735.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-f098adefd36910e1.js → page-baf9fb2b236ff509.js} +1 -1
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-395c2359af9bc2a9.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-cfdc0f6cf601fb4f.js → page-30c02c5c5eefddbd.js} +1 -1
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-c748c385fd4207db.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-df8dac9c150f9f1e.js +59 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-23a27239721d0c86.js → page-502e7efb917191b9.js} +1 -1
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-11b1e63e5750aa80.js → page-244f4c72b60bf0a0.js} +2 -2
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-fa0de4d9f54eb3ef.js → page-720b5ab2e46fc6bb.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-d4b67cdea67b89d0.js → page-12cb89849a36b78d.js} +1 -1
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-6abbed908eb3721a.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-d8fb1a26657cc67f.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f9d2dd98fde8ba67.js +14 -0
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-a04315501559f028.js → page-40e882239717e69f.js} +1 -1
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-c1757ed34595dcdb.js → page-e5e78bb5f4aa4063.js} +1 -1
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-46d86481868d6900.js → page-4f50d3385b23743f.js} +1 -1
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-895a59d896e1399c.js → page-5f5434b22c7f7b73.js} +1 -1
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-7b9bde3902dca2bb.js → page-1ce31613b04ec926.js} +1 -1
  659. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-e16aaf24dc525a49.js → page-6a0eb15b8664e682.js} +1 -1
  660. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-d17ab83ab811a84c.js → page-27bf96f0f2568f09.js} +1 -1
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-346541a45bcf828f.js → page-b2a5c4828ff3f6e0.js} +1 -1
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-f3c3284e4b3cb324.js → page-a442053054654766.js} +1 -1
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-a52d19cb5aacd04f.js → layout-158175db070fe14c.js} +1 -1
  664. package/app/.next-cli-build/static/chunks/app/_global-error/page-73a852c9be713797.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-73a852c9be713797.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-73a852c9be713797.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-73a852c9be713797.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-73a852c9be713797.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-73a852c9be713797.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-73a852c9be713797.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-73a852c9be713797.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-73a852c9be713797.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-73a852c9be713797.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-73a852c9be713797.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-73a852c9be713797.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-73a852c9be713797.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-73a852c9be713797.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-73a852c9be713797.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-73a852c9be713797.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-73a852c9be713797.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-73a852c9be713797.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-73a852c9be713797.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-73a852c9be713797.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-73a852c9be713797.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-73a852c9be713797.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-73a852c9be713797.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-73a852c9be713797.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-73a852c9be713797.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-73a852c9be713797.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-73a852c9be713797.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-73a852c9be713797.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-73a852c9be713797.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-73a852c9be713797.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-73a852c9be713797.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-73a852c9be713797.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-73a852c9be713797.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/combos/route-73a852c9be713797.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-73a852c9be713797.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-73a852c9be713797.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-73a852c9be713797.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-73a852c9be713797.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-73a852c9be713797.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-73a852c9be713797.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/health/route-73a852c9be713797.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/init/route-73a852c9be713797.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-73a852c9be713797.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-73a852c9be713797.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/keys/route-73a852c9be713797.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/locale/route-73a852c9be713797.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-73a852c9be713797.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-73a852c9be713797.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-73a852c9be713797.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-73a852c9be713797.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-73a852c9be713797.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-73a852c9be713797.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-73a852c9be713797.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-73a852c9be713797.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-73a852c9be713797.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-73a852c9be713797.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-73a852c9be713797.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-73a852c9be713797.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/models/route-73a852c9be713797.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/models/test/route-73a852c9be713797.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-73a852c9be713797.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-73a852c9be713797.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-73a852c9be713797.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-73a852c9be713797.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-73a852c9be713797.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-73a852c9be713797.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-73a852c9be713797.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-73a852c9be713797.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-73a852c9be713797.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-73a852c9be713797.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-73a852c9be713797.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-73a852c9be713797.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-73a852c9be713797.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-73a852c9be713797.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-73a852c9be713797.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-73a852c9be713797.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-73a852c9be713797.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-73a852c9be713797.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-73a852c9be713797.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-73a852c9be713797.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/pricing/route-73a852c9be713797.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-73a852c9be713797.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-73a852c9be713797.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-73a852c9be713797.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-73a852c9be713797.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-73a852c9be713797.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-73a852c9be713797.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-73a852c9be713797.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-73a852c9be713797.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-73a852c9be713797.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/providers/route-73a852c9be713797.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-73a852c9be713797.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-73a852c9be713797.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-73a852c9be713797.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-73a852c9be713797.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-73a852c9be713797.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-73a852c9be713797.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-73a852c9be713797.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-73a852c9be713797.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-73a852c9be713797.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-73a852c9be713797.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-73a852c9be713797.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-73a852c9be713797.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-73a852c9be713797.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-73a852c9be713797.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-73a852c9be713797.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-73a852c9be713797.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-73a852c9be713797.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-73a852c9be713797.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-73a852c9be713797.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-73a852c9be713797.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-73a852c9be713797.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/settings/route-73a852c9be713797.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-73a852c9be713797.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/tags/route-73a852c9be713797.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-73a852c9be713797.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-73a852c9be713797.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-73a852c9be713797.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-73a852c9be713797.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-73a852c9be713797.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-73a852c9be713797.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-73a852c9be713797.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-73a852c9be713797.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-73a852c9be713797.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-73a852c9be713797.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-73a852c9be713797.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-73a852c9be713797.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-73a852c9be713797.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-73a852c9be713797.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-73a852c9be713797.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-73a852c9be713797.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-73a852c9be713797.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-73a852c9be713797.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-73a852c9be713797.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-73a852c9be713797.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-73a852c9be713797.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-73a852c9be713797.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-73a852c9be713797.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-73a852c9be713797.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-73a852c9be713797.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-73a852c9be713797.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-73a852c9be713797.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-73a852c9be713797.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-73a852c9be713797.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-73a852c9be713797.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-73a852c9be713797.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-73a852c9be713797.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-73a852c9be713797.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-73a852c9be713797.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-73a852c9be713797.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-73a852c9be713797.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-73a852c9be713797.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1/route-73a852c9be713797.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-73a852c9be713797.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-73a852c9be713797.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-73a852c9be713797.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-73a852c9be713797.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-73a852c9be713797.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-73a852c9be713797.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-73a852c9be713797.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-73a852c9be713797.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/version/route-73a852c9be713797.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-73a852c9be713797.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/version/update/route-73a852c9be713797.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/landing/page-da7215e0796dbf9b.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/login/{page-f3c1df1fc132afda.js → page-0da5fcc5d841cbb9.js} +1 -1
  830. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-73a852c9be713797.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/page-73a852c9be713797.js +1 -0
  832. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-73a852c9be713797.js +1 -0
  833. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-73a852c9be713797.js +1 -0
  834. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-73a852c9be713797.js +1 -0
  835. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-73a852c9be713797.js +1 -0
  836. package/app/.next-cli-build/static/chunks/{webpack-f52125609b4734b6.js → webpack-77a7ed7beb6725df.js} +1 -1
  837. package/app/.next-cli-build/static/css/adecbbef384db8e1.css +1 -0
  838. package/app/custom-server.js +177 -167
  839. package/app/package.json +6 -3
  840. package/app/public/i18n/changelog/en.md +203 -133
  841. package/app/public/i18n/changelog/zh-CN.md +201 -131
  842. package/app/public/i18n/changelog/zh-TW.md +203 -133
  843. package/app/public/i18n/literals/zh-CN.json +182 -5
  844. package/app/public/i18n/literals/zh-TW.json +229 -2
  845. package/app/public/providers/amd.png +0 -0
  846. package/app/public/providers/xiaomi-mimo.png +0 -0
  847. package/app/src/lib/consoleArchiveStandalone.mjs +73 -0
  848. package/app/src/lib/oauth/providers/xiaomi-mimo.js +169 -0
  849. package/app/src/mitm/server.js +23 -23
  850. package/app/src/shared/utils/apiKey.js +82 -24
  851. package/app/src/sse/services/codebuddyCheckin.js +308 -54
  852. package/package.json +52 -52
  853. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route.js +0 -1
  854. package/app/.next-cli-build/server/app/api/providers/[id]/json-models/route_client-reference-manifest.js +0 -1
  855. package/app/.next-cli-build/server/chunks/1564.js +0 -1
  856. package/app/.next-cli-build/server/chunks/1636.js +0 -1
  857. package/app/.next-cli-build/server/chunks/295.js +0 -1
  858. package/app/.next-cli-build/server/chunks/3212.js +0 -1
  859. package/app/.next-cli-build/server/chunks/412.js +0 -7
  860. package/app/.next-cli-build/server/chunks/4665.js +0 -65
  861. package/app/.next-cli-build/server/chunks/6877.js +0 -1
  862. package/app/.next-cli-build/server/chunks/7211.js +0 -1
  863. package/app/.next-cli-build/server/chunks/7598.js +0 -1
  864. package/app/.next-cli-build/server/chunks/7913.js +0 -92
  865. package/app/.next-cli-build/server/chunks/8444.js +0 -3
  866. package/app/.next-cli-build/server/chunks/9140.js +0 -29
  867. package/app/.next-cli-build/server/chunks/9463.js +0 -1
  868. package/app/.next-cli-build/static/aKCEN8jaWm631dVqBrSte/_buildManifest.js +0 -1
  869. package/app/.next-cli-build/static/chunks/1243-53ff028412802304.js +0 -3
  870. package/app/.next-cli-build/static/chunks/1321-a54e76efdf16ea12.js +0 -1
  871. package/app/.next-cli-build/static/chunks/4614-de3422f98b83f305.js +0 -65
  872. package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +0 -1
  873. package/app/.next-cli-build/static/chunks/5497-cd84151680071f1d.js +0 -7
  874. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-1049c48c632926aa.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-36c5d10e7c244d2d.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-b475f81b3d89c963.js +0 -59
  877. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-237c096548d0981d.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-75cd720b6edf6d23.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d3c784cd4a50bef9.js +0 -14
  880. package/app/.next-cli-build/static/chunks/app/_global-error/page-610e2a51edf6ccba.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-610e2a51edf6ccba.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-610e2a51edf6ccba.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-610e2a51edf6ccba.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-610e2a51edf6ccba.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-610e2a51edf6ccba.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-610e2a51edf6ccba.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-610e2a51edf6ccba.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-610e2a51edf6ccba.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-610e2a51edf6ccba.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-610e2a51edf6ccba.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-610e2a51edf6ccba.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-610e2a51edf6ccba.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-610e2a51edf6ccba.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-610e2a51edf6ccba.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-610e2a51edf6ccba.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-610e2a51edf6ccba.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-610e2a51edf6ccba.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-610e2a51edf6ccba.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-610e2a51edf6ccba.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-610e2a51edf6ccba.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-610e2a51edf6ccba.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-610e2a51edf6ccba.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-610e2a51edf6ccba.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-610e2a51edf6ccba.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-610e2a51edf6ccba.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-610e2a51edf6ccba.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-610e2a51edf6ccba.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-610e2a51edf6ccba.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-610e2a51edf6ccba.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-610e2a51edf6ccba.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-610e2a51edf6ccba.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/combos/route-610e2a51edf6ccba.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-610e2a51edf6ccba.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-610e2a51edf6ccba.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-610e2a51edf6ccba.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-610e2a51edf6ccba.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-610e2a51edf6ccba.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-610e2a51edf6ccba.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/health/route-610e2a51edf6ccba.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/init/route-610e2a51edf6ccba.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-610e2a51edf6ccba.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/keys/route-610e2a51edf6ccba.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/locale/route-610e2a51edf6ccba.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-610e2a51edf6ccba.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-610e2a51edf6ccba.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-610e2a51edf6ccba.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-610e2a51edf6ccba.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-610e2a51edf6ccba.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-610e2a51edf6ccba.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-610e2a51edf6ccba.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-610e2a51edf6ccba.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-610e2a51edf6ccba.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-610e2a51edf6ccba.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-610e2a51edf6ccba.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/models/route-610e2a51edf6ccba.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/models/test/route-610e2a51edf6ccba.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-610e2a51edf6ccba.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-610e2a51edf6ccba.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-610e2a51edf6ccba.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-610e2a51edf6ccba.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-610e2a51edf6ccba.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-610e2a51edf6ccba.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-610e2a51edf6ccba.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-610e2a51edf6ccba.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-610e2a51edf6ccba.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-610e2a51edf6ccba.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-610e2a51edf6ccba.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-610e2a51edf6ccba.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-610e2a51edf6ccba.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-610e2a51edf6ccba.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-610e2a51edf6ccba.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-610e2a51edf6ccba.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/pricing/route-610e2a51edf6ccba.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-610e2a51edf6ccba.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-610e2a51edf6ccba.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-610e2a51edf6ccba.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/json-models/route-610e2a51edf6ccba.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-610e2a51edf6ccba.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-610e2a51edf6ccba.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-610e2a51edf6ccba.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-610e2a51edf6ccba.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-610e2a51edf6ccba.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-610e2a51edf6ccba.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/providers/route-610e2a51edf6ccba.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-610e2a51edf6ccba.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-610e2a51edf6ccba.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-610e2a51edf6ccba.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-610e2a51edf6ccba.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-610e2a51edf6ccba.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-610e2a51edf6ccba.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-610e2a51edf6ccba.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-610e2a51edf6ccba.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-610e2a51edf6ccba.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-610e2a51edf6ccba.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-610e2a51edf6ccba.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-610e2a51edf6ccba.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-610e2a51edf6ccba.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-610e2a51edf6ccba.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-610e2a51edf6ccba.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-610e2a51edf6ccba.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-610e2a51edf6ccba.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-610e2a51edf6ccba.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-610e2a51edf6ccba.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-610e2a51edf6ccba.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-610e2a51edf6ccba.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/settings/route-610e2a51edf6ccba.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-610e2a51edf6ccba.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/tags/route-610e2a51edf6ccba.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-610e2a51edf6ccba.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-610e2a51edf6ccba.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-610e2a51edf6ccba.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-610e2a51edf6ccba.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-610e2a51edf6ccba.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-610e2a51edf6ccba.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-610e2a51edf6ccba.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-610e2a51edf6ccba.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-610e2a51edf6ccba.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-610e2a51edf6ccba.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-610e2a51edf6ccba.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-610e2a51edf6ccba.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-610e2a51edf6ccba.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-610e2a51edf6ccba.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-610e2a51edf6ccba.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-610e2a51edf6ccba.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-610e2a51edf6ccba.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-610e2a51edf6ccba.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-610e2a51edf6ccba.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-610e2a51edf6ccba.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-610e2a51edf6ccba.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-610e2a51edf6ccba.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-610e2a51edf6ccba.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-610e2a51edf6ccba.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-610e2a51edf6ccba.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-610e2a51edf6ccba.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-610e2a51edf6ccba.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-610e2a51edf6ccba.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-610e2a51edf6ccba.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-610e2a51edf6ccba.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-610e2a51edf6ccba.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-610e2a51edf6ccba.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-610e2a51edf6ccba.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-610e2a51edf6ccba.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-610e2a51edf6ccba.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-610e2a51edf6ccba.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-610e2a51edf6ccba.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/v1/route-610e2a51edf6ccba.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-610e2a51edf6ccba.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-610e2a51edf6ccba.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-610e2a51edf6ccba.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-610e2a51edf6ccba.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-610e2a51edf6ccba.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-610e2a51edf6ccba.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-610e2a51edf6ccba.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-610e2a51edf6ccba.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/version/route-610e2a51edf6ccba.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-610e2a51edf6ccba.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/version/update/route-610e2a51edf6ccba.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/landing/page-abe5fbd51346146f.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-610e2a51edf6ccba.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/page-610e2a51edf6ccba.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-610e2a51edf6ccba.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-610e2a51edf6ccba.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-610e2a51edf6ccba.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-610e2a51edf6ccba.js +0 -1
  1045. package/app/.next-cli-build/static/css/87048d3b7e880a4f.css +0 -1
  1046. package/app/public/providers/apinex.png +0 -0
  1047. /package/app/.next-cli-build/static/{aKCEN8jaWm631dVqBrSte → ZVF_AsRusUqo_O-OyJWPo}/_ssgManifest.js +0 -0
@@ -1,7 +0,0 @@
1
- "use strict";exports.id=412,exports.ids=[412],exports.modules={267:(a,b,c)=>{c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(74429),g=c(51126),h=c(99258);let i=a=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},km:{name:"ខ្មែរ",flag:"\uD83C\uDDF0\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"},fa:{name:"فارسی",flag:"\uD83C\uDDEE\uD83C\uDDF7"}})[a]||{name:a,flag:"\uD83C\uDF10"};function j({className:a="",isOpen:b,onClose:c,hideTrigger:k=!1}){let[l,m]=(0,e.useState)("en"),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(!1),r=(0,e.useRef)(null),s="boolean"==typeof b,t=s?b:p,u=(a,b=l)=>{s?!a&&c&&c(b):q(a)},v=async a=>{if(a!==l&&!n){o(!0);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:a})}),await (0,h.wn)(),m(a),u(!1,a)}catch(a){console.error("Failed to set locale:",a)}finally{o(!1)}}};return(0,d.jsxs)("div",{className:a,children:[!k&&(0,d.jsxs)("button",{onClick:()=>u(!t),disabled:n,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,d.jsx)("span",{className:"text-sm font-medium",children:i(l).name}),(0,d.jsx)("span",{className:"text-lg",children:i(l).flag})]}),t&&(0,f.createPortal)((0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>u(!1)}),(0,d.jsxs)("div",{ref:r,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,d.jsx)("button",{onClick:()=>u(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,d.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:g.YZ.map(a=>{let b=l===a,c=i(a);return(0,d.jsxs)("button",{onClick:()=>v(a),disabled:n,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${b?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${n?"opacity-70 cursor-wait":""}`,title:c.name,children:[(0,d.jsx)("span",{className:"text-2xl",children:c.flag}),(0,d.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:c.name}),b&&(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},a)})})})]})]}),document.body)]})}},818:(a,b,c)=>{c.d(b,{h:()=>d});let d={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",km:"\uD83C\uDDF0\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4",fa:"\uD83C\uDDEE\uD83C\uDDF7"}},3236:(a,b,c)=>{c.d(b,{default:()=>m});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(42118),i=c(54510),j=c(95145),k=c(99258);function l({icon:a,label:b,onClick:c,trailing:e,danger:f}){return(0,d.jsxs)("button",{onClick:c,className:`flex items-center gap-3 w-full px-4 py-2.5 text-sm transition-colors ${f?"text-red-500 hover:bg-red-500/10":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[20px] ${f?"":"text-text-muted"}`,children:a}),(0,d.jsx)("span",{className:"flex-1 text-left",children:b}),e&&(0,d.jsx)("span",{className:"text-base",children:e})]})}function m({onLogout:a}){let[b,c]=(0,e.useState)(!1),[f,g]=(0,e.useState)(!1),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(!1),{toggleTheme:r,isDark:s}=(0,h.D)(),t=(0,e.useRef)(null),u=async()=>{q(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(a){}q(!1),o(!1)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"relative",ref:t,children:[(0,d.jsx)("button",{onClick:()=>c(a=>!a),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:(0,k.Tl)("Menu"),children:(0,d.jsx)("span",{className:"material-symbols-outlined",children:"grid_view"})}),b&&(0,d.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-60 bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl z-50 animate-in fade-in zoom-in-95 duration-150 overflow-hidden py-1",children:[(0,d.jsx)(l,{icon:"history",label:(0,k.Tl)("Change Log"),onClick:()=>{c(!1),g(!0)}}),(0,d.jsx)(l,{icon:s?"light_mode":"dark_mode",label:(0,k.Tl)("Theme"),onClick:()=>{r(),c(!1)}}),(0,d.jsx)(l,{icon:"power_settings_new",label:(0,k.Tl)("Shutdown"),danger:!0,onClick:()=>{c(!1),o(!0)}}),(0,d.jsx)(l,{icon:"logout",label:(0,k.Tl)("Logout"),danger:!0,onClick:()=>{c(!1),a()}})]})]}),(0,d.jsx)(i.default,{isOpen:f,onClose:()=>g(!1)}),(0,d.jsx)(j.ConfirmModal,{isOpen:n,onClose:()=>o(!1),onConfirm:u,title:(0,k.Tl)("Close Proxy"),message:(0,k.Tl)("Are you sure you want to close the proxy server?"),confirmText:(0,k.Tl)("Close"),cancelText:(0,k.Tl)("Cancel"),variant:"danger",loading:p})]})}l.propTypes={icon:g().string.isRequired,label:g().string.isRequired,onClick:g().func.isRequired,trailing:g().node,danger:g().bool},m.propTypes={onLogout:g().func.isRequired}},4770:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({label:a,options:b=[],value:c,onChange:g,placeholder:h="Select an option",error:i,hint:j,disabled:k=!1,required:l=!1,className:m,selectClassName:n,...o}){return(0,d.jsxs)("div",{className:(0,e.cn)("flex flex-col gap-1.5",m),children:[a&&(0,d.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[a,l&&(0,d.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsxs)("select",{value:c,onChange:g,disabled:k,className:(0,e.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",i&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",n),...o,children:[(0,d.jsx)("option",{value:"",disabled:!0,children:h}),b.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))]}),(0,d.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),i&&(0,d.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),i]}),j&&!i&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:j})]})}},5291:(a,b,c)=>{c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(79346),i=c(8590),j=c(56110);function k({isOpen:a,providerInfo:b,onSuccess:c,onClose:f}){let[g,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(null),q=(0,e.useCallback)((a,b)=>{"builder-id"===a?l("builder-id"):"idc"===a?(l("idc"),p(b)):"social"===a?(l("social"),n(b.provider)):("import"===a||"api-key"===a)&&c?.()},[c]),r=()=>{l(null),n(null),p(null)};return g?"builder-id"===g||"idc"===g?(0,d.jsx)(h.default,{isOpen:a,provider:"kiro",providerInfo:b,onSuccess:()=>{l(null),p(null),c?.(),f?.()},onClose:r,idcConfig:o}):"social"===g&&m?(0,d.jsx)(j.default,{isOpen:a,provider:m,onSuccess:()=>{l(null),n(null),c?.(),f?.()},onClose:r}):null:(0,d.jsx)(i.default,{isOpen:a,onMethodSelect:q,onClose:f})}k.propTypes={isOpen:g().bool.isRequired,providerInfo:g().shape({name:g().string}),onSuccess:g().func,onClose:g().func.isRequired}},8590:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412);function i({isOpen:a,onMethodSelect:b,onClose:c}){let[f,g]=(0,e.useState)(null),[j,k]=(0,e.useState)(""),[l,m]=(0,e.useState)("us-east-1"),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)("us-east-1"),[v,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(null),F=a=>{g(a),w(null)},G=()=>{g(null),w(null)},H=async()=>{if(!n.trim())return void w("Please enter a refresh token");y(!0),w(null);try{let a=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:n.trim(),...D||{}})}),c=await a.json();if(!a.ok)throw Error(c.error||"Import failed");b("import")}catch(a){w(a.message)}finally{y(!1)}},I=async()=>{if(!p.trim())return void w("Please paste CLIProxyAPI auth JSON");y(!0),w(null);try{let a=await fetch("/api/oauth/kiro/import-cli-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({json:p.trim()})}),c=await a.json();if(!a.ok)throw Error(c.error||"CLIProxyAPI import failed");b("import-cli-proxy")}catch(a){w(a.message)}finally{y(!1)}},J=async()=>{if(!r.trim())return void w("Please enter an API key");y(!0),w(null);try{let a=await fetch("/api/oauth/kiro/api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:r.trim(),region:t.trim()||"us-east-1"})}),c=await a.json();if(!a.ok)throw Error(c.error||"Import failed");b("api-key")}catch(a){w(a.message)}finally{y(!1)}},K=a=>{b("social",{provider:a})};return(0,d.jsx)(h.aF,{isOpen:a,title:"Connect Kiro",onClose:c,size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[!f&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,d.jsx)("button",{onClick:()=>b("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,d.jsx)("button",{onClick:()=>F("idc"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,d.jsx)("button",{onClick:()=>F("api-key"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"key"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"API Key"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Use a long-lived Kiro/CodeWhisperer API key (headless auth)."})]})]})}),(0,d.jsx)("button",{onClick:()=>F("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,d.jsx)("button",{onClick:()=>F("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,d.jsx)("button",{onClick:()=>F("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})}),(0,d.jsx)("button",{onClick:()=>F("import-cli-proxy"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"data_object"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold mb-1",children:"Import CLIProxyAPI JSON"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Paste external_idp auth JSON from CLIProxyAPI/Kiro Microsoft login."})]})]})})]}),"idc"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(h.pd,{value:j,onChange:a=>k(a.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,d.jsx)(h.pd,{value:l,onChange:a=>m(a.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),v&&(0,d.jsx)("p",{className:"text-sm text-red-600",children:v}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>{j.trim()?b("idc",{startUrl:j.trim(),region:l}):w("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,d.jsx)(h.$n,{onClick:G,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"api-key"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste a long-lived Kiro/CodeWhisperer API key. It is validated against AWS and stored directly as a bearer credential (no refresh)."})]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["API Key ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(h.pd,{value:r,onChange:a=>s(a.target.value),placeholder:"Paste your Kiro API key...",className:"font-mono text-sm"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,d.jsx)(h.pd,{value:t,onChange:a=>u(a.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for the key (default: us-east-1)"})]}),v&&(0,d.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:v})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:J,fullWidth:!0,disabled:x||!r.trim(),children:x?"Validating...":"Add API Key"}),(0,d.jsx)(h.$n,{onClick:G,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,d.jsxs)("div",{className:"flex-1 text-sm",children:[(0,d.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,d.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>K("google"),fullWidth:!0,children:"Continue with Google"}),(0,d.jsx)(h.$n,{onClick:G,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,d.jsxs)("div",{className:"flex-1 text-sm",children:[(0,d.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,d.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>K("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,d.jsx)(h.$n,{onClick:G,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[z&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!z&&(0,d.jsxs)(d.Fragment,{children:[B&&(0,d.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,d.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!B&&!v&&(0,d.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(h.pd,{value:n,onChange:a=>o(a.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),v&&(0,d.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:v})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:H,fullWidth:!0,disabled:x||!n.trim(),children:x?"Importing...":"Import Token"}),(0,d.jsx)(h.$n,{onClick:G,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]}),"import-cli-proxy"===f&&(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste the Kiro CLIProxyAPI auth JSON containing auth_method=external_idp. Only Microsoft login token endpoints are accepted."})]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["CLIProxyAPI Auth JSON ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)("textarea",{value:p,onChange:a=>q(a.target.value),placeholder:'{"auth_method":"external_idp","access_token":"...","refresh_token":"...","client_id":"...","token_endpoint":"https://login.microsoftonline.com/.../oauth2/v2.0/token","profile_arn":"...","scopes":"..."}',className:"min-h-40 w-full rounded-md border border-border bg-background p-3 font-mono text-sm outline-none focus:border-primary"})]}),v&&(0,d.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:v})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:I,fullWidth:!0,disabled:x||!p.trim(),children:x?"Importing...":"Import CLIProxyAPI JSON"}),(0,d.jsx)(h.$n,{onClick:G,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})})}i.propTypes={isOpen:g().bool.isRequired,onMethodSelect:g().func.isRequired,onClose:g().func.isRequired}},11633:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(17660),f=c(74380),g=c(79750);let h={mode:{label:"Mode",format:a=>a},defaultModel:{label:"Model",format:a=>a,mono:!0},baseUrl:{label:"Endpoint",format:a=>a,isLink:!0,mono:!0},costPerQuery:{label:"Cost / call",format:a=>0===a?"Free":(0,g.F)(a,4)},pricingUrl:{label:"Pricing",format:()=>"View pricing",isLink:!0},freeTier:{label:"Free tier",format:a=>a},freeMonthlyQuota:{label:"Free quota",format:a=>0===a?"—":a>=999999?"Unlimited":`${a.toLocaleString()} / mo`},searchTypes:{label:"Types",format:a=>a.join(", ")},formats:{label:"Formats",format:a=>a.join(", ")},maxMaxResults:{label:"Max results",format:a=>a},maxCharacters:{label:"Max chars",format:a=>a.toLocaleString()}};function i({config:a,provider:b,title:c="Provider Info"}){if(!a)return null;let g=Object.entries(h).filter(([b])=>void 0!==a[b]&&null!==a[b]&&""!==a[b]).map(([b,c])=>({key:b,label:c.label,value:c.format(a[b]),isLink:c.isLink,mono:c.mono,raw:a[b]})),j=b?.notice?.apiKeyUrl||b?.website,k=b?.notice?.text;return(0,d.jsxs)(e.default,{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:c}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[j&&(0,d.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]}),(0,d.jsx)(f.default,{code:b?.notice?.inviteCode})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2",children:[g.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0",children:a.label}),a.isLink?(0,d.jsx)("a",{href:a.raw,target:"_blank",rel:"noopener noreferrer",className:`text-sm text-primary hover:underline truncate ${a.mono?"font-mono":""}`,children:a.value}):(0,d.jsx)("span",{className:`text-sm text-text-main truncate ${a.mono?"font-mono":""}`,children:a.value})]},a.key)),k&&(0,d.jsxs)("div",{className:"flex items-start gap-3 min-w-0 sm:col-span-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0 mt-0.5",children:"Notice"}),(0,d.jsx)("span",{className:"text-sm text-text-main leading-relaxed",children:k})]})]})]})}},17660:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({children:a,title:b,subtitle:c,icon:g,action:h,padding:i="md",hover:j=!1,elev:k=!1,className:l,...m}){return(0,d.jsxs)("div",{className:(0,e.cn)("bg-surface border border-border-subtle",k?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",j&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[i],l),...m,children:[(b||h)&&(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[g&&(0,d.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:g})}),(0,d.jsxs)("div",{children:[b&&(0,d.jsx)("h3",{className:"text-text-main font-semibold",children:b}),c&&(0,d.jsx)("p",{className:"text-sm text-text-muted",children:c})]})]}),h]}),a]})}f.Section=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",b),...c,children:a})},f.Row=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",b),...c,children:a})},f.ListItem=function({children:a,actions:b,className:c,...f}){return(0,d.jsxs)("div",{className:(0,e.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",c),...f,children:[(0,d.jsx)("div",{className:"flex-1 min-w-0",children:a}),b&&(0,d.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:b})]})}},18982:(a,b,c)=>{c.d(b,{gH:()=>d});function d(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}},20084:(a,b,c)=>{c.d(b,{default:()=>g});var d=c(48249),e=c(67484),f=c(95145);function g({isOpen:a,onClose:b,onAdd:c,addedNames:h=[]}){let[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)("all"),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)({}),[w,x]=(0,e.useState)({}),[y,z]=(0,e.useState)({}),A=(0,e.useMemo)(()=>new Set(h),[h]),B=(0,e.useMemo)(()=>{let a=m.trim().toLowerCase();return i.filter(b=>("authless"!==o||!b.oauth)&&("oauth"!==o||!!b.oauth)&&(!a||(b.title||"").toLowerCase().includes(a)||(b.description||"").toLowerCase().includes(a)||(b.name||"").toLowerCase().includes(a)))},[i,m,o]),C=async a=>{if(!u[a.url]){x(b=>({...b,[a.url]:!0}));try{let b=await fetch("/api/cli-tools/cowork-mcp-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:a.url})}),c=await b.json(),d=c.tools||[],e=Array.isArray(a.toolNames)?a.toolNames:[],f=d.length>0?d.map(a=>a.name):e;v(b=>({...b,[a.url]:{tools:d,requiresAuth:!!c.requiresAuth,error:c.error}})),z(b=>({...b,[a.url]:Object.fromEntries(f.map(a=>[a,!0]))}))}catch(b){v(c=>({...c,[a.url]:{tools:[],error:b.message}}))}finally{x(b=>({...b,[a.url]:!1}))}}},D=(a,b)=>{let c=y[a]||{};z(d=>({...d,[a]:Object.fromEntries(Object.keys(c).map(a=>[a,b]))}))};return(0,d.jsx)(f.default,{isOpen:a,onClose:b,title:"Browse MCP Marketplace",size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:m,onChange:a=>n(a.target.value),placeholder:"Search by name or description...",className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsxs)("select",{value:o,onChange:a=>p(a.target.value),className:"px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,d.jsx)("option",{value:"all",children:"All"}),(0,d.jsx)("option",{value:"authless",children:"Authless"}),(0,d.jsx)("option",{value:"oauth",children:"OAuth"})]})]}),q&&(0,d.jsx)("div",{className:"px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:q}),k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-xs py-4 justify-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),(0,d.jsx)("span",{children:"Loading registry..."})]}),!k&&(0,d.jsxs)("div",{className:"flex flex-col gap-1 max-h-[60vh] overflow-y-auto",children:[0===B.length&&(0,d.jsx)("div",{className:"text-center text-xs text-text-muted py-6",children:"No servers match filter"}),B.map(a=>{let b=A.has(a.slug||a.name),e=s===a.url,f=u[a.url],g=w[a.url],h=y[a.url]||{},i=Object.keys(h),j=Object.values(h).filter(Boolean).length;return(0,d.jsxs)("div",{className:"rounded border border-transparent hover:border-border",children:[(0,d.jsxs)("div",{className:"flex items-start gap-2 px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5",children:[a.iconUrl?(0,d.jsx)("img",{src:a.iconUrl,alt:"",className:"size-7 rounded shrink-0 object-contain",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"}):(0,d.jsx)("div",{className:"size-7 rounded bg-surface shrink-0"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,d.jsx)("span",{className:"font-medium text-xs",children:a.title}),a.oauth?(0,d.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-amber-500/10 text-amber-600",children:"OAuth"}):(0,d.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-green-500/10 text-green-600",children:"Authless"}),a.toolCount>0&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[a.toolCount," tools"]})]}),a.description&&(0,d.jsx)("p",{className:"text-[10px] text-text-muted line-clamp-2 mt-0.5",children:a.description})]}),(0,d.jsx)("button",{onClick:()=>b?null:void(s===a.url?t(null):(t(a.url),C(a))),disabled:b,className:`shrink-0 px-2 py-1 rounded text-[10px] font-medium transition-colors ${b?"bg-green-500/10 text-green-600 cursor-default":e?"bg-surface border border-border text-text-muted hover:bg-black/5":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary/20"}`,children:b?"Added":e?"Cancel":"+ Add"})]}),e&&(0,d.jsxs)("div",{className:"px-3 py-2 bg-surface/40 border-t border-border flex flex-col gap-2",children:[g&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[10px] py-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),(0,d.jsx)("span",{children:"Probing server for tools..."})]}),!g&&f?.requiresAuth&&(0,d.jsx)("p",{className:"text-[10px] text-amber-600 bg-amber-500/10 px-2 py-1 rounded",children:"\uD83D\uDD10 OAuth required. Add now and authenticate after Apply; tool list will be discovered after first connect."}),!g&&f?.error&&!f?.requiresAuth&&(0,d.jsxs)("p",{className:"text-[10px] text-red-600 bg-red-500/10 px-2 py-1 rounded",children:["Probe failed: ",f.error]}),!g&&0===i.length&&!f?.requiresAuth&&!f?.error&&(0,d.jsx)("p",{className:"text-[10px] text-text-muted",children:"No tools advertised by server."}),!g&&i.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:[j,"/",i.length," tools enabled"]}),(0,d.jsxs)("div",{className:"flex gap-1",children:[(0,d.jsx)("button",{onClick:()=>D(a.url,!0),className:"text-[10px] text-primary hover:underline",children:"All"}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"\xb7"}),(0,d.jsx)("button",{onClick:()=>D(a.url,!1),className:"text-[10px] text-primary hover:underline",children:"None"})]})]}),(0,d.jsx)("div",{className:"grid grid-cols-2 gap-1 max-h-40 overflow-y-auto",children:i.map(b=>(0,d.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 px-1 rounded",children:[(0,d.jsx)("input",{type:"checkbox",checked:!!h[b],onChange:()=>{var c;return c=a.url,void z(a=>({...a,[c]:{...a[c],[b]:!a[c]?.[b]}}))},className:"size-3"}),(0,d.jsx)("span",{className:"truncate",children:b})]},b))})]}),(0,d.jsx)("button",{onClick:()=>{let b,d;return d=Object.keys(b=y[a.url]||{}).filter(a=>b[a]),void(c?.({name:a.slug||a.name,title:a.title,description:a.description,url:a.url,transport:a.transport,oauth:a.oauth,toolNames:d}),t(null))},className:"self-end px-2 py-1 rounded text-[10px] font-medium bg-primary text-white hover:bg-primary/90",children:"✓ Confirm Add"})]})]},a.url)})]}),(0,d.jsxs)("div",{className:"text-[10px] text-text-muted text-right",children:[B.length," of ",i.length," servers"]})]})})}},25919:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({src:a,alt:b="Avatar",name:c,size:g="md",className:h}){let i={xs:"size-6 text-xs",sm:"size-8 text-sm",md:"size-10 text-base",lg:"size-12 text-lg",xl:"size-16 text-xl"};return a?(0,d.jsx)("div",{className:(0,e.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",i[g],h),style:{backgroundImage:`url(${a})`},role:"img","aria-label":b}):(0,d.jsx)("div",{className:(0,e.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",i[g],(a=>{if(!a)return"bg-primary";let b=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],c=a.charCodeAt(0)%b.length;return b[c]})(c),h),role:"img","aria-label":b,children:(a=>{if(!a)return"?";let b=a.split(" ");return b.length>=2?`${b[0][0]}${b[1][0]}`.toUpperCase():a.substring(0,2).toUpperCase()})(c)})}},29225:(a,b,c)=>{c.d(b,{HY:()=>h,Kw:()=>i});let d={"perplexity-agent":"perplexity","gitlab-duo":"gitlab","vercel-ai-gateway":"vercel","b.ai":"bai","b-ai":"bai"},e={bai:".svg",gorouter:".svg",tabiauto:".svg"},f=new Set;function g(a){return a&&"string"==typeof a?a.trim().toLowerCase():""}function h(a){let b=function(a){let b=g(a);if(!b||f.has(b))return"";let c=d[b]||b;return f.has(c)?"":c}(a);return b?`/providers/${b}${e[b]||".png"}`:null}function i(a){let b=g(a);b&&f.add(b);let c=d[b];c&&f.add(c)}},29476:(a,b,c)=>{c.d(b,{y:()=>f});var d=c(67484),e=c(59160);function f(){let[a,b]=(0,d.useState)(()=>({})),[c,f]=(0,d.useState)(()=>({}));return{getCaps:(0,d.useCallback)(b=>(function(a,b,c){if(!c)return null;if(a[c])return a[c];let d=c.includes("/")?c.slice(c.indexOf("/")+1):c;if(b[d])return b[d];let f=c.includes("/")?c.slice(0,c.indexOf("/")):null,g=(0,e.nl)(f,d);return{vision:g.vision,search:g.search,reasoning:g.reasoning,contextWindow:g.contextWindow,maxOutput:g.maxOutput}})(a,c,b),[a,c])}}},32971:(a,b,c)=>{c.d(b,{default:()=>e});var d=c(48249);function e({text:a,children:b,position:c="top",color:f}){let g=f?"":"bg-gray-900";return(0,d.jsxs)("div",{className:"relative inline-flex group/tt",children:[b,(0,d.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[c]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${g} text-white opacity-0 group-hover/tt:opacity-100 transition-opacity duration-150 whitespace-normal`,style:f?{backgroundColor:f}:{},children:a})]})}},37365:(a,b,c)=>{c.d(b,{C:()=>d});let d=(0,c(31417).v)(a=>({query:"",placeholder:"",visible:!1,setQuery:b=>a({query:b}),register:(b="Search...")=>a({visible:!0,placeholder:b,query:""}),unregister:()=>a({visible:!1,placeholder:"",query:""})}))},38930:(a,b,c)=>{c.d(b,{default:()=>g});var d=c(48249),e=c(91431),f=c(32971);function g({caps:a,className:b="",colorOverride:c,size:h=16}){if(!a)return null;let i=Object.keys(e.bs).filter(b=>a[b]);return 0===i.length?null:(0,d.jsx)("span",{className:`inline-flex items-center gap-0.5 ${b}`,children:i.map(a=>(0,d.jsx)(f.default,{text:`${e.bs[a].label} — ${e.bs[a].desc}`,children:(0,d.jsx)("span",{className:`material-symbols-outlined leading-none cursor-help ${c||e.bs[a].color}`,style:{fontSize:`${h}px`},children:e.bs[a].icon})},a))})}},39645:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(95145),g=c(99070),h=c(50377);function i({isOpen:a,onClose:b,title:c="Manual Configuration",configs:j=[]}){let{copy:k}=(0,h.C)(),[l,m]=(0,e.useState)(null);return(0,d.jsx)(f.default,{isOpen:a,onClose:b,title:c,size:"xl",children:(0,d.jsx)("div",{className:"flex flex-col gap-4",children:j.map((a,b)=>(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:a.filename}),(0,d.jsxs)(g.default,{variant:"ghost",size:"sm",onClick:()=>{var c;return c=a.content,void(k(c,`manualconfig-${b}`),m(b),setTimeout(()=>m(null),2e3))},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:l===b?"check":"content_copy"}),l===b?"Copied!":"Copy"]})]}),(0,d.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:a.content})]},b))})})}},41371:(a,b,c)=>{c.d(b,{i:()=>f});var d=c(31417);let e=0,f=(0,d.v)((a,b)=>({notifications:[],addNotification:c=>{let d=++e,f={id:d,type:c.type||"info",message:c.message,title:c.title||null,duration:c.duration??5e3,dismissible:c.dismissible??!0,createdAt:Date.now()};return a(a=>({notifications:[...a.notifications,f]})),f.duration>0&&setTimeout(()=>b().removeNotification(d),f.duration),d},removeNotification:b=>{a(a=>({notifications:a.notifications.filter(a=>a.id!==b)}))},clearAll:()=>a({notifications:[]}),success:(a,c)=>b().addNotification({type:"success",message:a,title:c}),error:(a,c)=>b().addNotification({type:"error",message:a,title:c,duration:8e3}),warning:(a,c)=>b().addNotification({type:"warning",message:a,title:c}),info:(a,c)=>b().addNotification({type:"info",message:a,title:c})}))},42118:(a,b,c)=>{c.d(b,{D:()=>i});var d=c(67484),e=c(13033);function f(a){return()=>{}}function g(){return!1}function h(){return!1}function i(){let{theme:a,setTheme:b,toggleTheme:c,initTheme:i}=(0,e.A)(),j=(0,d.useSyncExternalStore)(f,g,h);return{theme:a,setTheme:b,toggleTheme:c,isDark:"dark"===a||"system"===a&&j}}},42196:(a,b,c)=>{c.d(b,{default:()=>w});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(2116),i=c.n(h),j=c(19099),k=c(71404),l=c(12020),m=c(92592),n=c(50377),o=c(99258),p=c(99070),q=c(95145);let r=["embedding","image","video","tts","stt"],s="/dashboard/media-providers/web",t=[{href:"/dashboard/endpoint",label:"Endpoint & Key",icon:"api"},{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/combos",label:"Combo & Vision Adapter",icon:"layers"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"},{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"}],u=[{href:"/dashboard/console-log",label:"Console Log",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"}],v=[{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/skills",label:"Skills",icon:"extension"}];function w({onClose:a}){let b=(0,j.usePathname)(),[c,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)(!1),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(0),[G,H]=(0,e.useState)(!1),{copied:I,copy:J}=(0,n.C)(2e3),K=l.h0.installCmdLatest,L=a=>"/dashboard/endpoint"===a?"/dashboard"===b||b.startsWith("/dashboard/endpoint"):b.startsWith(a),M=async()=>{try{await navigator.clipboard.writeText(K)}catch{}J(K);let a=l.h0.shutdownCountdownSec;F(a);let b=setInterval(()=>{F(a-=1),a<=0&&(clearInterval(b),fetch("/api/version/shutdown",{method:"POST"}).catch(()=>{}),h(!0))},1e3)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("aside",{className:"flex w-72 flex-col border-r border-border-subtle bg-vibrancy backdrop-blur-xl transition-colors duration-300 min-h-full",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-6 pt-5 pb-2",children:[(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,d.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"})]}),(0,d.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-2",children:[(0,d.jsxs)(i(),{href:"/dashboard",className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"flex items-center justify-center size-9 rounded-[10px] bg-gradient-to-br from-brand-500 to-brand-700 shadow-[var(--shadow-warm)]",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("h1",{className:"text-lg font-semibold tracking-tight text-text-main",children:"10Router Proxy"}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["v",l.vQ.version]})]})]}),y&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 rounded p-1 -m-1",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-green-600 dark:text-amber-500",children:[(0,o.Tl)("↑ New version available:")," v",y.latestVersion]}),"fpk"===y.installChannel||"desktop"===y.installChannel?(0,d.jsx)("a",{href:y.releaseUrl,target:"_blank",rel:"noreferrer",className:"px-2 py-1 rounded bg-green-600 hover:bg-green-700 dark:bg-amber-500 dark:hover:bg-amber-600 text-white text-[11px] font-semibold transition-colors text-center",children:"fpk"===y.installChannel?(0,o.Tl)("Get the fpk from Releases"):(0,o.Tl)("Get the installer from Releases")}):(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("button",{onClick:()=>B(!0),className:"px-2 py-1 rounded bg-green-600 hover:bg-green-700 dark:bg-amber-500 dark:hover:bg-amber-600 text-white text-[11px] font-semibold transition-colors cursor-pointer",children:(0,o.Tl)("Update now")}),(0,d.jsx)("button",{onClick:()=>J(K),title:(0,o.Tl)("Copy install command"),className:"flex-1 text-left hover:opacity-80 transition-opacity cursor-pointer min-w-0",children:(0,d.jsx)("code",{className:"block text-[10px] text-green-600/80 dark:text-amber-400/70 font-mono truncate",children:I?"✓ "+(0,o.Tl)("copied!"):K})})]})]})]}),(0,d.jsxs)("nav",{className:"flex-1 px-4 py-2 space-y-0.5 overflow-y-auto custom-scrollbar",children:[t.map(b=>(0,d.jsxs)(i(),{href:b.href,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(b.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,d.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[18px]",L(b.href)?"fill-1":"group-hover:text-primary transition-colors"),children:b.icon}),(0,d.jsx)("span",{className:"text-[13px] font-medium",children:b.label})]},b.href)),(0,d.jsxs)("div",{className:"pt-3 mt-2 space-y-0.5",children:[(0,d.jsx)("p",{className:"px-4 text-xs font-semibold text-text-muted/60 uppercase tracking-wider mb-2",children:"System"}),(0,d.jsxs)("button",{onClick:()=>f(a=>!a),className:(0,k.cn)("w-full flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",b.startsWith("/dashboard/media-providers")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"perm_media"}),(0,d.jsx)("span",{className:"text-[13px] font-medium flex-1 text-left",children:"Media Providers"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] transition-transform",style:{transform:c?"rotate(180deg)":"rotate(0deg)"},children:"expand_more"})]}),c&&(0,d.jsxs)("div",{className:"pl-4",children:[m.rj.filter(a=>r.includes(a.id)).map(c=>(0,d.jsxs)(i(),{href:`/dashboard/media-providers/${c.id}`,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",b.startsWith(`/dashboard/media-providers/${c.id}`)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:c.icon}),(0,d.jsx)("span",{className:"text-sm",children:c.label})]},c.id)),(0,d.jsxs)(i(),{href:s,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-4 py-1 rounded-lg transition-all group",b.startsWith(s)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"travel_explore"}),(0,d.jsx)("span",{className:"text-sm",children:"Web Fetch & Search"})]},"web")]}),v.map(b=>(0,d.jsxs)(i(),{href:b.href,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(b.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,d.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[18px]",L(b.href)?"fill-1":"group-hover:text-primary transition-colors"),children:b.icon}),(0,d.jsx)("span",{className:"text-[13px] font-medium",children:b.label})]},b.href)),u.map(b=>"/dashboard/translator"!==b.href||G?(0,d.jsxs)(i(),{href:b.href,onClick:a,className:(0,k.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L(b.href)?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,d.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[18px]",L(b.href)?"fill-1":"group-hover:text-primary transition-colors"),children:b.icon}),(0,d.jsx)("span",{className:"text-[13px] font-medium",children:b.label})]},b.href):null),(0,d.jsxs)(i(),{href:"/dashboard/profile",onClick:a,className:(0,k.cn)("flex items-center gap-3 px-3 py-1 rounded-lg transition-all group",L("/dashboard/profile")?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,d.jsx)("span",{className:(0,k.cn)("material-symbols-outlined text-[18px]",L("/dashboard/profile")?"fill-1":"group-hover:text-primary transition-colors"),children:"settings"}),(0,d.jsx)("span",{className:"text-[13px] font-medium",children:"Settings"})]})]})]})]}),(0,d.jsx)(q.ConfirmModal,{isOpen:A,onClose:()=>B(!1),onConfirm:()=>{B(!1),D(!0)},title:(0,o.Tl)("Update 10Router"),message:(0,o.Tl)("Show install command for v${version}? You can copy it and shutdown to install manually.").replace("${version}",y?.latestVersion||""),confirmText:(0,o.Tl)("Show Command"),cancelText:(0,o.Tl)("Cancel"),variant:"primary"}),(g||C)&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm p-6",children:C?(0,d.jsx)(x,{latestVersion:y?.latestVersion,installCmd:K,copied:I,onCopyAndShutdown:M,onCancel:()=>{D(!1),F(0)},countdown:E,isDisconnected:g}):(0,d.jsxs)("div",{className:"text-center p-8",children:[(0,d.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-red-500/20 text-red-500 mx-auto mb-4",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"power_off"})}),(0,d.jsx)("h2",{className:"text-xl font-semibold text-white mb-2",children:(0,o.Tl)("Server Disconnected")}),(0,d.jsx)("p",{className:"text-text-muted mb-6",children:(0,o.Tl)("The proxy server has been stopped.")}),(0,d.jsx)(p.default,{variant:"secondary",onClick:()=>globalThis.location.reload(),children:(0,o.Tl)("Reload Page")})]})})]})}function x({latestVersion:a,installCmd:b,copied:c,onCopyAndShutdown:e,onCancel:f,countdown:g,isDisconnected:h}){let i=g>0;return(0,d.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-neutral-900/95 border border-white/10 p-6 text-white",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,d.jsx)("div",{className:"flex items-center justify-center size-11 rounded-full bg-amber-500/20 text-amber-400",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"content_copy"})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("h2",{className:"text-lg font-semibold",children:[(0,o.Tl)("Update 10Router"),a?` v${a}`:""]}),(0,d.jsx)("p",{className:"text-xs text-white/60",children:h?(0,o.Tl)("Server stopped. Paste the command into a terminal to install."):i?(0,o.Tl)("Command copied. Server will stop in {s}s...").replace("{s}",String(g)):(0,o.Tl)("Click the button below to copy the install command and shutdown.")})]})]}),(0,d.jsx)("p",{className:"text-sm text-white/80 mb-2",children:(0,o.Tl)("Install command:")}),(0,d.jsx)("div",{className:"w-full px-3 py-2 rounded bg-white/5 mb-4",children:(0,d.jsx)("code",{className:"text-xs font-mono text-amber-400 break-all",children:b})}),(0,d.jsxs)("ol",{className:"text-xs text-white/70 space-y-1 list-decimal list-inside mb-4",children:[(0,d.jsx)("li",{children:(0,o.Tl)("Click Copy & Shutdown below.")}),(0,d.jsx)("li",{children:(0,o.Tl)("Paste the command into your terminal and press Enter.")}),(0,d.jsx)("li",{children:(0,o.Tl)("Run 10router again after install.")})]}),h?(0,d.jsx)(p.default,{variant:"secondary",fullWidth:!0,onClick:()=>globalThis.location.reload(),children:(0,o.Tl)("Reload Page")}):(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(p.default,{variant:"secondary",onClick:f,disabled:i,className:"whitespace-nowrap shrink-0",children:(0,o.Tl)("Cancel")}),(0,d.jsx)(p.default,{variant:"primary",fullWidth:!0,onClick:e,disabled:i,children:c?(0,o.Tl)("✓ Copied — shutting down..."):i?(0,o.Tl)("Shutting down in {s}s").replace("{s}",String(g)):(0,o.Tl)("Copy & Shutdown")})]})]})}w.propTypes={onClose:g().func},x.propTypes={latestVersion:g().string,installCmd:g().string.isRequired,copied:g().bool,onCopyAndShutdown:g().func.isRequired,onCancel:g().func.isRequired,countdown:g().number,isDisconnected:g().bool}},43182:(a,b,c)=>{c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412);let i="https://gitlab.com";function j({isOpen:a,providerInfo:b,onSuccess:c,onClose:f}){let[g,k]=(0,e.useState)(null),[l,m]=(0,e.useState)(i),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(null),B=()=>{k(null),m(i),o(""),q(""),s(""),w(null),u(!1),y(!1),A(null),f()},C=async()=>{if(!r.trim())return void w("Personal Access Token is required");u(!0),w(null);try{let a=await fetch("/api/oauth/gitlab/pat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:r.trim(),baseUrl:l.trim()||i})}),b=await a.json();if(!a.ok)throw Error(b.error||"Authentication failed");c?.(),B()}catch(a){w(a.message)}finally{u(!1)}};return a?x&&z?(0,d.jsx)(h.LF,{isOpen:!0,provider:"gitlab",providerInfo:b,oauthMeta:z,onSuccess:()=>{c?.(),B()},onClose:()=>{y(!1),A(null)}}):(0,d.jsx)(h.aF,{isOpen:a,title:"Connect GitLab Duo",onClose:B,size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[!g&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Choose how to authenticate with GitLab Duo:"}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,d.jsxs)("button",{onClick:()=>k("oauth"),className:"flex flex-col items-center gap-2 p-4 rounded-lg border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"lock_open"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:"OAuth App"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab OAuth application"})]})]}),(0,d.jsxs)("button",{onClick:()=>k("pat"),className:"flex flex-col items-center gap-2 p-4 rounded-lg border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"key"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:"Personal Access Token"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab PAT with api scope"})]})]})]})]}),"oauth"===g&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Create an OAuth app at"," ",(0,d.jsx)("a",{href:`${l.trim()||i}/-/profile/applications`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Applications"})," ","with redirect URI"," ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"http://localhost/callback"})]}),(0,d.jsx)(h.pd,{label:"GitLab Base URL",value:l,onChange:a=>m(a.target.value),placeholder:i}),(0,d.jsx)(h.pd,{label:"Client ID",value:n,onChange:a=>o(a.target.value),placeholder:"Your OAuth application client ID"}),(0,d.jsx)(h.pd,{label:"Client Secret (optional for PKCE)",value:p,onChange:a=>q(a.target.value),placeholder:"Leave empty for public PKCE app"}),v&&(0,d.jsx)("p",{className:"text-sm text-red-500",children:v}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>{n.trim()?(w(null),A({baseUrl:l.trim()||i,clientId:n.trim(),clientSecret:p.trim()}),y(!0)):w("Client ID is required")},fullWidth:!0,disabled:!n.trim(),children:"Authorize"}),(0,d.jsx)(h.$n,{onClick:()=>{k(null),w(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"pat"===g&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Create a PAT at"," ",(0,d.jsx)("a",{href:`${l.trim()||i}/-/user_settings/personal_access_tokens`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Access Tokens"})," ","with scopes: ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"api"}),","," ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"read_user"}),", and"," ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"ai_features"}),"."]}),(0,d.jsx)(h.pd,{label:"GitLab Base URL",value:l,onChange:a=>m(a.target.value),placeholder:i}),(0,d.jsx)(h.pd,{label:"Personal Access Token",value:r,onChange:a=>s(a.target.value),placeholder:"glpat-xxxxxxxxxxxxxxxxxxxx",type:"password"}),v&&(0,d.jsx)("p",{className:"text-sm text-red-500",children:v}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:C,fullWidth:!0,disabled:!r.trim()||t,loading:t,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:()=>{k(null),w(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})}):null}j.propTypes={isOpen:g().bool.isRequired,providerInfo:g().shape({name:g().string}),onSuccess:g().func,onClose:g().func.isRequired}},47036:(a,b,c)=>{c.d(b,{default:()=>y});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(49885),j=c.n(i),k=c(72738),l=c(3236);c(51126);var m=c(818),n=c(267);function o(){let[a,b]=(0,e.useState)(!1),[c,f]=(0,e.useState)("en");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>b(!0),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Language","data-i18n-skip":"true",children:(0,d.jsx)("span",{className:"text-lg leading-none",children:m.h[c]||"\uD83C\uDF10"})}),(0,d.jsx)(n.default,{hideTrigger:!0,isOpen:a,onClose:a=>{b(!1),f(a)}})]})}var p=c(53845),q=c(74429),r=c(12020);function s({isOpen:a,onClose:b}){let[c,f]=(0,e.useState)(null),[g,h]=(0,e.useState)(!1),[i,j]=(0,e.useState)(""),k=(0,e.useRef)(null);return!a||"u"<typeof document?null:(0,q.createPortal)((0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:b}),(0,d.jsxs)("div",{ref:k,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,d.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-pink-500",children:"volunteer_activism"}),c?.title||"Support 10Router"]}),(0,d.jsx)("button",{onClick:b,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,d.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[g&&(0,d.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),i&&(0,d.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load donate info: ",i]}),!g&&!i&&c&&(0,d.jsxs)(d.Fragment,{children:[c.message&&(0,d.jsx)("p",{className:"text-text-muted text-sm mb-6 text-center",children:c.message}),(0,d.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:c.channels?.map(a=>(0,d.jsx)(t,{channel:a},a.id))})]})]})]})]}),document.body)}function t({channel:a}){let{label:b,description:c,icon:e,color:f,url:g,qr:h}=a,i=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-3",style:{backgroundColor:`${f}20`,color:f},children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:e})}),(0,d.jsx)("div",{className:"font-semibold text-text-main mb-1",children:b}),c&&(0,d.jsx)("div",{className:"text-xs text-text-muted mb-3 text-center",children:c}),h&&(0,d.jsx)("img",{src:h,alt:`${b} QR`,className:"w-full max-w-[180px] aspect-square object-contain rounded-lg bg-white p-1",loading:"lazy",decoding:"async"})]});return(0,d.jsxs)("div",{className:"flex flex-col items-center p-4 rounded-xl border border-black/10 dark:border-white/10 bg-surface/50 hover:border-pink-500/40 transition-colors",children:[i,g&&(0,d.jsxs)("a",{href:g,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium text-white hover:opacity-90 transition-opacity",style:{backgroundColor:f},children:["Open",(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"})]})]})}s.propTypes={isOpen:j().bool.isRequired,onClose:j().func.isRequired};var u=c(37365),v=c(92592),w=c(29225),x=c(99258);function y({onMenuClick:a,onDesktopMenuClick:b,showMenuButton:c=!0}){let g=(0,f.usePathname)(),[i,j]=(0,e.useState)(""),[m,n]=(0,e.useState)(""),[q,t]=(0,e.useState)(!1),{title:u,description:A,icon:B,breadcrumbs:C}=(0,e.useMemo)(()=>(a=>{if(!a)return{title:"",description:"",breadcrumbs:[]};let b=a.match(/\/media-providers\/([^/]+)\/([^/]+)$/);if(b){let a=b[1],c=b[2],d=v.rj.find(b=>b.id===a),e=v.Q2[c];return{title:e?.name||c,description:"",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${a}`},{label:d?.label||a,href:`/dashboard/media-providers/${a}`},{label:e?.name||c,image:(0,w.HY)(c)}]}}let c=a.match(/\/media-providers\/([^/]+)$/);if(c){let a=c[1],b=v.rj.find(b=>b.id===a);return{title:b?.label||a,description:`Manage your ${b?.label||a} providers`,icon:b?.icon||"perm_media",breadcrumbs:[]}}let d=a.match(/\/providers\/([^/]+)$/);if(d){let a=d[1],b=r.zN[a]||r.fg[a];if(b)return{title:b.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:b.name,image:(0,w.HY)(b.id)}]}}return a.includes("/providers")&&!a.includes("/media-providers")?{title:"Providers",description:"Manage your AI provider connections",icon:"dns",breadcrumbs:[]}:a.includes("/combos")?{title:"Combos",description:"Model combos with fallback",icon:"layers",breadcrumbs:[]}:a.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",icon:"bar_chart",breadcrumbs:[]}:a.includes("/auth-files")?{title:"Auth Files",description:"Map provider credentials stored in the local database",icon:"vpn_key",breadcrumbs:[]}:a.includes("/quota")?{title:"Quota Tracker",description:"Track and manage your API quota limits",icon:"data_usage",breadcrumbs:[]}:a.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through 10Router",icon:"security",breadcrumbs:[]}:a.includes("/token-saver")?{title:"Token Saver",description:"Compress prompts and outputs to save tokens",icon:"savings",breadcrumbs:[]}:a.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",icon:"terminal",breadcrumbs:[]}:a.includes("/proxy-pools")?{title:"Proxy Pools",description:"Manage your proxy pool configurations",icon:"lan",breadcrumbs:[]}:a.includes("/skills")?{title:"Agent Skills",description:"Copy a link and paste to your AI to use 10Router — no install needed",icon:"extension",breadcrumbs:[]}:a.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:a.includes("/profile")?{title:"Settings",description:"Manage your preferences",icon:"settings",breadcrumbs:[]}:a.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",icon:"translate",breadcrumbs:[]}:a.includes("/console-log")?{title:"Console Log",description:"Live server console output",icon:"monitor",breadcrumbs:[]}:"/dashboard"===a?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(g),[g]),D=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(a){console.error("Failed to logout:",a)}};return(0,d.jsxs)("header",{className:"shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20",children:[(0,d.jsx)("div",{className:"flex items-center gap-3 lg:hidden shrink-0",children:c&&(0,d.jsx)("button",{onClick:a,className:"text-text-main hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),b&&(0,d.jsx)("button",{onClick:b,className:"hidden lg:flex items-center justify-center p-2 shrink-0 text-text-main hover:text-primary transition-colors rounded-lg",title:"Toggle sidebar","aria-label":"Toggle sidebar",children:(0,d.jsx)("span",{className:"material-symbols-outlined",children:"menu_open"})}),(0,d.jsx)("div",{className:"flex flex-col min-w-0 flex-1",children:C.length>0?(0,d.jsx)("div",{className:"flex items-center gap-2",children:C.map((a,b)=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[b>0&&(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),a.href?(0,d.jsx)(h(),{href:a.href,className:"text-text-muted hover:text-primary transition-colors",children:a.label}):(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[a.image&&(0,d.jsx)(k.A,{src:a.image,alt:a.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:a.label.slice(0,2).toUpperCase()}),(0,d.jsx)("h1",{className:"text-base lg:text-2xl font-semibold text-text-main tracking-tight truncate",children:(0,x.Tl)(a.label)})]})]},`${a.label}-${a.href||"current"}`))}):u?(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[B&&(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-xl lg:text-2xl",children:B}),(0,d.jsx)("h1",{className:"text-base lg:text-2xl font-semibold tracking-tight truncate",children:(0,x.Tl)(u)})]}),A&&(0,d.jsx)("p",{className:"hidden lg:block text-sm text-text-muted truncate",children:(0,x.Tl)(A)})]}):null}),(0,d.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[i&&("OIDC"===m||"SAML"===m)&&(0,d.jsxs)("div",{className:"hidden sm:flex items-center max-w-[220px] px-3 py-1.5 rounded-full border border-border bg-surface/70 text-xs text-text-muted truncate",title:i,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1.5 text-primary",children:"person"}),(0,d.jsx)("span",{className:"truncate",children:i}),(0,d.jsx)("span",{className:"ml-2 shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary",children:m})]}),(0,d.jsx)(z,{}),(0,d.jsxs)("button",{onClick:()=>t(!0),className:"flex items-center gap-1.5 px-3 h-8 rounded-lg border border-pink-500/30 bg-pink-500/10 text-pink-600 dark:text-pink-400 hover:bg-pink-500/20 transition-colors text-sm font-medium","aria-label":"Donate",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"volunteer_activism"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Donate"})]}),(0,d.jsx)(p.default,{}),(0,d.jsx)(o,{}),(0,d.jsx)(l.default,{onLogout:D})]}),(0,d.jsx)(s,{isOpen:q,onClose:()=>t(!1)})]})}function z(){let a=(0,u.C)(a=>a.visible),b=(0,u.C)(a=>a.query),c=(0,u.C)(a=>a.placeholder),e=(0,u.C)(a=>a.setQuery);return a?(0,d.jsxs)("div",{className:"relative w-[160px] sm:w-[220px]",children:[(0,d.jsx)("span",{className:"material-symbols-outlined absolute left-2 top-1/2 -translate-y-1/2 text-text-muted text-[16px] pointer-events-none",children:"search"}),(0,d.jsx)("input",{type:"text",value:b,onChange:a=>e(a.target.value),placeholder:c,className:"w-full h-8 pl-7 pr-7 rounded-lg border border-border bg-surface/60 text-sm focus:outline-none focus:border-primary/50 transition-colors"}),b&&(0,d.jsx)("button",{type:"button",onClick:()=>e(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-main p-0.5 rounded","aria-label":"Clear search",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}):null}y.propTypes={onMenuClick:j().func,onDesktopMenuClick:j().func,showMenuButton:j().bool}},48781:(a,b,c)=>{c.d(b,{default:()=>k});var d=c(48249),e=c(2116),f=c.n(e),g=c(12020);let h=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],i=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],j=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function k(){return(0,d.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,d.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,d.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,d.jsx)("div",{className:"size-6 text-primary",children:(0,d.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,d.jsx)("path",{clipRule:"evenodd",d:"M12.0799 24L4 19.2479L9.95537 8.75216L18.04 13.4961L18.0446 4H29.9554L29.96 13.4961L38.0446 8.75216L44 19.2479L35.92 24L44 28.7521L38.0446 39.2479L29.96 34.5039L29.9554 44H18.0446L18.04 34.5039L9.95537 39.2479L4 28.7521L12.0799 24Z",fillRule:"evenodd"})})}),(0,d.jsx)("span",{className:"text-xl font-bold text-text-main",children:g.vQ.name})]}),(0,d.jsx)("p",{className:"text-text-muted mb-6 max-w-sm font-light",children:"The unified interface for modern AI infrastructure. Secure, observable, and scalable."}),(0,d.jsxs)("div",{className:"flex gap-4",children:[(0,d.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})})}),(0,d.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,d.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:h.map(a=>(0,d.jsx)("li",{children:(0,d.jsx)(f(),{href:a.href,className:"hover:text-primary transition-colors",children:a.label})},a.label))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,d.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:i.map(a=>(0,d.jsx)("li",{children:(0,d.jsx)(f(),{href:a.href,className:"hover:text-primary transition-colors",children:a.label})},a.label))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,d.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:j.map(a=>(0,d.jsx)("li",{children:(0,d.jsx)(f(),{href:a.href,className:"hover:text-primary transition-colors",children:a.label})},a.label))})]})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",g.vQ.name," Inc. All rights reserved."]}),(0,d.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,d.jsx)(f(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,d.jsx)(f(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},50377:(a,b,c)=>{c.d(b,{C:()=>e});var d=c(67484);function e(a=2e3){let[b,c]=(0,d.useState)(null),f=(0,d.useRef)(null);return{copied:b,copy:(0,d.useCallback)((b,d="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(b);else{let a=document.createElement("textarea");a.value=b,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)}})(),c(d),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{c(null)},a)},[a])}}},50412:(a,b,c)=>{c.d(b,{x0:()=>x.default,Ex:()=>j.default,$n:()=>d.default,nh:()=>D.default,Zp:()=>g.default,Qv:()=>i.CardSkeleton,CK:()=>o.default,uo:()=>h.ConfirmModal,G9:()=>t.default,wI:()=>w.default,vj:()=>v.default,vE:()=>u.default,pd:()=>e.default,N5:()=>C.default,Mh:()=>s.default,uR:()=>n.default,Nf:()=>p.default,aF:()=>h.default,rq:()=>m.default,gw:()=>y.default,LF:()=>l.default,Wx:()=>B.default,gM:()=>r.default,Iz:()=>z.default,l6:()=>f.default,lM:()=>k.default,m_:()=>A.default,jK:()=>q.default});var d=c(99070),e=c(83552),f=c(4770),g=c(17660),h=c(95145),i=c(74812);c(25919);var j=c(75171),k=c(95514);c(53845),c(19308),c(42196),c(47036),c(48781);var l=c(79346),m=c(83352),n=c(39645),o=c(62727),p=c(20084),q=c(59026);c(267),c(3236),c(54510);var r=c(91809);c(8590);var s=c(5291);c(56110);var t=c(51109),u=c(79488),v=c(43182),w=c(51585),x=c(67738),y=c(50585),z=c(91099),A=c(32971),B=c(11633),C=c(74380),D=c(38930);c(85306),c(53838)},50585:(a,b,c)=>{c.d(b,{default:()=>m});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(17660),i=c(4770),j=c(75171);let k="__none__",l=[{value:"none",label:"None (single pool)"},{value:"round-robin",label:"Round-robin"},{value:"random",label:"Random"}];function m({providerId:a}){let[b,c]=(0,e.useState)([]),[f,g]=(0,e.useState)(k),[n,o]=(0,e.useState)("none"),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(!1),t=(0,e.useCallback)(async(b,c)=>{q(!0);try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={...e[a]||{}};b===k?delete f.proxyPoolId:f.proxyPoolId=b,"none"===c?delete f.rotateStrategy:f.rotateStrategy=c;let g={...e};0===Object.keys(f).length?delete g[a]:g[a]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})}),s(!0),setTimeout(()=>s(!1),1500)}catch(a){console.log("Save proxy config error:",a)}finally{q(!1)}},[a]),u=b.length>=2,v="none"!==n;return(0,d.jsxs)(h.default,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use. Optionally route requests through a proxy pool to bypass IP-based limits."})]}),r&&(0,d.jsx)(j.default,{variant:"success",size:"sm",children:"Saved"})]}),(0,d.jsx)(i.default,{label:"Proxy Pool",value:f,onChange:a=>{var b;g(b=a.target.value),t(b,n)},disabled:p||v,options:[{value:k,label:"None (direct)"},...b.map(a=>({value:a.id,label:a.name}))],hint:v?"Pool selector is ignored when rotation is active — all active pools are used.":void 0}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 mt-4",children:[(0,d.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Rotation Strategy"}),(0,d.jsx)("select",{value:n,onChange:a=>{var b;o(b=a.target.value),t(f,b)},disabled:p,className:"py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all disabled:opacity-50",children:l.map(a=>(0,d.jsx)("option",{value:a.value,disabled:"none"!==a.value&&!u,children:a.label},a.value))}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:u?v?"round-robin"===n?`Rotating through all ${b.length} active pools in order. State is in-memory (resets on restart).`:`Picking a random pool from ${b.length} active pools each request.`:"Uses the selected pool above. Set to Round-robin or Random to rotate across all active pools.":"Need at least 2 active proxy pools for rotation."})]})]})}m.propTypes={providerId:g().string.isRequired}},51109:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412);function i({isOpen:a,onSuccess:b,onClose:c}){let[f,g]=(0,e.useState)(""),[j,k]=(0,e.useState)(""),[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),v=async()=>{q(!0),m(null),s(!1),u(!1);try{let a=await fetch("/api/oauth/cursor/auto-import"),b=await a.json();b.found?(g(b.accessToken),k(b.machineId),s(!0)):b.windowsManual?u(!0):m(b.error||"Could not auto-detect tokens")}catch(a){m("Failed to auto-detect tokens")}finally{q(!1)}},w=async()=>{if(!f.trim())return void m("Please enter an access token");if(!j.trim())return void m("Please enter a machine ID");o(!0),m(null);try{let a=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:f.trim(),machineId:j.trim()})}),d=await a.json();if(!a.ok)throw Error(d.error||"Import failed");b?.(),c()}catch(a){m(a.message)}finally{o(!1)}};return(0,d.jsx)(h.aF,{isOpen:a,title:"Connect Cursor IDE",onClose:c,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[p&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!p&&(0,d.jsxs)(d.Fragment,{children:[r&&(0,d.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,d.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),t&&(0,d.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,d.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,d.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,d.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,d.jsx)(h.$n,{onClick:v,variant:"outline",fullWidth:!0,children:"Retry"})]}),!r&&!t&&!l&&(0,d.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)("textarea",{value:f,onChange:a=>g(a.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,d.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,d.jsx)(h.pd,{value:j,onChange:a=>k(a.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),l&&(0,d.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:l})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:w,fullWidth:!0,disabled:n||!f.trim()||!j.trim(),children:n?"Importing...":"Import Token"}),(0,d.jsx)(h.$n,{onClick:c,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}i.propTypes={isOpen:g().bool.isRequired,onSuccess:g().func,onClose:g().func.isRequired}},51585:(a,b,c)=>{c.d(b,{default:()=>n});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(95145),i=c(83552),j=c(99070),k=c(75171),l=c(92592),m=c(4770);function n({isOpen:a,connection:b,proxyPools:c,onSave:f,onClose:g}){let[o,p]=(0,e.useState)({name:"",priority:1,apiKey:""}),[q,r]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[s,t]=(0,e.useState)({accountId:""}),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),[E,F]=(0,e.useState)(!1),G=b?.authType==="oauth",H=b?.provider==="azure",I=b?.provider==="cloudflare-ai",J=!!b&&((0,l.mq)(b.provider)||(0,l.gb)(b.provider)),K=b&&l.Q2?.[b.provider]?.regions||null,L=()=>{if(K&&u)return{...b?.providerSpecificData||{},region:u}},M=async()=>{if(b?.provider){x(!0),z(null);try{let a=await fetch(`/api/providers/${b.id}/test`,{method:"POST"}),c=await a.json();z(c.valid?"success":"failed")}catch{z("failed")}finally{x(!1)}}},N=async()=>{if(b?.provider&&o.apiKey){B(!0),D(null);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b.provider,apiKey:o.apiKey,...H?{providerSpecificData:q}:{},...I?{providerSpecificData:s}:{},...K?{providerSpecificData:L()}:{}})}),c=await a.json();D(c.valid?"success":"failed")}catch{D("failed")}finally{B(!1)}}},O=async()=>{if(b){F(!0);try{let a={name:o.name,priority:o.priority};if(!G&&o.apiKey){a.apiKey=o.apiKey;let c="success"===C;if(!c)try{B(!0),D(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b.provider,apiKey:o.apiKey,...H?{providerSpecificData:q}:{},...I?{providerSpecificData:s}:{},...K?{providerSpecificData:L()}:{}})});c=!!(await a.json()).valid,D(c?"success":"failed")}catch{D("failed")}finally{B(!1)}c&&(a.testStatus="active",a.lastError=null,a.lastErrorAt=null)}H&&(a.providerSpecificData={azureEndpoint:q.azureEndpoint,apiVersion:q.apiVersion,deployment:q.deployment,organization:q.organization}),I&&(a.providerSpecificData={accountId:s.accountId}),K&&u&&(a.providerSpecificData=L()),await f(a)}finally{F(!1)}}};return b?(0,d.jsx)(h.default,{isOpen:a,title:"Edit Connection",onClose:g,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(i.default,{label:"Name",value:o.name,onChange:a=>p({...o,name:a.target.value}),placeholder:G?"Account name":"Production Key"}),G&&b.email&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,d.jsx)("p",{className:"font-medium",children:b.email})]}),(0,d.jsx)(i.default,{label:"Priority",type:"number",value:o.priority,onChange:a=>p({...o,priority:Number.parseInt(a.target.value,10)||1})}),!G&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.default,{label:"API Key",type:"password",value:o.apiKey,onChange:a=>p({...o,apiKey:a.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.default,{onClick:N,disabled:!o.apiKey||A||E,variant:"secondary",children:A?"Checking...":"Check"})})]}),C&&(0,d.jsx)(k.default,{variant:"success"===C?"success":"error",children:"success"===C?"Valid":"Invalid"})]}),H&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(i.default,{label:"Azure Endpoint",value:q.azureEndpoint,onChange:a=>r({...q,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com",hint:"Your Azure OpenAI resource endpoint URL"}),(0,d.jsx)(i.default,{label:"Deployment Name",value:q.deployment,onChange:a=>r({...q,deployment:a.target.value}),placeholder:"gpt-4",hint:"The deployment name in your Azure resource"}),(0,d.jsx)(i.default,{label:"API Version",value:q.apiVersion,onChange:a=>r({...q,apiVersion:a.target.value}),placeholder:"2024-10-01-preview",hint:"Azure OpenAI API version to use"}),(0,d.jsx)(i.default,{label:"Organization",value:q.organization,onChange:a=>r({...q,organization:a.target.value}),placeholder:"Organization ID",hint:"Required for billing"})]})]}),K&&(0,d.jsx)(m.default,{label:"Region",value:u,onChange:a=>v(a.target.value),options:K.map(a=>({value:a.id,label:a.label}))}),!J&&!H&&!I&&(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)(j.default,{onClick:M,variant:"secondary",disabled:w,children:w?"Testing...":"Test Connection"}),y&&(0,d.jsx)(k.default,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Failed"})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.default,{onClick:O,fullWidth:!0,disabled:E,children:E?"Saving...":"Save"}),(0,d.jsx)(j.default,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}n.propTypes={isOpen:g().bool.isRequired,connection:g().shape({id:g().string,name:g().string,email:g().string,priority:g().number,authType:g().string,provider:g().string,providerSpecificData:g().object}),proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),onSave:g().func.isRequired,onClose:g().func.isRequired}},53838:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(49885),f=c.n(e),g=c(53845);function h({children:a}){return(0,d.jsxs)("div",{className:"min-h-screen flex flex-col relative bg-bg transition-colors duration-500 overflow-x-hidden selection:bg-primary/20 selection:text-primary",children:[(0,d.jsx)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 dark:bg-primary/5 rounded-full blur-[100px] pointer-events-none z-0"}),(0,d.jsx)("div",{className:"fixed bottom-0 right-0 w-[600px] h-[600px] bg-orange-200/20 dark:bg-orange-900/10 rounded-full blur-[120px] pointer-events-none z-0 translate-y-1/3 translate-x-1/3"}),(0,d.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,d.jsx)(g.default,{variant:"card"})}),(0,d.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:a})]})}h.propTypes={children:f().node.isRequired}},53845:(a,b,c)=>{c.d(b,{default:()=>g});var d=c(48249),e=c(42118),f=c(71404);function g({className:a,variant:b="default"}){let{isDark:c,toggleTheme:h}=(0,e.D)(),i={default:(0,f.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,f.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};return(0,d.jsx)("button",{onClick:h,className:(0,f.cn)(i[b],a),"aria-label":`Switch to ${c?"light":"dark"} mode`,title:`Switch to ${c?"light":"dark"} mode`,children:(0,d.jsx)("span",{className:(0,f.cn)("material-symbols-outlined text-[22px]","card"===b&&"transition-transform duration-300 group-hover:rotate-12"),children:c?"light_mode":"dark_mode"})})}},54510:(a,b,c)=>{c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(74429),g=c(49885),h=c.n(g),i=c(26921),j=c(99258);function k({isOpen:a,onClose:b}){let[c,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[l,m]=(0,e.useState)(""),n=(0,e.useRef)(null);return((0,j.kk)(),!a||"u"<typeof document)?null:(0,f.createPortal)((0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:b}),(0,d.jsxs)("div",{ref:n,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:(0,j.Tl)("Change Log")}),(0,d.jsx)("button",{onClick:b,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":(0,j.Tl)("Close"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,d.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[h&&(0,d.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),(0,j.Tl)("Loading...")]}),l&&(0,d.jsxs)("div",{className:"text-red-500 py-4",children:[(0,j.Tl)("Failed to load changelog: "),l]}),!h&&!l&&c&&(0,d.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:c}})]})]})]}),document.body)}c(12020),i.xI.setOptions({gfm:!0,breaks:!0}),i.xI.use({renderer:{link({href:a,title:b,tokens:c}){let d=c?this.parser.parseInline(c):b||a;return`<a href="${a}" target="_blank" rel="noopener noreferrer">${d}</a>`}}}),k.propTypes={isOpen:h().bool.isRequired,onClose:h().func.isRequired}},56110:(a,b,c)=>{c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(50377);function j({isOpen:a,provider:b,onSuccess:c,onClose:f}){let[g,k]=(0,e.useState)("loading"),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(null),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(null),{copied:t,copy:u}=(0,i.C)();(0,e.useRef)(!1);let v=async()=>{try{let a;s(null);try{a=new URL(p)}catch(a){throw Error("Invalid callback URL format")}let d=a.searchParams.get("code");a.searchParams.get("state");let e=a.searchParams.get("error");if(e)throw Error(a.searchParams.get("error_description")||e);if(!d)throw Error("No authorization code found in URL");let f=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:d,codeVerifier:n.codeVerifier,provider:b})}),g=await f.json();if(!f.ok)throw Error(g.error);k("success"),c?.()}catch(a){s(a.message),k("error")}},w="google"===b?"Google":"GitHub";return(0,d.jsx)(h.aF,{isOpen:a,title:`Connect Kiro via ${w}`,onClose:f,size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===g&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",w," authentication"]})]}),"input"===g&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.pd,{value:l,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,d.jsx)(h.$n,{variant:"secondary",icon:"auth_url"===t?"check":"content_copy",onClick:()=>u(l,"auth_url"),children:"Copy"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,d.jsx)(h.pd,{value:p,onChange:a=>q(a.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:v,fullWidth:!0,disabled:!p,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===g&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",w," has been connected."]}),(0,d.jsx)(h.$n,{onClick:f,fullWidth:!0,children:"Done"})]}),"error"===g&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,d.jsx)("p",{className:"text-sm text-red-600 mb-4",children:r}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>k("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,d.jsx)(h.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}j.propTypes={isOpen:g().bool.isRequired,provider:g().oneOf(["google","github"]).isRequired,onSuccess:g().func,onClose:g().func.isRequired}},59026:(a,b,c)=>{c.d(b,{default:()=>O});var d=c(48249),e=c(67484),f=c(19099);c(92592);var g=c(75171),h=c(17660),i=c(49885),j=c.n(i),k=c(79750);let l=a=>new Intl.NumberFormat().format(a||0);function m({stats:a}){return(0,d.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 sm:gap-4",children:[(0,d.jsxs)(h.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,d.jsx)("span",{className:"truncate text-2xl font-bold",children:l(a.totalRequests)})]}),(0,d.jsxs)(h.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,d.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:l(a.totalPromptTokens)})]}),(0,d.jsxs)(h.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Cached Tokens"}),(0,d.jsx)("span",{className:"truncate text-2xl font-bold text-info",children:l(a.totalCachedTokens)})]}),(0,d.jsxs)(h.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,d.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:l(a.totalCompletionTokens)})]}),(0,d.jsxs)(h.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,d.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,d.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(0,k.F)(a.totalCost)]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}m.propTypes={stats:j().object.isRequired};let n=a=>new Intl.NumberFormat().format(a||0);function o(a){if(!a)return"Never";let b=Math.floor((Date.now()-new Date(a))/6e4);return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}h ago`:new Date(a).toLocaleDateString()}function p({field:a,currentSort:b,currentOrder:c}){return b!==a?(0,d.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,d.jsx)("span",{className:"ml-1",children:"asc"===c?"↑":"↓"})}function q({item:a,viewMode:b,isSummary:c=!1}){return"tokens"===b?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:c&&void 0===a.promptTokens?"—":n(a.promptTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:a.cachedTokens?n(a.cachedTokens):"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:c&&void 0===a.completionTokens?"—":n(a.completionTokens)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:n(a.totalTokens)})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:c&&void 0===a.inputCost?"—":(0,k.F)(a.inputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:a.cachedCost?(0,k.F)(a.cachedCost):"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:c&&void 0===a.outputCost?"—":(0,k.F)(a.outputCost)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:(0,k.F)(a.totalCost||a.cost)})]})}function r({title:a,columns:b,groupedData:c,tableType:f,sortBy:g,sortOrder:i,onToggleSort:j,viewMode:k,storageKey:l,renderDetailCells:m,renderSummaryCells:n,emptyMessage:o}){let[s,t]=(0,e.useState)(new Set),u=(0,e.useCallback)(a=>{t(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),v=(0,e.useMemo)(()=>"tokens"===k?[{field:"promptTokens",label:"Input Tokens"},{field:"cachedTokens",label:"Cached"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"inputCost",label:"Input Cost"},{field:"cachedCost",label:"Cached Cost"},{field:"outputCost",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[k]),w=b.length+v.length;return(0,d.jsxs)(h.default,{className:"overflow-hidden",children:[(0,d.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,d.jsx)("h3",{className:"font-semibold",children:a})}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,d.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,d.jsxs)("tr",{children:[b.map(a=>(0,d.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===a.align?"text-right":""}`,onClick:()=>j(f,a.field),children:[a.label," ",(0,d.jsx)(p,{field:a.field,currentSort:g,currentOrder:i})]},a.field)),v.map(a=>(0,d.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>j(f,a.field),children:[a.label," ",(0,d.jsx)(p,{field:a.field,currentSort:g,currentOrder:i})]},a.field))]})}),(0,d.jsxs)("tbody",{className:"divide-y divide-border",children:[c.map(a=>(0,d.jsxs)(e.Fragment,{children:[(0,d.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>u(a.groupKey),children:[(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${s.has(a.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:`font-medium transition-colors ${a.summary.pending>0?"text-primary":""}`,children:a.groupKey})]})}),n(a),(0,d.jsx)(q,{item:a.summary,viewMode:k,isSummary:!0})]}),s.has(a.groupKey)&&a.items.map(a=>(0,d.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[m(a),(0,d.jsx)(q,{item:a,viewMode:k})]},`detail-${a.key}`))]},a.groupKey)),0===c.length&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{colSpan:w,className:"px-6 py-8 text-center text-text-muted",children:o})})]})]})})]})}p.propTypes={field:j().string.isRequired,currentSort:j().string.isRequired,currentOrder:j().string.isRequired},q.propTypes={item:j().object.isRequired,viewMode:j().string.isRequired,isSummary:j().bool},r.propTypes={title:j().string.isRequired,columns:j().arrayOf(j().shape({field:j().string.isRequired,label:j().string.isRequired,align:j().string})).isRequired,groupedData:j().array.isRequired,tableType:j().string.isRequired,sortBy:j().string.isRequired,sortOrder:j().string.isRequired,onToggleSort:j().func.isRequired,viewMode:j().string.isRequired,storageKey:j().string.isRequired,renderDetailCells:j().func.isRequired,renderSummaryCells:j().func.isRequired,emptyMessage:j().string.isRequired};var s=c(90314),t=c(48679),u=c(70452),v=c(5277),w=c(22393),x=c(54206),y=c(8479),z=c(66355);let A=a=>a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}K`:String(a||0),B=a=>(0,k.F)(a,4);function C({period:a="7d"}){let[b,c]=(0,e.useState)([]),[f,g]=(0,e.useState)(!0),[i,j]=(0,e.useState)("tokens");(0,e.useCallback)(async()=>{g(!0);try{let b=await fetch(`/api/usage/chart?period=${a}`);if(b.ok){let a=await b.json();c(a)}}catch(a){console.error("Failed to fetch chart data:",a)}finally{g(!1)}},[a]);let k=b.some(a=>a.tokens>0||a.cost>0);return(0,d.jsxs)(h.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,d.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,d.jsx)("button",{onClick:()=>j("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,d.jsx)("button",{onClick:()=>j("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),f?(0,d.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):k?(0,d.jsx)(t.u,{width:"100%",height:220,children:(0,d.jsxs)(u.Q,{data:b,margin:{top:4,right:8,left:0,bottom:0},children:[(0,d.jsxs)("defs",{children:[(0,d.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,d.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,d.jsx)(v.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,d.jsx)(w.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,d.jsx)(x.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===i?A:B,width:50}),(0,d.jsx)(y.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(a,b)=>"tokens"===b?[A(a),"Tokens"]:[B(a),"Cost"]}),"tokens"===i?(0,d.jsx)(z.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,d.jsx)(z.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,d.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}C.propTypes={period:j().string};let D=(0,s.default)(async()=>{},{loadableGenerated:{modules:["shared\\components\\UsageStats.js -> @/app/(dashboard)/dashboard/usage/components/ProviderTopology"]},ssr:!1});function E({timestamp:a}){let b,[,c]=(0,e.useState)(0);return(0,d.jsx)(d.Fragment,{children:(b=Math.floor((Date.now()-new Date(a))/1e3))<60?`${b}s ago`:b<3600?`${Math.floor(b/60)}m ago`:b<86400?`${Math.floor(b/3600)}h ago`:`${Math.floor(b/86400)}d ago`})}function F({requests:a=[]}){return(0,d.jsxs)(h.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,d.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),a.length?(0,d.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,d.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,d.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,d.jsxs)("tr",{className:"border-b border-border",children:[(0,d.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,d.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,d.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,d.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border/50",children:a.map((a,b)=>{let c=!a.status||"ok"===a.status||"success"===a.status;return(0,d.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,d.jsx)("td",{className:"py-1.5",children:(0,d.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${c?"bg-success":"bg-error"}`})}),(0,d.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:a.model,children:a.model}),(0,d.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,d.jsxs)("span",{className:"text-primary",children:[n(a.promptTokens),"↑"]})," ",(0,d.jsxs)("span",{className:"text-success",children:[n(a.completionTokens),"↓"]})]}),(0,d.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,d.jsx)(E,{timestamp:a.timestamp})})]},b)})})]})}):(0,d.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}let G=new Set(["requests","lastUsed","promptTokens","cachedTokens","completionTokens","totalTokens","cost","inputCost","cachedCost","outputCost"]);function H(a,b,c,d,e){var f=function(a,b){if(!Array.isArray(a))return[];let c={};return a.forEach(a=>{let d=function(a,b){switch(b){case"rawModel":return a.rawModel||"Unknown Model";case"accountName":return a.accountName||`Account ${a.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return a.keyName||"Unknown Key";case"endpoint":return a.endpoint||"Unknown Endpoint";default:return a[b]||"Unknown"}}(a,b);c[d]||(c[d]={groupKey:d,summary:{requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,totalTokens:0,cost:0,inputCost:0,cachedCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let e=c[d].summary;e.requests+=a.requests||0,e.promptTokens+=a.promptTokens||0,e.completionTokens+=a.completionTokens||0,e.cachedTokens+=a.cachedTokens||0,e.totalTokens+=a.totalTokens||0,e.cost+=a.cost||0,e.inputCost+=a.inputCost||0,e.cachedCost+=a.cachedCost||0,e.outputCost+=a.outputCost||0,e.pending+=a.pending||0,a.lastUsed&&(!e.lastUsed||new Date(a.lastUsed)>new Date(e.lastUsed))&&(e.lastUsed=a.lastUsed),c[d].items.push(a)}),Object.values(c)}(function(a,b={},c,d){return Object.entries(a||{}).map(([a,c])=>{let d=(c.promptTokens||0)+(c.completionTokens||0),e=c.cost||0,f=c.cachedTokens||0,g=Math.max(0,(c.promptTokens||0)-f),h=d>0?(c.completionTokens||0)*(e/d):0;return{...c,key:a,totalTokens:d,totalCost:e,inputCost:d>0?e/d*g:0,cachedCost:d>0?e/d*f:0,outputCost:h,pending:b[a]||0}}).sort((a,b)=>{let e=a[c],f=b[c];return("string"==typeof e&&(e=e.toLowerCase()),"string"==typeof f&&(f=f.toLowerCase()),e<f)?"asc"===d?-1:1:e>f?"asc"===d?1:-1:0})}(a,b,d,e),c);if(!G.has(d))return f;let g="asc"===e?1:-1;return[...f].sort((a,b)=>{let c=a.summary[d],e=b.summary[d];return"lastUsed"===d&&(c=c?new Date(c).getTime():0,e=e?new Date(e).getTime():0),((c||0)-(e||0))*g})}let I=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],J=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],K=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],L=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],M=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],N=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function O({period:a,setPeriod:b,hidePeriodSelector:c=!1}={}){let h=(0,f.useRouter)(),i=(0,f.useSearchParams)(),j=i.get("sortBy")||"rawModel",k=i.get("sortOrder")||"asc",[l,p]=(0,e.useState)(null),[q,s]=(0,e.useState)(!0),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)("model"),[x,y]=(0,e.useState)("costs"),[z,A]=(0,e.useState)([]),[B,E]=(0,e.useState)({}),[G,P]=(0,e.useState)("today");(0,e.useRef)(!0),(0,e.useRef)(!1);let Q=a??G,R=b??P,S=(0,e.useCallback)((a,b)=>{let c=new URLSearchParams(i.toString());c.get("sortBy")===b?c.set("sortOrder","asc"===c.get("sortOrder")?"desc":"asc"):(c.set("sortBy",b),c.set("sortOrder","asc")),h.replace(`?${c.toString()}`,{scroll:!1})},[i,h]),T=(0,e.useMemo)(()=>{if(!l)return null;switch(v){case"model":{let a=l.pending?.byModel||{};return{columns:I,groupedData:H(l.byModel,a,"rawModel",j,k),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.summary.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.summary.lastUsed)})]}),renderDetailCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${a.pending>0?"text-primary":""}`,children:a.rawModel}),(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)(g.default,{variant:a.pending>0?"primary":"neutral",size:"sm",children:a.provider})}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.lastUsed)})]})}}case"account":{let a={};return l?.pending?.byAccount&&Object.entries(l.byAccount||{}).forEach(([b,c])=>{let d=l.pending.byAccount[c.connectionId];if(d){let e=c.provider?`${c.rawModel} (${c.provider})`:c.rawModel;a[b]=d[e]||0}}),{columns:J,groupedData:H(l.byAccount,a,"accountName",j,k),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.summary.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.summary.lastUsed)})]}),renderDetailCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${a.pending>0?"text-primary":""}`,children:a.accountName||`Account ${a.connectionId?.slice(0,8)}...`}),(0,d.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${a.pending>0?"text-primary":""}`,children:a.rawModel}),(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)(g.default,{variant:a.pending>0?"primary":"neutral",size:"sm",children:a.provider})}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.lastUsed)})]})}}case"apiKey":return{columns:K,groupedData:H(l.byApiKey,{},"keyName",j,k),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.summary.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.summary.lastUsed)})]}),renderDetailCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 font-medium",children:a.keyName}),(0,d.jsx)("td",{className:"px-6 py-3",children:a.rawModel}),(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)(g.default,{variant:"neutral",size:"sm",children:a.provider})}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.lastUsed)})]})};default:return{columns:L,groupedData:H(l.byEndpoint,{},"endpoint",j,k),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.summary.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.summary.lastUsed)})]}),renderDetailCells:a=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:a.endpoint}),(0,d.jsx)("td",{className:"px-6 py-3",children:a.rawModel}),(0,d.jsx)("td",{className:"px-6 py-3",children:(0,d.jsx)(g.default,{variant:"neutral",size:"sm",children:a.provider})}),(0,d.jsx)("td",{className:"px-6 py-3 text-right",children:n(a.requests)}),(0,d.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:o(a.lastUsed)})]})}}},[l,v,j,k]);if(!l&&!q)return(0,d.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let U=(0,d.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!c&&(0,d.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,d.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:N.map(a=>(0,d.jsx)("button",{onClick:()=>R(a.value),disabled:t,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${Q===a.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:a.label},a.value))}),t&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),q?U:(0,d.jsx)(m,{stats:l}),q?U:(0,d.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,d.jsx)(D,{providers:z,activeRequests:l.activeRequests||[],lastProvider:l.recentRequests?.[0]?.provider||"",errorProvider:l.errorProvider||""}),(0,d.jsx)(F,{requests:l.recentRequests||[]})]}),q?U:(0,d.jsx)(C,{period:Q}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("select",{value:v,onChange:a=>w(a.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:M.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))}),(0,d.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,d.jsx)("button",{onClick:()=>y("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===x?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,d.jsx)("button",{onClick:()=>y("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===x?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),q?U:T&&(0,d.jsx)(r,{title:"",columns:T.columns,groupedData:T.groupedData,tableType:v,sortBy:j,sortOrder:k,onToggleSort:S,viewMode:x,storageKey:T.storageKey,renderSummaryCells:T.renderSummaryCells,renderDetailCells:T.renderDetailCells,emptyMessage:T.emptyMessage})]})]})}},59160:(a,b,c)=>{c.d(b,{nl:()=>l});var d=c(18982);let e={vision:!1,pdf:!1,audioInput:!1,videoInput:!1,imageOutput:!1,audioOutput:!1,search:!1,tools:!0,reasoning:!1,thinkingFormat:null,thinkingCanDisable:!0,thinkingRange:null,contextWindow:2e5,maxOutput:64e3},f={"claude-fable-5-1":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},"claude-opus-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-5-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"muse-spark-1.2-contributor-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"muse-spark-1.3-contributor-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072},"big-pickle":{reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:65536},"mimo-v2.5-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:65536},"ling-3.0-flash-fin-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:131072,maxOutput:32768},"nemotron-3-ultra-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:65536},"nemotron-3.5-lightning-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:65536},"claude-opus-5-thinking-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.8":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-8":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.8-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-8-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-thinking-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"gpt-image-1":{imageOutput:!0,tools:!1},"glm-4.6v":{vision:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:128e3},"glm-5.3-flash":{vision:!0,videoInput:!0,pdf:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:1e6,maxOutput:131072},"vision-model":{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6},"coder-model":{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6},"kimi-k3":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:131072},k3:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:131072},"kimi-for-coding":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"kimi-for-coding-highspeed":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"kimi-k2.7-code":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"kimi-k2.7-code-highspeed":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536},"agnes-2.5-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:65536},"agnes-2.5-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536}},g={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},h={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:372e3,maxOutput:128e3},i={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},j={nvidia:{"minimaxai/minimax-m2.7":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072},"minimaxai/minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:131072},"z-ai/glm-5.2":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:128e3},"deepseek-ai/deepseek-v4-pro":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:65536},"deepseek-ai/deepseek-v4-flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:65536}},codex:{"gpt-6-astra":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3},"gpt-5.6-sol":h,"gpt-5.6-sol-review":h,"gpt-5.6-terra":i,"gpt-5.6-terra-review":i,"gpt-5.6-luna":i,"gpt-5.6-luna-review":i},kiro:{"gpt-5.6-sol":g,"gpt-5.6-terra":g,"gpt-5.6-luna":g,"gpt-5.6-sol-thinking":g,"gpt-5.6-terra-thinking":g,"gpt-5.6-luna-thinking":g,"gpt-5.6-sol-agentic":g,"gpt-5.6-terra-agentic":g,"gpt-5.6-luna-agentic":g,"gpt-5.6-sol-thinking-agentic":g,"gpt-5.6-terra-thinking-agentic":g,"gpt-5.6-luna-thinking-agentic":g},"codebuddy-cn":{"glm-5.2":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:48e3},"glm-5.1":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"glm-5v-turbo":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:64e3},"glm-4.7":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:128e3},"kimi-k2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.6":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},hy3:{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"hy4-preview":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:64e3},"glm-5.3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:48e3},"glm-5.3-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:32e3},"kimi-k3-1":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:32e3},"deepseek-v4-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:5e4},"deepseek-v4-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!0,contextWindow:1e6,maxOutput:5e4},"deepseek-v4-flash-vision-exp":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:384e3}},qoder:{ultimate:{vision:!0,reasoning:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},performance:{vision:!0,reasoning:!0,thinkingFormat:"claude-adaptive",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},dmodel:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},dfmodel:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},gmodel:{reasoning:!0,thinkingFormat:"zai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},gfmodel:{vision:!0,reasoning:!0,thinkingFormat:"zai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:128e3},kmodel_latest:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},kmodel:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:65536},mmodel:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:512e3},qmodel_latest:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qmodel:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qfmodel:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536},qmodel_38max:{vision:!0,reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:65536}},poolside:{"laguna-s-2.1":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:32e3},"laguna-xs-2.1":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:32e3}},apinex:{"grok/4.6":{reasoning:!0,thinkingFormat:"openai",contextWindow:5e5},"claude/opus-5":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"claude/sonnet-5":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"gpt/5.6-sol":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"gpt/5.6-terra":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"gpt/5.6-luna":{reasoning:!0,thinkingFormat:"openai",contextWindow:105e4},"gemini/3.1-pro":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"gemini/3.8-flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"deepseek/v4-flash-0731":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"deepseek/v4-pro-0813":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"glm/5.3-flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"glm/5.3":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"kimi/k3":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"free/glm-5.3-flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"free/deepseek-v4-flash-0731":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"free/deepseek-v4-pro-0813":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"free/gpt-5.6-luna":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"free/qwen-3.8-max":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6}}},k=[{pattern:"*claude*opus-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*opus-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.8*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*haiku*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*opus*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*sonnet*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*fable*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*mythos*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude-3*",caps:{vision:!0}},{pattern:"*claude*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*gemini*image*",caps:{vision:!0,imageOutput:!0,contextWindow:1048576}},{pattern:"*gemini-3.8*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-3.7*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-3*pro*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65535}},{pattern:"*gemini-3*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-budget",thinkingRange:{min:0,max:24576},contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2*",caps:{vision:!0,audioInput:!0,videoInput:!0,search:!0,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini*",caps:{vision:!0,search:!0,contextWindow:1048576}},{pattern:"*gemma*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*nanobanana*",caps:{vision:!0,imageOutput:!0}},{pattern:"*gpt-6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3}},{pattern:"*gpt-5*image*",caps:{imageOutput:!0}},{pattern:"*gpt-5*codex*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-4o*",caps:{vision:!0,search:!0,contextWindow:128e3,maxOutput:16384}},{pattern:"*gpt-4.1*",caps:{vision:!0,contextWindow:1e6,maxOutput:32768}},{pattern:"*gpt-4-turbo*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*gpt-4*",caps:{contextWindow:128e3}},{pattern:"*gpt-3.5*",caps:{contextWindow:16385,maxOutput:4096}},{pattern:"*gpt-oss*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1-mini*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o4*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*grok*image*",caps:{imageOutput:!0}},{pattern:"*grok-code*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,maxOutput:5e5}},{pattern:"*grok-4.5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,maxOutput:64e3}},{pattern:"*grok-4*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-3*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:131072}},{pattern:"*grok*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*qwen*vl*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwen*omni*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144,maxOutput:65536}},{pattern:"*qwen*coder*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},{pattern:"*qwen*max*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.5*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.6*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.7*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*plus*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*235b*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwq*",caps:{reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:131072}},{pattern:"*qwen*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*kimi*k3*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:131072}},{pattern:"*kimi*for-coding*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536}},{pattern:"*kimi*k2.7*code*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:65536}},{pattern:"*kimi*k2*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",contextWindow:262144,maxOutput:262144}},{pattern:"*kimi*",caps:{reasoning:!0,thinkingFormat:"kimi",contextWindow:262144}},{pattern:"*glm-5*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4.7*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*glm*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*deepseek-v4*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:1e6,maxOutput:384e3}},{pattern:"*reasoner*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-r*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-chat*",caps:{contextWindow:128e3}},{pattern:"*deepseek*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:128e3}},{pattern:"*minimax*image*",caps:{imageOutput:!0}},{pattern:"*minimax-m3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"minimax",contextWindow:1048576,maxOutput:512e3}},{pattern:"*minimax-m2.7*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:204800,maxOutput:131072}},{pattern:"*minimax*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072}},{pattern:"*mimo*v2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,contextWindow:1048576,maxOutput:131072}},{pattern:"*mimo*omni*",caps:{vision:!0,audioInput:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*mimo*",caps:{vision:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*llama-4*",caps:{vision:!0,contextWindow:1e6}},{pattern:"*llama*",caps:{contextWindow:128e3}},{pattern:"*codestral*",caps:{contextWindow:256e3}},{pattern:"*mistral-large*",caps:{vision:!0,contextWindow:256e3}},{pattern:"*mistral*",caps:{contextWindow:128e3}},{pattern:"*command-a-vision*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*command*",caps:{contextWindow:128e3}},{pattern:"*sonar*",caps:{search:!0,contextWindow:128e3}},{pattern:"*pplx*",caps:{search:!0,contextWindow:128e3}},{pattern:"*perplexity*",caps:{search:!0,contextWindow:128e3}},{pattern:"*laguna-s-2.1*free*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:32e3}},{pattern:"*laguna-s-2.1*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:32e3}},{pattern:"*laguna*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:32e3}},{pattern:"*hunyuan*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"hy3*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"*step-*",caps:{reasoning:!0,thinkingFormat:"step",contextWindow:128e3}},{pattern:"*nemotron*",caps:{reasoning:!0,contextWindow:128e3}},{pattern:"*ling-*",caps:{reasoning:!0,contextWindow:128e3}}];function l(a,b){if(!b)return{...e};let c=b.includes("/")?b.split("/").pop():b;if(a){let d=j[a];if(d?.[b])return{...e,...d[b]};if(d?.[c])return{...e,...d[c]}}if(f[c])return{...e,...f[c]};if(f[b])return{...e,...f[b]};for(let{pattern:a,caps:f}of k)if((0,d.gH)(a,c)||(0,d.gH)(a,b))return{...e,...f};return{...e}}},62727:(a,b,c)=>{c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c(95145),g=c(83552),h=c(99070),i=c(83352);let j=/^[a-zA-Z0-9_.\-]+$/;function k({index:a,model:b,isFirst:c,isLast:f,onEdit:g,onMoveUp:h,onMoveDown:i,onRemove:j}){let[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(b),p=()=>{let a=n.trim();a&&a!==b?g(a):o(b),m(!1)};return(0,d.jsxs)("div",{className:"group flex min-w-0 items-center gap-1.5 rounded-md bg-black/[0.02] px-2 py-1 transition-colors hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04]",children:[(0,d.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:a+1}),l?(0,d.jsx)("input",{autoFocus:!0,value:n,onChange:a=>o(a.target.value),onBlur:p,onKeyDown:a=>{"Enter"===a.key&&p(),"Escape"===a.key&&(o(b),m(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,d.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>m(!0),title:"Click to edit",children:b}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,d.jsx)("button",{onClick:h,disabled:c,className:`p-0.5 rounded ${c?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,d.jsx)("button",{onClick:i,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,d.jsx)("button",{onClick:j,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function l({isOpen:a,combo:b,onClose:c,onSave:m,activeProviders:n,kindFilter:o=null,forcePrefix:p="",title:q}){let r=b?.name?p&&b.name.startsWith(p)?b.name.slice(p.length):b.name:"",[s,t]=(0,e.useState)(r),[u,v]=(0,e.useState)(b?.models||[]),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)({}),E=a=>{if(!a.trim())return B("Name is required"),!1;let b=p+a;return j.test(b)?(B(""),!0):(B("Only letters, numbers, -, _ and . allowed"),!1)},F=a=>{let b=a.target.value;p&&b.startsWith(p)&&(b=b.slice(p.length)),t(b),b?E(b):B("")},G=async()=>{E(s)&&(z(!0),await m({name:p+s.trim(),models:u}),z(!1))},H=!!b;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.default,{isOpen:a,onClose:c,title:q||(H?"Edit Combo":"Create Combo"),children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{children:[p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1 block",children:"Combo Name"}),(0,d.jsxs)("div",{className:"flex items-stretch",children:[(0,d.jsx)("span",{className:"inline-flex items-center px-2 rounded-l border border-r-0 border-black/10 dark:border-white/10 bg-black/[0.04] dark:bg-white/[0.04] text-text-muted font-mono text-sm",children:p}),(0,d.jsx)("input",{value:s,onChange:F,placeholder:"my-combo",className:"flex-1 min-w-0 rounded-r border border-black/10 dark:border-white/10 bg-white dark:bg-black/20 px-2 py-1.5 font-mono text-sm outline-none focus:border-primary"})]}),A&&(0,d.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:A})]}):(0,d.jsx)(g.default,{label:"Combo Name",value:s,onChange:F,placeholder:"my-combo",error:A}),(0,d.jsxs)("p",{className:"text-[10px] text-text-muted mt-0.5",children:[p?`Auto-prefixed with "${p}". `:"","Only letters, numbers, -, _ and . allowed"]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===u.length?(0,d.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,d.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:u.map((a,b)=>(0,d.jsx)(k,{index:b,model:a,isFirst:0===b,isLast:b===u.length-1,onEdit:a=>{let c=[...u];c[b]=a,v(c)},onMoveUp:()=>(a=>{if(0===a)return;let b=[...u];[b[a-1],b[a]]=[b[a],b[a-1]],v(b)})(b),onMoveDown:()=>(a=>{if(a===u.length-1)return;let b=[...u];[b[a],b[a+1]]=[b[a+1],b[a]],v(b)})(b),onRemove:()=>v(u.filter((a,c)=>c!==b))},b))}),(0,d.jsxs)("button",{onClick:()=>x(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,d.jsx)(h.default,{onClick:c,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(h.default,{onClick:G,fullWidth:!0,size:"sm",disabled:!s.trim()||!!A||y,children:y?"Saving...":H?"Save":"Create"})]})]})}),w&&(0,d.jsx)(i.default,{isOpen:w,onClose:()=>x(!1),onSelect:a=>{u.includes(a.value)||v([...u,a.value])},onDeselect:a=>{v(u.filter(b=>b!==a.value))},activeProviders:n,modelAliases:C,title:"Add Model to Combo",kindFilter:o,addedModelValues:u,closeOnSelect:!1})]})}},67738:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412);function i({isOpen:a,onClose:b,onCreated:c,onSaved:f,node:g}){let j=!!g,[k,l]=(0,e.useState)({name:"",prefix:"",baseUrl:"https://api.openai.com/v1"}),[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),w=async()=>{if(k.name.trim()&&k.prefix.trim()&&k.baseUrl.trim()){n(!0);try{let a=j?`/api/provider-nodes/${g.id}`:"/api/provider-nodes",b={name:k.name,prefix:k.prefix,baseUrl:k.baseUrl};j||(b.type="custom-embedding");let d=await fetch(a,{method:j?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),e=await d.json();d.ok&&(j?f?.(e.node):c?.(e.node))}catch(a){console.log("Error saving custom embedding node:",a)}finally{n(!1)}}},x=async()=>{t(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:k.baseUrl,apiKey:o,type:"custom-embedding",modelId:q.trim()||void 0})}),b=await a.json();v(b)}catch{v({valid:!1,error:"Network error"})}finally{t(!1)}};return(0,d.jsx)(h.aF,{isOpen:a,title:j?"Edit Custom Embedding":"Add Custom Embedding",onClose:b,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(h.pd,{label:"Name",value:k.name,onChange:a=>l({...k,name:a.target.value}),placeholder:"Voyage AI",hint:"Required. A friendly label for this embedding provider."}),(0,d.jsx)(h.pd,{label:"Prefix",value:k.prefix,onChange:a=>l({...k,prefix:a.target.value}),placeholder:"voyage",hint:"Required. Used as the provider prefix for model IDs (e.g. voyage/voyage-3)."}),(0,d.jsx)(h.pd,{label:"Base URL",value:k.baseUrl,onChange:a=>l({...k,baseUrl:a.target.value}),placeholder:"https://api.voyageai.com/v1",hint:"Most embedding APIs are OpenAI-compatible: Voyage, Cohere, Jina, Mistral, Together..."}),(0,d.jsx)(h.pd,{label:"API Key (for Check)",type:"password",value:o,onChange:a=>p(a.target.value)}),(0,d.jsx)(h.pd,{label:"Model ID (for Check)",value:q,onChange:a=>r(a.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",hint:"Required for validation. Will send a test embeddings request."}),(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)(h.$n,{onClick:x,disabled:!o||!q.trim()||s||!k.baseUrl.trim(),variant:"secondary",children:s?"Checking...":"Check"}),(()=>{if(!u)return null;let{valid:a,error:b,dimensions:c}=u;return a?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.Ex,{variant:"success",children:"Valid"}),c&&(0,d.jsxs)("span",{className:"text-sm text-text-muted",children:[c," dims"]})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)(h.Ex,{variant:"error",children:"Invalid"}),b&&(0,d.jsx)("span",{className:"text-sm text-red-500",children:b})]})})()]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:w,fullWidth:!0,disabled:!k.name.trim()||!k.prefix.trim()||!k.baseUrl.trim()||m,children:m?j?"Saving...":"Creating...":j?"Save":"Create"}),(0,d.jsx)(h.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}i.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onCreated:g().func,onSaved:g().func,node:g().shape({id:g().string,name:g().string,prefix:g().string,baseUrl:g().string})}},71404:(a,b,c)=>{c.d(b,{cn:()=>d});function d(...a){return a.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},72738:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(29225);function i({src:a,providerId:b,alt:c,size:f=32,className:g="",fallbackText:j="?",fallbackColor:k}){let l=function(a,b){if(b)return(0,h.HY)(b);if(!a)return null;let c=String(a).match(/^\/providers\/([^/]+)\.png$/i);return c?(0,h.HY)(c[1]):a}(a,b),[m,n]=(0,e.useState)(!1);return!l||m?(0,d.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${g}`.trim(),style:{width:f,height:f,color:k,fontSize:Math.max(10,Math.floor(.38*f))},children:j}):(0,d.jsx)("img",{src:l,alt:c,width:f,height:f,className:g,loading:"lazy",decoding:"async",onError:()=>{let a=l.match(/^\/providers\/([^/]+)\.png$/i);a&&(0,h.Kw)(a[1]),b&&(0,h.Kw)(b),n(!0)}})}i.propTypes={src:g().string,providerId:g().string,alt:g().string,size:g().number,className:g().string,fallbackText:g().string,fallbackColor:g().string}},74380:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(50377);function f({code:a,label:b="Invite code"}){let{copied:c,copy:g}=(0,e.C)();return a?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border bg-bg-subtle px-1.5 py-0.5 text-xs text-text-muted whitespace-nowrap",children:[(0,d.jsx)("span",{children:b}),(0,d.jsx)("code",{className:"font-mono text-text-main",children:a}),(0,d.jsx)("button",{type:"button",onClick:()=>g(a,"invite-code"),title:"Copy invite code",className:"inline-flex items-center text-text-muted hover:text-text transition-colors cursor-pointer",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"invite-code"===c?"check":"content_copy"})})]}):null}},74812:(a,b,c)=>{c.d(b,{CardSkeleton:()=>i,PageLoading:()=>g,Skeleton:()=>h,Spinner:()=>f,default:()=>j});var d=c(48249),e=c(71404);function f({size:a="md",className:b}){return(0,d.jsx)("span",{className:(0,e.cn)("material-symbols-outlined animate-spin text-brand-500",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[a],b),children:"progress_activity"})}function g({message:a="Loading..."}){return(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,d.jsx)(f,{size:"xl"}),(0,d.jsx)("p",{className:"mt-4 text-text-muted",children:a})]})}function h({className:a,...b}){return(0,d.jsx)("div",{className:(0,e.cn)("animate-pulse rounded-[10px] bg-surface-2",a),...b})}function i(){return(0,d.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsx)(h,{className:"h-4 w-24"}),(0,d.jsx)(h,{className:"size-10 rounded-[10px]"})]}),(0,d.jsx)(h,{className:"h-8 w-16 mb-2"}),(0,d.jsx)(h,{className:"h-3 w-20"})]})}function j({type:a="spinner",...b}){switch(a){case"page":return(0,d.jsx)(g,{...b});case"skeleton":return(0,d.jsx)(h,{...b});case"card":return(0,d.jsx)(i,{...b});default:return(0,d.jsx)(f,{...b})}}},75171:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(71404);let f={default:"bg-surface-2 text-text-muted",primary:"bg-brand-500/10 text-brand-600 dark:text-brand-300",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},g={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function h({children:a,variant:b="default",size:c="md",dot:i=!1,icon:j,className:k}){return(0,d.jsxs)("span",{className:(0,e.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",f[b],g[c],k),children:[i&&(0,d.jsx)("span",{className:(0,e.cn)("size-1.5 rounded-full","success"===b&&"bg-green-500","warning"===b&&"bg-yellow-500","error"===b&&"bg-red-500","info"===b&&"bg-blue-500","primary"===b&&"bg-brand-500","default"===b&&"bg-gray-500")}),j&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:j}),a]})}},79346:(a,b,c)=>{c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(50377);let j=new Set(["trae","windsurf","zed"]),k={trae:{label:"Cloud-IDE-JWT",instructions:"Sign in at trae.ai (or solo.trae.ai), open DevTools → Network, copy the Cloud-IDE-JWT token from any request's Authorization header (~14-day lifetime).",placeholder:"Paste Cloud-IDE-JWT here...",ideName:"Trae",ideOptional:!0},windsurf:{label:"Windsurf API key",instructions:'In the Windsurf/VS Code IDE, run the "Windsurf: Provide Auth Token" command, then copy the displayed sk-ws-... key.',placeholder:"Paste sk-ws-... key here...",ideName:"Windsurf",ideOptional:!1}};function l({isOpen:a,provider:b,providerInfo:c,onSuccess:f,onClose:g,oauthMeta:m,idcConfig:n}){let[o,p]=(0,e.useState)("waiting"),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(""),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)("browser"),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(null),I=(0,e.useRef)(null),J=(0,e.useRef)(!1);(0,e.useRef)(!1);let{copied:K,copy:L}=(0,i.C)(),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("/callback?code=...");(0,e.useRef)(!1);let Q=(0,e.useCallback)(async(a,c)=>{if(q)try{let d=await fetch(`/api/oauth/${b}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a,redirectUri:q.redirectUri,codeVerifier:q.codeVerifier,state:c,...m?{meta:m}:{}})}),e=await d.json();if(!d.ok)throw Error(e.error);p("success"),f?.()}catch(a){v(a.message),p("error")}},[q,b,f,m]),R=(0,e.useCallback)(async a=>{if(q?.state)try{let b=await fetch("/api/oauth/xai/manual-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a,state:q.state})}),c=await b.json();if(!b.ok)throw Error(c.error);p("success"),f?.()}catch(a){v(a.message),p("error")}},[q,f]),S=(0,e.useCallback)(async(a,c,d,e,g)=>{J.current=!1,B(!0);let h=Date.now()+(Number.isFinite(g)&&g>0?g:12e4);for(;Date.now()<h;){if(J.current){console.log("[OAuthModal] Polling aborted"),B(!1);return}if(await new Promise(a=>setTimeout(a,1e3*d)),J.current){console.log("[OAuthModal] Polling aborted after sleep"),B(!1);return}try{let g=await fetch(`/api/oauth/${b}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:a,codeVerifier:c,extraData:e})}),h=await g.json();if(h.success){J.current=!0,p("success"),B(!1),f?.();return}if("expired_token"===h.error||"access_denied"===h.error)throw Error(h.errorDescription||h.error);"slow_down"===h.error&&(d=Math.min(d+5,30))}catch(a){v(a.message),p("error"),B(!1);return}}v("Authorization timeout"),p("error"),B(!1)},[b,f]),T=(0,e.useCallback)(async a=>{let b=await fetch(`/api/oauth/${a}/start-proxy`),c=await b.json();if(!b.ok||!c.success||!c.callbackUrl)throw Error(c.reason||c.error||`Failed to start ${a} callback server`);let d=new URL(`/api/oauth/${a}/authorize`,window.location.origin);d.searchParams.set("redirect_uri",c.callbackUrl);let e=await fetch(d),f=await e.json();if(!e.ok)throw Error(f.error);let g={state:f.state};f.codeVerifier&&(g.codeVerifier=f.codeVerifier),await fetch(`/api/oauth/${a}/register-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),r({...f,proxyProvider:a}),p("waiting"),I.current=window.open(f.authUrl,"oauth_popup","width=600,height=700"),I.current||p("input")},[]),U=(0,e.useCallback)(async()=>{if(b)try{let a;if(v(null),j.has(b)&&"browser"===C)return void await T(b);if(["github","kiro","kimi","kimi-coding","kilocode","codebuddy-cn","codebuddy-intl","qoder","grok-cli"].includes(b)){x(!0),p("waiting");let a=new URL(`/api/oauth/${b}/device-code`,window.location.origin);"kiro"===b&&n?.startUrl&&(a.searchParams.set("start_url",n.startUrl),n.region&&a.searchParams.set("region",n.region),a.searchParams.set("auth_method","idc"));let c=await fetch(a.toString()),d=await c.json();if(!c.ok)throw Error(d.error);z(d);let e=d.verification_uri_complete||d.verification_uri;e&&window.open(e,"_blank","noopener,noreferrer");let f="kiro"===b?{_clientId:d._clientId,_clientSecret:d._clientSecret,_region:d._region,_authMethod:d._authMethod,_startUrl:d._startUrl}:"qoder"===b?{_qoderNonce:d._qoderNonce,_qoderMachineId:d._qoderMachineId,_qoderVerifier:d.codeVerifier}:"kimi"===b||"kimi-coding"===b?{_kimiDeviceId:d._kimiDeviceId}:null;S(d.device_code,d.codeVerifier,d.interval||5,f,Number.isFinite(d.expires_in)&&d.expires_in>0?1e3*d.expires_in:void 0);return}let c=window.location.port||("https:"===window.location.protocol?"443":"80");a="codex"===b?"http://localhost:1455/auth/callback":"xai"===b?"http://127.0.0.1:56121/callback":`http://localhost:${c}/callback`;let d=new URL(`/api/oauth/${b}/authorize`,window.location.origin);d.searchParams.set("redirect_uri",a),m&&Object.entries(m).forEach(([a,b])=>{b&&d.searchParams.set(a,b)});let e=await fetch(d.toString()),f=await e.json();if(!e.ok)throw Error(f.error);let g=!1,h=!1;if("codex"===b)try{let b=new URL("/api/oauth/codex/start-proxy",window.location.origin);b.searchParams.set("app_port",c),b.searchParams.set("state",f.state),b.searchParams.set("code_verifier",f.codeVerifier),b.searchParams.set("redirect_uri",a);let d=await fetch(b.toString()),e=await d.json();g=e.success,h=!!e.serverSide}catch{g=!1}let i=!1,k=!1;if("xai"===b)try{let b=new URL("/api/oauth/xai/start-proxy",window.location.origin);b.searchParams.set("app_port",c),b.searchParams.set("state",f.state),b.searchParams.set("code_verifier",f.codeVerifier),b.searchParams.set("redirect_uri",a);let d=await fetch(b.toString()),e=await d.json();if(i=e.success,k=!!e.serverSide,!i&&"port_busy"===e.reason)throw Error("Port 56121 in use; close the conflicting process and retry")}catch(a){if(a?.message)throw a;i=!1}if(r({...f,redirectUri:a,codexServerSide:h,xaiServerSide:k}),!f.authUrl){if("device_code"===f.flowType)throw Error(`Provider ${b} uses device-code login but is not wired in the OAuth modal device-code list`);throw Error("No authorization URL returned from OAuth provider")}"codex"===b&&g||"xai"===b&&i||M&&"codex"!==b&&"xai"!==b?(p("waiting"),I.current=window.open(f.authUrl,"oauth_popup","width=600,height=700"),I.current||p("input")):(p("input"),window.open(f.authUrl,"_blank"))}catch(a){v(a.message),p("error")}},[b,M,S,m,n,C,T]),V=async()=>{try{if(v(null),"paste-token"===C&&k[b]){let a=E.trim();if(!a)throw Error("Missing token");let c=await fetch(`/api/oauth/${b}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a})}),d=await c.json();if(!c.ok)throw Error(d.error);p("success"),f?.();return}let a=s.trim();if(j.has(b)&&a){let c=await fetch(`/api/oauth/${b}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a,state:q?.state})}),d=await c.json();if(!c.ok)throw Error(d.error);p("success"),f?.();return}if(a.startsWith("eyJ")&&a.includes("."))return void await Q(a,null);if("xai"===b&&a&&!a.includes("://")&&!a.includes("?")&&!a.includes("code="))return void await R(a);if("kimchi"===b&&a&&!a.includes("://")&&!a.includes("?"))return void await Q(a,null);let c=new URL(a),d=c.searchParams.get("code"),e=c.searchParams.get("token"),g=c.searchParams.get("state"),h=c.searchParams.get("error");if(h)throw Error(c.searchParams.get("error_description")||h);if(!d&&!e)throw Error("xai"===b?"Paste the callback URL or copied xAI code":"kimchi"===b?"No Kimchi token found in URL":"No authorization code found in URL");await Q(e||d,g)}catch(a){v(a.message),p("error")}},W=(0,e.useCallback)(()=>{"codex"===b?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===b?fetch("/api/oauth/xai/stop-proxy").catch(()=>{}):"trae"===b?fetch("/api/oauth/trae/stop-proxy").catch(()=>{}):"windsurf"===b?fetch("/api/oauth/windsurf/stop-proxy").catch(()=>{}):"zed"===b&&fetch("/api/oauth/zed/stop-proxy").catch(()=>{}),g()},[g,b]);if(!b||!c)return null;let X="xai"===b,Y="kimchi"===b,Z=y?.verification_uri_complete||y?.verification_uri||"",$=X?"Connect Grok Build OAuth":`Connect ${c.name}`,_=X?"http://127.0.0.1:56121/callback?code=... or copied code":Y?`${O.replace("code=...","token=...")} or copied token`:O;return(0,d.jsx)(h.aF,{isOpen:a,title:$,onClose:W,size:"lg",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[j.has(b)&&("waiting"===o||"input"===o||"error"===o)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{type:"button",onClick:()=>{D("browser"),v(null),p("waiting"),U()},className:`flex-1 rounded-lg border px-3 py-2 text-sm transition-colors ${"browser"===C?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:"\uD83C\uDF10 Sign in with browser"}),(0,d.jsx)("button",{type:"button",onClick:()=>{D("paste-token"),v(null),p("input")},className:`flex-1 rounded-lg border px-3 py-2 text-sm transition-colors ${"paste-token"===C?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:"\uD83D\uDD11 Paste token"})]}),"browser"===C&&(0,d.jsxs)(d.Fragment,{children:["waiting"===o&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{className:"text-sm",children:"Waiting for browser authorization…"})]}),"input"===o&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Popup was blocked. After authorizing in the browser, paste the full callback URL here:"}),(0,d.jsx)(h.pd,{value:s,onChange:a=>t(a.target.value),placeholder:"http://127.0.0.1:.../callback?...",className:"font-mono text-xs"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:V,fullWidth:!0,disabled:!s,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:W,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]}),"paste-token"===C&&(0,d.jsxs)("div",{className:"space-y-3",children:[G&&!G.installed&&(0,d.jsxs)("div",{className:`px-3 py-2 rounded-lg text-sm ${k[b].ideOptional?"bg-blue-500/10 text-blue-700 dark:text-blue-300":"bg-yellow-500/10 text-yellow-700 dark:text-yellow-300"}`,children:[k[b].ideName," IDE not detected.",k[b].ideOptional?" You can still grab the token from DevTools.":` Install ${k[b].ideName} IDE to get the token, or use "Sign in with browser".`]}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:k[b].instructions}),(0,d.jsx)(h.pd,{value:E,onChange:a=>F(a.target.value),placeholder:k[b].placeholder,className:"font-mono text-xs"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:V,fullWidth:!0,disabled:!E,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:W,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]}),("waiting"===o||"input"===o)&&!w&&!j.has(b)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{className:"text-sm",children:X?"Waiting for Grok Build OAuth…":"Waiting for popup authorization…"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,d.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,d.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,d.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 1: Open this ",X?"Grok Build OAuth URL":"URL"," in your browser"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.pd,{value:q?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,d.jsx)(h.$n,{variant:"secondary",icon:"auth_url"===K?"check":"content_copy",onClick:()=>L(q?.authUrl,"auth_url"),disabled:!q?.authUrl,children:"Copy"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 2: Paste the ","xai"===b?"callback URL or copied code":Y?"callback URL or copied token":"callback URL"," here"]}),(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"xai"===b?"If xAI shows a code instead of redirecting, paste that code here.":Y?"After authorization, copy the full callback URL or token from your browser.":"After authorization, copy the full URL from your browser."}),(0,d.jsx)(h.pd,{value:s,onChange:a=>t(a.target.value),placeholder:_,className:"font-mono text-xs"})]})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:V,fullWidth:!0,disabled:!s,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:W,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"waiting"===o&&w&&y&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"text-center py-4",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the login URL below and authorize:"}),(0,d.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Login URL"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 text-sm break-all",children:Z}),(0,d.jsx)(h.$n,{size:"sm",variant:"ghost",icon:"login_url"===K?"check":"content_copy",onClick:()=>L(Z,"login_url"),disabled:!Z}),(0,d.jsx)(h.$n,{size:"sm",variant:"ghost",icon:"open_in_new",onClick:()=>window.open(Z,"_blank","noopener,noreferrer"),disabled:!Z,children:"Open"})]})]}),(0,d.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,d.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,d.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:y.user_code}),(0,d.jsx)(h.$n,{size:"sm",variant:"ghost",icon:"user_code"===K?"check":"content_copy",onClick:()=>L(y.user_code,"user_code")})]})]})]}),A&&(0,d.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"success"===o&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",c.name," account has been connected."]}),(0,d.jsx)(h.$n,{onClick:W,fullWidth:!0,children:"Done"})]}),"error"===o&&(0,d.jsxs)("div",{className:"text-center py-6",children:[(0,d.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,d.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,d.jsx)("p",{className:"text-sm text-red-600 mb-4",children:u}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:U,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,d.jsx)(h.$n,{onClick:W,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}l.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerInfo:g().shape({name:g().string}),onSuccess:g().func,onClose:g().func.isRequired,oauthMeta:g().object,idcConfig:g().shape({startUrl:g().string,region:g().string})}},79488:(a,b,c)=>{c.d(b,{default:()=>i});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412);function i({isOpen:a,onSuccess:b,onClose:c}){let[f,g]=(0,e.useState)(""),[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(!1),p=async()=>{if(!f.trim())return void m("Please paste your cookie");k(!0),m(null);try{let a=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:f.trim()})}),c=await a.json();if(!a.ok)throw Error(c.error||"Authentication failed");o(!0),setTimeout(()=>{b?.(),q()},1500)}catch(a){m(a.message)}finally{k(!1)}},q=()=>{g(""),m(null),o(!1),c?.()};return(0,d.jsx)(h.aF,{isOpen:a,onClose:q,title:"iFlow Cookie Authentication",children:(0,d.jsx)("div",{className:"space-y-4",children:n?(0,d.jsxs)("div",{className:"text-center py-8",children:[(0,d.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,d.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,d.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,d.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,d.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,d.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,d.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,d.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,d.jsx)("li",{children:"Login to your account"}),(0,d.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,d.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,d.jsx)("li",{children:"Paste it below"})]})]})]}),(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,d.jsx)("textarea",{value:f,onChange:a=>g(a.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:j})]}),l&&(0,d.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,d.jsx)("p",{className:"text-sm text-error",children:l})}),(0,d.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,d.jsx)(h.$n,{variant:"secondary",onClick:q,disabled:j,fullWidth:!0,children:"Cancel"}),(0,d.jsx)(h.$n,{onClick:p,loading:j,fullWidth:!0,children:"Authenticate"})]})]})})})}i.propTypes={isOpen:g().bool.isRequired,onSuccess:g().func,onClose:g().func}},79750:(a,b,c)=>{c.d(b,{F:()=>g,i:()=>f});var d=c(51126);let e={en:{sym:"$",rate:1},"zh-CN":{sym:"¥",rate:7.2},"zh-TW":{sym:"NT$",rate:31.5},ja:{sym:"\xa5",rate:155},ko:{sym:"₩",rate:1350},vi:{sym:"₫",rate:25e3},"pt-BR":{sym:"R$",rate:5.5},"pt-PT":{sym:"€",rate:.92},es:{sym:"€",rate:.92},de:{sym:"€",rate:.92}};function f(){if("u"<typeof localStorage)return!0;let a=localStorage.getItem("useRegionalCurrency");return null===a||"0"!==a}function g(a,b=2){let c=a||0;if(!f())return`$${c.toFixed(b)}`;let h=e[(0,d.QC)(function(){if("u"<typeof document)return"en";let a=document.cookie.split(";").find(a=>a.trim().startsWith(`${d.CL}=`));return a?decodeURIComponent(a.split("=")[1]):"en"}())];return h?`${h.sym}${(c*h.rate).toFixed(b)}`:`$${c.toFixed(b)}`}},83352:(a,b,c)=>{c.d(b,{default:()=>q});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(95145),i=c(72738),j=c(38930),k=c(29476),l=c(91431),m=c(92592),n=c(99258);let o=[...Object.keys(m.zN),...Object.keys(m.IS),...Object.keys(m.nJ),...Object.keys(m.fg)],p=Object.keys(m.IS).filter(a=>m.IS[a].noAuth);function q({isOpen:a,onClose:b,onSelect:c,onDeselect:f,selectedModel:g,activeProviders:r=[],title:s,modelAliases:t={},kindFilter:u=null,capFilter:v=null,addedModelValues:w=[],closeOnSelect:x=!0}){let y=(0,e.useMemo)(()=>u?r.filter(a=>{let b=m.Q2[a.provider];return(b?.serviceKinds||["llm"]).includes(u)}):r,[r,u]),{getCaps:z}=(0,k.y)(),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)([]),[E,F]=(0,e.useState)([]),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)([]);(0,e.useMemo)(()=>r.filter(a=>"cursor"===a.provider&&a.id).map(a=>a.id),[r]);let M=(0,e.useMemo)(()=>({...m.zN,...m.IS,...m.nJ,...m.fg}),[]),N=(0,e.useMemo)(()=>{let a={},b=new Set(["webSearch","webFetch"]),c=new Set(["image","tts","stt","embedding","imageToText"]),d=new Set(["tts","image","webFetch"]);return[...new Set([...y.map(a=>a.provider),...u?p.filter(a=>(m.Q2[a]?.serviceKinds||["llm"]).includes(u)):p])].sort((a,b)=>{let c=o.indexOf(a),d=o.indexOf(b);return(-1===c?999:c)-(-1===d?999:d)}).forEach(e=>{let f=(0,m.wG)(e),g=M[e]||{name:e,color:"#666"},h=(0,m.mq)(e)||(0,m.gb)(e);if(u&&b.has(u)){a[e]={name:g.name,alias:f,color:g.color,models:[{id:e,name:g.name,value:e}]};return}if(g.passthroughModels){let b=Object.entries(t).filter(([,a])=>a.startsWith(`${f}/`)).map(([a,b])=>({id:b.replace(`${f}/`,""),name:a,value:b})),h=G.filter(a=>a.providerAlias===f).map(a=>({id:a.id,name:a.name||a.id,value:`${f}/${a.id}`,kind:(0,l.CP)(a),isCustom:!0})),i=b;if(u&&c.has(u)){let a=h.filter(a=>(0,l.CP)(a)===u);0===(i=[...a,...(0,l.KC)(e).filter(a=>(0,l.CP)(a)===u).map(a=>({id:a.id,name:a.name,value:`${f}/${a.id}`,kind:(0,l.CP)(a)})).filter(b=>!a.some(a=>a.value===b.value))]).length&&d.has(u)&&(g.serviceKinds||["llm"]).includes(u)&&(i=[{id:e,name:g.name,value:f}])}else{let a=h.filter(a=>!(0,l.CP)(a)||"llm"===(0,l.CP)(a)),c=new Set([...b,...a].map(a=>a.value)),d=(0,l.KC)(e).filter(a=>!(0,l.CP)(a)||"llm"===(0,l.CP)(a)).map(a=>({id:a.id,name:a.name,value:`${f}/${a.id}`,kind:(0,l.CP)(a)})).filter(a=>!c.has(a.value));i=[...a,...b.filter(b=>!a.some(a=>a.value===b.value)),...d]}if(i.length>0){let b=E.find(a=>a.id===e),c=b?.name||g.name;a[e]={name:c,alias:f,color:g.color,models:i}}}else if(h){if(u&&c.has(u))return;let b=r.find(a=>a.provider===e),d=E.find(a=>a.id===e),f=d?.name||b?.name||g.name,h=b?.providerSpecificData?.prefix||d?.prefix||e,i=Object.entries(t).filter(([,a])=>a.startsWith(`${e}/`)).map(([a,b])=>({id:b.replace(`${e}/`,""),name:a,value:`${h}/${b.replace(`${e}/`,"")}`})),j=G.filter(a=>a.providerAlias===e).map(a=>({id:a.id,name:a.name||a.id,value:`${h}/${a.id}`,isCustom:!0})),k=new Set(i.map(a=>a.value)),l=[...i,...j.filter(a=>!k.has(a.value))],m=l.length>0?l:[{id:`__placeholder__${e}`,name:`${h}/model-id`,value:`${h}/model-id`,isPlaceholder:!0}];a[e]={name:f,alias:h,color:g.color,models:m,isCustom:!0,hasModels:l.length>0}}else{var i;let b="cursor"===e&&K.length>0?K:(0,l.KC)(e),h=new Set(b.map(a=>a.id)),j=b.length>0,k=Object.entries(t).filter(([a,b])=>b.startsWith(`${f}/`)&&(!j||a===b.replace(`${f}/`,""))&&!h.has(b.replace(`${f}/`,""))).map(([a,b])=>({id:b.replace(`${f}/`,""),name:a,value:b,isCustom:!0})),m=new Set(k.map(a=>a.id)),n=G.filter(a=>a.providerAlias===f&&!h.has(a.id)&&!m.has(a.id)).map(a=>({id:a.id,name:a.name||a.id,value:`${f}/${a.id}`,isCustom:!0})),o=[...b.map(a=>({id:a.id,name:a.name,value:`${f}/${a.id}`,kind:(0,l.CP)(a)})),...k,...n],p=new Set,q=(i=o.filter(a=>!p.has(a.value)&&(p.add(a.value),!0)),u?c.has(u)?i.filter(a=>a.isPlaceholder||(0,l.CP)(a)===u):i:i.filter(a=>a.isPlaceholder||a.isCustom||!(0,l.CP)(a)||"llm"===(0,l.CP)(a)));0===q.length&&u&&d.has(u)&&(g.serviceKinds||["llm"]).includes(u)&&(q=[{id:e,name:g.name,value:f}]),q.length>0&&(a[e]={name:g.name,alias:f,color:g.color,models:q})}}),Object.entries(a).forEach(([b,c])=>{let d=new Set([...I[(0,m.wG)(b)]||[],...I[b]||[]]);0!==d.size&&(c.models=c.models.filter(a=>!d.has(a.id)),0===c.models.length&&delete a[b])}),a},[y,t,M,E,G,I,u,r,K]),O=(0,e.useMemo)(()=>{if(u||v)return[];if(!A.trim())return C;let a=A.toLowerCase();return C.filter(b=>b.name.toLowerCase().includes(a))},[C,A,u]),P=(0,e.useMemo)(()=>{let a=A.trim().toLowerCase(),b={};return Object.entries(N).forEach(([c,d])=>{var e;let f=d.models;if(!v||0!==(f=f.filter(a=>z(a.value)?.[v]===!0)).length){if(a){let b=d.name.toLowerCase().includes(a);if(0===(f=f.filter(b=>b.name.toLowerCase().includes(a)||b.id.toLowerCase().includes(a))).length&&!b)return}b[c]={...d,models:[...(e=f).filter(a=>w.includes(a.value)).sort((a,b)=>a.name.localeCompare(b.name)),...e.filter(a=>!w.includes(a.value)).sort((a,b)=>a.name.localeCompare(b.name))]}}}),b},[N,A,w]),Q=a=>{let d=a?.value||a?.name||a;w.includes(d)&&f?f(a):c(a),x&&(b(),B(""))};return(0,d.jsxs)(h.default,{isOpen:a,onClose:()=>{b(),B("")},title:s??(0,n.Tl)("Select Model"),size:"md",className:"p-4!",footer:null,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,d.jsx)("span",{children:(0,n.Tl)("Click to add, click again to remove. Changes are saved automatically.")})]}),(0,d.jsx)("div",{className:"mb-3",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,d.jsx)("input",{type:"text",placeholder:(0,n.Tl)("Search..."),value:A,onChange:a=>B(a.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,d.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[O.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,d.jsx)("span",{className:"text-xs font-medium text-primary",children:(0,n.Tl)("Combos")}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",O.length,")"]})]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:O.map(a=>{let b=g===a.name;return(0,d.jsxs)("button",{onClick:()=>Q({id:a.name,name:a.name,value:a.name}),className:`
2
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer flex items-center gap-1
3
- ${b?"bg-primary text-white border-primary":w.includes(a.name)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
- `,children:[w.includes(a.name)&&(0,d.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),a.name]},a.id)})})]}),Object.entries(P).map(([a,b])=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,d.jsx)(i.A,{src:`/providers/${a}.png`,alt:b.name,size:14,fallbackText:(b.name||a).slice(0,2).toUpperCase(),fallbackColor:b.color}),(0,d.jsx)("span",{className:"text-xs font-medium text-primary",children:b.name}),(0,d.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",b.models.length,")"]})]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.models.map(a=>{let b=g===a.value,c=a.isPlaceholder;return(0,d.jsx)("button",{onClick:()=>Q(a),title:c?"Select to pre-fill, then edit model ID in the input":void 0,className:`
5
- px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
6
- ${c?"border-dashed border-border text-text-muted hover:border-primary/50 hover:text-primary bg-surface italic":b?"bg-primary text-white border-primary":w.includes(a.value)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
- `,children:(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[w.includes(a.value)&&!c&&(0,d.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),c?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"edit"}),a.name]}):a.isCustom?(0,d.jsxs)(d.Fragment,{children:[a.name,(0,d.jsx)("span",{className:"text-[9px] opacity-60 font-normal",children:"custom"}),(0,d.jsx)(j.default,{caps:z(a.value)})]}):(0,d.jsxs)(d.Fragment,{children:[a.name,(0,d.jsx)(j.default,{caps:z(a.value)})]})]})},a.value)})})]},a)),0===Object.keys(P).length&&0===O.length&&(0,d.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,d.jsx)("p",{className:"text-xs",children:(0,n.Tl)("No models found")})]})]})]})}q.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onSelect:g().func.isRequired,onDeselect:g().func,selectedModel:g().string,activeProviders:g().arrayOf(g().shape({provider:g().string.isRequired})),title:g().string,modelAliases:g().object,kindFilter:g().string,addedModelValues:g().arrayOf(g().string),closeOnSelect:g().bool}},83552:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({label:a,type:b="text",placeholder:c,value:g,onChange:h,error:i,hint:j,icon:k,disabled:l=!1,required:m=!1,className:n,inputClassName:o,...p}){return(0,d.jsxs)("div",{className:(0,e.cn)("flex flex-col gap-1.5",n),children:[a&&(0,d.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[a,m&&(0,d.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,d.jsxs)("div",{className:"relative",children:[k&&(0,d.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:k})}),(0,d.jsx)("input",{type:b,placeholder:c,value:g,onChange:h,disabled:l,className:(0,e.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",k&&"pl-10",i&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",o),...p})]}),i&&(0,d.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),i]}),j&&!i&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:j})]})}},85306:(a,b,c)=>{c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(19099),g=c(41371),h=c(42196),i=c(47036);function j({children:a}){let[b,c]=(0,e.useState)(!1),[k,l]=(0,e.useState)(()=>!1),m=(0,f.usePathname)(),n=(0,g.i)(a=>a.notifications),o=(0,g.i)(a=>a.removeNotification);return(0,d.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,d.jsx)("div",{className:"fixed top-[5%] left-1/2 z-[80] flex w-[min(92vw,380px)] -translate-x-1/2 flex-col gap-2",children:n.map(a=>{var b;let c="success"===(b=a.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===b?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===b?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,d.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${c.wrapper}`,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5 flex-shrink-0",children:c.icon}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[a.title?(0,d.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:a.title}):null,(0,d.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:a.message})]}),a.dismissible?(0,d.jsx)("button",{type:"button",onClick:()=>o(a.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},a.id)})}),b&&(0,d.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>c(!1)}),(0,d.jsx)("div",{className:`${k?"hidden":"hidden lg:flex"}`,children:(0,d.jsx)(h.default,{})}),(0,d.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${b?"translate-x-0":"-translate-x-full"}`,children:(0,d.jsx)(h.default,{onClose:()=>c(!1)})}),(0,d.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300 isolate",children:[(0,d.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none -z-10","aria-hidden":"true"}),(0,d.jsx)(i.default,{onMenuClick:()=>c(!0),onDesktopMenuClick:()=>{l(a=>!a)}},m),(0,d.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===m?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===m?"flex flex-col overflow-hidden":""}`,children:(0,d.jsx)("div",{className:`${"/dashboard/basic-chat"===m?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:a})})]})]})}},91099:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({options:a=[],value:b,onChange:c,size:g="md",className:h}){let i={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,d.jsx)("div",{className:(0,e.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",h),children:a.map(a=>(0,d.jsxs)("button",{onClick:()=>c(a.value),className:(0,e.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",i[g],b===a.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[a.icon&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:a.icon}),a.label]},a.value))})}},91809:(a,b,c)=>{c.d(b,{default:()=>g});var d=c(48249),e=c(67484),f=c(17660);function g(){let[a,b]=(0,e.useState)([]),[c,g]=(0,e.useState)(!0),[h,i]=(0,e.useState)(!0);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("span",{children:"Auto Refresh (500ms)"}),(0,d.jsx)("div",{onClick:()=>i(!h),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${h?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,d.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${h?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,d.jsx)(f.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,d.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:c&&0===a.length?(0,d.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===a.length?(0,d.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,d.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,d.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,d.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,d.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,d.jsx)("tbody",{className:"divide-y divide-border/50",children:a.map((a,b)=>{let c=a.split(" | ");if(c.length<7)return null;let e=c[6],f=e.includes("PENDING"),g=e.includes("FAILED"),h=e.includes("OK");return(0,d.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${f?"bg-primary/5":""}`,children:[(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:c[0]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:c[1]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,d.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:c[2]})}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:c[3],children:c[3]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:c[4]}),(0,d.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:c[5]}),(0,d.jsx)("td",{className:`px-3 py-1.5 font-bold ${h?"text-success":g?"text-error":"text-primary animate-pulse"}`,children:e})]},b)})})]})})}),(0,d.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are saved to log.txt in the application data directory."})]})}},95145:(a,b,c)=>{c.d(b,{ConfirmModal:()=>i,default:()=>h});var d=c(48249);c(67484);var e=c(71404),f=c(99070),g=c(32971);function h({isOpen:a,onClose:b,title:c,children:f,footer:i,size:j="md",closeOnOverlay:k=!0,showTrafficLights:l=!0,className:m}){return a?(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:k?b:void 0}),(0,d.jsxs)("div",{className:(0,e.cn)("relative w-full bg-surface","border border-border-subtle","rounded-[14px] shadow-[var(--shadow-elev)]","fade-in",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[j],m),children:[(c||l)&&(0,d.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-border-subtle",children:[(0,d.jsxs)("div",{className:"flex items-center",children:[l&&(0,d.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-4 ml-2",children:[(0,d.jsx)(g.default,{text:"Close",position:"top",color:"#FF5F56",children:(0,d.jsx)("button",{onClick:b,"aria-label":"Close",title:"Close",className:"w-4 h-4 rounded-full bg-[#FF5F56] hover:brightness-90 transition-all cursor-pointer flex items-center justify-center group/dot",children:(0,d.jsx)("span",{className:"text-[9px] font-bold text-white opacity-0 group-hover/dot:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,d.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"}),(0,d.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"})]}),c&&(0,d.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:c})]}),(0,d.jsx)("button",{onClick:b,"aria-label":"Close",className:"md:hidden p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,d.jsx)("div",{className:"p-6 max-h-[calc(85vh-100px)] overflow-y-auto custom-scrollbar",children:f}),i&&(0,d.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-border-subtle",children:i})]})]}):null}function i({isOpen:a,onClose:b,onConfirm:c,title:e="Confirm",message:g,confirmText:j="Confirm",cancelText:k="Cancel",variant:l="danger",loading:m=!1}){return(0,d.jsx)(h,{isOpen:a,onClose:b,title:e,size:"sm",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.default,{variant:"ghost",onClick:b,disabled:m,children:k}),(0,d.jsx)(f.default,{variant:l,onClick:c,loading:m,children:j})]}),children:(0,d.jsx)("p",{className:"text-text-muted",children:g})})}},95514:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({checked:a=!1,onChange:b,label:c,description:g,disabled:h=!1,size:i="md",className:j}){let k={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,d.jsxs)("div",{className:(0,e.cn)("flex items-center gap-3",h&&"opacity-50 cursor-not-allowed",j),children:[(0,d.jsx)("button",{type:"button",role:"switch","aria-checked":a,disabled:h,onClick:()=>{!h&&b&&b(!a)},className:(0,e.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",a?"bg-brand-500":"bg-surface-3",k[i].track,h&&"cursor-not-allowed"),children:(0,d.jsx)("span",{className:(0,e.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",a?k[i].translate:"translate-x-0.5",k[i].thumb,"mt-0.5")})}),(c||g)&&(0,d.jsxs)("div",{className:"flex flex-col",children:[c&&(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:c}),g&&(0,d.jsx)("span",{className:"text-xs text-text-muted",children:g})]})]})}},99070:(a,b,c)=>{c.d(b,{default:()=>h});var d=c(48249),e=c(71404);let f={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},g={sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]"};function h({children:a,variant:b="primary",size:c="md",icon:i,iconRight:j,disabled:k=!1,loading:l=!1,fullWidth:m=!1,className:n,...o}){return(0,d.jsxs)("button",{className:(0,e.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",f[b],g[c],m&&"w-full",n),disabled:k||l,...o,children:[l?(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):i?(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:i}):null,a,j&&!l&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:j})]})}}};