@techysy/10router 1.4.0 → 1.5.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 (1156) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +11 -8
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +8 -8
  5. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  6. package/app/.next-cli-build/routes-manifest.json +20 -0
  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 +2 -2
  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/experimental/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +10 -5
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  80. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  88. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.html +2 -2
  91. package/app/.next-cli-build/server/app/_not-found.rsc +7 -7
  92. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -7
  93. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +7 -7
  94. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  95. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  120. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +2 -2
  126. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  144. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js +1 -0
  166. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js.nft.json +1 -0
  167. package/app/.next-cli-build/server/app/api/external-quota/[source]/route_client-reference-manifest.js +1 -0
  168. package/app/.next-cli-build/server/app/api/gateway-probe/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/gateway-probe/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  195. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/network/egress-region/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/claim-compensation/route.js +1 -0
  233. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/claim-compensation/route.js.nft.json +1 -0
  234. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/claim-compensation/route_client-reference-manifest.js +1 -0
  235. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  272. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  278. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  316. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  320. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  322. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  324. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  326. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  330. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  332. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  334. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  336. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  356. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  378. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  404. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  418. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/rerank/route.js +1 -0
  430. package/app/.next-cli-build/server/app/api/v1/rerank/route.js.nft.json +1 -0
  431. package/app/.next-cli-build/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -0
  432. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/version/route.js +2 -2
  457. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/version/shell-update/route.js +2 -2
  459. package/app/.next-cli-build/server/app/api/version/shell-update/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  465. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  467. package/app/.next-cli-build/server/app/callback.html +2 -2
  468. package/app/.next-cli-build/server/app/callback.rsc +7 -7
  469. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +7 -7
  470. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  471. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +7 -7
  472. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +2 -2
  473. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +9 -9
  474. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +9 -9
  475. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +9 -9
  476. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +2 -2
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +9 -9
  479. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +9 -9
  480. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
  481. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  482. package/app/.next-cli-build/server/app/dashboard/combos.html +2 -2
  483. package/app/.next-cli-build/server/app/dashboard/combos.rsc +9 -9
  484. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +9 -9
  485. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +9 -9
  486. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  487. package/app/.next-cli-build/server/app/dashboard/endpoint.html +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +9 -9
  489. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +9 -9
  490. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
  491. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  492. package/app/.next-cli-build/server/app/dashboard/experimental.html +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +9 -9
  494. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +9 -9
  495. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +9 -9
  496. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +3 -3
  497. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +9 -9
  499. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +9 -9
  500. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +9 -9
  501. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  502. package/app/.next-cli-build/server/app/dashboard/mitm.html +2 -2
  503. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +9 -9
  504. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +9 -9
  505. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +9 -9
  506. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  507. package/app/.next-cli-build/server/app/dashboard/profile.html +2 -2
  508. package/app/.next-cli-build/server/app/dashboard/profile.rsc +9 -9
  509. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +9 -9
  510. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +9 -9
  511. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  512. package/app/.next-cli-build/server/app/dashboard/providers/new.html +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +9 -9
  514. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +9 -9
  515. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +9 -9
  516. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  517. package/app/.next-cli-build/server/app/dashboard/providers.html +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/providers.rsc +9 -9
  519. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +9 -9
  520. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +9 -9
  521. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  522. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +9 -9
  524. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +9 -9
  525. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +9 -9
  526. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
  527. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +2 -2
  528. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +9 -9
  529. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +9 -9
  530. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +9 -9
  531. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
  532. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/quota.rsc +10 -10
  534. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +10 -10
  535. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +10 -10
  536. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  537. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +2 -2
  541. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -8
  542. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -8
  543. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  544. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +8 -8
  545. package/app/.next-cli-build/server/app/dashboard/skills.html +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/skills.rsc +9 -9
  547. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +9 -9
  548. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +9 -9
  549. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  550. package/app/.next-cli-build/server/app/dashboard/token-saver.html +2 -2
  551. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +9 -9
  552. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +9 -9
  553. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +9 -9
  554. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
  555. package/app/.next-cli-build/server/app/dashboard/translator.html +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/translator.rsc +9 -9
  557. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +9 -9
  558. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +9 -9
  559. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  560. package/app/.next-cli-build/server/app/dashboard/usage.html +2 -2
  561. package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
  562. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +9 -9
  563. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
  564. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  565. package/app/.next-cli-build/server/app/dashboard.html +2 -2
  566. package/app/.next-cli-build/server/app/dashboard.rsc +9 -9
  567. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +9 -9
  568. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +9 -9
  569. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  570. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  571. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  572. package/app/.next-cli-build/server/app/index.html +1 -1
  573. package/app/.next-cli-build/server/app/index.rsc +7 -7
  574. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +7 -7
  575. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -7
  576. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  577. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  578. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  579. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  580. package/app/.next-cli-build/server/app/landing.html +2 -2
  581. package/app/.next-cli-build/server/app/landing.rsc +8 -8
  582. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -8
  583. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  584. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +8 -8
  585. package/app/.next-cli-build/server/app/login/page.js +1 -1
  586. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  587. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  588. package/app/.next-cli-build/server/app/login.html +2 -2
  589. package/app/.next-cli-build/server/app/login.rsc +8 -8
  590. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -8
  591. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  592. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +8 -8
  593. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  594. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  595. package/app/.next-cli-build/server/app/page.js +1 -1
  596. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  598. package/app/.next-cli-build/server/app-paths-manifest.json +11 -8
  599. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  600. package/app/.next-cli-build/server/chunks/1386.js +2 -2
  601. package/app/.next-cli-build/server/chunks/1806.js +1 -1
  602. package/app/.next-cli-build/server/chunks/1884.js +6 -0
  603. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  604. package/app/.next-cli-build/server/chunks/2557.js +5 -3
  605. package/app/.next-cli-build/server/chunks/2812.js +1 -1
  606. package/app/.next-cli-build/server/chunks/2926.js +1 -1
  607. package/app/.next-cli-build/server/chunks/2960.js +1 -0
  608. package/app/.next-cli-build/server/chunks/{5330.js → 318.js} +5 -5
  609. package/app/.next-cli-build/server/chunks/3256.js +1 -1
  610. package/app/.next-cli-build/server/chunks/3433.js +12 -12
  611. package/app/.next-cli-build/server/chunks/3500.js +1 -1
  612. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  613. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  614. package/app/.next-cli-build/server/chunks/3599.js +1 -0
  615. package/app/.next-cli-build/server/chunks/3662.js +1 -1
  616. package/app/.next-cli-build/server/chunks/3792.js +1 -1
  617. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  618. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  619. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  620. package/app/.next-cli-build/server/chunks/4293.js +1 -1
  621. package/app/.next-cli-build/server/chunks/4613.js +1 -1
  622. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  623. package/app/.next-cli-build/server/chunks/4775.js +1 -0
  624. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  625. package/app/.next-cli-build/server/chunks/4803.js +2 -2
  626. package/app/.next-cli-build/server/chunks/4927.js +4 -4
  627. package/app/.next-cli-build/server/chunks/507.js +2 -2
  628. package/app/.next-cli-build/server/chunks/5182.js +1 -1
  629. package/app/.next-cli-build/server/chunks/5210.js +11 -11
  630. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  631. package/app/.next-cli-build/server/chunks/539.js +1 -1
  632. package/app/.next-cli-build/server/chunks/5433.js +1 -1
  633. package/app/.next-cli-build/server/chunks/5527.js +1 -1
  634. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  635. package/app/.next-cli-build/server/chunks/5757.js +1 -0
  636. package/app/.next-cli-build/server/chunks/5781.js +2 -2
  637. package/app/.next-cli-build/server/chunks/595.js +1 -1
  638. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  639. package/app/.next-cli-build/server/chunks/615.js +1 -1
  640. package/app/.next-cli-build/server/chunks/6252.js +2 -2
  641. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  642. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  643. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  644. package/app/.next-cli-build/server/chunks/6593.js +1 -0
  645. package/app/.next-cli-build/server/chunks/6756.js +1 -1
  646. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  647. package/app/.next-cli-build/server/chunks/6790.js +1 -0
  648. package/app/.next-cli-build/server/chunks/6877.js +1 -0
  649. package/app/.next-cli-build/server/chunks/6947.js +1 -1
  650. package/app/.next-cli-build/server/chunks/6960.js +3 -3
  651. package/app/.next-cli-build/server/chunks/698.js +2 -2
  652. package/app/.next-cli-build/server/chunks/7067.js +1 -1
  653. package/app/.next-cli-build/server/chunks/7122.js +1 -6
  654. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  655. package/app/.next-cli-build/server/chunks/7252.js +1 -0
  656. package/app/.next-cli-build/server/chunks/7274.js +1 -1
  657. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  658. package/app/.next-cli-build/server/chunks/75.js +1 -1
  659. package/app/.next-cli-build/server/chunks/7568.js +1 -1
  660. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  661. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  662. package/app/.next-cli-build/server/chunks/8062.js +2 -2
  663. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  664. package/app/.next-cli-build/server/chunks/8172.js +2 -2
  665. package/app/.next-cli-build/server/chunks/8318.js +1 -1
  666. package/app/.next-cli-build/server/chunks/8410.js +1 -1
  667. package/app/.next-cli-build/server/chunks/8439.js +1 -1
  668. package/app/.next-cli-build/server/chunks/8469.js +2 -2
  669. package/app/.next-cli-build/server/chunks/8499.js +4 -4
  670. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  671. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  672. package/app/.next-cli-build/server/chunks/8672.js +1 -1
  673. package/app/.next-cli-build/server/chunks/8689.js +1 -1
  674. package/app/.next-cli-build/server/chunks/8749.js +4 -4
  675. package/app/.next-cli-build/server/chunks/8775.js +1 -0
  676. package/app/.next-cli-build/server/chunks/8895.js +4 -4
  677. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  678. package/app/.next-cli-build/server/chunks/8972.js +1 -0
  679. package/app/.next-cli-build/server/chunks/9046.js +1 -1
  680. package/app/.next-cli-build/server/chunks/9055.js +1 -1
  681. package/app/.next-cli-build/server/chunks/9154.js +1 -1
  682. package/app/.next-cli-build/server/chunks/939.js +1 -1
  683. package/app/.next-cli-build/server/chunks/9417.js +1 -1
  684. package/app/.next-cli-build/server/chunks/9451.js +2 -2
  685. package/app/.next-cli-build/server/chunks/9489.js +2 -2
  686. package/app/.next-cli-build/server/chunks/9601.js +1 -0
  687. package/app/.next-cli-build/server/chunks/9628.js +1 -1
  688. package/app/.next-cli-build/server/chunks/976.js +2 -2
  689. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  690. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  691. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  692. package/app/.next-cli-build/server/middleware.js +5 -5
  693. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  694. package/app/.next-cli-build/server/pages/404.html +2 -2
  695. package/app/.next-cli-build/server/pages/500.html +1 -1
  696. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  697. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  698. package/app/.next-cli-build/static/4BxfiRlz5UJXZcUl6uinS/_buildManifest.js +1 -0
  699. package/app/.next-cli-build/static/chunks/1243-acdc1dcbfcd9336d.js +3 -0
  700. package/app/.next-cli-build/static/chunks/1321-f4736e33b06bb9d6.js +1 -0
  701. package/app/.next-cli-build/static/chunks/5497-f54b1274c2141bf0.js +7 -0
  702. package/app/.next-cli-build/static/chunks/{6808-7c2c0ea1ee14763c.js → 6808-b0b12958916efbd5.js} +1 -1
  703. package/app/.next-cli-build/static/chunks/{8720-f1b68ba6d347a434.js → 8720-a2aa5581184c3985.js} +1 -1
  704. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-7ee730e7a1ddb6e5.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-de760afb83419302.js → page-bce04d7851a6bf65.js} +14 -9
  706. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-7a5d36237ec6b40e.js → page-244e20b305c911c6.js} +2 -2
  707. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-ceb259d31ded818a.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c70550b49f94cbc4.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-cefb3cbfe469dd51.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/_global-error/page-fb1f157de1c4ca66.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-fb1f157de1c4ca66.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-fb1f157de1c4ca66.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-fb1f157de1c4ca66.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-fb1f157de1c4ca66.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-fb1f157de1c4ca66.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-fb1f157de1c4ca66.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-fb1f157de1c4ca66.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-fb1f157de1c4ca66.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-fb1f157de1c4ca66.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-fb1f157de1c4ca66.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-fb1f157de1c4ca66.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-fb1f157de1c4ca66.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-fb1f157de1c4ca66.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-fb1f157de1c4ca66.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-fb1f157de1c4ca66.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-profiles/route-fb1f157de1c4ca66.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-fb1f157de1c4ca66.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-fb1f157de1c4ca66.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-fb1f157de1c4ca66.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-fb1f157de1c4ca66.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-fb1f157de1c4ca66.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-fb1f157de1c4ca66.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-fb1f157de1c4ca66.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-fb1f157de1c4ca66.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-fb1f157de1c4ca66.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-fb1f157de1c4ca66.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-fb1f157de1c4ca66.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-fb1f157de1c4ca66.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-fb1f157de1c4ca66.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-fb1f157de1c4ca66.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-fb1f157de1c4ca66.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-fb1f157de1c4ca66.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-fb1f157de1c4ca66.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-fb1f157de1c4ca66.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/combos/route-fb1f157de1c4ca66.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/external-quota/[source]/route-fb1f157de1c4ca66.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/gateway-probe/route-fb1f157de1c4ca66.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-fb1f157de1c4ca66.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-fb1f157de1c4ca66.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-fb1f157de1c4ca66.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-fb1f157de1c4ca66.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-fb1f157de1c4ca66.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-fb1f157de1c4ca66.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/health/route-fb1f157de1c4ca66.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/init/route-fb1f157de1c4ca66.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-fb1f157de1c4ca66.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-fb1f157de1c4ca66.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/keys/route-fb1f157de1c4ca66.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/locale/route-fb1f157de1c4ca66.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-fb1f157de1c4ca66.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-fb1f157de1c4ca66.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-fb1f157de1c4ca66.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-fb1f157de1c4ca66.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-fb1f157de1c4ca66.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-fb1f157de1c4ca66.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-fb1f157de1c4ca66.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-fb1f157de1c4ca66.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-fb1f157de1c4ca66.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-fb1f157de1c4ca66.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-fb1f157de1c4ca66.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-fb1f157de1c4ca66.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-fb1f157de1c4ca66.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/models/route-fb1f157de1c4ca66.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/models/test/route-fb1f157de1c4ca66.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-fb1f157de1c4ca66.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-fb1f157de1c4ca66.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-fb1f157de1c4ca66.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-fb1f157de1c4ca66.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/claim-compensation/route-fb1f157de1c4ca66.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-fb1f157de1c4ca66.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-fb1f157de1c4ca66.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-fb1f157de1c4ca66.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-fb1f157de1c4ca66.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-fb1f157de1c4ca66.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-fb1f157de1c4ca66.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-fb1f157de1c4ca66.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-fb1f157de1c4ca66.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-fb1f157de1c4ca66.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-fb1f157de1c4ca66.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-fb1f157de1c4ca66.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-fb1f157de1c4ca66.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-fb1f157de1c4ca66.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-fb1f157de1c4ca66.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-fb1f157de1c4ca66.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-fb1f157de1c4ca66.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-fb1f157de1c4ca66.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-fb1f157de1c4ca66.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-fb1f157de1c4ca66.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-kill/route-fb1f157de1c4ca66.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-status/route-fb1f157de1c4ca66.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-fb1f157de1c4ca66.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-fb1f157de1c4ca66.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/pricing/route-fb1f157de1c4ca66.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-fb1f157de1c4ca66.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-fb1f157de1c4ca66.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-fb1f157de1c4ca66.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-fb1f157de1c4ca66.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-fb1f157de1c4ca66.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-fb1f157de1c4ca66.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-fb1f157de1c4ca66.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-fb1f157de1c4ca66.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-fb1f157de1c4ca66.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/providers/route-fb1f157de1c4ca66.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-fb1f157de1c4ca66.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-fb1f157de1c4ca66.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-fb1f157de1c4ca66.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-fb1f157de1c4ca66.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-fb1f157de1c4ca66.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-fb1f157de1c4ca66.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-fb1f157de1c4ca66.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-fb1f157de1c4ca66.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-fb1f157de1c4ca66.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-fb1f157de1c4ca66.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-fb1f157de1c4ca66.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-fb1f157de1c4ca66.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-fb1f157de1c4ca66.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-fb1f157de1c4ca66.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-fb1f157de1c4ca66.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-fb1f157de1c4ca66.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-fb1f157de1c4ca66.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/security/status/route-fb1f157de1c4ca66.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-fb1f157de1c4ca66.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-fb1f157de1c4ca66.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-fb1f157de1c4ca66.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-fb1f157de1c4ca66.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/settings/route-fb1f157de1c4ca66.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-fb1f157de1c4ca66.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/tags/route-fb1f157de1c4ca66.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-fb1f157de1c4ca66.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-fb1f157de1c4ca66.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-fb1f157de1c4ca66.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-fb1f157de1c4ca66.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-fb1f157de1c4ca66.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-fb1f157de1c4ca66.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-fb1f157de1c4ca66.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-fb1f157de1c4ca66.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-fb1f157de1c4ca66.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-fb1f157de1c4ca66.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-fb1f157de1c4ca66.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-fb1f157de1c4ca66.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-fb1f157de1c4ca66.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-fb1f157de1c4ca66.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-fb1f157de1c4ca66.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-fb1f157de1c4ca66.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-fb1f157de1c4ca66.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-fb1f157de1c4ca66.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-fb1f157de1c4ca66.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-fb1f157de1c4ca66.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-fb1f157de1c4ca66.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-fb1f157de1c4ca66.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-fb1f157de1c4ca66.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-fb1f157de1c4ca66.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-fb1f157de1c4ca66.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-fb1f157de1c4ca66.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-fb1f157de1c4ca66.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-fb1f157de1c4ca66.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-fb1f157de1c4ca66.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-fb1f157de1c4ca66.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-fb1f157de1c4ca66.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-fb1f157de1c4ca66.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-fb1f157de1c4ca66.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-fb1f157de1c4ca66.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-fb1f157de1c4ca66.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-fb1f157de1c4ca66.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-fb1f157de1c4ca66.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-fb1f157de1c4ca66.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/v1/rerank/route-fb1f157de1c4ca66.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-fb1f157de1c4ca66.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-fb1f157de1c4ca66.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/v1/route-fb1f157de1c4ca66.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-fb1f157de1c4ca66.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-fb1f157de1c4ca66.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-fb1f157de1c4ca66.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-fb1f157de1c4ca66.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-fb1f157de1c4ca66.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-fb1f157de1c4ca66.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-fb1f157de1c4ca66.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-fb1f157de1c4ca66.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-fb1f157de1c4ca66.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/version/route-fb1f157de1c4ca66.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/version/shell-update/route-fb1f157de1c4ca66.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-fb1f157de1c4ca66.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/version/update/route-fb1f157de1c4ca66.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-227586f513028910.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/landing/page-38924391f8649361.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-fb1f157de1c4ca66.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/page-fb1f157de1c4ca66.js +1 -0
  898. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-fb1f157de1c4ca66.js +1 -0
  899. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-fb1f157de1c4ca66.js +1 -0
  900. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-fb1f157de1c4ca66.js +1 -0
  901. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-fb1f157de1c4ca66.js +1 -0
  902. package/app/.next-cli-build/static/chunks/{webpack-1adc95943fa90500.js → webpack-f1d5e73ffd2bfb73.js} +1 -1
  903. package/app/.next-cli-build/static/css/{7a3e1568f247f3d0.css → 50fcf2faa21a2f51.css} +1 -1
  904. package/app/.next-cli-build/static/css/cd8cdc4426ba0a3b.css +1 -0
  905. package/app/custom-server.js +46 -0
  906. package/app/package.json +71 -71
  907. package/app/public/i18n/changelog/en.md +42 -0
  908. package/app/public/i18n/changelog/zh-CN.md +42 -0
  909. package/app/public/i18n/changelog/zh-TW.md +42 -0
  910. package/app/public/i18n/literals/ar.json +198 -197
  911. package/app/public/i18n/literals/bn.json +198 -197
  912. package/app/public/i18n/literals/cs.json +198 -197
  913. package/app/public/i18n/literals/da.json +198 -197
  914. package/app/public/i18n/literals/de.json +198 -197
  915. package/app/public/i18n/literals/el.json +198 -197
  916. package/app/public/i18n/literals/es.json +198 -197
  917. package/app/public/i18n/literals/fi.json +198 -197
  918. package/app/public/i18n/literals/fr.json +198 -197
  919. package/app/public/i18n/literals/he.json +198 -197
  920. package/app/public/i18n/literals/hi.json +198 -197
  921. package/app/public/i18n/literals/hu.json +198 -197
  922. package/app/public/i18n/literals/id.json +198 -197
  923. package/app/public/i18n/literals/it.json +198 -197
  924. package/app/public/i18n/literals/ja.json +198 -197
  925. package/app/public/i18n/literals/ko.json +198 -197
  926. package/app/public/i18n/literals/nl.json +198 -197
  927. package/app/public/i18n/literals/no.json +198 -197
  928. package/app/public/i18n/literals/pl.json +198 -197
  929. package/app/public/i18n/literals/pt-BR.json +991 -990
  930. package/app/public/i18n/literals/pt-PT.json +198 -197
  931. package/app/public/i18n/literals/ro.json +198 -197
  932. package/app/public/i18n/literals/ru.json +198 -197
  933. package/app/public/i18n/literals/sv.json +198 -197
  934. package/app/public/i18n/literals/tl.json +198 -197
  935. package/app/public/i18n/literals/tr.json +198 -197
  936. package/app/public/i18n/literals/uk.json +198 -197
  937. package/app/public/i18n/literals/ur.json +198 -197
  938. package/app/public/i18n/literals/vi.json +198 -197
  939. package/app/public/i18n/literals/zh-CN.json +29 -5
  940. package/app/public/i18n/literals/zh-TW.json +31 -5
  941. package/app/public/providers/codiv.png +0 -0
  942. package/app/public/providers/minimax-code-global.png +0 -0
  943. package/app/public/providers/minimax-code.png +0 -0
  944. package/app/public/providers/modelscope.png +0 -0
  945. package/app/public/providers/river.png +0 -0
  946. package/app/public/providers/thx.png +0 -0
  947. package/app/src/sse/services/codebuddyCheckin.js +247 -2
  948. package/package.json +61 -61
  949. package/app/.next-cli-build/server/chunks/2120.js +0 -1
  950. package/app/.next-cli-build/server/chunks/2468.js +0 -1
  951. package/app/.next-cli-build/server/chunks/2752.js +0 -1
  952. package/app/.next-cli-build/server/chunks/2978.js +0 -1
  953. package/app/.next-cli-build/server/chunks/3659.js +0 -1
  954. package/app/.next-cli-build/server/chunks/4886.js +0 -1
  955. package/app/.next-cli-build/server/chunks/682.js +0 -1
  956. package/app/.next-cli-build/server/chunks/8675.js +0 -1
  957. package/app/.next-cli-build/server/chunks/9713.js +0 -1
  958. package/app/.next-cli-build/static/MH4bXJmhiPfMG7orS09FV/_buildManifest.js +0 -1
  959. package/app/.next-cli-build/static/chunks/1243-64d16638d3aac467.js +0 -3
  960. package/app/.next-cli-build/static/chunks/1321-1ad989ddb9bd4822.js +0 -1
  961. package/app/.next-cli-build/static/chunks/5497-a519f837339f7d19.js +0 -7
  962. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-2df49dc3be3c6b7d.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-96c6e23fdaedd167.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-e0183e527ccc2c9b.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-528e2bc2a1bb20da.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/_global-error/page-7a2b8ef7454a1a22.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7a2b8ef7454a1a22.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7a2b8ef7454a1a22.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7a2b8ef7454a1a22.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7a2b8ef7454a1a22.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7a2b8ef7454a1a22.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7a2b8ef7454a1a22.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7a2b8ef7454a1a22.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7a2b8ef7454a1a22.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7a2b8ef7454a1a22.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7a2b8ef7454a1a22.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7a2b8ef7454a1a22.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-7a2b8ef7454a1a22.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7a2b8ef7454a1a22.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7a2b8ef7454a1a22.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7a2b8ef7454a1a22.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-profiles/route-7a2b8ef7454a1a22.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7a2b8ef7454a1a22.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7a2b8ef7454a1a22.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7a2b8ef7454a1a22.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7a2b8ef7454a1a22.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7a2b8ef7454a1a22.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7a2b8ef7454a1a22.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7a2b8ef7454a1a22.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7a2b8ef7454a1a22.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7a2b8ef7454a1a22.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7a2b8ef7454a1a22.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7a2b8ef7454a1a22.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7a2b8ef7454a1a22.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7a2b8ef7454a1a22.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7a2b8ef7454a1a22.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7a2b8ef7454a1a22.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7a2b8ef7454a1a22.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7a2b8ef7454a1a22.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/combos/route-7a2b8ef7454a1a22.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/gateway-probe/route-7a2b8ef7454a1a22.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7a2b8ef7454a1a22.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7a2b8ef7454a1a22.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7a2b8ef7454a1a22.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7a2b8ef7454a1a22.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7a2b8ef7454a1a22.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7a2b8ef7454a1a22.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/health/route-7a2b8ef7454a1a22.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/init/route-7a2b8ef7454a1a22.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-7a2b8ef7454a1a22.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/keys/route-7a2b8ef7454a1a22.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/locale/route-7a2b8ef7454a1a22.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7a2b8ef7454a1a22.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7a2b8ef7454a1a22.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7a2b8ef7454a1a22.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7a2b8ef7454a1a22.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7a2b8ef7454a1a22.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7a2b8ef7454a1a22.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7a2b8ef7454a1a22.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7a2b8ef7454a1a22.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7a2b8ef7454a1a22.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-7a2b8ef7454a1a22.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-7a2b8ef7454a1a22.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7a2b8ef7454a1a22.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7a2b8ef7454a1a22.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/models/route-7a2b8ef7454a1a22.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/models/test/route-7a2b8ef7454a1a22.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-7a2b8ef7454a1a22.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7a2b8ef7454a1a22.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-7a2b8ef7454a1a22.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-7a2b8ef7454a1a22.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-7a2b8ef7454a1a22.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7a2b8ef7454a1a22.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7a2b8ef7454a1a22.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7a2b8ef7454a1a22.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7a2b8ef7454a1a22.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7a2b8ef7454a1a22.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7a2b8ef7454a1a22.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7a2b8ef7454a1a22.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7a2b8ef7454a1a22.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7a2b8ef7454a1a22.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7a2b8ef7454a1a22.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-7a2b8ef7454a1a22.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-7a2b8ef7454a1a22.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-7a2b8ef7454a1a22.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-7a2b8ef7454a1a22.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-7a2b8ef7454a1a22.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-kill/route-7a2b8ef7454a1a22.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-status/route-7a2b8ef7454a1a22.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7a2b8ef7454a1a22.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/pricing/route-7a2b8ef7454a1a22.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7a2b8ef7454a1a22.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7a2b8ef7454a1a22.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7a2b8ef7454a1a22.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7a2b8ef7454a1a22.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7a2b8ef7454a1a22.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7a2b8ef7454a1a22.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7a2b8ef7454a1a22.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/providers/route-7a2b8ef7454a1a22.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7a2b8ef7454a1a22.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7a2b8ef7454a1a22.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7a2b8ef7454a1a22.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7a2b8ef7454a1a22.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7a2b8ef7454a1a22.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7a2b8ef7454a1a22.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7a2b8ef7454a1a22.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7a2b8ef7454a1a22.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7a2b8ef7454a1a22.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7a2b8ef7454a1a22.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7a2b8ef7454a1a22.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7a2b8ef7454a1a22.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7a2b8ef7454a1a22.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7a2b8ef7454a1a22.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7a2b8ef7454a1a22.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7a2b8ef7454a1a22.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/security/status/route-7a2b8ef7454a1a22.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-7a2b8ef7454a1a22.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7a2b8ef7454a1a22.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7a2b8ef7454a1a22.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7a2b8ef7454a1a22.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/settings/route-7a2b8ef7454a1a22.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7a2b8ef7454a1a22.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/tags/route-7a2b8ef7454a1a22.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7a2b8ef7454a1a22.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7a2b8ef7454a1a22.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7a2b8ef7454a1a22.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7a2b8ef7454a1a22.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7a2b8ef7454a1a22.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7a2b8ef7454a1a22.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7a2b8ef7454a1a22.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7a2b8ef7454a1a22.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7a2b8ef7454a1a22.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7a2b8ef7454a1a22.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7a2b8ef7454a1a22.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7a2b8ef7454a1a22.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7a2b8ef7454a1a22.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7a2b8ef7454a1a22.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7a2b8ef7454a1a22.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7a2b8ef7454a1a22.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7a2b8ef7454a1a22.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-7a2b8ef7454a1a22.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7a2b8ef7454a1a22.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7a2b8ef7454a1a22.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7a2b8ef7454a1a22.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-7a2b8ef7454a1a22.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7a2b8ef7454a1a22.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7a2b8ef7454a1a22.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7a2b8ef7454a1a22.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7a2b8ef7454a1a22.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7a2b8ef7454a1a22.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7a2b8ef7454a1a22.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7a2b8ef7454a1a22.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7a2b8ef7454a1a22.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7a2b8ef7454a1a22.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7a2b8ef7454a1a22.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7a2b8ef7454a1a22.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7a2b8ef7454a1a22.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7a2b8ef7454a1a22.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-7a2b8ef7454a1a22.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7a2b8ef7454a1a22.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7a2b8ef7454a1a22.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7a2b8ef7454a1a22.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7a2b8ef7454a1a22.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/v1/route-7a2b8ef7454a1a22.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7a2b8ef7454a1a22.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7a2b8ef7454a1a22.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7a2b8ef7454a1a22.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7a2b8ef7454a1a22.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7a2b8ef7454a1a22.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7a2b8ef7454a1a22.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7a2b8ef7454a1a22.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7a2b8ef7454a1a22.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/version/route-7a2b8ef7454a1a22.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/version/shell-update/route-7a2b8ef7454a1a22.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7a2b8ef7454a1a22.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/version/update/route-7a2b8ef7454a1a22.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-3659ea13d950adc1.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/landing/page-01cca10383327c01.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7a2b8ef7454a1a22.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/page-7a2b8ef7454a1a22.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7a2b8ef7454a1a22.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7a2b8ef7454a1a22.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7a2b8ef7454a1a22.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7a2b8ef7454a1a22.js +0 -1
  1155. package/app/.next-cli-build/static/css/66cb1d1c16ed3a27.css +0 -1
  1156. /package/app/.next-cli-build/static/{MH4bXJmhiPfMG7orS09FV → 4BxfiRlz5UJXZcUl6uinS}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{43073:(e,t,i)=>{"use strict";i.d(t,{O:()=>l,l:()=>n});let s=/https:\/\/accounts\.google\.com\/signin\/continue[^\s"'<>)\]]+/;function l(e){if("string"!=typeof e)return null;let t=s.exec(e);return t?t[0]:null}let a=/https:\/\/[^\s"'<>)\]]*account\.stepfun\.com\/security[^\s"'<>)\]]*/;function n(e){if("string"!=typeof e)return null;let t=a.exec(e);return t?t[0]:null}},70217:(e,t,i)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"partial"===t?"warning":"error"===t||"expired"===t||"unavailable"===t||"needs-reauth"===t?"error":"default"}i.d(t,{g:()=>s})},83204:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>el});var s=i(95155),l=i(12115),a=i(73321),n=i(98500),r=i.n(n),o=i(5772),d=i(8247),c=i(35497),u=i(88105),m=i(28777),p=i(73006);function x(e){if("string"!=typeof e)return null;let t=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!t)return null;let i=Number(t[1]),s=Number(t[2]);return i>23||s>59?null:60*i+s}function h(e,t=Date.now()){let i;if(!e||"object"!=typeof e)return null;let s=x(e.window_start),l=x(e.window_end);if(null===s||null===l||s===l)return null;let a=e.timezone||"Asia/Singapore",n=function(e,t=Date.now()){try{let i=new Intl.DateTimeFormat("en-GB",{timeZone:e,hourCycle:"h23",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(new Date(t)),s=e=>Number(i.find(t=>t.type===e)?.value),l=s("hour"),a=s("minute"),n=s("second");if([l,a,n].some(e=>!Number.isFinite(e)))return null;return{hour:l,minute:a,second:n,secondsOfDay:3600*l+60*a+n}}catch{return null}}(a,t);if(!n)return null;let r=n.minute+60*n.hour,o=s<=l?r>=s&&r<l:r>=s||r<l;return i=o?(60*l-n.secondsOfDay+86400)%86400:(60*s-n.secondsOfDay+86400)%86400,{active:o,secondsToBoundary:i,windowLabel:`${e.window_start}–${e.window_end}`,timezone:a}}function f(e,t){return e&&"object"==typeof e&&(t&&String(t).startsWith("zh")?e.zh||e.en:e.en||e.zh)||""}function g({promotion:e}){var t;let[i,a]=(0,l.useState)(()=>Date.now());(0,l.useEffect)(()=>{let e=setInterval(()=>a(Date.now()),1e3);return()=>clearInterval(e)},[]);let n=h(e,i);if(!n)return null;let r=f(e?.badge,(0,p.kk)()),o=f(e?.description,(0,p.kk)()),d=!Number.isFinite(t=n.secondsToBoundary)||t<0?"--:--:--":[Math.floor(t/3600),Math.floor(t%3600/60),Math.floor(t%60)].map(e=>String(e).padStart(2,"0")).join(":"),c=n.active?`${(0,p.Tl)("Off-peak discount active")} \xb7 ${d} ${(0,p.Tl)("until standard rate")}`:`${d} ${(0,p.Tl)("until off-peak discount")}`;return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 rounded-[10px] bg-green-500/10 px-3 py-2 text-xs text-green-600 dark:text-green-400",title:o||void 0,children:[(0,s.jsx)("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"eco"}),(0,s.jsx)("span",{className:"font-medium",children:c}),r&&(0,s.jsxs)("span",{className:"opacity-80",children:["\xb7 ",r]}),(0,s.jsxs)("span",{className:"ml-auto font-mono opacity-60",children:[n.windowLabel," ",n.timezone]})]})}var y=i(990),b=i(62630);i(67468);let v=["none","low","medium","high"],j=["none","thinking"],w=["none","low","medium","high","xhigh","max"],k={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":w,"claude-budget":w,"gemini-level":["minimal","low","medium","high"],"gemini-budget":v,zai:j,qwen:v,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],minimax:j,hunyuan:v,step:v},N=["none","minimal","low","medium","high","xhigh","max"],T=["none","low","medium","high","max"],C=[{pattern:"*claude*4.6*",levels:T},{pattern:"*claude*4-6*",levels:T},{provider:"codex",pattern:"*gpt-6*",levels:N},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...N,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...N,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:N},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*preview*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"amd",pattern:"DeepSeek-V4-Flash*",levels:["none","minimal","low","medium","high","xhigh","max"]},{provider:"amd",pattern:"Qwen3.8-Flash-Next",levels:["none","low","medium","xhigh"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]}];function S(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let i=function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return t?{major:Number(t[1]),minor:void 0===t[2]?null:Number(t[2])}:null}(e);if(!i)return null;let{major:s,minor:l}=i;return s<4||4===s&&(null===l||l<=5||null!==l&&l>=1e3)?null:"output_config"}(t))return null;let i=(0,y.nl)(e,t);if(!i.reasoning)return null;let s=C.find(i=>(!i.provider||i.provider===e)&&(0,b.gH)(i.pattern,t)),l=s?.levels||k[i.thinkingFormat]||v;return!1===i.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var $=i(11059),A=i(929),O=i(65921);let E=new Map;async function P(e){if(!e?.url||!e?.type)return[];let t=E.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),i=await fetch(`/api/providers/suggested-models?${t}`);if(!i.ok)return[];let s=(await i.json()).data??[];return E.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}function D({customModels:e=[],modelAliases:t={},providerAlias:i,builtInModels:s=[],type:l="llm",includeLegacyAliases:a=!0}){let n=new Set(s.map(e=>e.id)),r=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==i)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||n.has(t.id))continue;let s=`${i}/${t.id}`;r.has(s)||(r.add(s),o.push({id:t.id,name:t.name||t.id,fullModel:s,source:"custom",type:e,enabled:!1!==t.enabled,...void 0===t.vision?{}:{vision:t.vision},...void 0===t.reasoning?{}:{reasoning:t.reasoning},...void 0===t.contextWindow?{}:{contextWindow:t.contextWindow},...void 0===t.maxOutput?{}:{maxOutput:t.maxOutput}}))}if(!a)return o;let d=`${i}/`;for(let[e,i]of Object.entries(t||{})){if("string"!=typeof i||!i.startsWith(d))continue;let t=i.slice(d.length);!t||n.has(t)||r.has(i)||(r.add(i),o.push({id:t,alias:e,fullModel:i,source:"legacyAlias",type:l||"llm"}))}return o}var I=i(43073),R=i(90337),M=i(14051),q=i.n(M),_=i(47650);let z=e=>{let t=Number(String(e).trim());return Number.isFinite(t)&&t>0?Math.floor(t):null};function U({label:e,builtIn:t,value:i,onChange:l,invalid:a,autoFocus:n}){return(0,s.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"flex items-baseline justify-between gap-2 text-text-muted",children:[(0,s.jsx)("span",{children:e}),t?(0,s.jsxs)("span",{className:"font-mono text-[10px] text-text-subtle",children:[(0,p.Tl)("Built-in")," ",t]}):null]}),(0,s.jsx)("input",{type:"number",min:"1",step:"1",value:i,autoFocus:n,onChange:e=>l(e.target.value),placeholder:t?String(t):(0,p.Tl)("Not set"),className:`rounded-md border bg-bg px-2 py-1.5 font-mono text-text focus:outline-none ${a?"border-red-500":"border-border focus:border-primary"}`})]})}function F({caps:e,baseCaps:t,pinned:i,label:a,onSave:n}){let[r,o]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),[u,m]=(0,l.useState)(null),[x,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(""),y=(0,l.useRef)(null),b=(0,l.useRef)(null),v=t?.contextWindow??null,j=t?.maxOutput??null,w=z(x),k=z(f),N=""!==x.trim()&&null===w,T=""!==f.trim()&&null===k,C=!d&&!N&&!T,S=(0,l.useCallback)(()=>{let e=y.current;if(!e)return;let t=e.getBoundingClientRect(),i=b.current?.offsetWidth||300,s=b.current?.offsetHeight||300,l=window.innerHeight-t.bottom-8,a=l<s&&t.top-8>l;m({left:Math.min(Math.max(8,t.right-i),Math.max(8,window.innerWidth-i-8)),top:a?void 0:t.bottom+6,bottom:a?window.innerHeight-t.top+6:void 0})},[]);(0,l.useEffect)(()=>{if(!r)return;let e=e=>{b.current?.contains(e.target)||y.current?.contains(e.target)||o(!1)},t=e=>{"Escape"===e.key&&o(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),window.addEventListener("resize",S),window.addEventListener("scroll",S,!0),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t),window.removeEventListener("resize",S),window.removeEventListener("scroll",S,!0)}},[r,S]),(0,l.useLayoutEffect)(()=>{r&&S()},[r,S]);let $=async e=>{c(!0);try{await n(e?{contextWindow:null,maxOutput:null}:{contextWindow:w,maxOutput:k}),o(!1)}finally{c(!1)}};return(0,s.jsxs)("div",{className:"relative shrink-0",children:[(0,s.jsx)("button",{ref:y,onClick:()=>{r?o(!1):(h(e?.contextWindow?String(e.contextWindow):""),g(e?.maxOutput?String(e.maxOutput):""),o(!0))},"aria-haspopup":"dialog","aria-expanded":r,className:`rounded p-0.5 transition-colors hover:bg-sidebar ${i?"text-primary":"text-text-muted hover:text-primary"}`,title:(0,p.Tl)("Model limits"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"tune"})}),r&&"u">typeof document&&(0,_.createPortal)((0,s.jsxs)("div",{ref:b,role:"dialog","aria-label":(0,p.Tl)("Model limits"),onKeyDown:e=>{"Enter"===e.key&&C&&(e.preventDefault(),$(!1))},style:{position:"fixed",width:300,left:u?.left??0,top:u?.top,bottom:u?.bottom,visibility:u?"visible":"hidden"},className:"z-50 flex flex-col gap-2.5 rounded-xl border border-border bg-surface p-3 text-xs shadow-[var(--shadow-elev)]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border-subtle pb-2",children:[(0,s.jsx)("span",{className:"min-w-0 truncate font-medium text-text",children:a||(0,p.Tl)("Model limits")}),i?(0,s.jsx)("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] text-primary",children:(0,p.Tl)("Overridden")}):null]}),(0,s.jsx)(U,{label:(0,p.Tl)("Context window"),builtIn:v,value:x,onChange:h,invalid:N,autoFocus:!0}),(0,s.jsx)(U,{label:(0,p.Tl)("Max output"),builtIn:j,value:f,onChange:g,invalid:T}),(N||T)&&(0,s.jsx)("p",{className:"text-[10px] leading-snug text-red-500",children:(0,p.Tl)("Enter a whole number greater than 0")}),null!==w&&null!==k&&k>w&&(0,s.jsx)("p",{className:"text-[10px] leading-snug text-amber-600 dark:text-amber-400",children:(0,p.Tl)("Max output is larger than the context window")}),(0,s.jsx)("p",{className:"text-[10px] leading-snug text-text-muted/70",children:(0,p.Tl)("Overrides the built-in catalog values")}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-border-subtle pt-2",children:[(0,s.jsx)("button",{className:"rounded px-2 py-1 text-text-muted hover:text-red-500 disabled:opacity-40",onClick:()=>$(!0),disabled:d||!i,children:(0,p.Tl)("Restore built-in")}),(0,s.jsx)("button",{className:"rounded bg-primary px-2.5 py-1 text-white disabled:opacity-50",onClick:()=>$(!1),disabled:!C,children:(0,p.Tl)("Save")})]})]}),document.body)]})}function L({model:e,fullModel:t,alias:i,copied:a,onCopy:n,testStatus:r,isCustom:o,isFree:d,onDeleteAlias:u,onTest:m,isTesting:x,onDisable:g,onEnable:y,caps:b,baseCaps:v,thinkingSuffix:j,onSaveCaps:w,capsPinned:k}){let N=function(){let[e,t]=(0,l.useState)(()=>new Date().getHours());return(0,l.useEffect)(()=>{let e=setInterval(()=>t(new Date().getHours()),6e4);return()=>clearInterval(e)},[]),e}(),T=j?`${t}(${j})`:t,C="number"==typeof e.rateMultiplier?e.rateMultiplier:null,S=function(e,t){if(!t||"number"!=typeof e||Number.isNaN(e))return!1;let{from:i,to:s}=t;return i<=s?e>=i&&e<s:e>=i||e<s}(N,e.nightFree),$=null!==C&&C>0&&function(e,t=Date.now()){let i=function(e){let t=e?.promoFreeUntil;if("string"!=typeof t||""===t.trim())return null;let i=Date.parse(t);return Number.isFinite(i)?i:null}(e);return null!==i&&t<i}(e),A=$?0:C,O=S||0===A,E=function(e){let[t,i]=(0,l.useState)(()=>Date.now()),s=e?`${e.window_start}|${e.window_end}|${e.timezone}`:null;return(0,l.useEffect)(()=>{if(!s)return;let e=setInterval(()=>i(Date.now()),3e4);return()=>clearInterval(e)},[s]),h(e,t)}(e.promotion),P="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:P?{color:P}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:T}),(0,s.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,s.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,s.jsx)(c.nh,{caps:b,colorOverride:"text-text-muted/70",size:12}),e.paidTier&&(0,s.jsx)(c.m_,{text:(0,p.Tl)("Not available on every plan yet — needs a paid tier, or is still rolling out"),children:(0,s.jsx)(c.Ex,{size:"sm",variant:"warning",icon:"lock",className:"shrink-0 cursor-help leading-none",children:(0,p.Tl)("Paid tier")})}),e.subPriority&&(0,s.jsx)(c.m_,{text:(0,p.Tl)("Prioritized for subscribers"),children:(0,s.jsx)(c.Ex,{size:"sm",variant:"info",icon:"bolt",className:"shrink-0 cursor-help leading-none",children:(0,p.Tl)("Sub priority")})}),(null!==A||S)&&(0,s.jsx)(c.m_,{text:S?`${(0,p.Tl)("Night-free window")} (23:00–08:00) — ${(0,p.Tl)("rides the free quota")}`:$?(0,p.Tl)("Credit multiplier")+`: ${C}x — `+(0,p.Tl)("promo free until")+` ${e.promoFreeUntil}`:0===A?(0,p.Tl)("Credit multiplier")+": 0x — "+(0,p.Tl)("rides the free quota"):(0,p.Tl)("Credit multiplier")+`: ${A}x`,children:(0,s.jsx)(c.Ex,{size:"sm",variant:O?"success":"default",className:`shrink-0 cursor-help leading-none${O?"":" font-mono"}`,children:O?"free":`${A.toFixed(2)}x`})}),E&&(0,s.jsx)(c.m_,{text:[f(e.promotion?.badge,(0,p.kk)())||(0,p.Tl)("Off-peak discount"),f(e.promotion?.description,(0,p.kk)()),`${E.windowLabel} ${E.timezone}${E.active?` — ${(0,p.Tl)("active now")}`:""}`].filter(Boolean).join(" \xb7 "),children:(0,s.jsx)(c.Ex,{size:"sm",variant:E.active?"success":"default",className:"shrink-0 cursor-help leading-none",children:(0,s.jsx)("span",{className:"material-symbols-outlined align-[-1px]",style:{fontSize:10},children:"eco"})})})]})]}),w&&(0,s.jsx)(F,{caps:b,baseCaps:v,pinned:k,label:e.name||t,onSave:w}),m&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:m,disabled:x,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${x?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:x?{animation:"spin 1s linear infinite"}:void 0,children:x?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:x?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>n(T,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),o?(0,s.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):y?(0,s.jsx)("button",{onClick:y,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-green-500/10 hover:text-green-500",title:(0,p.Tl)("Enable this model"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"})}):g?(0,s.jsx)("button",{onClick:g,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function K({modelId:e,fullModel:t,copied:i,onCopy:l,onDeleteAlias:a,onToggle:n,enabled:r=!0,onTest:o,testStatus:d,isTesting:c}){let u="ok"===d?"#22c55e":"error"===d?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===d?"border-green-500/40":"error"===d?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${r?"":"opacity-60"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:u?{color:u}:void 0,children:"ok"===d?"check_circle":"error"===d?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e}`?"Copied!":"Copy"})]}),o&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:o,disabled:c,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]})]})]}),n&&(0,s.jsx)("button",{onClick:n,className:`p-1 rounded ${r?"text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-500/10":"text-green-600 hover:bg-green-50 dark:hover:bg-green-500/10"}`,title:r?"Disable model":"Activate model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:r?"block":"restart_alt"})}),(0,s.jsx)("button",{onClick:a,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function J({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,customModels:a,copied:n,onCopy:r,onDeleteAlias:o,onAddCustomModel:d,onToggleCustomModel:u,onDeleteCustomModel:m,onBulkCustomModels:x,connections:h,isAnthropic:f}){let g=(0,O.i)(),[y,b]=(0,l.useState)(""),[v,j]=(0,l.useState)(!1),[w,k]=(0,l.useState)(!1),[N,T]=(0,l.useState)(null),[C,S]=(0,l.useState)({}),$=async t=>{if(!N){T(t);try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await i.json();S(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{S(e=>({...e,[t]:"error"}))}finally{T(null)}}},A=D({customModels:a,modelAliases:i,providerAlias:e,type:"llm"}),E=A.filter(e=>!1!==e.enabled),P=A.filter(e=>!1===e.enabled),I=async()=>{if(!y.trim()||v)return;let e=y.trim();if(A.some(t=>t.id===e))return void g.warning("Model already exists for this provider.");j(!0);try{await d(e),b("")}catch(e){console.log("Error adding model:",e)}finally{j(!1)}},R=async()=>{if(w)return;let e=h.find(e=>!1!==e.isActive);if(e){k(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void g.error(i.error||"Failed to import models");let s=i.models||[];if(0===s.length)return void g.warning("No models returned from /models.");let l=0;for(let e of s){let t=e.id||e.name||e.model;t&&(A.some(e=>e.id===t)||(await d(t,!1),l+=1))}0===l&&g.warning("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{k(!1)}}},M=h.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",f?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:y,onChange:e=>b(e.target.value),onKeyDown:e=>"Enter"===e.key&&I(),placeholder:f?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-surface focus:outline-none focus:border-primary"})]}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:I,disabled:!y.trim()||v,children:v?"Adding...":"Add"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:R,disabled:!M||w,children:w?"Importing...":"Import from /models"})]}),!M&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),A.length>0&&x&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,s.jsxs)("span",{children:[A.length," custom model",A.length>1?"s":""]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>x(!0),className:"text-primary hover:underline",children:(0,p.Tl)("Enable all")}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>x(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,p.Tl)("Disable all")}),(0,s.jsxs)("span",{children:["— ",(0,p.Tl)("bulk actions affect what clients see in /v1/models")]})]}),E.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:E.map(({id:i,alias:l,source:a})=>(0,s.jsx)(K,{modelId:i,fullModel:`${t}/${i}`,copied:n,onCopy:r,onDeleteAlias:()=>"custom"===a?m(i):o(l),onToggle:"custom"===a&&u?()=>u(i,!1):void 0,onTest:h.length>0?()=>$(i):void 0,testStatus:C[i],isTesting:N===i},`${a}-${e}/${i}`))}),P.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),P.map(({id:i,alias:l,source:a})=>(0,s.jsx)(K,{modelId:i,fullModel:`${t}/${i}`,copied:n,onCopy:r,enabled:!1,onDeleteAlias:()=>"custom"===a?m(i):o(l),onToggle:"custom"===a&&u?()=>u(i,!0):void 0,onTest:h.length>0?()=>$(i):void 0,testStatus:C[i],isTesting:N===i},`disabled-${a}-${e}/${i}`))]})]})}L.propTypes={model:q().shape({id:q().string.isRequired,rateMultiplier:q().number,paidTier:q().bool,subPriority:q().bool,promotion:q().object,nightFree:q().shape({from:q().number,to:q().number})}).isRequired,fullModel:q().string.isRequired,alias:q().string,copied:q().string,onCopy:q().func.isRequired,testStatus:q().oneOf(["ok","error"]),isCustom:q().bool,isFree:q().bool,onDeleteAlias:q().func,onTest:q().func,isTesting:q().bool,onDisable:q().func,onEnable:q().func,caps:q().object,baseCaps:q().object,thinkingSuffix:q().string,onSaveCaps:q().func,capsPinned:q().bool},q().string.isRequired,q().string.isRequired,q().string,q().func.isRequired,q().func.isRequired,q().func,q().oneOf(["ok","error"]),q().bool,q().string.isRequired,q().object.isRequired,q().arrayOf(q().object),q().string,q().func.isRequired,q().func.isRequired,q().func.isRequired,q().func.isRequired,J.propTypes={providerStorageAlias:q().string.isRequired,providerDisplayAlias:q().string.isRequired,modelAliases:q().object.isRequired,customModels:q().arrayOf(q().object),copied:q().string,onCopy:q().func.isRequired,onDeleteAlias:q().func.isRequired,onAddCustomModel:q().func.isRequired,onBulkCustomModels:q().func,onToggleCustomModel:q().func,onDeleteCustomModel:q().func.isRequired,connections:q().arrayOf(q().shape({id:q().string,isActive:q().bool})).isRequired,isAnthropic:q().bool};var W=i(70217),B=i(36109);function H({until:e,inline:t=!1}){let[i,a]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let i=Math.floor(t/1e3);if(i<60)a(`${i}s`);else if(i<3600)a(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);a(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),i)?t?(0,s.jsxs)("span",{className:"shrink-0 text-xs text-orange-500 font-mono",children:[(0,s.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",i]}):(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:[(0,s.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",i]}):null}function V({connection:e,proxyPools:t,isOAuth:i,isFirst:a,isLast:n,onMoveUp:r,onMoveDown:o,onToggleActive:d,onUpdateProxy:u,onEdit:m,onDelete:x,oneByOneStatus:h=null,autoPing:f=null}){let[g,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),j=(0,l.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,N=k?w.get(k):null,T=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!k||T,S=N?`Pool: ${N.name}`:k?`Pool: ${k} (inactive/missing)`:T?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=f?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",O="";if(N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);O=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{O=t}}let E=N?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";N?.isActive===!0?P="success":(k||T)&&(P="error"),(0,l.useEffect)(()=>{if(!g)return;let e=e=>{j.current&&!j.current.contains(e.target)&&y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let D=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),y(!1)}},M=e.authType||(i?"oauth":"apikey"),q="oauth"===M,_="cookie"===M,z=e.providerSpecificData?.authMethod,U="string"==typeof e.accessToken?e.accessToken:"",F=e.hasDesktopSession??!!e.providerSpecificData?.mimoPassToken,L=e.hasAccessToken??(U.length>0&&!U.startsWith("mimo-desktop-session")),K="desktop-session"===z||F&&!L,J=F&&L,G=!J&&!K&&"oauth"===z,Q=K||J?(0,p.Tl)("Desktop Session"):G?(0,p.Tl)("Browser sign-in"):q?"OAuth":_?"Cookie":"API Key",Y=J?(0,p.Tl)("Browser sign-in"):null,Z=e.providerSpecificData?.mimoUserId||e.providerSpecificData?.uid||null,X=("xiaomi-mimo"===e.provider||"xiaomi-tokenplan"===e.provider)&&Z?`MiMo ${Z}`:null,ee=e.name?.trim(),et=e.email?.trim(),ei=e.displayName?.trim(),es=!!(ee&&ee!==et&&(!ei||ee!==ei)),el=ee||X||et||ei||(q?"OAuth Account":_?"Cookie Account":"API Key"),ea=es?null:ee&&et&&ee!==et||X&&et&&et!==X?et:ee&&ei&&ee!==ei?ei:null,[en,er]=(0,l.useState)(()=>(0,B._)(e));(0,l.useEffect)(()=>{let t=()=>{er(t=>{let i=(0,B._)(e);return(0,B.W)(t,i)?t:i})};t();let i=Object.keys(e).some(t=>t.startsWith("modelLock_")&&e[t])?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[e]);let{state:eo,earliestUntil:ed}=en,ec="partial"===eo||"unavailable"===eo,eu="needs-reauth"===eo?(0,p.Tl)("Needs re-auth"):"partial"===eo?(0,p.Tl)("Partial"):eo,em=!1!==e.isActive?(0,I.O)(e.lastError):null,ep=!1===e.isActive||em?null:(0,I.l)(e.lastError),ex=em||ep,{copied:eh,copy:ef}=(0,$.C)(),eg=()=>h?"queued"===h.state?(0,p.Tl)("queued"):"testing"===h.state?(0,p.Tl)("testing"):"success"===h.state?(0,p.Tl)("success"):"failed"===h.state?h.error?`${(0,p.Tl)("failed")}: ${h.error}`:(0,p.Tl)("failed"):null:null;return(0,s.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.jsx)("button",{onClick:r,disabled:a,className:`p-0.5 rounded ${a?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:F?"computer":G?"login":_?"cookie":q?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:el}),ea&&(0,s.jsx)("p",{className:"text-xs text-text-muted truncate",children:ea}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(c.Ex,{variant:(0,W.g)(e.isActive,eo),size:"sm",dot:!0,children:!1===e.isActive?(0,p.Tl)("disabled"):eu||(0,p.Tl)("Unknown")}),(0,s.jsx)(c.Ex,{variant:"default",size:"sm",children:Q}),Y&&(0,s.jsx)(c.Ex,{variant:"default",size:"sm",children:Y}),C&&(0,s.jsx)(c.Ex,{variant:P,size:"sm",children:"Proxy"}),e.earliestPackageExpiry&&(0,s.jsxs)(c.Ex,{variant:"outline",size:"sm",title:`${(0,p.Tl)("Earliest package")}: ${e.earliestPackageName||(0,p.Tl)("Quota package")} (${new Date(e.earliestPackageExpiry).toLocaleString()})`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] mr-1",children:"schedule"}),function(e){if(!e)return"";let t=new Date(e).getTime()-Date.now();if(t<=0)return(0,p.Tl)("expired");let i=Math.floor(t/36e5);if(i<24)return`${i}h`;let s=Math.floor(i/24);return s<30?i%24?`${s}d ${i%24}h`:`${s}d`:new Date(e).toLocaleDateString()}(e.earliestPackageExpiry)]}),ec&&!1!==e.isActive&&!e.lastError&&(0,s.jsx)(H,{until:ed}),e.lastError&&!1!==e.isActive&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 max-w-full truncate text-xs text-red-500 sm:max-w-[380px]",title:(0,R.DY)(e.lastError),children:[ec&&(0,s.jsx)(H,{until:ed,inline:!0}),(0,R.DY)(e.lastError)]}),ex&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("a",{href:ex,target:"_blank",rel:"noopener noreferrer",title:(0,p.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"shrink-0 text-xs text-blue-500 underline hover:text-blue-400",children:(0,p.Tl)(ep?"Complete verification":"Verify your account")}),(0,s.jsx)("button",{type:"button",onClick:()=>ef(ex,"verification"),title:(0,p.Tl)("Copy link"),className:"shrink-0 text-xs text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm align-middle",children:"verification"===eh?"check":"content_copy"})})]}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),eg()&&(0,s.jsx)(c.Ex,{variant:h?"success"===h.state?"success":"failed"===h.state?"error":"testing"===h.state?"primary":"default":"default",size:"sm",children:eg()})]}),C&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),O&&(0,s.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:O}),E&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:j,children:[(0,s.jsxs)("button",{onClick:()=>y(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:b,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:b?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,s.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,s.jsx)("button",{onClick:()=>D("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>D(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),f&&(0,s.jsx)(c.m_,{text:A,children:(0,s.jsxs)("button",{onClick:()=>f.onToggle(!f.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${f.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,s.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}H.propTypes={until:q().string.isRequired,inline:q().bool},V.propTypes={connection:q().shape({id:q().string,name:q().string,email:q().string,displayName:q().string,modelLockUntil:q().string,testStatus:q().string,isActive:q().bool,lastError:q().string,priority:q().number,globalPriority:q().number}).isRequired,proxyPools:q().arrayOf(q().shape({id:q().string,name:q().string,proxyUrl:q().string,noProxy:q().string,isActive:q().bool})),isOAuth:q().bool.isRequired,isFirst:q().bool.isRequired,isLast:q().bool.isRequired,onMoveUp:q().func.isRequired,onMoveDown:q().func.isRequired,onToggleActive:q().func.isRequired,onUpdateProxy:q().func,onEdit:q().func.isRequired,onDelete:q().func.isRequired,oneByOneStatus:q().shape({state:q().string,error:q().string}),autoPing:q().shape({on:q().bool,onToggle:q().func,provider:q().string})};let G=`name1|sk-key1
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{43073:(e,t,i)=>{"use strict";i.d(t,{O:()=>l,l:()=>n});let s=/https:\/\/accounts\.google\.com\/signin\/continue[^\s"'<>)\]]+/;function l(e){if("string"!=typeof e)return null;let t=s.exec(e);return t?t[0]:null}let a=/https:\/\/[^\s"'<>)\]]*account\.stepfun\.com\/security[^\s"'<>)\]]*/;function n(e){if("string"!=typeof e)return null;let t=a.exec(e);return t?t[0]:null}},70217:(e,t,i)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"partial"===t?"warning":"error"===t||"expired"===t||"unavailable"===t||"needs-reauth"===t?"error":"default"}i.d(t,{g:()=>s})},83204:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>el});var s=i(95155),l=i(12115),a=i(73321),n=i(98500),r=i.n(n),o=i(5772),d=i(8247),c=i(35497),u=i(88105),m=i(28777),p=i(73006);function x(e){if("string"!=typeof e)return null;let t=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!t)return null;let i=Number(t[1]),s=Number(t[2]);return i>23||s>59?null:60*i+s}function h(e,t=Date.now()){let i;if(!e||"object"!=typeof e)return null;let s=x(e.window_start),l=x(e.window_end);if(null===s||null===l||s===l)return null;let a=e.timezone||"Asia/Singapore",n=function(e,t=Date.now()){try{let i=new Intl.DateTimeFormat("en-GB",{timeZone:e,hourCycle:"h23",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(new Date(t)),s=e=>Number(i.find(t=>t.type===e)?.value),l=s("hour"),a=s("minute"),n=s("second");if([l,a,n].some(e=>!Number.isFinite(e)))return null;return{hour:l,minute:a,second:n,secondsOfDay:3600*l+60*a+n}}catch{return null}}(a,t);if(!n)return null;let r=n.minute+60*n.hour,o=s<=l?r>=s&&r<l:r>=s||r<l;return i=o?(60*l-n.secondsOfDay+86400)%86400:(60*s-n.secondsOfDay+86400)%86400,{active:o,secondsToBoundary:i,windowLabel:`${e.window_start}–${e.window_end}`,timezone:a}}function f(e,t){return e&&"object"==typeof e&&(t&&String(t).startsWith("zh")?e.zh||e.en:e.en||e.zh)||""}function g({promotion:e}){var t;let[i,a]=(0,l.useState)(()=>Date.now());(0,l.useEffect)(()=>{let e=setInterval(()=>a(Date.now()),1e3);return()=>clearInterval(e)},[]);let n=h(e,i);if(!n)return null;let r=f(e?.badge,(0,p.kk)()),o=f(e?.description,(0,p.kk)()),d=!Number.isFinite(t=n.secondsToBoundary)||t<0?"--:--:--":[Math.floor(t/3600),Math.floor(t%3600/60),Math.floor(t%60)].map(e=>String(e).padStart(2,"0")).join(":"),c=n.active?`${(0,p.Tl)("Off-peak discount active")} \xb7 ${d} ${(0,p.Tl)("until standard rate")}`:`${d} ${(0,p.Tl)("until off-peak discount")}`;return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 rounded-[10px] bg-green-500/10 px-3 py-2 text-xs text-green-600 dark:text-green-400",title:o||void 0,children:[(0,s.jsx)("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"eco"}),(0,s.jsx)("span",{className:"font-medium",children:c}),r&&(0,s.jsxs)("span",{className:"opacity-80",children:["\xb7 ",r]}),(0,s.jsxs)("span",{className:"ml-auto font-mono opacity-60",children:[n.windowLabel," ",n.timezone]})]})}var y=i(990),b=i(62630);i(67468);let v=["none","low","medium","high"],j=["none","thinking"],w=["none","low","medium","high","xhigh","max"],k={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":w,"claude-budget":w,"gemini-level":["minimal","low","medium","high"],"gemini-budget":v,zai:j,qwen:v,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],minimax:j,hunyuan:v,step:v},N=["none","minimal","low","medium","high","xhigh","max"],T=["none","low","medium","high","max"],C=[{pattern:"*claude*4.6*",levels:T},{pattern:"*claude*4-6*",levels:T},{provider:"codex",pattern:"*gpt-6*",levels:N},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...N,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...N,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:N},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*preview*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"amd",pattern:"DeepSeek-V4-Flash*",levels:["none","minimal","low","medium","high","xhigh","max"]},{provider:"amd",pattern:"Qwen3.8-Flash-Next",levels:["none","low","medium","xhigh"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]}];function S(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let i=function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return t?{major:Number(t[1]),minor:void 0===t[2]?null:Number(t[2])}:null}(e);if(!i)return null;let{major:s,minor:l}=i;return s<4||4===s&&(null===l||l<=5||null!==l&&l>=1e3)?null:"output_config"}(t))return null;let i=(0,y.nl)(e,t);if(!i.reasoning)return null;let s=C.find(i=>(!i.provider||i.provider===e)&&(0,b.gH)(i.pattern,t)),l=s?.levels||k[i.thinkingFormat]||v;return!1===i.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var $=i(11059),A=i(929),O=i(65921);let E=new Map;async function P(e){if(!e?.url||!e?.type)return[];let t=E.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),i=await fetch(`/api/providers/suggested-models?${t}`);if(!i.ok)return[];let s=(await i.json()).data??[];return E.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}function D({customModels:e=[],modelAliases:t={},providerAlias:i,builtInModels:s=[],type:l="llm",includeLegacyAliases:a=!0}){let n=new Set(s.map(e=>e.id)),r=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==i)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||n.has(t.id))continue;let s=`${i}/${t.id}`;r.has(s)||(r.add(s),o.push({id:t.id,name:t.name||t.id,fullModel:s,source:"custom",type:e,enabled:!1!==t.enabled,...void 0===t.vision?{}:{vision:t.vision},...void 0===t.reasoning?{}:{reasoning:t.reasoning},...void 0===t.contextWindow?{}:{contextWindow:t.contextWindow},...void 0===t.maxOutput?{}:{maxOutput:t.maxOutput}}))}if(!a)return o;let d=`${i}/`;for(let[e,i]of Object.entries(t||{})){if("string"!=typeof i||!i.startsWith(d))continue;let t=i.slice(d.length);!t||n.has(t)||r.has(i)||(r.add(i),o.push({id:t,alias:e,fullModel:i,source:"legacyAlias",type:l||"llm"}))}return o}var I=i(43073),R=i(90337),M=i(14051),q=i.n(M),_=i(47650);let z=e=>{let t=Number(String(e).trim());return Number.isFinite(t)&&t>0?Math.floor(t):null};function U({label:e,builtIn:t,value:i,onChange:l,invalid:a,autoFocus:n}){return(0,s.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"flex items-baseline justify-between gap-2 text-text-muted",children:[(0,s.jsx)("span",{children:e}),t?(0,s.jsxs)("span",{className:"font-mono text-[10px] text-text-subtle",children:[(0,p.Tl)("Built-in")," ",t]}):null]}),(0,s.jsx)("input",{type:"number",min:"1",step:"1",value:i,autoFocus:n,onChange:e=>l(e.target.value),placeholder:t?String(t):(0,p.Tl)("Not set"),className:`rounded-md border bg-bg px-2 py-1.5 font-mono text-text focus:outline-none ${a?"border-red-500":"border-border focus:border-primary"}`})]})}function F({caps:e,baseCaps:t,pinned:i,label:a,onSave:n}){let[r,o]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),[u,m]=(0,l.useState)(null),[x,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(""),y=(0,l.useRef)(null),b=(0,l.useRef)(null),v=t?.contextWindow??null,j=t?.maxOutput??null,w=z(x),k=z(f),N=""!==x.trim()&&null===w,T=""!==f.trim()&&null===k,C=!d&&!N&&!T,S=(0,l.useCallback)(()=>{let e=y.current;if(!e)return;let t=e.getBoundingClientRect(),i=b.current?.offsetWidth||300,s=b.current?.offsetHeight||300,l=window.innerHeight-t.bottom-8,a=l<s&&t.top-8>l;m({left:Math.min(Math.max(8,t.right-i),Math.max(8,window.innerWidth-i-8)),top:a?void 0:t.bottom+6,bottom:a?window.innerHeight-t.top+6:void 0})},[]);(0,l.useEffect)(()=>{if(!r)return;let e=e=>{b.current?.contains(e.target)||y.current?.contains(e.target)||o(!1)},t=e=>{"Escape"===e.key&&o(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),window.addEventListener("resize",S),window.addEventListener("scroll",S,!0),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t),window.removeEventListener("resize",S),window.removeEventListener("scroll",S,!0)}},[r,S]),(0,l.useLayoutEffect)(()=>{r&&S()},[r,S]);let $=async e=>{c(!0);try{await n(e?{contextWindow:null,maxOutput:null}:{contextWindow:w,maxOutput:k}),o(!1)}finally{c(!1)}};return(0,s.jsxs)("div",{className:"relative shrink-0",children:[(0,s.jsx)("button",{ref:y,onClick:()=>{r?o(!1):(h(e?.contextWindow?String(e.contextWindow):""),g(e?.maxOutput?String(e.maxOutput):""),o(!0))},"aria-haspopup":"dialog","aria-expanded":r,className:`rounded p-0.5 transition-colors hover:bg-sidebar ${i?"text-primary":"text-text-muted hover:text-primary"}`,title:(0,p.Tl)("Model limits"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"tune"})}),r&&"u">typeof document&&(0,_.createPortal)((0,s.jsxs)("div",{ref:b,role:"dialog","aria-label":(0,p.Tl)("Model limits"),onKeyDown:e=>{"Enter"===e.key&&C&&(e.preventDefault(),$(!1))},style:{position:"fixed",width:300,left:u?.left??0,top:u?.top,bottom:u?.bottom,visibility:u?"visible":"hidden"},className:"z-50 flex flex-col gap-2.5 rounded-xl border border-border bg-surface p-3 text-xs shadow-[var(--shadow-elev)]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border-subtle pb-2",children:[(0,s.jsx)("span",{className:"min-w-0 truncate font-medium text-text",children:a||(0,p.Tl)("Model limits")}),i?(0,s.jsx)("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] text-primary",children:(0,p.Tl)("Overridden")}):null]}),(0,s.jsx)(U,{label:(0,p.Tl)("Context window"),builtIn:v,value:x,onChange:h,invalid:N,autoFocus:!0}),(0,s.jsx)(U,{label:(0,p.Tl)("Max output"),builtIn:j,value:f,onChange:g,invalid:T}),(N||T)&&(0,s.jsx)("p",{className:"text-[10px] leading-snug text-red-500",children:(0,p.Tl)("Enter a whole number greater than 0")}),null!==w&&null!==k&&k>w&&(0,s.jsx)("p",{className:"text-[10px] leading-snug text-amber-600 dark:text-amber-400",children:(0,p.Tl)("Max output is larger than the context window")}),(0,s.jsx)("p",{className:"text-[10px] leading-snug text-text-muted/70",children:(0,p.Tl)("Overrides the built-in catalog values")}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-border-subtle pt-2",children:[(0,s.jsx)("button",{className:"rounded px-2 py-1 text-text-muted hover:text-red-500 disabled:opacity-40",onClick:()=>$(!0),disabled:d||!i,children:(0,p.Tl)("Restore built-in")}),(0,s.jsx)("button",{className:"rounded bg-primary px-2.5 py-1 text-white disabled:opacity-50",onClick:()=>$(!1),disabled:!C,children:(0,p.Tl)("Save")})]})]}),document.body)]})}function L({model:e,fullModel:t,alias:i,copied:a,onCopy:n,testStatus:r,isCustom:o,isFree:d,onDeleteAlias:u,onTest:m,isTesting:x,onDisable:g,onEnable:y,caps:b,baseCaps:v,thinkingSuffix:j,onSaveCaps:w,capsPinned:k}){let N=function(){let[e,t]=(0,l.useState)(()=>new Date().getHours());return(0,l.useEffect)(()=>{let e=setInterval(()=>t(new Date().getHours()),6e4);return()=>clearInterval(e)},[]),e}(),T=j?`${t}(${j})`:t,C="number"==typeof e.rateMultiplier?e.rateMultiplier:null,S=function(e,t){if(!t||"number"!=typeof e||Number.isNaN(e))return!1;let{from:i,to:s}=t;return i<=s?e>=i&&e<s:e>=i||e<s}(N,e.nightFree),$=null!==C&&C>0&&function(e,t=Date.now()){let i=function(e){let t=e?.promoFreeUntil;if("string"!=typeof t||""===t.trim())return null;let i=Date.parse(t);return Number.isFinite(i)?i:null}(e);return null!==i&&t<i}(e),A=$?0:C,O=S||0===A,E=function(e){let[t,i]=(0,l.useState)(()=>Date.now()),s=e?`${e.window_start}|${e.window_end}|${e.timezone}`:null;return(0,l.useEffect)(()=>{if(!s)return;let e=setInterval(()=>i(Date.now()),3e4);return()=>clearInterval(e)},[s]),h(e,t)}(e.promotion),P="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:P?{color:P}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:T}),(0,s.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,s.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,s.jsx)(c.nh,{caps:b,colorOverride:"text-text-muted/70",size:12}),e.paidTier&&(0,s.jsx)(c.m_,{text:(0,p.Tl)("Not available on every plan yet — needs a paid tier, or is still rolling out"),children:(0,s.jsx)(c.Ex,{size:"xs",variant:"warning",icon:"lock",className:"shrink-0 cursor-help leading-none",children:(0,p.Tl)("Paid tier")})}),e.subPriority&&(0,s.jsx)(c.m_,{text:(0,p.Tl)("Prioritized for subscribers"),children:(0,s.jsx)(c.Ex,{size:"xs",variant:"info",icon:"bolt",className:"shrink-0 cursor-help leading-none",children:(0,p.Tl)("Sub priority")})}),(null!==A||S)&&(0,s.jsx)(c.m_,{text:S?`${(0,p.Tl)("Night-free window")} (23:00–08:00) — ${(0,p.Tl)("rides the free quota")}`:$?(0,p.Tl)("Credit multiplier")+`: ${C}x — `+(0,p.Tl)("promo free until")+` ${e.promoFreeUntil}`:0===A?(0,p.Tl)("Credit multiplier")+": 0x — "+(0,p.Tl)("rides the free quota"):(0,p.Tl)("Credit multiplier")+`: ${A}x`,children:(0,s.jsx)(c.Ex,{size:"sm",variant:O?"success":"default",className:`shrink-0 cursor-help leading-none${O?"":" font-mono"}`,children:O?"free":`${A.toFixed(2)}x`})}),E&&(0,s.jsx)(c.m_,{text:[f(e.promotion?.badge,(0,p.kk)())||(0,p.Tl)("Off-peak discount"),f(e.promotion?.description,(0,p.kk)()),`${E.windowLabel} ${E.timezone}${E.active?` — ${(0,p.Tl)("active now")}`:""}`].filter(Boolean).join(" \xb7 "),children:(0,s.jsx)(c.Ex,{size:"sm",variant:E.active?"success":"default",className:"shrink-0 cursor-help leading-none",children:(0,s.jsx)("span",{className:"material-symbols-outlined align-[-1px]",style:{fontSize:10},children:"eco"})})})]})]}),w&&(0,s.jsx)(F,{caps:b,baseCaps:v,pinned:k,label:e.name||t,onSave:w}),m&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:m,disabled:x,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${x?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:x?{animation:"spin 1s linear infinite"}:void 0,children:x?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:x?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>n(T,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),o?(0,s.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):y?(0,s.jsx)("button",{onClick:y,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-green-500/10 hover:text-green-500",title:(0,p.Tl)("Enable this model"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"})}):g?(0,s.jsx)("button",{onClick:g,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function K({modelId:e,fullModel:t,copied:i,onCopy:l,onDeleteAlias:a,onToggle:n,enabled:r=!0,onTest:o,testStatus:d,isTesting:c}){let u="ok"===d?"#22c55e":"error"===d?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===d?"border-green-500/40":"error"===d?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${r?"":"opacity-60"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:u?{color:u}:void 0,children:"ok"===d?"check_circle":"error"===d?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e}`?"Copied!":"Copy"})]}),o&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:o,disabled:c,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]})]})]}),n&&(0,s.jsx)("button",{onClick:n,className:`p-1 rounded ${r?"text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-500/10":"text-green-600 hover:bg-green-50 dark:hover:bg-green-500/10"}`,title:r?"Disable model":"Activate model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:r?"block":"restart_alt"})}),(0,s.jsx)("button",{onClick:a,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function J({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:i,customModels:a,copied:n,onCopy:r,onDeleteAlias:o,onAddCustomModel:d,onToggleCustomModel:u,onDeleteCustomModel:m,onBulkCustomModels:x,connections:h,isAnthropic:f}){let g=(0,O.i)(),[y,b]=(0,l.useState)(""),[v,j]=(0,l.useState)(!1),[w,k]=(0,l.useState)(!1),[N,T]=(0,l.useState)(null),[C,S]=(0,l.useState)({}),$=async t=>{if(!N){T(t);try{let i=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await i.json();S(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{S(e=>({...e,[t]:"error"}))}finally{T(null)}}},A=D({customModels:a,modelAliases:i,providerAlias:e,type:"llm"}),E=A.filter(e=>!1!==e.enabled),P=A.filter(e=>!1===e.enabled),I=async()=>{if(!y.trim()||v)return;let e=y.trim();if(A.some(t=>t.id===e))return void g.warning("Model already exists for this provider.");j(!0);try{await d(e),b("")}catch(e){console.log("Error adding model:",e)}finally{j(!1)}},R=async()=>{if(w)return;let e=h.find(e=>!1!==e.isActive);if(e){k(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void g.error(i.error||"Failed to import models");let s=i.models||[];if(0===s.length)return void g.warning("No models returned from /models.");let l=0;for(let e of s){let t=e.id||e.name||e.model;t&&(A.some(e=>e.id===t)||(await d(t,!1),l+=1))}0===l&&g.warning("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{k(!1)}}},M=h.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",f?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:y,onChange:e=>b(e.target.value),onKeyDown:e=>"Enter"===e.key&&I(),placeholder:f?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-surface focus:outline-none focus:border-primary"})]}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:I,disabled:!y.trim()||v,children:v?"Adding...":"Add"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:R,disabled:!M||w,children:w?"Importing...":"Import from /models"})]}),!M&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),A.length>0&&x&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,s.jsxs)("span",{children:[A.length," custom model",A.length>1?"s":""]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>x(!0),className:"text-primary hover:underline",children:(0,p.Tl)("Enable all")}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>x(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,p.Tl)("Disable all")}),(0,s.jsxs)("span",{children:["— ",(0,p.Tl)("bulk actions affect what clients see in /v1/models")]})]}),E.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:E.map(({id:i,alias:l,source:a})=>(0,s.jsx)(K,{modelId:i,fullModel:`${t}/${i}`,copied:n,onCopy:r,onDeleteAlias:()=>"custom"===a?m(i):o(l),onToggle:"custom"===a&&u?()=>u(i,!1):void 0,onTest:h.length>0?()=>$(i):void 0,testStatus:C[i],isTesting:N===i},`${a}-${e}/${i}`))}),P.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),P.map(({id:i,alias:l,source:a})=>(0,s.jsx)(K,{modelId:i,fullModel:`${t}/${i}`,copied:n,onCopy:r,enabled:!1,onDeleteAlias:()=>"custom"===a?m(i):o(l),onToggle:"custom"===a&&u?()=>u(i,!0):void 0,onTest:h.length>0?()=>$(i):void 0,testStatus:C[i],isTesting:N===i},`disabled-${a}-${e}/${i}`))]})]})}L.propTypes={model:q().shape({id:q().string.isRequired,rateMultiplier:q().number,paidTier:q().bool,subPriority:q().bool,promotion:q().object,nightFree:q().shape({from:q().number,to:q().number})}).isRequired,fullModel:q().string.isRequired,alias:q().string,copied:q().string,onCopy:q().func.isRequired,testStatus:q().oneOf(["ok","error"]),isCustom:q().bool,isFree:q().bool,onDeleteAlias:q().func,onTest:q().func,isTesting:q().bool,onDisable:q().func,onEnable:q().func,caps:q().object,baseCaps:q().object,thinkingSuffix:q().string,onSaveCaps:q().func,capsPinned:q().bool},q().string.isRequired,q().string.isRequired,q().string,q().func.isRequired,q().func.isRequired,q().func,q().oneOf(["ok","error"]),q().bool,q().string.isRequired,q().object.isRequired,q().arrayOf(q().object),q().string,q().func.isRequired,q().func.isRequired,q().func.isRequired,q().func.isRequired,J.propTypes={providerStorageAlias:q().string.isRequired,providerDisplayAlias:q().string.isRequired,modelAliases:q().object.isRequired,customModels:q().arrayOf(q().object),copied:q().string,onCopy:q().func.isRequired,onDeleteAlias:q().func.isRequired,onAddCustomModel:q().func.isRequired,onBulkCustomModels:q().func,onToggleCustomModel:q().func,onDeleteCustomModel:q().func.isRequired,connections:q().arrayOf(q().shape({id:q().string,isActive:q().bool})).isRequired,isAnthropic:q().bool};var W=i(70217),B=i(36109);function H({until:e,inline:t=!1}){let[i,a]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let i=Math.floor(t/1e3);if(i<60)a(`${i}s`);else if(i<3600)a(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);a(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),i)?t?(0,s.jsxs)("span",{className:"shrink-0 text-xs text-orange-500 font-mono",children:[(0,s.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",i]}):(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:[(0,s.jsx)("span",{className:"text-[0.85em] leading-none",children:"⏱"})," ",i]}):null}function V({connection:e,proxyPools:t,isOAuth:i,isFirst:a,isLast:n,onMoveUp:r,onMoveDown:o,onToggleActive:d,onUpdateProxy:u,onEdit:m,onDelete:x,oneByOneStatus:h=null,autoPing:f=null}){let[g,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),j=(0,l.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,N=k?w.get(k):null,T=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!k||T,S=N?`Pool: ${N.name}`:k?`Pool: ${k} (inactive/missing)`:T?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=f?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",O="";if(N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);O=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{O=t}}let E=N?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";N?.isActive===!0?P="success":(k||T)&&(P="error"),(0,l.useEffect)(()=>{if(!g)return;let e=e=>{j.current&&!j.current.contains(e.target)&&y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let D=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),y(!1)}},M=e.authType||(i?"oauth":"apikey"),q="oauth"===M,_="cookie"===M,z=e.providerSpecificData?.authMethod,U="string"==typeof e.accessToken?e.accessToken:"",F=e.hasDesktopSession??!!e.providerSpecificData?.mimoPassToken,L=e.hasAccessToken??(U.length>0&&!U.startsWith("mimo-desktop-session")),K="desktop-session"===z||F&&!L,J=F&&L,G=!J&&!K&&"oauth"===z,Q=K||J?(0,p.Tl)("Desktop Session"):G?(0,p.Tl)("Browser sign-in"):q?"OAuth":_?"Cookie":"API Key",Y=J?(0,p.Tl)("Browser sign-in"):null,Z=e.providerSpecificData?.mimoUserId||e.providerSpecificData?.uid||null,X=("xiaomi-mimo"===e.provider||"xiaomi-tokenplan"===e.provider)&&Z?`MiMo ${Z}`:null,ee=e.name?.trim(),et=e.email?.trim(),ei=e.displayName?.trim(),es=!!(ee&&ee!==et&&(!ei||ee!==ei)),el=ee||X||et||ei||(q?"OAuth Account":_?"Cookie Account":"API Key"),ea=es?null:ee&&et&&ee!==et||X&&et&&et!==X?et:ee&&ei&&ee!==ei?ei:null,[en,er]=(0,l.useState)(()=>(0,B._)(e));(0,l.useEffect)(()=>{let t=()=>{er(t=>{let i=(0,B._)(e);return(0,B.W)(t,i)?t:i})};t();let i=Object.keys(e).some(t=>t.startsWith("modelLock_")&&e[t])?setInterval(t,1e3):null;return()=>{i&&clearInterval(i)}},[e]);let{state:eo,earliestUntil:ed}=en,ec="partial"===eo||"unavailable"===eo,eu="needs-reauth"===eo?(0,p.Tl)("Needs re-auth"):"partial"===eo?(0,p.Tl)("Partial"):eo,em=!1!==e.isActive?(0,I.O)(e.lastError):null,ep=!1===e.isActive||em?null:(0,I.l)(e.lastError),ex=em||ep,{copied:eh,copy:ef}=(0,$.C)(),eg=()=>h?"queued"===h.state?(0,p.Tl)("queued"):"testing"===h.state?(0,p.Tl)("testing"):"success"===h.state?(0,p.Tl)("success"):"failed"===h.state?h.error?`${(0,p.Tl)("failed")}: ${h.error}`:(0,p.Tl)("failed"):null:null;return(0,s.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.jsx)("button",{onClick:r,disabled:a,className:`p-0.5 rounded ${a?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:F?"computer":G?"login":_?"cookie":q?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:el}),ea&&(0,s.jsx)("p",{className:"text-xs text-text-muted truncate",children:ea}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(c.Ex,{variant:(0,W.g)(e.isActive,eo),size:"sm",dot:!0,children:!1===e.isActive?(0,p.Tl)("disabled"):eu||(0,p.Tl)("Unknown")}),(0,s.jsx)(c.Ex,{variant:"default",size:"sm",children:Q}),Y&&(0,s.jsx)(c.Ex,{variant:"default",size:"sm",children:Y}),C&&(0,s.jsx)(c.Ex,{variant:P,size:"sm",children:"Proxy"}),e.earliestPackageExpiry&&(0,s.jsxs)(c.Ex,{variant:"outline",size:"sm",title:`${(0,p.Tl)("Earliest package")}: ${e.earliestPackageName||(0,p.Tl)("Quota package")} (${new Date(e.earliestPackageExpiry).toLocaleString()})`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] mr-1",children:"schedule"}),function(e){if(!e)return"";let t=new Date(e).getTime()-Date.now();if(t<=0)return(0,p.Tl)("expired");let i=Math.floor(t/36e5);if(i<24)return`${i}h`;let s=Math.floor(i/24);return s<30?i%24?`${s}d ${i%24}h`:`${s}d`:new Date(e).toLocaleDateString()}(e.earliestPackageExpiry)]}),ec&&!1!==e.isActive&&!e.lastError&&(0,s.jsx)(H,{until:ed}),e.lastError&&!1!==e.isActive&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 max-w-full truncate text-xs text-red-500 sm:max-w-[380px]",title:(0,R.DY)(e.lastError),children:[ec&&(0,s.jsx)(H,{until:ed,inline:!0}),(0,R.DY)(e.lastError)]}),ex&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("a",{href:ex,target:"_blank",rel:"noopener noreferrer",title:(0,p.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"shrink-0 text-xs text-blue-500 underline hover:text-blue-400",children:(0,p.Tl)(ep?"Complete verification":"Verify your account")}),(0,s.jsx)("button",{type:"button",onClick:()=>ef(ex,"verification"),title:(0,p.Tl)("Copy link"),className:"shrink-0 text-xs text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm align-middle",children:"verification"===eh?"check":"content_copy"})})]}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),eg()&&(0,s.jsx)(c.Ex,{variant:h?"success"===h.state?"success":"failed"===h.state?"error":"testing"===h.state?"primary":"default":"default",size:"sm",children:eg()})]}),C&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),O&&(0,s.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:O}),E&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:j,children:[(0,s.jsxs)("button",{onClick:()=>y(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:b,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:b?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,s.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,s.jsx)("button",{onClick:()=>D("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>D(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),f&&(0,s.jsx)(c.m_,{text:A,children:(0,s.jsxs)("button",{onClick:()=>f.onToggle(!f.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${f.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,s.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}H.propTypes={until:q().string.isRequired,inline:q().bool},V.propTypes={connection:q().shape({id:q().string,name:q().string,email:q().string,displayName:q().string,modelLockUntil:q().string,testStatus:q().string,isActive:q().bool,lastError:q().string,priority:q().number,globalPriority:q().number}).isRequired,proxyPools:q().arrayOf(q().shape({id:q().string,name:q().string,proxyUrl:q().string,noProxy:q().string,isActive:q().bool})),isOAuth:q().bool.isRequired,isFirst:q().bool.isRequired,isLast:q().bool.isRequired,onMoveUp:q().func.isRequired,onMoveDown:q().func.isRequired,onToggleActive:q().func.isRequired,onUpdateProxy:q().func,onEdit:q().func.isRequired,onDelete:q().func.isRequired,oneByOneStatus:q().shape({state:q().string,error:q().string}),autoPing:q().shape({on:q().bool,onToggle:q().func,provider:q().string})};let G=`name1|sk-key1
2
2
  name2|sk-key2
3
3
  sk-key-only-auto-named`;function Q({isOpen:e,provider:t,providerName:i,isCompatible:a,isAnthropic:n,authType:r,authHint:o,website:d,proxyPools:m,error:x,existingNames:h,onSave:f,onBulkDone:g,onClose:y}){let b="__none__",v="ollama-local"===t,j="cookie"===r,w="xai"===t&&!j,k=j?"Cookie Value":"qoder"===t?"Personal Access Token (PAT)":"API Key",N="azure"===t,T="cloudflare-ai"===t,C=u.Q2?.[t]?.regions||null,S=u.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[$,A]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:b,ollamaHostUrl:""}),[O,E]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[P,D]=(0,l.useState)({accountId:""}),[I,R]=(0,l.useState)(S),[M,q]=(0,l.useState)(!1),[_,z]=(0,l.useState)(null),[U,F]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(e&&C&&!M){let e=!0;return fetch("/api/network/egress-region").then(e=>e.json()).then(i=>{if(!e)return;let s=i?.recommendedRegions?.[t];s&&C.some(e=>e.id===s)&&(R(s),z({country:i.country||i.countryCode,regionId:s}))}).catch(()=>{}),()=>{e=!1}}},[e,t,C,M]);let[L,K]=(0,l.useState)(null),[J,W]=(0,l.useState)(null),[B,H]=(0,l.useState)(!1),[V,Y]=(0,l.useState)(!1),Z=T?`name1|sk-key1|acc123456
4
4
  name2|sk-key2|def789012
@@ -11,4 +11,4 @@ pt-only-auto-named`:G,[X,ee]=(0,l.useState)("single"),[et,ei]=(0,l.useState)("")
11
11
  "idToken": "eyJhbGc...",
12
12
  "email": "user@example.com"
13
13
  }
14
- ]`;function ee({isOpen:e,onClose:t,onSuccess:i}){let[a,n]=(0,l.useState)(""),[r,o]=(0,l.useState)(!1),[d,u]=(0,l.useState)(""),[m,x]=(0,l.useState)(null),h=()=>{r||(n(""),u(""),x(null),t())},f=async()=>{var e;let t;u(""),x(null);let s=a.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){u(`${(0,p.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void u((0,p.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void u(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof i&&i()}catch(e){u(e.message||(0,p.Tl)("Request failed"))}finally{o(!1)}},g=m?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(c.aF,{isOpen:e,title:(0,p.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,p.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:X,value:a,onChange:e=>n(e.target.value),disabled:r}),d&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,p.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,p.Tl)("failed")}`:""]}),g.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:f,fullWidth:!0,disabled:r||!a.trim(),children:r?(0,p.Tl)("Importing..."):(0,p.Tl)("Import All")}),(0,s.jsx)(c.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:r,children:(0,p.Tl)("Close")})]})]})})}function et({isOpen:e,onClose:t,onSuccess:i,password:a=""}){let[n,r]=(0,l.useState)(""),[o,d]=(0,l.useState)(""),[u,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(null),y=(0,l.useRef)(null),b=()=>{u||(r(""),d(""),h(""),g(null),y.current&&(y.current.value=""),t())},v=async()=>{let e;h(""),g(null);let t=n.trim();if(!t)return;try{e=JSON.parse(t)}catch(e){h(`${(0,p.Tl)("Invalid JSON")}: ${e.message}`);return}let s=Array.isArray(e)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!s||0===s.length)return void h((0,p.Tl)("No accounts found in input"));m(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/bulk-import",{method:"POST",headers:{"Content-Type":"application/json",...a?{"x-10r-password":a}:{}},body:JSON.stringify({accounts:s})}),t=await e.json();if(!e.ok)return void h(401===e.status?(0,p.Tl)("Invalid password"):t?.error||`Request failed: ${e.status}`);g(t),(t.imported>0||t.updated>0)&&"function"==typeof i&&i()}catch(e){h(e.message||(0,p.Tl)("Request failed"))}finally{m(!1)}},j=f?.results?.filter(e=>!e.ok)||[],w=f?.skipped??0;return(0,s.jsx)(c.aF,{isOpen:e,title:(0,p.Tl)("Import CodeBuddy CN Accounts"),onClose:b,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.$n,{variant:"secondary",fullWidth:!0,icon:"upload_file",onClick:()=>y.current?.click(),disabled:u,children:o||(0,p.Tl)("Choose JSON file...")}),(0,s.jsx)("input",{ref:y,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;d(t.name),h(""),g(null);let i=new FileReader;i.onload=()=>r(String(i.result||"")),i.onerror=()=>h((0,p.Tl)("Failed to read file")),i.readAsText(t)}})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"absolute -top-2 left-2 bg-sidebar px-1 text-[10px] text-text-muted",children:(0,p.Tl)("Or paste JSON")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 pt-4 text-sm font-mono resize-y min-h-[160px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:'[{ "access_token": "eyJ...", "refresh_token": "eyJ...", "nickname": "<nickname>" }]',value:n,onChange:e=>r(e.target.value),disabled:u})]}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),f&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${f.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",f.imported," ",(0,p.Tl)("added"),", ",f.updated," ",(0,p.Tl)("updated"),w>0?`, ${w} ${(0,p.Tl)("skipped")}`:"",f.failed>0?`, ✗ ${f.failed} ${(0,p.Tl)("failed")}`:""]}),j.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:j.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:u||!n.trim(),children:u?(0,p.Tl)("Importing..."):(0,p.Tl)("Import All")}),(0,s.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:u,children:(0,p.Tl)("Close")})]})]})})}function ei({isOpen:e,mode:t,provider:i,providerName:a,dashboardPassword:n,onClose:r,onSuccess:o}){let[d,u]=(0,l.useState)(""),[m,x]=(0,l.useState)(""),[h,f]=(0,l.useState)(!1),[g,y]=(0,l.useState)(""),[b,v]=(0,l.useState)(null),[j,w]=(0,l.useState)(""),[k,N]=(0,l.useState)(null),T=(0,l.useRef)(null),C=(0,l.useRef)(null),S=e=>{clearTimeout(C.current),C.current=setTimeout(()=>{C.current=null,$(),r()},e)};(0,l.useEffect)(()=>()=>clearTimeout(C.current),[]);let $=()=>{u(""),x(""),f(!1),y(""),v(null),w(""),N(null),T.current&&(T.current.value="")},A={"Content-Type":"application/json","x-10r-password":n||""},O=async()=>{if(y(""),v(null),clearTimeout(C.current),d.length<4)return void y((0,p.Tl)("Passphrase must be at least 4 characters"));if(d!==m)return void y((0,p.Tl)("Passphrases do not match"));f(!0);try{let e=await fetch("/api/oauth/transfer/export",{method:"POST",headers:A,body:JSON.stringify({provider:i,passphrase:d})}),t=await e.json();if(!e.ok)throw Error((0,p.Tl)(t?.error)||`Request failed: ${e.status}`);let s=JSON.stringify(t.blob,null,2),l=URL.createObjectURL(new Blob([s],{type:"application/json"})),a=document.createElement("a");a.href=l,a.download=`oauth-${i}-transfer-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(l),1e3),v({exported:t.count}),S(1200)}catch(e){y(e.message||(0,p.Tl)("Export failed"))}finally{f(!1)}},E=async()=>{if(y(""),v(null),clearTimeout(C.current),!k)return void y((0,p.Tl)("Pick a transfer file first"));if(!d)return void y((0,p.Tl)("Transfer passphrase required"));f(!0);try{let e=await fetch("/api/oauth/transfer/import",{method:"POST",headers:A,body:JSON.stringify({provider:i,passphrase:d,blob:k})}),t=await e.json();if(!e.ok){if(401===e.status&&/passphrase/i.test(t?.error||""))throw Error((0,p.Tl)("Wrong passphrase"));throw Error((0,p.Tl)(t?.error)||`Request failed: ${e.status}`)}v(t),"function"==typeof o&&o(),!((t?.webSessions?.failed||0)>0)&&(t?.imported||0)+(t?.updated||0)>0&&S(1800)}catch(e){y(e.message||(0,p.Tl)("Import failed"))}finally{f(!1)}};return(0,s.jsx)(c.aF,{isOpen:e,title:"export"===t?(0,p.Tl)("Export OAuth accounts"):(0,p.Tl)("Import OAuth accounts"),onClose:()=>{h||(clearTimeout(C.current),C.current=null,$(),r())},children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,p.Tl)("Provider"),": ",(0,s.jsx)("span",{className:"font-medium text-text-main",children:a||i})]}),"export"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.pd,{type:"password",reveal:!0,label:(0,p.Tl)("Transfer passphrase"),value:d,onChange:e=>u(e.target.value),placeholder:"••••••••"}),(0,s.jsx)(c.pd,{type:"password",reveal:!0,label:(0,p.Tl)("Confirm passphrase"),value:m,onChange:e=>x(e.target.value),placeholder:"••••••••"})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,p.Tl)("The file is encrypted with this passphrase — it is required again at import, and cannot be recovered.")}),g&&(0,s.jsx)("p",{className:"text-xs text-red-500",children:g}),b&&(0,s.jsxs)("p",{className:"text-xs text-green-600",children:[(0,p.Tl)("Export complete")," — ",b.exported," ",(0,p.Tl)("accounts exported")]}),(0,s.jsx)(c.$n,{onClick:O,disabled:h,fullWidth:!0,children:(0,p.Tl)("Export encrypted file")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.pd,{label:(0,p.Tl)("Transfer file"),value:j,readOnly:!0,placeholder:(0,p.Tl)("Pick a transfer file first"),className:"cursor-pointer",onClick:()=>T.current?.click()}),(0,s.jsx)("input",{ref:T,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;w(t.name),y(""),v(null);let i=new FileReader;i.onload=()=>{try{let e=JSON.parse(String(i.result||""));if(e?.format!=="10router-oauth-secure-v1"){y((0,p.Tl)("Unrecognized transfer file (expected an encrypted OAuth transfer)")),N(null);return}N(e)}catch(e){y(`${(0,p.Tl)("Invalid JSON")}: ${e.message}`),N(null)}},i.onerror=()=>y((0,p.Tl)("Failed to read file")),i.readAsText(t)}}),(0,s.jsx)(c.pd,{type:"password",reveal:!0,label:(0,p.Tl)("Transfer passphrase"),value:d,onChange:e=>u(e.target.value),placeholder:"••••••••"}),g&&(0,s.jsx)("p",{className:"text-xs text-red-500",children:g}),b&&(0,s.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,s.jsxs)("p",{children:[(0,p.Tl)("Import complete"),": ",b.imported||0," ",(0,p.Tl)("imported"),", ",b.updated||0," ",(0,p.Tl)("updated"),(b.failed||0)>0?`, ${b.failed} ${(0,p.Tl)("failed")}`:""]}),b.webSessions?.failed>0&&(0,s.jsxs)("p",{className:"mt-1 text-amber-600 dark:text-amber-400",children:[(0,p.Tl)("Web session check failed for"),": ",b.webSessions.failures.map(e=>e.name).join(", ")]}),b.webSessions?.checked>0&&0===b.webSessions.failed&&(0,s.jsxs)("p",{className:"mt-1 text-green-600",children:[(0,p.Tl)("Web sessions verified"),": ",b.webSessions.ok,"/",b.webSessions.checked]})]}),(0,s.jsx)(c.$n,{onClick:E,disabled:h,fullWidth:!0,children:(0,p.Tl)("Import connections")})]})]})})}ee.propTypes={isOpen:q().bool.isRequired,onClose:q().func.isRequired,onSuccess:q().func},et.propTypes={isOpen:q().bool.isRequired,onClose:q().func.isRequired,onSuccess:q().func,password:q().string},ei.propTypes={isOpen:q().bool.isRequired,mode:q().oneOf(["export","import"]).isRequired,provider:q().string.isRequired,providerName:q().string,dashboardPassword:q().string,onClose:q().func.isRequired,onSuccess:q().func};let es={claude:"claudeAutoPing",codex:"codexAutoPing"};function el(){let e,t,i,n,x,h,f,y,b=(0,a.useParams)(),v=(0,a.useRouter)(),j=b.id,{getCaps:w,getBaseCaps:k,overrides:N,refresh:T}=(0,A.yU)(),C=(0,O.i)(),[E,M]=(0,l.useState)([]),[q,_]=(0,l.useState)(!0),[z,U]=(0,l.useState)(null),[F,K]=(0,l.useState)([]),[W,B]=(0,l.useState)(!1),[H,G]=(0,l.useState)(!1),[X,el]=(0,l.useState)(!1),[ea,en]=(0,l.useState)(!1),[er,eo]=(0,l.useState)(""),[ed,ec]=(0,l.useState)(!1),[eu,em]=(0,l.useState)(!1),[ep,ex]=(0,l.useState)(!1),[eh,ef]=(0,l.useState)(!1),[eg,ey]=(0,l.useState)(!1),[eb,ev]=(0,l.useState)(null),[ej,ew]=(0,l.useState)({}),[ek,eN]=(0,l.useState)([]),[eT,eC]=(0,l.useState)(!1),[eS,e$]=(0,l.useState)(!1),[eA,eO]=(0,l.useState)(!1),[eE,eP]=(0,l.useState)(!1),[eD,eI]=(0,l.useState)({open:!1,action:null,value:""}),[eR,eM]=(0,l.useState)(!1),[eq,e_]=(0,l.useState)(""),[ez,eU]=(0,l.useState)(""),[eF,eL]=(0,l.useState)(!1),[eK,eJ]=(0,l.useState)({}),[eW,eB]=(0,l.useState)(""),[eH,eV]=(0,l.useState)(()=>new Set),[eG,eQ]=(0,l.useState)(!1),[eY,eZ]=(0,l.useState)([]),[eX,e0]=(0,l.useState)("__none__"),[e1,e2]=(0,l.useState)(!1),[e5,e3]=(0,l.useState)(null),[e4,e6]=(0,l.useState)(""),[e8,e7]=(0,l.useState)(!1),[e9,te]=(0,l.useState)("auto"),[tt,ti]=(0,l.useState)({enabled:!1,connections:{}}),[ts,tl]=(0,l.useState)([]),[ta,tn]=(0,l.useState)(!1),[tr,to]=(0,l.useState)([]),[td,tc]=(0,l.useState)([]),[tu,tm]=(0,l.useState)([]),[tp,tx]=(0,l.useState)(null),[th,tf]=(0,l.useState)(!1),[tg,ty]=(0,l.useState)(!1),[tb,tv]=(0,l.useState)(!1),tj="__provider_default__",[tw,tk]=(0,l.useState)(tj),[tN,tT]=(0,l.useState)(null),[tC,tS]=(0,l.useState)({}),[t$,tA]=(0,l.useState)(null),tO=(0,l.useRef)(!1),[tE,tP]=(0,l.useState)(!1),{copied:tD,copy:tI}=(0,$.C)(),tR="ag_risk_confirmed",tM=()=>{"xiaomi-mimo"===j||"mimo-desktop"===j?G(!0):B(!0)},tq=()=>{"antigravity"===j&&"true"!==window.localStorage.getItem(tR)?tf(!0):tX?tM():(eo(""),en(!0))},t_=()=>{eo(""),en(!0)},tz=()=>{tX?tq():t_()},tU=async()=>{if(!eR){eM(!0),e_("");try{let e=await fetch("/api/auth/verify-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:eD.value})});if(!e.ok){let t=await e.json().catch(()=>({}));e_(t?.error||(0,p.Tl)("Invalid password"));return}let{action:t,value:i}=eD;eI({open:!1,action:null,value:""}),"export"===t&&(tB(i),tJ(t),tL(!0))}catch(e){e_(e.message||(0,p.Tl)("Invalid password"))}finally{eM(!1)}}},[tF,tL]=(0,l.useState)(!1),[tK,tJ]=(0,l.useState)("export"),[tW,tB]=(0,l.useState)(""),tH=async()=>{eO(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/checkin",{method:"POST",cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let i=Array.isArray(t?.results)?t.results:[];if(0===i.length)return void C.warning((0,p.Tl)("No CodeBuddy CN connections to check in"));let s=i.filter(e=>"checked-in"===e.status).length,l=i.filter(e=>"already"===e.status).length,a=i.filter(e=>"failed"===e.status).length;0===a?C.success(`${(0,p.Tl)("Check-in complete")}: ${s} ${(0,p.Tl)("checked-in")}, ${l} ${(0,p.Tl)("already checked in")}`):C.error(`${(0,p.Tl)("Check-in complete with errors")}: ${a} ${(0,p.Tl)("failed")}`)}catch(e){C.error((0,p.Tl)("Check-in failed")+": "+e.message)}finally{eO(!1)}},tV=()=>(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,s.jsx)(c.$n,{size:"sm",icon:"calendar_today",onClick:tH,disabled:eA,className:"w-full sm:w-auto",title:(0,p.Tl)("CodeBuddy CN auto-checks in daily (retries all day until confirmed)"),children:eA?(0,p.Tl)("Checking in..."):(0,p.Tl)("Check in now")})}),tG=async()=>{eP(!0);try{let e="qoder-cn"===j?"/api/oauth/qoder-cn/checkin":"/api/oauth/qoder/checkin",t=await fetch(e,{method:"POST",cache:"no-store"}),i=await t.json();if(!t.ok)throw Error(i?.error||`Request failed: ${t.status}`);let s=Array.isArray(i?.results)?i.results:[];if(0===s.length)return void C.warning((0,p.Tl)("No active Qoder connections found"));let l=s.filter(e=>"checked-in"===e.status),a=s.filter(e=>"already"===e.status),n=s.filter(e=>"no-activity"===e.status),r=s.filter(e=>"failed"===e.status),o=l.reduce((e,t)=>e+(t.claimedAmount||0),0);if(l.length>0)C.success(`${(0,p.Tl)("Claim successful")}: +${o} Credits (${l.length} ${(0,p.Tl)("accounts")})`);else if(r.length>0)C.error(`${(0,p.Tl)("Claim failed")}: ${r.map(e=>e.error).join(", ")}`);else if(n.length>0){let e=a.length>0?` / ${(0,p.Tl)("Daily credits already claimed for today")} (${a.length} ${(0,p.Tl)("accounts")})`:` (${n.length} ${(0,p.Tl)("accounts")})`;C.info((0,p.Tl)("No claimable activity available for this account")+e)}else C.info((0,p.Tl)("Daily credits already claimed for today"))}catch(e){C.error((0,p.Tl)("Claim failed")+": "+e.message)}finally{eP(!1)}},tQ=()=>(0,s.jsx)(c.$n,{size:"sm",icon:"redeem",variant:"secondary",onClick:tG,disabled:eE,className:"w-full sm:w-auto",title:(0,p.Tl)("Claim daily activity Credits"),children:eE?(0,p.Tl)("Claiming..."):(0,p.Tl)("Claim Credits")}),tY=z?{id:z.id,name:z.name||("anthropic-compatible"===z.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===z.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===z.type?"AC":"OC",apiType:z.apiType,baseUrl:z.baseUrl,type:z.type}:u.zN[j]||u.fg[j]||u.IS[j]||u.nJ[j]||u.br[j],tZ=tY?.authModes||[],tX=!!u.zN[j]||!!u.IS[j]||tZ.includes("oauth"),t0=!!u.fg[j]||tZ.includes("apikey"),t1=!!u.IS[j]?.noAuth,t2="codebuddy-cn"===j,t5=tX&&tY?.authModes?.includes("oauth")&&eT,t3=t2&&eS,t4=e=>t5&&!t3?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>{eU(""),eI({open:!0,action:"export",value:""})},className:e,children:(0,p.Tl)("Export")}),(0,s.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{tJ("import"),tL(!0)},className:e,children:(0,p.Tl)("Import")})]}):null,t6=(0,m.KC)(j),t8="qoder"===j||"qoder-cn"===j,t7="qoder"===j||"qoder-cn"===j||"xiaomi-mimo"===j,t9="cursor"===j&&tr.length>0?tr:t8?function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||0===t.length)return e;let i=new Map(t.map(e=>[String(e.id).split("/").pop(),e]));return e.map(e=>{let t=i.get(e.id);return t?{...e,rateMultiplier:"number"==typeof t.rateMultiplier?t.rateMultiplier:e.rateMultiplier,promotion:t.promotion??e.promotion??null}:e})}(t6,tr):t6,ie=t8&&t9.find(e=>e.promotion)?.promotion||null,it=(0,u.wG)(j),ii=(0,u.mq)(j),is=(0,u.gb)(j),il=ii||is,ia=!il&&tX&&t0,ir="xai"===j?"Grok Build OAuth":"grok-cli"===j?"Grok CLI Device Login":"kimi"===j?"Kimi Coding OAuth":"OAuth",io="xai"===j?"xAI API Key":"kimi"===j?"Kimi API Key":"qoder"===j?"PAT":"API Key",id=e=>{if(!e9||"auto"===e9)return null;let t=S(j,e);return t&&t.includes(e9)?e9:null},ic=il?j:it,iu=(()=>{let e=new Set,t=new Set,i=i=>{if(!i||t.has(i))return;t.add(i);let s=S(j,i);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of t9)i(e.id);for(let e of td)i(e.id);for(let e of ek)e.providerAlias===ic&&"llm"===(e.kind||e.type||"llm")&&i(e.id);return e.size?["auto",...e]:null})(),im=il?z?.prefix||j:it,ip=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(ic)}`,{cache:"no-store"}),t=await e.json();e.ok&&tm(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[ic]),ix=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ic,ids:[e]})})).ok&&await ip()}catch(e){console.log("Error disabling model:",e)}},ih=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(ic)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ip()}catch(e){console.log("Error enabling model:",e)}},ig=async(e,t)=>{await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ic,id:e,type:"llm",enabled:t})})},iy=async(e,t=[])=>{let i=e.length+t.length;i&&tx({title:"Disable All Models",message:`Disable all ${i} model(s)?`,onConfirm:async()=>{tx(null);try{for(let i of(e.length&&(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ic,ids:e})})).ok&&await ip(),t))await ig(i,!1);t.length&&await ij()}catch(e){console.log("Error disabling all models:",e)}}})},ib=async(e=[])=>{try{for(let t of((await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(ic)}`,{method:"DELETE"})).ok&&await ip(),e))await ig(t,!0);e.length&&await ij()}catch(e){console.log("Error enabling all models:",e)}},iv=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ew(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),ij=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eN(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===j&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&tc(e.models)}).catch(()=>{})},[j]);let iw=(0,l.useCallback)(async()=>{try{let[e,t,i,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),a=await t.json(),n=await i.json(),r=s.ok?await s.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===j);M(e)}i.ok&&K(n.proxyPools||[]);let o=(r.providerStrategies||{})[j]||{};e3(o.fallbackStrategy||null),e6(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1"),e7(!0===o.earliestExpiryFirst),eC(!0===r.codeBuddyOAuthImport);let d=(r.providerThinking||{})[j]||{};te(d.mode||"auto");let c=es[j],u=c&&r[c]||{};if(ti({enabled:!0===u.enabled,connections:u.connections||{}}),t.ok){let e=(a.nodes||[]).find(e=>e.id===j)||null;if(!e&&il)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===j)||null))break}U(e)}}catch(e){console.log("Error fetching connections:",e)}finally{_(!1)}},[j,il]),ik=(0,l.useCallback)(async()=>{await iw(),await ip()},[iw,ip]),iN=async e=>{try{let t=await fetch(`/api/provider-nodes/${j}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await t.json();t.ok&&(U(i.node),await iw(),ef(!1))}catch(e){console.log("Error updating provider node:",e)}},iT=async(e,t,i=e8)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),l=(s.ok?await s.json():{}).providerStrategies||{},a={...l[j]||{}};e?a.fallbackStrategy=e:delete a.fallbackStrategy,"round-robin"===e&&""!==t?a.stickyRoundRobinLimit=Number(t)||3:delete a.stickyRoundRobinLimit,i?a.earliestExpiryFirst=!0:delete a.earliestExpiryFirst;let n={...l};0===Object.keys(a).length?delete n[j]:n[j]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}},iC=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),i={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?i[j]={mode:e}:delete i[j],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:i})})}catch(e){console.log("Error saving thinking config:",e)}},iS=async e=>{let t=es[j];if(t){ti(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{iw(),iv(),ij(),ip()},[iw,iv,ij,ip]),(0,l.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.json()).then(e=>{eC(!0===e.codeBuddyOAuthImport),"boolean"==typeof e.codeBuddyCheckin&&e$(e.codeBuddyCheckin)}).catch(e=>console.log("Error reading settings:",e))},[]),(0,l.useEffect)(()=>{if("cursor"!==j&&!t8)return void to([]);let e=E.find(e=>!1!==e.isActive);if(!e?.id)return void to([]);let t=!1;return fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json()})).then(({ok:e,data:i})=>{!t&&e&&Array.isArray(i.models)&&i.models.length>0&&to(i.models)}).catch(()=>{}),()=>{t=!0}},[j,E]),(0,l.useEffect)(()=>{let e=(u.zN[j]||u.fg[j]||u.IS[j]||u.nJ[j])?.modelsFetcher;e&&P(e).then(tl)},[j]);let i$=async(e,t,i=it)=>{let s=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await iv();else{let t=await e.json();C.error(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},iA=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await iv()}catch(e){console.log("Error deleting alias:",e)}},iO=async(e,t="llm",i=ic,s={},l,a)=>{try{let n={providerAlias:i,id:e,type:t};if(void 0!==l&&(n.enabled=l),a&&(n.transport=a),s&&"object"==typeof s)for(let e of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==s[e]&&(n[e]=s[e]);let r=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(r.ok)await ij(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await r.json();C.error(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},iE=e=>!!(N?.[ic]?.[e]||N?.[j]?.[e]),iP=async(e,t)=>{try{let i=await fetch("/api/models/caps",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:ic||j,modelId:e,...t||{}})});if(!i.ok){let e=await i.json().catch(()=>({}));C.error(e?.error||"Failed to save model settings");return}T()}catch(e){console.log("Error saving model caps:",e),C.error("Failed to save model settings")}},iD=async(e,t="llm",i=ic)=>{try{let s=new URLSearchParams({providerAlias:i,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await ij(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},iI=async(e,t,i="llm")=>{try{(await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ic,id:e,type:i,enabled:t})})).ok&&(await ij(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error toggling custom model:",e)}},iR=(e,t="llm")=>{tx({title:e?(0,p.Tl)("Enable all custom models?"):(0,p.Tl)("Disable all custom models?"),message:e?(0,p.Tl)("All custom models of this provider will be listed in /v1/models and exposed to clients."):(0,p.Tl)("All custom models of this provider will disappear from /v1/models until re-enabled. Clients will no longer see them."),onConfirm:async()=>{tx(null);try{(await fetch("/api/models/custom/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ic,type:t,enabled:e})})).ok&&(await ij(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error bulk-updating custom models:",e)}}})},iM=async()=>{if(tE)return;let e=E.find(e=>!1!==e.isActive);if(!e)return void C.warning("xiaomi-mimo"===j?(0,p.Tl)("Please add an active MiMo connection first"):(0,p.Tl)("Please add an active Qoder connection first"));tP(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void C.error(i.error||(0,p.Tl)("Failed to fetch models"));let s=i.models||[];if(0===s.length)return void C.warning((0,p.Tl)("No models returned"));let l=0,a=0;for(let e of s){let t=e.id||e.name;if(!t)continue;if("llm"!==(e.kind||"llm")){a+=1;continue}let i=t.replace(/^qoder(-cn)?\//,"");!s.some(e=>e.id===i)&&(ek.some(e=>e.providerAlias===ic&&e.id===i&&"llm"===(e.kind||e.type||"llm"))||Object.values(ej).includes(`${ic}/${i}`)||(await iO(i,"llm",ic,{},!1),l+=1))}0===l?C.warning((0,p.Tl)("All models already exist, no new models added")):C.success((0,p.Tl)("Successfully added")+` ${l} `+(0,p.Tl)("models")),a>0&&C.info((0,p.Tl)("Media models skipped (use Media Providers)")+` (${a})`)}catch(e){console.log("Error importing Qoder models:",e),C.error((0,p.Tl)("Error fetching models")+": "+e.message)}finally{tP(!1)}},iq="opencode-go"===j||"bai"===j||"cline"===j,i_=async()=>{if(ta)return;let e=E.find(e=>!1!==e.isActive);if(!e?.id)return void C.warning((0,p.Tl)("Add a connection to enable importing models."));tn(!0);try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),i=await t.json();if(!t.ok)throw Error(i?.error||`Request failed: ${t.status}`);let s=(Array.isArray(i.models)?i.models:[]).map(e=>{let t=e?.id||e?.name||e?.model;return t?{...e,id:String(t),name:e.name||String(t)}:null}).filter(Boolean);tl(s),C.success(`${(0,p.Tl)("Models refreshed")} (${s.length})`)}catch(e){C.error((0,p.Tl)("Failed to fetch models")+": "+e.message)}finally{tn(!1)}},iz=async()=>{if(tg||0===E.length)return;let e=Object.fromEntries(E.map(e=>[e.id,{state:"queued",error:null}]));tO.current=!1,ty(!0),tv(!1),tT(null),tS(e),tA({total:E.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,i=0;try{for(let e=0;e<E.length;e+=1){if(tO.current){tA({total:E.length,completed:e,passed:t,failed:i,stopped:!0});break}let s=E[e];tT(s.id),tS(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=t9.some(e=>e.id===tw)?tw:null,l=await fetch(`/api/providers/${s.id}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e&&e!==tj?{model:e}:{})}),a=await l.json(),n=!!a.valid;n?t+=1:i+=1,tS(e=>({...e,[s.id]:{state:n?"success":"failed",error:n?null:a.error||null}}))}catch(e){i+=1,tS(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}tA({total:E.length,completed:e+1,passed:t,failed:i,stopped:!1}),e<E.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{tT(null),ty(!1),tv(!1),tO.current=!1,iw()}},iU=async e=>{tx({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{tx(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&M(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},iF=()=>{eB(""),eJ({}),tS({}),tA(null),iw(),B(!1)},iL=async e=>{eo("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:j,...e})}),i=null;try{i=await t.json()}catch{i=null}if(t.ok){eB(""),eJ({}),await ik(),en(!1);return}eo(i?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),eo("Failed to save connection")}},iK=async e=>{try{(await fetch(`/api/providers/${eb.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(eB(""),eJ({}),tS({}),tA(null),await iw(),ex(!1))}catch(e){console.log("Error updating connection:",e)}},iJ=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&M(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},iW=async(e,t)=>{let i=[...E];[i[e],i[t]]=[i[t],i[e]],M(i);try{await Promise.all([fetch(`/api/providers/${i[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${i[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await iw()}},iB=E.filter(e=>eY.includes(e.id)),iH=E.length>0&&eY.length===E.length;(0,l.useEffect)(()=>{eZ(e=>e.filter(e=>E.some(t=>t.id===e)))},[E]),(()=>{if(0===iB.length)return;let e=new Set(iB.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let i=F.find(e=>e.id===t);return i?.name}})();let iV=()=>{e1||ey(!1)},iG=async e=>{e2(!0);try{let t=0;for(let{connectionId:i,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",i,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await iw(),ey(!1)}finally{e2(!1)}},iQ=e=>iG(E.map(t=>({connectionId:t.id,proxyPoolId:e}))),iY=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:E.map((e,t)=>{let i;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(i=e.id,eY.includes(i)),onChange:()=>{var t;return t=e.id,void eZ(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(V,{connection:e,proxyPools:F,isOAuth:tX,isFirst:0===t,isLast:t===E.length-1,onMoveUp:()=>iW(t,t-1),onMoveDown:()=>iW(t,t+1),onToggleActive:t=>iJ(e.id,t),autoPing:es[j]&&"oauth"===e.authType?{on:!0===tt.connections[e.id],onToggle:t=>{var i;return i=e.id,void iS({...tt,connections:{...tt.connections,[i]:t}})},provider:j}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&M(i=>i.map(i=>i.id===e.id?{...i,providerSpecificData:{...i.providerSpecificData,proxyPoolId:t||null}}:i))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ev(e),ex(!0)},onDelete:()=>iU(e.id),oneByOneStatus:tC[e.id]||null})})]},e.id)})}),iZ=F.filter(e=>!0===e.isActive),iX=(0,s.jsx)(c.aF,{isOpen:eg,onClose:iV,title:`Apply Proxy (${E.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=F.filter(e=>!0===e.isActive);return 0===e.length?void C.warning("No active proxy pools available."):iG(E.map((t,i)=>({connectionId:t.id,proxyPoolId:e[i%e.length].id})))},disabled:e1||0===iZ.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>iQ(null),disabled:e1,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),F.map(e=>(0,s.jsxs)("button",{onClick:()=>iQ(e.id),disabled:e1||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),e1&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(c.$n,{onClick:iV,variant:"ghost",fullWidth:!0,disabled:e1,children:"Cancel"})]})}),i0=async e=>{if(!eH.has(e)){eV(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${ic}/${e}`})}),i=await t.json();eJ(t=>({...t,[e]:i.ok?"ok":"error"})),eB(i.ok?"":i.error||"Model not reachable")}catch{eJ(t=>({...t,[e]:"error"})),eB("Network error")}finally{setTimeout(()=>{iw()},600),eV(t=>{let i=new Set(t);return i.delete(e),i})}}};if(q)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(c.Qv,{}),(0,s.jsx)(c.Qv,{})]});if(!tY)return(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let i1=()=>ii&&tY.apiType?"responses"===tY.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":is?"/providers/anthropic-m.png":(0,d.HY)(tY.id);return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(r(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tY.color}15`},children:eF||!i1()?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:tY.color},children:tY.textIcon||tY.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:i1(),alt:tY.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(tY.id),eL(!0)},loading:"lazy",decoding:"async"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tY.name}),(tY.notice?.webUrl||tY.notice?.apiKeyUrl||tY.notice?.signupUrl||tY.website)&&(0,s.jsxs)("a",{href:tY.notice?.webUrl||tY.notice?.apiKeyUrl||tY.notice?.signupUrl||tY.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tY.notice?.webUrl?"Web console":tY.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,s.jsx)(c.N5,{code:tY.notice?.inviteCode})]}),!t1&&(0,s.jsx)("p",{className:"text-text-muted",children:1===E.length?(0,p.Tl)("1 connection"):(0,p.Tl)("{n} connections").replace("{n}",String(E.length))})]})]})]}),tY.deprecated&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tY.deprecationNotice})]}),tY.notice?.text&&!tY.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:(0,p.Tl)(tY.notice.text)}),tY.notice.apiKeyUrl&&(0,s.jsx)("a",{href:tY.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:(0,p.Tl)("Get API Key →")})]}),il&&z&&(0,s.jsx)(c.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:is?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[is?"Messages API":"responses"===z.apiType?"Responses API":"Chat Completions"," \xb7 ",(z.baseUrl||"").replace(/\/$/,""),"/",is?"messages":"responses"===z.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{eo(""),en(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ef(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{tx({title:"Delete Compatible Node",message:`Delete this ${is?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{tx(null);try{(await fetch(`/api/provider-nodes/${j}`,{method:"DELETE"})).ok&&v.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),t1?(0,s.jsx)(c.gw,{providerId:j}):(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[E.length>0&&F.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ey(!0),children:"Apply Proxy"}),E.length>0&&(0,s.jsxs)(s.Fragment,{children:[eY.length>0&&(0,s.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eY.length;0!==e&&tx({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{tx(null);let e=0,t=[...eY];for(let i of t)try{(await fetch(`/api/providers/${i}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}M(e=>e.filter(e=>!t.includes(e.id))),eZ([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eY.length,")"]}),E.length>0&&t9.length>1&&(0,s.jsx)(c.l6,{value:tw,onChange:e=>tk(e.target.value),disabled:tg,options:[{value:tj,label:(0,p.Tl)("Provider default")},...t9.filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>({value:e.id,label:e.name||e.id}))],selectClassName:"!py-2 !text-xs w-44"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:iz,disabled:tg,children:tg?(0,p.Tl)("Testing Connection One-by-One..."):(0,p.Tl)("Test Connection One-by-One")}),tg&&(0,s.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{tg&&(tO.current=!0,tv(!0))},disabled:tb,children:tb?(0,p.Tl)("Stopping..."):(0,p.Tl)("Stop")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",title:(0,p.Tl)("Prioritize accounts with quota packages that expire soonest"),children:(0,p.Tl)("Earliest Expiry First")}),(0,s.jsx)(c.lM,{checked:e8,onChange:e=>{e7(e),iT(e5,e4,e)}})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:(0,p.Tl)("Round Robin")}),(0,s.jsx)(c.lM,{checked:"round-robin"===e5,onChange:e=>{let t=e?"round-robin":null,i=e?e4||"1":e4;e&&!e4&&e6("1"),e3(t),iT(t,i,e8)}}),"round-robin"===e5&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:(0,p.Tl)("Sticky:")}),(0,s.jsx)("input",{type:"number",min:1,value:e4,onChange:e=>{var t;e6(t=e.target.value),iT("round-robin",t,e8)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-surface focus:outline-none focus:border-primary"})]})]})]})]}),0===E.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tX?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ia&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ir," or ",io,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ia?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tq,children:ir}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:t_,children:io}),t4(),t3&&tV()]}):(0,s.jsxs)(s.Fragment,{children:[!il&&"iflow"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>el(!0),children:"Cookie"}),("qoder"===j||"qoder-cn"===j)&&tQ(),"codex"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ec(!0),children:(0,p.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:tz,children:il?"Add API Key":"iflow"===j?"OAuth":"mimo-desktop"===j?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,p.Tl)("Connect with Desktop Session"),(0,s.jsx)(c.m_,{text:(0,p.Tl)("Requires sign-in to Xiaomi MiMo Desktop app first"),position:"top",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] opacity-60",children:"info"})})]}):"Add Connection"}),t4()]})})]}):(0,s.jsxs)(s.Fragment,{children:[t$&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:[(0,p.Tl)("Total:")," ",t$.total]}),(0,s.jsxs)("span",{children:[(0,p.Tl)("Completed:")," ",t$.completed]}),(0,s.jsxs)("span",{children:[(0,p.Tl)("Passed:")," ",t$.passed]}),(0,s.jsxs)("span",{children:[(0,p.Tl)("Failed:")," ",t$.failed]}),t$.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,p.Tl)("Stopped")}),tg&&tN&&(0,s.jsxs)("span",{children:[(0,p.Tl)("Running:")," ",E.find(e=>e.id===tN)?.name||tN]})]})}),E.length>0&&(0,s.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:iH,onChange:()=>{iH?eZ([]):eZ(E.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),iY,!il&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>el(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ec(!0),title:(0,p.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,p.Tl)("Bulk Add")}),ia?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tq,className:"w-full sm:w-auto",children:ir}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:t_,className:"w-full sm:w-auto",children:io}),t4("w-full sm:w-auto"),t3&&tV(),("qoder"===j||"qoder-cn"===j)&&tQ()]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:tz,className:"w-full sm:w-auto",children:"Add"}),t4("w-full sm:w-auto")]})]})]})]}),(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),iu&&(0,s.jsx)("select",{value:e9,onChange:e=>{var t;te(t=e.target.value),iC(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-surface px-2 py-1 text-xs focus:border-primary focus:outline-none",children:iu.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!il&&(e=[...t9,...td.filter(e=>!t9.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!tu.includes(e)),i=(t=ek.filter(e=>e?.providerAlias===ic&&"llm"===(e.kind||e.type||"llm"))).filter(e=>!1!==e.enabled).map(e=>e.id),n=t.filter(e=>!1===e.enabled).map(e=>e.id),x=tu.length>0||n.length>0,h=e.length>0||i.length>0,(0,s.jsxs)("div",{className:"flex gap-2",children:[x&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>ib(n),children:"Active All"}),h&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>iy(e,i),children:"Disable All"})]}))]}),!!eW&&(f=(0,I.O)(eW),y=function(e){if(!e)return"";let t=(0,R.DY)(e);if(t&&t!==e)return t;let i=(0,p.Tl)(e);if(i&&i!==e)return i;let s=String(e).match(/^HTTP\s+\d+:\s*(?:\[(?:\d+|[A-Z0-9_]+)\]:\s*)?(.*)$/i);if(s&&s[1]){let e=s[1].trim(),t=(0,p.Tl)(e);if(t&&t!==e)return t}return(0,p.Tl)(e)}(eW),(0,s.jsxs)("p",{className:"text-xs text-red-500 mb-3 break-words",children:[y," ",f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("a",{href:f,target:"_blank",rel:"noopener noreferrer",title:(0,p.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"text-blue-500 underline hover:text-blue-400",children:(0,p.Tl)("Verify your account")})," ",(0,s.jsx)("button",{type:"button",onClick:()=>tI(f,"verification"),className:"text-text-muted underline hover:text-primary",children:"verification"===tD?(0,p.Tl)("Copied"):(0,p.Tl)("Copy link")}),(0,s.jsxs)("span",{className:"text-text-muted",children:[" ","(",(0,p.Tl)("Recommended: open in an incognito window and sign in with the affected account"),")"]})]})]})),(()=>{let e,t,i;if(il)return(0,s.jsx)(J,{providerStorageAlias:ic,providerDisplayAlias:im,modelAliases:ej,customModels:ek,copied:tD,onCopy:tI,onSetAlias:i$,onDeleteAlias:iA,onAddCustomModel:(e,t)=>iO(e,"llm",ic,{},t),onToggleCustomModel:iI,onDeleteCustomModel:e=>iD(e,"llm",ic),onBulkCustomModels:iR,connections:E,isAnthropic:is});let l=[...t9,...td.filter(e=>!t9.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),a=new Set(tu),n=l.filter(e=>!a.has(e.id)),r=l.filter(e=>a.has(e.id)),o=D({customModels:ek,modelAliases:ej,providerAlias:ic,builtInModels:t9,type:"llm"}),d=o.filter(e=>!1!==e.enabled),c=o.filter(e=>!1===e.enabled);return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[ie&&(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(g,{promotion:ie})}),d.length+c.length>0&&(0,s.jsxs)("div",{className:"w-full flex items-center gap-2 text-xs text-text-muted -mb-1",children:[(0,s.jsxs)("span",{children:[(0,p.Tl)("Custom models")," (",d.length+c.length,")"]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>iR(!0),className:"text-primary hover:underline",children:(0,p.Tl)("Enable all")}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>iR(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,p.Tl)("Disable all")})]}),d.map(e=>(0,s.jsx)(L,{model:{id:e.id,name:e.name},fullModel:`${im}/${e.id}`,alias:e.alias,copied:tD,onCopy:tI,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?iD(e.id,"llm",ic):iA(e.alias)},testStatus:eK[e.id],onTest:E.length>0||t1?()=>i0(e.id):void 0,isTesting:eH.has(e.id),isCustom:!0,isFree:!1,caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iP(e.id,t),capsPinned:iE(e.id),thinkingSuffix:id(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${ic}/${e.id}`,i=`${j}/${e.id}`,l=Object.entries(ej).find(([,e])=>e===t||e===i)?.[0];return(0,s.jsx)(L,{model:e,fullModel:`${im}/${e.id}`,alias:l,copied:tD,onCopy:tI,onSetAlias:t=>i$(e.id,t,ic),onDeleteAlias:()=>iA(l),testStatus:eK[e.id],onTest:E.length>0||t1?()=>i0(e.id):void 0,isTesting:eH.has(e.id),isFree:e.isFree,onDisable:()=>ix(e.id),caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iP(e.id,t),capsPinned:iE(e.id),thinkingSuffix:id(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>eQ(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"cline"===j&&E.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:i_,disabled:ta,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:ta?{animation:"spin 1s linear infinite"}:void 0,children:ta?"progress_activity":"download"}),ta?(0,p.Tl)("Importing..."):(0,p.Tl)("Import from /models")]}),t7&&E.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:iM,disabled:tE,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:tE?{animation:"spin 1s linear infinite"}:void 0,children:tE?"progress_activity":"download"}),tE?(0,p.Tl)("Fetching..."):(0,p.Tl)("xiaomi-mimo"===j?"Fetch MiMo Models":"Fetch Qoder Models")]}),iq&&"cline"!==j&&(0,s.jsxs)("button",{onClick:i_,disabled:ta||!E.some(e=>!1!==e.isActive),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:ta?{animation:"spin 1s linear infinite"}:void 0,children:ta?"progress_activity":"refresh"}),ta?(0,p.Tl)("Refreshing..."):(0,p.Tl)("Refresh Official Models")]}),ts.length>0&&(e=new Set([...Object.values(ej),...o.map(e=>e.fullModel)]),t=new Set(t9.map(e=>e.id)),0===(i=ts.filter(i=>!e.has(`${ic}/${i.id}`)&&!t.has(i.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await iO(e.id,"llm",ic)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),(r.length>0||c.length>0)&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length+c.length,"):"]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,s.jsx)(L,{model:{id:e.id,name:e.name},fullModel:`${im}/${e.id}`,copied:tD,onCopy:tI,testStatus:eK[e.id],onTest:E.length>0||t1?()=>i0(e.id):void 0,isTesting:eH.has(e.id),onEnable:()=>iI(e.id,!0),isCustom:!1,isFree:!1,caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iP(e.id,t),capsPinned:iE(e.id)},`custom-${e.fullModel}`)),r.map(e=>(0,s.jsx)(L,{model:e,fullModel:`${im}/${e.id}`,copied:tD,onCopy:tI,testStatus:eK[e.id],onTest:E.length>0||t1?()=>i0(e.id):void 0,isTesting:eH.has(e.id),onEnable:()=>ih(e.id),isFree:e.isFree,caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iP(e.id,t),capsPinned:iE(e.id),thinkingSuffix:id(e.id)},e.id))]})]})]})})()]}),iX,"kiro"===j?(0,s.jsx)(c.Mh,{isOpen:W,providerInfo:tY,onSuccess:iF,onClose:()=>B(!1)}):"cursor"===j?(0,s.jsx)(c.G9,{isOpen:W,onSuccess:iF,onClose:()=>B(!1)}):"zed"===j?(0,s.jsx)(c.TE,{isOpen:W,providerInfo:tY,onSuccess:iF,onClose:()=>B(!1)}):"gitlab"===j?(0,s.jsx)(c.vj,{isOpen:W,providerInfo:tY,onSuccess:iF,onClose:()=>B(!1)}):(0,s.jsx)(c.LF,{isOpen:W,provider:j,providerInfo:tY,onSuccess:iF,onClose:()=>B(!1)}),("xiaomi-mimo"===j||"mimo-desktop"===j)&&(0,s.jsx)(c.LH,{provider:j,isOpen:H,onSuccess:iF,onClose:()=>G(!1)}),"iflow"===j&&(0,s.jsx)(c.vE,{isOpen:X,onSuccess:()=>{iw(),el(!1)},onClose:()=>el(!1)}),(0,s.jsx)(Q,{isOpen:ea,provider:j,providerName:tY.name,isCompatible:il,isAnthropic:is,authType:tY?.authType,authHint:tY?.authHint,website:tY?.website,proxyPools:F,error:er,existingNames:E.map(e=>e.name).filter(Boolean),onSave:iL,onBulkDone:ik,onClose:()=>{eo(""),en(!1)}}),(0,s.jsx)(c.wI,{isOpen:ep,connection:eb,proxyPools:F,onSave:iK,onClose:()=>ex(!1)}),il&&(0,s.jsx)(Y,{isOpen:eh,node:z,onSave:iN,onClose:()=>ef(!1),isAnthropic:is}),!il&&(0,s.jsx)(Z,{isOpen:eG,providerAlias:ic,providerDisplayAlias:im,onSave:async(e,t,i,s)=>{await iO(e,i||"llm",ic,t||{},void 0,s),eQ(!1)},onClose:()=>eQ(!1)}),"codex"===j&&(0,s.jsx)(ee,{isOpen:ed,onClose:()=>ec(!1),onSuccess:iw}),"codebuddy-cn"===j&&(0,s.jsx)(et,{isOpen:eu,password:ez,onClose:()=>em(!1),onSuccess:iw}),(0,s.jsx)(ei,{isOpen:tF,mode:tK,provider:j,providerName:tY?.name,dashboardPassword:tW,onClose:()=>{tL(!1),tB("")},onSuccess:iw}),(0,s.jsxs)(c.aF,{isOpen:eD.open,onClose:()=>eI({open:!1,action:null,value:""}),title:(0,p.Tl)("Confirm Password"),size:"sm",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{variant:"ghost",onClick:()=>eI({open:!1,action:null,value:""}),children:(0,p.Tl)("Cancel")}),(0,s.jsx)(c.$n,{variant:"primary",onClick:tU,disabled:!eD.value||eR,children:eR?(0,p.Tl)("Verifying..."):(0,p.Tl)("Confirm")})]}),children:[(0,s.jsx)("p",{className:"text-text-muted mb-3 text-sm",children:(0,p.Tl)("Enter your dashboard password to export OAuth accounts (the file will be encrypted with the transfer passphrase you pick next).")}),(0,s.jsx)(c.pd,{type:"password",reveal:!0,autoFocus:!0,value:eD.value,onChange:e=>eI(t=>({...t,value:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&eD.value&&tU()},placeholder:(0,p.Tl)("Password")}),eq&&(0,s.jsx)("p",{className:"text-xs text-red-500 mt-2",children:eq})]}),(0,s.jsx)(c.uo,{isOpen:th,onClose:()=>tf(!1),onConfirm:()=>{(window.localStorage.setItem(tR,"true"),tf(!1),tX)?tM():t_()},title:"Risk Notice",message:tY?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(c.uo,{isOpen:!!tp,onClose:()=>tx(null),onConfirm:tp?.onConfirm,title:tp?.title||"Confirm",message:tp?.message,variant:"danger"})]})}},90337:(e,t,i)=>{"use strict";i.d(t,{DY:()=>o});var s=i(73006),l=i(22862),a=i(43073);let n=/subscription_quota_exhausted|本周用量已满|本周额度已用完/i;function r(e,t){return(0,s.Tl)(e).replace("{n}",String(t))}function o(e){if(!e||"string"!=typeof e)return e??"";let t=(0,s.Tl)(e);if(t&&t!==e)return t;if(n.test(e))return(0,s.Tl)("Subscription quota used up. Please wait for the quota reset.");if(l.AZ.test(e)){let t=(0,a.l)(e),i=(0,s.Tl)("This account must complete real-name verification before StepFun will serve it. Complete it at {url}, then retry.");return i.replace("{url}",t||(0,s.Tl)("the provider's console"))}if(/Individual quota reached|QUOTA_EXHAUSTED|RESOURCE_EXHAUSTED/i.test(e)){let t,i,l,a,n,o,d,c,{delay:u,timestamp:m,model:p}=(t=String(e||""),i=null,l=null,a=/"quotaResetDelay"\s*:\s*"([^"]+)"/.exec(t),n=/\bResets in\s+([0-9hms.]+)/i.exec(t),i=a&&a[1]||n&&n[1]||null,o=/"quotaResetTimeStamp"\s*:\s*"([^"]+)"/.exec(t),d=/"quotaResetTimeStamp"\s*:\s*(".*?"|\S+)/.exec(t),(l=o&&o[1]||d&&d[1]||null)&&(l=l.replace(/^"|"$/g,"")),{delay:i,timestamp:l,model:/"model"\s*:\s*"([^"]+)"/.exec(t)?.[1]||null}),x=function(e){if(!e)return"";let{h:t,m:i,s}=e;if(s>=60&&(i+=Math.floor(s/60),s%=60),i>=60&&(t+=Math.floor(i/60),i%=60),t>=24){let e=Math.floor(t/24),i=t%24;return i>0?`${r("{n}d",e)} ${r("{n}h",i)}`:r("{n}d",e)}let l=[];return t>0&&l.push(r("{n}h",t)),i>0&&l.push(r("{n}m",i)),(s>0||0===l.length)&&l.push(r("{n}s",s)),l.join(" ")}((c=/^(?:(\d+(?:\.\d+)?)h)?(?:(\d+(?:\.\d+)?)m)?(?:(\d+(?:\.\d+)?)s)?$/i.exec(String(u||"").trim()))&&(c[1]||c[2]||c[3])?{h:Math.floor(parseFloat(c[1]||0)),m:Math.floor(parseFloat(c[2]||0)),s:Math.round(parseFloat(c[3]||0))}:null),h=m?function(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e||"";try{return t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t.toISOString()}}(m):"",f=(0,s.Tl)(p?"Individual quota reached for model {model}. Resets at {time} (in {duration}).":"Individual quota reached. Resets at {time} (in {duration}).");return(f=(f=f.replace("{model}",p||"")).replace("{time}",h||(0,s.Tl)("shortly"))).replace("{duration}",x||(0,s.Tl)("a short while"))}return t}},93578:(e,t,i)=>{Promise.resolve().then(i.bind(i,83204))}},e=>{e.O(0,[3170,305,5772,1321,5497,6109,8441,3794,7358],()=>e(e.s=93578)),_N_E=e.O()}]);
14
+ ]`;function ee({isOpen:e,onClose:t,onSuccess:i}){let[a,n]=(0,l.useState)(""),[r,o]=(0,l.useState)(!1),[d,u]=(0,l.useState)(""),[m,x]=(0,l.useState)(null),h=()=>{r||(n(""),u(""),x(null),t())},f=async()=>{var e;let t;u(""),x(null);let s=a.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){u(`${(0,p.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void u((0,p.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void u(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof i&&i()}catch(e){u(e.message||(0,p.Tl)("Request failed"))}finally{o(!1)}},g=m?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(c.aF,{isOpen:e,title:(0,p.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,p.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:X,value:a,onChange:e=>n(e.target.value),disabled:r}),d&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,p.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,p.Tl)("failed")}`:""]}),g.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:f,fullWidth:!0,disabled:r||!a.trim(),children:r?(0,p.Tl)("Importing..."):(0,p.Tl)("Import All")}),(0,s.jsx)(c.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:r,children:(0,p.Tl)("Close")})]})]})})}function et({isOpen:e,onClose:t,onSuccess:i,password:a=""}){let[n,r]=(0,l.useState)(""),[o,d]=(0,l.useState)(""),[u,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(null),y=(0,l.useRef)(null),b=()=>{u||(r(""),d(""),h(""),g(null),y.current&&(y.current.value=""),t())},v=async()=>{let e;h(""),g(null);let t=n.trim();if(!t)return;try{e=JSON.parse(t)}catch(e){h(`${(0,p.Tl)("Invalid JSON")}: ${e.message}`);return}let s=Array.isArray(e)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!s||0===s.length)return void h((0,p.Tl)("No accounts found in input"));m(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/bulk-import",{method:"POST",headers:{"Content-Type":"application/json",...a?{"x-10r-password":a}:{}},body:JSON.stringify({accounts:s})}),t=await e.json();if(!e.ok)return void h(401===e.status?(0,p.Tl)("Invalid password"):t?.error||`Request failed: ${e.status}`);g(t),(t.imported>0||t.updated>0)&&"function"==typeof i&&i()}catch(e){h(e.message||(0,p.Tl)("Request failed"))}finally{m(!1)}},j=f?.results?.filter(e=>!e.ok)||[],w=f?.skipped??0;return(0,s.jsx)(c.aF,{isOpen:e,title:(0,p.Tl)("Import CodeBuddy CN Accounts"),onClose:b,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.$n,{variant:"secondary",fullWidth:!0,icon:"upload_file",onClick:()=>y.current?.click(),disabled:u,children:o||(0,p.Tl)("Choose JSON file...")}),(0,s.jsx)("input",{ref:y,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;d(t.name),h(""),g(null);let i=new FileReader;i.onload=()=>r(String(i.result||"")),i.onerror=()=>h((0,p.Tl)("Failed to read file")),i.readAsText(t)}})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"absolute -top-2 left-2 bg-sidebar px-1 text-[10px] text-text-muted",children:(0,p.Tl)("Or paste JSON")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 pt-4 text-sm font-mono resize-y min-h-[160px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:'[{ "access_token": "eyJ...", "refresh_token": "eyJ...", "nickname": "<nickname>" }]',value:n,onChange:e=>r(e.target.value),disabled:u})]}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),f&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${f.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",f.imported," ",(0,p.Tl)("added"),", ",f.updated," ",(0,p.Tl)("updated"),w>0?`, ${w} ${(0,p.Tl)("skipped")}`:"",f.failed>0?`, ✗ ${f.failed} ${(0,p.Tl)("failed")}`:""]}),j.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:j.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:u||!n.trim(),children:u?(0,p.Tl)("Importing..."):(0,p.Tl)("Import All")}),(0,s.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:u,children:(0,p.Tl)("Close")})]})]})})}function ei({isOpen:e,mode:t,provider:i,providerName:a,dashboardPassword:n,onClose:r,onSuccess:o}){let[d,u]=(0,l.useState)(""),[m,x]=(0,l.useState)(""),[h,f]=(0,l.useState)(!1),[g,y]=(0,l.useState)(""),[b,v]=(0,l.useState)(null),[j,w]=(0,l.useState)(""),[k,N]=(0,l.useState)(null),T=(0,l.useRef)(null),C=(0,l.useRef)(null),S=e=>{clearTimeout(C.current),C.current=setTimeout(()=>{C.current=null,$(),r()},e)};(0,l.useEffect)(()=>()=>clearTimeout(C.current),[]);let $=()=>{u(""),x(""),f(!1),y(""),v(null),w(""),N(null),T.current&&(T.current.value="")},A={"Content-Type":"application/json","x-10r-password":n||""},O=async()=>{if(y(""),v(null),clearTimeout(C.current),d.length<4)return void y((0,p.Tl)("Passphrase must be at least 4 characters"));if(d!==m)return void y((0,p.Tl)("Passphrases do not match"));f(!0);try{let e=await fetch("/api/oauth/transfer/export",{method:"POST",headers:A,body:JSON.stringify({provider:i,passphrase:d})}),t=await e.json();if(!e.ok)throw Error((0,p.Tl)(t?.error)||`Request failed: ${e.status}`);let s=JSON.stringify(t.blob,null,2),l=URL.createObjectURL(new Blob([s],{type:"application/json"})),a=document.createElement("a");a.href=l,a.download=`oauth-${i}-transfer-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(l),1e3),v({exported:t.count}),S(1200)}catch(e){y(e.message||(0,p.Tl)("Export failed"))}finally{f(!1)}},E=async()=>{if(y(""),v(null),clearTimeout(C.current),!k)return void y((0,p.Tl)("Pick a transfer file first"));if(!d)return void y((0,p.Tl)("Transfer passphrase required"));f(!0);try{let e=await fetch("/api/oauth/transfer/import",{method:"POST",headers:A,body:JSON.stringify({provider:i,passphrase:d,blob:k})}),t=await e.json();if(!e.ok){if(401===e.status&&/passphrase/i.test(t?.error||""))throw Error((0,p.Tl)("Wrong passphrase"));throw Error((0,p.Tl)(t?.error)||`Request failed: ${e.status}`)}v(t),"function"==typeof o&&o(),!((t?.webSessions?.failed||0)>0)&&(t?.imported||0)+(t?.updated||0)>0&&S(1800)}catch(e){y(e.message||(0,p.Tl)("Import failed"))}finally{f(!1)}};return(0,s.jsx)(c.aF,{isOpen:e,title:"export"===t?(0,p.Tl)("Export OAuth accounts"):(0,p.Tl)("Import OAuth accounts"),onClose:()=>{h||(clearTimeout(C.current),C.current=null,$(),r())},children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,p.Tl)("Provider"),": ",(0,s.jsx)("span",{className:"font-medium text-text-main",children:a||i})]}),"export"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(c.pd,{type:"password",reveal:!0,label:(0,p.Tl)("Transfer passphrase"),value:d,onChange:e=>u(e.target.value),placeholder:"••••••••"}),(0,s.jsx)(c.pd,{type:"password",reveal:!0,label:(0,p.Tl)("Confirm passphrase"),value:m,onChange:e=>x(e.target.value),placeholder:"••••••••"})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,p.Tl)("The file is encrypted with this passphrase — it is required again at import, and cannot be recovered.")}),g&&(0,s.jsx)("p",{className:"text-xs text-red-500",children:g}),b&&(0,s.jsxs)("p",{className:"text-xs text-green-600",children:[(0,p.Tl)("Export complete")," — ",b.exported," ",(0,p.Tl)("accounts exported")]}),(0,s.jsx)(c.$n,{onClick:O,disabled:h,fullWidth:!0,children:(0,p.Tl)("Export encrypted file")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.pd,{label:(0,p.Tl)("Transfer file"),value:j,readOnly:!0,placeholder:(0,p.Tl)("Pick a transfer file first"),className:"cursor-pointer",onClick:()=>T.current?.click()}),(0,s.jsx)("input",{ref:T,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;w(t.name),y(""),v(null);let i=new FileReader;i.onload=()=>{try{let e=JSON.parse(String(i.result||""));if(e?.format!=="10router-oauth-secure-v1"){y((0,p.Tl)("Unrecognized transfer file (expected an encrypted OAuth transfer)")),N(null);return}N(e)}catch(e){y(`${(0,p.Tl)("Invalid JSON")}: ${e.message}`),N(null)}},i.onerror=()=>y((0,p.Tl)("Failed to read file")),i.readAsText(t)}}),(0,s.jsx)(c.pd,{type:"password",reveal:!0,label:(0,p.Tl)("Transfer passphrase"),value:d,onChange:e=>u(e.target.value),placeholder:"••••••••"}),g&&(0,s.jsx)("p",{className:"text-xs text-red-500",children:g}),b&&(0,s.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,s.jsxs)("p",{children:[(0,p.Tl)("Import complete"),": ",b.imported||0," ",(0,p.Tl)("imported"),", ",b.updated||0," ",(0,p.Tl)("updated"),(b.failed||0)>0?`, ${b.failed} ${(0,p.Tl)("failed")}`:""]}),b.webSessions?.failed>0&&(0,s.jsxs)("p",{className:"mt-1 text-amber-600 dark:text-amber-400",children:[(0,p.Tl)("Web session check failed for"),": ",b.webSessions.failures.map(e=>e.name).join(", ")]}),b.webSessions?.checked>0&&0===b.webSessions.failed&&(0,s.jsxs)("p",{className:"mt-1 text-green-600",children:[(0,p.Tl)("Web sessions verified"),": ",b.webSessions.ok,"/",b.webSessions.checked]})]}),(0,s.jsx)(c.$n,{onClick:E,disabled:h,fullWidth:!0,children:(0,p.Tl)("Import connections")})]})]})})}ee.propTypes={isOpen:q().bool.isRequired,onClose:q().func.isRequired,onSuccess:q().func},et.propTypes={isOpen:q().bool.isRequired,onClose:q().func.isRequired,onSuccess:q().func,password:q().string},ei.propTypes={isOpen:q().bool.isRequired,mode:q().oneOf(["export","import"]).isRequired,provider:q().string.isRequired,providerName:q().string,dashboardPassword:q().string,onClose:q().func.isRequired,onSuccess:q().func};let es={claude:"claudeAutoPing",codex:"codexAutoPing"};function el(){let e,t,i,n,x,h,f,y,b=(0,a.useParams)(),v=(0,a.useRouter)(),j=b.id,{getCaps:w,getBaseCaps:k,overrides:N,refresh:T}=(0,A.yU)(),C=(0,O.i)(),[E,M]=(0,l.useState)([]),[q,_]=(0,l.useState)(!0),[z,U]=(0,l.useState)(null),[F,K]=(0,l.useState)([]),[W,B]=(0,l.useState)(!1),[H,G]=(0,l.useState)(!1),[X,el]=(0,l.useState)(!1),[ea,en]=(0,l.useState)(!1),[er,eo]=(0,l.useState)(""),[ed,ec]=(0,l.useState)(!1),[eu,em]=(0,l.useState)(!1),[ep,ex]=(0,l.useState)(!1),[eh,ef]=(0,l.useState)(!1),[eg,ey]=(0,l.useState)(!1),[eb,ev]=(0,l.useState)(null),[ej,ew]=(0,l.useState)({}),[ek,eN]=(0,l.useState)([]),[eT,eC]=(0,l.useState)(!1),[eS,e$]=(0,l.useState)(!1),[eA,eO]=(0,l.useState)(!1),[eE,eP]=(0,l.useState)(!1),[eD,eI]=(0,l.useState)(!1),[eR,eM]=(0,l.useState)(!1),[eq,e_]=(0,l.useState)({open:!1,action:null,value:""}),[ez,eU]=(0,l.useState)(!1),[eF,eL]=(0,l.useState)(""),[eK,eJ]=(0,l.useState)(""),[eW,eB]=(0,l.useState)(!1),[eH,eV]=(0,l.useState)({}),[eG,eQ]=(0,l.useState)(""),[eY,eZ]=(0,l.useState)(()=>new Set),[eX,e0]=(0,l.useState)(!1),[e1,e2]=(0,l.useState)([]),[e5,e3]=(0,l.useState)("__none__"),[e4,e6]=(0,l.useState)(!1),[e8,e7]=(0,l.useState)(null),[e9,te]=(0,l.useState)(""),[tt,ti]=(0,l.useState)(!1),[ts,tl]=(0,l.useState)("auto"),[ta,tn]=(0,l.useState)({enabled:!1,connections:{}}),[tr,to]=(0,l.useState)([]),[td,tc]=(0,l.useState)(!1),[tu,tm]=(0,l.useState)([]),[tp,tx]=(0,l.useState)([]),[th,tf]=(0,l.useState)([]),[tg,ty]=(0,l.useState)(null),[tb,tv]=(0,l.useState)(!1),[tj,tw]=(0,l.useState)(!1),[tk,tN]=(0,l.useState)(!1),tT="__provider_default__",[tC,tS]=(0,l.useState)(tT),[t$,tA]=(0,l.useState)(null),[tO,tE]=(0,l.useState)({}),[tP,tD]=(0,l.useState)(null),tI=(0,l.useRef)(!1),[tR,tM]=(0,l.useState)(!1),{copied:tq,copy:t_}=(0,$.C)(),tz="ag_risk_confirmed",tU=()=>{"xiaomi-mimo"===j||"mimo-desktop"===j?G(!0):B(!0)},tF=()=>{"antigravity"===j&&"true"!==window.localStorage.getItem(tz)?tv(!0):t3?tU():(eo(""),en(!0))},tL=()=>{eo(""),en(!0)},tK=()=>{t3?tF():tL()},tJ=async()=>{if(!ez){eU(!0),eL("");try{let e=await fetch("/api/auth/verify-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:eq.value})});if(!e.ok){let t=await e.json().catch(()=>({}));eL(t?.error||(0,p.Tl)("Invalid password"));return}let{action:t,value:i}=eq;e_({open:!1,action:null,value:""}),"export"===t&&(tQ(i),tV(t),tB(!0))}catch(e){eL(e.message||(0,p.Tl)("Invalid password"))}finally{eU(!1)}}},[tW,tB]=(0,l.useState)(!1),[tH,tV]=(0,l.useState)("export"),[tG,tQ]=(0,l.useState)(""),tY=async()=>{eP(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/checkin",{method:"POST",cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let i=Array.isArray(t?.results)?t.results:[];if(0===i.length)return void C.warning((0,p.Tl)("No CodeBuddy CN connections to check in"));let s=i.filter(e=>"checked-in"===e.status).length,l=i.filter(e=>"already"===e.status).length,a=i.filter(e=>"failed"===e.status).length;0===a?C.success(`${(0,p.Tl)("Check-in complete")}: ${s} ${(0,p.Tl)("checked-in")}, ${l} ${(0,p.Tl)("already checked in")}`):C.error(`${(0,p.Tl)("Check-in complete with errors")}: ${a} ${(0,p.Tl)("failed")}`)}catch(e){C.error((0,p.Tl)("Check-in failed")+": "+e.message)}finally{eP(!1)}},tZ=async()=>{eI(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/claim-compensation",{method:"POST",cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let i=Array.isArray(t?.results)?t.results:[];if(0===i.length)return void C.warning((0,p.Tl)("No CodeBuddy CN connections found"));let s=i.filter(e=>"claimed"===e.status),l=i.filter(e=>"already"===e.status);i.filter(e=>"no-activity"===e.status);let a=i.filter(e=>"failed"===e.status),n=s.reduce((e,t)=>e+(t.claimedAmount||0),0);s.length>0?C.success(`${(0,p.Tl)("Claim successful")}: +${n} Credits (${s.length} ${(0,p.Tl)("accounts")})`):a.length>0?C.error(`${(0,p.Tl)("Claim failed")}: ${a.map(e=>e.error).join(", ")}`):l.length>0?C.info((0,p.Tl)("Compensation credits already claimed")):C.info((0,p.Tl)("No claimable activity available for this account"))}catch(e){C.error((0,p.Tl)("Claim failed")+": "+e.message)}finally{eI(!1)}},tX=()=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"calendar_today",onClick:tY,disabled:eE,className:"w-full sm:w-auto",title:(0,p.Tl)("CodeBuddy CN auto-checks in daily (retries all day until confirmed)"),children:eE?(0,p.Tl)("Checking in..."):(0,p.Tl)("Check in now")}),(0,s.jsx)(c.$n,{size:"sm",icon:"redeem",variant:"secondary",onClick:tZ,disabled:eD,className:"w-full sm:w-auto",title:(0,p.Tl)("Claim extra compensation & gifts"),children:eD?(0,p.Tl)("Claiming..."):(0,p.Tl)("Claim Compensation")})]}),t0=async()=>{eM(!0);try{let e="qoder-cn"===j?"/api/oauth/qoder-cn/checkin":"/api/oauth/qoder/checkin",t=await fetch(e,{method:"POST",cache:"no-store"}),i=await t.json();if(!t.ok)throw Error(i?.error||`Request failed: ${t.status}`);let s=Array.isArray(i?.results)?i.results:[];if(0===s.length)return void C.warning((0,p.Tl)("No active Qoder connections found"));let l=s.filter(e=>"checked-in"===e.status),a=s.filter(e=>"already"===e.status),n=s.filter(e=>"no-activity"===e.status),r=s.filter(e=>"failed"===e.status),o=l.reduce((e,t)=>e+(t.claimedAmount||0),0);if(l.length>0)C.success(`${(0,p.Tl)("Claim successful")}: +${o} Credits (${l.length} ${(0,p.Tl)("accounts")})`);else if(r.length>0)C.error(`${(0,p.Tl)("Claim failed")}: ${r.map(e=>e.error).join(", ")}`);else if(n.length>0){let e=a.length>0?` / ${(0,p.Tl)("Daily credits already claimed for today")} (${a.length} ${(0,p.Tl)("accounts")})`:` (${n.length} ${(0,p.Tl)("accounts")})`;C.info((0,p.Tl)("No claimable activity available for this account")+e)}else C.info((0,p.Tl)("Daily credits already claimed for today"))}catch(e){C.error((0,p.Tl)("Claim failed")+": "+e.message)}finally{eM(!1)}},t1=()=>(0,s.jsx)(c.$n,{size:"sm",icon:"redeem",variant:"secondary",onClick:t0,disabled:eR,className:"w-full sm:w-auto",title:(0,p.Tl)("Claim daily activity Credits"),children:eR?(0,p.Tl)("Claiming..."):(0,p.Tl)("Claim Credits")}),t2=z?{id:z.id,name:z.name||("anthropic-compatible"===z.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===z.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===z.type?"AC":"OC",apiType:z.apiType,baseUrl:z.baseUrl,type:z.type}:u.zN[j]||u.fg[j]||u.IS[j]||u.nJ[j]||u.br[j],t5=t2?.authModes||[],t3=!!u.zN[j]||!!u.IS[j]||t5.includes("oauth"),t4=!!u.fg[j]||t5.includes("apikey"),t6=!!u.IS[j]?.noAuth,t8="codebuddy-cn"===j,t7=t3&&t2?.authModes?.includes("oauth")&&eT,t9=t8&&(eS||eA),ie=e=>t7&&!t9?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>{eJ(""),e_({open:!0,action:"export",value:""})},className:e,children:(0,p.Tl)("Export")}),(0,s.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{tV("import"),tB(!0)},className:e,children:(0,p.Tl)("Import")})]}):null,it=(0,m.KC)(j),ii="qoder"===j||"qoder-cn"===j,is="qoder"===j||"qoder-cn"===j||"xiaomi-mimo"===j,il="cursor"===j&&tu.length>0?tu:ii?function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||0===t.length)return e;let i=new Map(t.map(e=>[String(e.id).split("/").pop(),e]));return e.map(e=>{let t=i.get(e.id);return t?{...e,rateMultiplier:"number"==typeof t.rateMultiplier?t.rateMultiplier:e.rateMultiplier,promotion:t.promotion??e.promotion??null}:e})}(it,tu):it,ia=ii&&il.find(e=>e.promotion)?.promotion||null,ir=(0,u.wG)(j),io=(0,u.mq)(j),id=(0,u.gb)(j),ic=io||id,iu=!ic&&t3&&t4,im="xai"===j?"Grok Build OAuth":"grok-cli"===j?"Grok CLI Device Login":"kimi"===j?"Kimi Coding OAuth":"OAuth",ip="xai"===j?"xAI API Key":"kimi"===j?"Kimi API Key":"qoder"===j?"PAT":"API Key",ix=e=>{if(!ts||"auto"===ts)return null;let t=S(j,e);return t&&t.includes(ts)?ts:null},ih=ic?j:ir,ig=(()=>{let e=new Set,t=new Set,i=i=>{if(!i||t.has(i))return;t.add(i);let s=S(j,i);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of il)i(e.id);for(let e of tp)i(e.id);for(let e of ek)e.providerAlias===ih&&"llm"===(e.kind||e.type||"llm")&&i(e.id);return e.size?["auto",...e]:null})(),iy=ic?z?.prefix||j:ir,ib=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(ih)}`,{cache:"no-store"}),t=await e.json();e.ok&&tf(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[ih]),iv=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ih,ids:[e]})})).ok&&await ib()}catch(e){console.log("Error disabling model:",e)}},ij=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(ih)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ib()}catch(e){console.log("Error enabling model:",e)}},iw=async(e,t)=>{await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ih,id:e,type:"llm",enabled:t})})},ik=async(e,t=[])=>{let i=e.length+t.length;i&&ty({title:"Disable All Models",message:`Disable all ${i} model(s)?`,onConfirm:async()=>{ty(null);try{for(let i of(e.length&&(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ih,ids:e})})).ok&&await ib(),t))await iw(i,!1);t.length&&await iC()}catch(e){console.log("Error disabling all models:",e)}}})},iN=async(e=[])=>{try{for(let t of((await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(ih)}`,{method:"DELETE"})).ok&&await ib(),e))await iw(t,!0);e.length&&await iC()}catch(e){console.log("Error enabling all models:",e)}},iT=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ew(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),iC=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eN(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===j&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&tx(e.models)}).catch(()=>{})},[j]);let iS=(0,l.useCallback)(async()=>{try{let[e,t,i,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),a=await t.json(),n=await i.json(),r=s.ok?await s.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===j);M(e)}i.ok&&K(n.proxyPools||[]);let o=(r.providerStrategies||{})[j]||{};e7(o.fallbackStrategy||null),te(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1"),ti(!0===o.earliestExpiryFirst),eC(!0===r.codeBuddyOAuthImport);let d=(r.providerThinking||{})[j]||{};tl(d.mode||"auto");let c=es[j],u=c&&r[c]||{};if(tn({enabled:!0===u.enabled,connections:u.connections||{}}),t.ok){let e=(a.nodes||[]).find(e=>e.id===j)||null;if(!e&&ic)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===j)||null))break}U(e)}}catch(e){console.log("Error fetching connections:",e)}finally{_(!1)}},[j,ic]),i$=(0,l.useCallback)(async()=>{await iS(),await ib()},[iS,ib]),iA=async e=>{try{let t=await fetch(`/api/provider-nodes/${j}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await t.json();t.ok&&(U(i.node),await iS(),ef(!1))}catch(e){console.log("Error updating provider node:",e)}},iO=async(e,t,i=tt)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),l=(s.ok?await s.json():{}).providerStrategies||{},a={...l[j]||{}};e?a.fallbackStrategy=e:delete a.fallbackStrategy,"round-robin"===e&&""!==t?a.stickyRoundRobinLimit=Number(t)||3:delete a.stickyRoundRobinLimit,i?a.earliestExpiryFirst=!0:delete a.earliestExpiryFirst;let n={...l};0===Object.keys(a).length?delete n[j]:n[j]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}},iE=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),i={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?i[j]={mode:e}:delete i[j],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:i})})}catch(e){console.log("Error saving thinking config:",e)}},iP=async e=>{let t=es[j];if(t){tn(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{iS(),iT(),iC(),ib()},[iS,iT,iC,ib]),(0,l.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.json()).then(e=>{eC(!0===e.codeBuddyOAuthImport),"boolean"==typeof e.codeBuddyCheckin&&e$(e.codeBuddyCheckin),"boolean"==typeof e.codeBuddyCompensation&&eO(e.codeBuddyCompensation)}).catch(e=>console.log("Error reading settings:",e))},[]),(0,l.useEffect)(()=>{if("cursor"!==j&&!ii)return void tm([]);let e=E.find(e=>!1!==e.isActive);if(!e?.id)return void tm([]);let t=!1;return fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json()})).then(({ok:e,data:i})=>{!t&&e&&Array.isArray(i.models)&&i.models.length>0&&tm(i.models)}).catch(()=>{}),()=>{t=!0}},[j,E]),(0,l.useEffect)(()=>{let e=(u.zN[j]||u.fg[j]||u.IS[j]||u.nJ[j])?.modelsFetcher;e&&P(e).then(to)},[j]);let iD=async(e,t,i=ir)=>{let s=`${i}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await iT();else{let t=await e.json();C.error(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},iI=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await iT()}catch(e){console.log("Error deleting alias:",e)}},iR=async(e,t="llm",i=ih,s={},l,a)=>{try{let n={providerAlias:i,id:e,type:t};if(void 0!==l&&(n.enabled=l),a&&(n.transport=a),s&&"object"==typeof s)for(let e of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==s[e]&&(n[e]=s[e]);let r=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(r.ok)await iC(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await r.json();C.error(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},iM=e=>!!(N?.[ih]?.[e]||N?.[j]?.[e]),iq=async(e,t)=>{try{let i=await fetch("/api/models/caps",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:ih||j,modelId:e,...t||{}})});if(!i.ok){let e=await i.json().catch(()=>({}));C.error(e?.error||"Failed to save model settings");return}T()}catch(e){console.log("Error saving model caps:",e),C.error("Failed to save model settings")}},i_=async(e,t="llm",i=ih)=>{try{let s=new URLSearchParams({providerAlias:i,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await iC(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},iz=async(e,t,i="llm")=>{try{(await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ih,id:e,type:i,enabled:t})})).ok&&(await iC(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error toggling custom model:",e)}},iU=(e,t="llm")=>{ty({title:e?(0,p.Tl)("Enable all custom models?"):(0,p.Tl)("Disable all custom models?"),message:e?(0,p.Tl)("All custom models of this provider will be listed in /v1/models and exposed to clients."):(0,p.Tl)("All custom models of this provider will disappear from /v1/models until re-enabled. Clients will no longer see them."),onConfirm:async()=>{ty(null);try{(await fetch("/api/models/custom/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:ih,type:t,enabled:e})})).ok&&(await iC(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error bulk-updating custom models:",e)}}})},iF=async()=>{if(tR)return;let e=E.find(e=>!1!==e.isActive);if(!e)return void C.warning("xiaomi-mimo"===j?(0,p.Tl)("Please add an active MiMo connection first"):(0,p.Tl)("Please add an active Qoder connection first"));tM(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),i=await t.json();if(!t.ok)return void C.error(i.error||(0,p.Tl)("Failed to fetch models"));let s=i.models||[];if(0===s.length)return void C.warning((0,p.Tl)("No models returned"));let l=0,a=0;for(let e of s){let t=e.id||e.name;if(!t)continue;if("llm"!==(e.kind||"llm")){a+=1;continue}let i=t.replace(/^qoder(-cn)?\//,"");!s.some(e=>e.id===i)&&(ek.some(e=>e.providerAlias===ih&&e.id===i&&"llm"===(e.kind||e.type||"llm"))||Object.values(ej).includes(`${ih}/${i}`)||(await iR(i,"llm",ih,{},!1),l+=1))}0===l?C.warning((0,p.Tl)("All models already exist, no new models added")):C.success((0,p.Tl)("Successfully added")+` ${l} `+(0,p.Tl)("models")),a>0&&C.info((0,p.Tl)("Media models skipped (use Media Providers)")+` (${a})`)}catch(e){console.log("Error importing Qoder models:",e),C.error((0,p.Tl)("Error fetching models")+": "+e.message)}finally{tM(!1)}},iL="opencode-go"===j||"bai"===j||"cline"===j,iK=async()=>{if(td)return;let e=E.find(e=>!1!==e.isActive);if(!e?.id)return void C.warning((0,p.Tl)("Add a connection to enable importing models."));tc(!0);try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),i=await t.json();if(!t.ok)throw Error(i?.error||`Request failed: ${t.status}`);let s=(Array.isArray(i.models)?i.models:[]).map(e=>{let t=e?.id||e?.name||e?.model;return t?{...e,id:String(t),name:e.name||String(t)}:null}).filter(Boolean);to(s),C.success(`${(0,p.Tl)("Models refreshed")} (${s.length})`)}catch(e){C.error((0,p.Tl)("Failed to fetch models")+": "+e.message)}finally{tc(!1)}},iJ=async()=>{if(tj||0===E.length)return;let e=Object.fromEntries(E.map(e=>[e.id,{state:"queued",error:null}]));tI.current=!1,tw(!0),tN(!1),tA(null),tE(e),tD({total:E.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,i=0;try{for(let e=0;e<E.length;e+=1){if(tI.current){tD({total:E.length,completed:e,passed:t,failed:i,stopped:!0});break}let s=E[e];tA(s.id),tE(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=il.some(e=>e.id===tC)?tC:null,l=await fetch(`/api/providers/${s.id}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e&&e!==tT?{model:e}:{})}),a=await l.json(),n=!!a.valid;n?t+=1:i+=1,tE(e=>({...e,[s.id]:{state:n?"success":"failed",error:n?null:a.error||null}}))}catch(e){i+=1,tE(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}tD({total:E.length,completed:e+1,passed:t,failed:i,stopped:!1}),e<E.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{tA(null),tw(!1),tN(!1),tI.current=!1,iS()}},iW=async e=>{ty({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{ty(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&M(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},iB=()=>{eQ(""),eV({}),tE({}),tD(null),iS(),B(!1)},iH=async e=>{eo("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:j,...e})}),i=null;try{i=await t.json()}catch{i=null}if(t.ok){eQ(""),eV({}),await i$(),en(!1);return}eo(i?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),eo("Failed to save connection")}},iV=async e=>{try{(await fetch(`/api/providers/${eb.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(eQ(""),eV({}),tE({}),tD(null),await iS(),ex(!1))}catch(e){console.log("Error updating connection:",e)}},iG=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&M(i=>i.map(i=>i.id===e?{...i,isActive:t}:i))}catch(e){console.log("Error updating connection status:",e)}},iQ=async(e,t)=>{let i=[...E];[i[e],i[t]]=[i[t],i[e]],M(i);try{await Promise.all([fetch(`/api/providers/${i[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${i[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await iS()}},iY=E.filter(e=>e1.includes(e.id)),iZ=E.length>0&&e1.length===E.length;(0,l.useEffect)(()=>{e2(e=>e.filter(e=>E.some(t=>t.id===e)))},[E]),(()=>{if(0===iY.length)return;let e=new Set(iY.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let i=F.find(e=>e.id===t);return i?.name}})();let iX=()=>{e4||ey(!1)},i0=async e=>{e6(!0);try{let t=0;for(let{connectionId:i,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",i,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await iS(),ey(!1)}finally{e6(!1)}},i1=e=>i0(E.map(t=>({connectionId:t.id,proxyPoolId:e}))),i2=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:E.map((e,t)=>{let i;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(i=e.id,e1.includes(i)),onChange:()=>{var t;return t=e.id,void e2(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(V,{connection:e,proxyPools:F,isOAuth:t3,isFirst:0===t,isLast:t===E.length-1,onMoveUp:()=>iQ(t,t-1),onMoveDown:()=>iQ(t,t+1),onToggleActive:t=>iG(e.id,t),autoPing:es[j]&&"oauth"===e.authType?{on:!0===ta.connections[e.id],onToggle:t=>{var i;return i=e.id,void iP({...ta,connections:{...ta.connections,[i]:t}})},provider:j}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&M(i=>i.map(i=>i.id===e.id?{...i,providerSpecificData:{...i.providerSpecificData,proxyPoolId:t||null}}:i))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ev(e),ex(!0)},onDelete:()=>iW(e.id),oneByOneStatus:tO[e.id]||null})})]},e.id)})}),i5=F.filter(e=>!0===e.isActive),i3=(0,s.jsx)(c.aF,{isOpen:eg,onClose:iX,title:`Apply Proxy (${E.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=F.filter(e=>!0===e.isActive);return 0===e.length?void C.warning("No active proxy pools available."):i0(E.map((t,i)=>({connectionId:t.id,proxyPoolId:e[i%e.length].id})))},disabled:e4||0===i5.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>i1(null),disabled:e4,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),F.map(e=>(0,s.jsxs)("button",{onClick:()=>i1(e.id),disabled:e4||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),e4&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(c.$n,{onClick:iX,variant:"ghost",fullWidth:!0,disabled:e4,children:"Cancel"})]})}),i4=async e=>{if(!eY.has(e)){eZ(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${ih}/${e}`})}),i=await t.json();eV(t=>({...t,[e]:i.ok?"ok":"error"})),eQ(i.ok?"":i.error||"Model not reachable")}catch{eV(t=>({...t,[e]:"error"})),eQ("Network error")}finally{setTimeout(()=>{iS()},600),eZ(t=>{let i=new Set(t);return i.delete(e),i})}}};if(q)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(c.Qv,{}),(0,s.jsx)(c.Qv,{})]});if(!t2)return(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let i6=()=>io&&t2.apiType?"responses"===t2.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":id?"/providers/anthropic-m.png":(0,d.HY)(t2.id);return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(r(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${t2.color}15`},children:eW||!i6()?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:t2.color},children:t2.textIcon||t2.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:i6(),alt:t2.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(t2.id),eB(!0)},loading:"lazy",decoding:"async"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:t2.name}),(t2.notice?.webUrl||t2.notice?.apiKeyUrl||t2.notice?.signupUrl||t2.website)&&(0,s.jsxs)("a",{href:t2.notice?.webUrl||t2.notice?.apiKeyUrl||t2.notice?.signupUrl||t2.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),t2.notice?.webUrl?"Web console":t2.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,s.jsx)(c.N5,{code:t2.notice?.inviteCode})]}),!t6&&(0,s.jsx)("p",{className:"text-text-muted",children:1===E.length?(0,p.Tl)("1 connection"):(0,p.Tl)("{n} connections").replace("{n}",String(E.length))})]})]})]}),t2.deprecated&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:t2.deprecationNotice})]}),t2.notice?.text&&!t2.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:(0,p.Tl)(t2.notice.text)}),t2.notice.apiKeyUrl&&(0,s.jsx)("a",{href:t2.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:(0,p.Tl)("Get API Key →")})]}),ic&&z&&(0,s.jsx)(c.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:id?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[id?"Messages API":"responses"===z.apiType?"Responses API":"Chat Completions"," \xb7 ",(z.baseUrl||"").replace(/\/$/,""),"/",id?"messages":"responses"===z.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{eo(""),en(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ef(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{ty({title:"Delete Compatible Node",message:`Delete this ${id?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{ty(null);try{(await fetch(`/api/provider-nodes/${j}`,{method:"DELETE"})).ok&&v.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),t6?(0,s.jsx)(c.gw,{providerId:j}):(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[E.length>0&&F.length>0&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ey(!0),children:"Apply Proxy"}),E.length>0&&(0,s.jsxs)(s.Fragment,{children:[e1.length>0&&(0,s.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=e1.length;0!==e&&ty({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{ty(null);let e=0,t=[...e1];for(let i of t)try{(await fetch(`/api/providers/${i}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}M(e=>e.filter(e=>!t.includes(e.id))),e2([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",e1.length,")"]}),E.length>0&&il.length>1&&(0,s.jsx)(c.l6,{value:tC,onChange:e=>tS(e.target.value),disabled:tj,options:[{value:tT,label:(0,p.Tl)("Provider default")},...il.filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>({value:e.id,label:e.name||e.id}))],selectClassName:"!py-2 !text-xs w-44"}),(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:iJ,disabled:tj,children:tj?(0,p.Tl)("Testing Connection One-by-One..."):(0,p.Tl)("Test Connection One-by-One")}),tj&&(0,s.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{tj&&(tI.current=!0,tN(!0))},disabled:tk,children:tk?(0,p.Tl)("Stopping..."):(0,p.Tl)("Stop")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",title:(0,p.Tl)("Prioritize accounts whose quota (packages, subscription windows, balances) expires soonest"),children:(0,p.Tl)("Earliest Expiry First")}),(0,s.jsx)(c.lM,{checked:tt,onChange:e=>{ti(e),iO(e8,e9,e)}})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:(0,p.Tl)("Round Robin")}),(0,s.jsx)(c.lM,{checked:"round-robin"===e8,onChange:e=>{let t=e?"round-robin":null,i=e?e9||"1":e9;e&&!e9&&te("1"),e7(t),iO(t,i,tt)}}),"round-robin"===e8&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:(0,p.Tl)("Sticky:")}),(0,s.jsx)("input",{type:"number",min:1,value:e9,onChange:e=>{var t;te(t=e.target.value),iO("round-robin",t,tt)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-surface focus:outline-none focus:border-primary"})]})]})]})]}),0===E.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:t3?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),iu&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",im," or ",ip,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:iu?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tF,children:im}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:tL,children:ip}),ie(),t9&&tX()]}):(0,s.jsxs)(s.Fragment,{children:[!ic&&"iflow"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>el(!0),children:"Cookie"}),("qoder"===j||"qoder-cn"===j)&&t1(),"codex"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ec(!0),children:(0,p.Tl)("Bulk Add")}),(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:tK,children:ic?"Add API Key":"iflow"===j?"OAuth":"mimo-desktop"===j?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,p.Tl)("Connect with Desktop Session"),(0,s.jsx)(c.m_,{text:(0,p.Tl)("Requires sign-in to Xiaomi MiMo Desktop app first"),position:"top",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] opacity-60",children:"info"})})]}):"Add Connection"}),ie()]})})]}):(0,s.jsxs)(s.Fragment,{children:[tP&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:[(0,p.Tl)("Total:")," ",tP.total]}),(0,s.jsxs)("span",{children:[(0,p.Tl)("Completed:")," ",tP.completed]}),(0,s.jsxs)("span",{children:[(0,p.Tl)("Passed:")," ",tP.passed]}),(0,s.jsxs)("span",{children:[(0,p.Tl)("Failed:")," ",tP.failed]}),tP.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,p.Tl)("Stopped")}),tj&&t$&&(0,s.jsxs)("span",{children:[(0,p.Tl)("Running:")," ",E.find(e=>e.id===t$)?.name||t$]})]})}),E.length>0&&(0,s.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:iZ,onChange:()=>{iZ?e2([]):e2(E.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),i2,!ic&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>el(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===j&&(0,s.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ec(!0),title:(0,p.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,p.Tl)("Bulk Add")}),iu?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tF,className:"w-full sm:w-auto",children:im}),(0,s.jsx)(c.$n,{size:"sm",icon:"key",onClick:tL,className:"w-full sm:w-auto",children:ip}),ie("w-full sm:w-auto"),t9&&tX(),("qoder"===j||"qoder-cn"===j)&&t1()]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{size:"sm",icon:"add",onClick:tK,className:"w-full sm:w-auto",children:"Add"}),ie("w-full sm:w-auto")]})]})]})]}),(0,s.jsxs)(c.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),ig&&(0,s.jsx)("select",{value:ts,onChange:e=>{var t;tl(t=e.target.value),iE(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-surface px-2 py-1 text-xs focus:border-primary focus:outline-none",children:ig.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!ic&&(e=[...il,...tp.filter(e=>!il.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!th.includes(e)),i=(t=ek.filter(e=>e?.providerAlias===ih&&"llm"===(e.kind||e.type||"llm"))).filter(e=>!1!==e.enabled).map(e=>e.id),n=t.filter(e=>!1===e.enabled).map(e=>e.id),x=th.length>0||n.length>0,h=e.length>0||i.length>0,(0,s.jsxs)("div",{className:"flex gap-2",children:[x&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>iN(n),children:"Active All"}),h&&(0,s.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>ik(e,i),children:"Disable All"})]}))]}),!!eG&&(f=(0,I.O)(eG),y=function(e){if(!e)return"";let t=(0,R.DY)(e);if(t&&t!==e)return t;let i=(0,p.Tl)(e);if(i&&i!==e)return i;let s=String(e).match(/^HTTP\s+\d+:\s*(?:\[(?:\d+|[A-Z0-9_]+)\]:\s*)?(.*)$/i);if(s&&s[1]){let e=s[1].trim(),t=(0,p.Tl)(e);if(t&&t!==e)return t}return(0,p.Tl)(e)}(eG),(0,s.jsxs)("p",{className:"text-xs text-red-500 mb-3 break-words",children:[y," ",f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("a",{href:f,target:"_blank",rel:"noopener noreferrer",title:(0,p.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"text-blue-500 underline hover:text-blue-400",children:(0,p.Tl)("Verify your account")})," ",(0,s.jsx)("button",{type:"button",onClick:()=>t_(f,"verification"),className:"text-text-muted underline hover:text-primary",children:"verification"===tq?(0,p.Tl)("Copied"):(0,p.Tl)("Copy link")}),(0,s.jsxs)("span",{className:"text-text-muted",children:[" ","(",(0,p.Tl)("Recommended: open in an incognito window and sign in with the affected account"),")"]})]})]})),(()=>{let e,t,i;if(ic)return(0,s.jsx)(J,{providerStorageAlias:ih,providerDisplayAlias:iy,modelAliases:ej,customModels:ek,copied:tq,onCopy:t_,onSetAlias:iD,onDeleteAlias:iI,onAddCustomModel:(e,t)=>iR(e,"llm",ih,{},t),onToggleCustomModel:iz,onDeleteCustomModel:e=>i_(e,"llm",ih),onBulkCustomModels:iU,connections:E,isAnthropic:id});let l=[...il,...tp.filter(e=>!il.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),a=new Set(th),n=l.filter(e=>!a.has(e.id)),r=l.filter(e=>a.has(e.id)),o=D({customModels:ek,modelAliases:ej,providerAlias:ih,builtInModels:il,type:"llm"}),d=o.filter(e=>!1!==e.enabled),c=o.filter(e=>!1===e.enabled);return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[ia&&(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(g,{promotion:ia})}),d.length+c.length>0&&(0,s.jsxs)("div",{className:"w-full flex items-center gap-2 text-xs text-text-muted -mb-1",children:[(0,s.jsxs)("span",{children:[(0,p.Tl)("Custom models")," (",d.length+c.length,")"]}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>iU(!0),className:"text-primary hover:underline",children:(0,p.Tl)("Enable all")}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>iU(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,p.Tl)("Disable all")})]}),d.map(e=>(0,s.jsx)(L,{model:{id:e.id,name:e.name},fullModel:`${iy}/${e.id}`,alias:e.alias,copied:tq,onCopy:t_,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?i_(e.id,"llm",ih):iI(e.alias)},testStatus:eH[e.id],onTest:E.length>0||t6?()=>i4(e.id):void 0,isTesting:eY.has(e.id),isCustom:!0,isFree:!1,caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iq(e.id,t),capsPinned:iM(e.id),thinkingSuffix:ix(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${ih}/${e.id}`,i=`${j}/${e.id}`,l=Object.entries(ej).find(([,e])=>e===t||e===i)?.[0];return(0,s.jsx)(L,{model:e,fullModel:`${iy}/${e.id}`,alias:l,copied:tq,onCopy:t_,onSetAlias:t=>iD(e.id,t,ih),onDeleteAlias:()=>iI(l),testStatus:eH[e.id],onTest:E.length>0||t6?()=>i4(e.id):void 0,isTesting:eY.has(e.id),isFree:e.isFree,onDisable:()=>iv(e.id),caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iq(e.id,t),capsPinned:iM(e.id),thinkingSuffix:ix(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>e0(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"cline"===j&&E.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:iK,disabled:td,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:td?{animation:"spin 1s linear infinite"}:void 0,children:td?"progress_activity":"download"}),td?(0,p.Tl)("Importing..."):(0,p.Tl)("Import from /models")]}),is&&E.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:iF,disabled:tR,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:tR?{animation:"spin 1s linear infinite"}:void 0,children:tR?"progress_activity":"download"}),tR?(0,p.Tl)("Fetching..."):(0,p.Tl)("xiaomi-mimo"===j?"Fetch MiMo Models":"Fetch Qoder Models")]}),iL&&"cline"!==j&&(0,s.jsxs)("button",{onClick:iK,disabled:td||!E.some(e=>!1!==e.isActive),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:td?{animation:"spin 1s linear infinite"}:void 0,children:td?"progress_activity":"refresh"}),td?(0,p.Tl)("Refreshing..."):(0,p.Tl)("Refresh Official Models")]}),tr.length>0&&(e=new Set([...Object.values(ej),...o.map(e=>e.fullModel)]),t=new Set(il.map(e=>e.id)),0===(i=tr.filter(i=>!e.has(`${ih}/${i.id}`)&&!t.has(i.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await iR(e.id,"llm",ih)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),(r.length>0||c.length>0)&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length+c.length,"):"]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,s.jsx)(L,{model:{id:e.id,name:e.name},fullModel:`${iy}/${e.id}`,copied:tq,onCopy:t_,testStatus:eH[e.id],onTest:E.length>0||t6?()=>i4(e.id):void 0,isTesting:eY.has(e.id),onEnable:()=>iz(e.id,!0),isCustom:!1,isFree:!1,caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iq(e.id,t),capsPinned:iM(e.id)},`custom-${e.fullModel}`)),r.map(e=>(0,s.jsx)(L,{model:e,fullModel:`${iy}/${e.id}`,copied:tq,onCopy:t_,testStatus:eH[e.id],onTest:E.length>0||t6?()=>i4(e.id):void 0,isTesting:eY.has(e.id),onEnable:()=>ij(e.id),isFree:e.isFree,caps:w(`${j}/${e.id}`),baseCaps:k(`${j}/${e.id}`),onSaveCaps:t=>iq(e.id,t),capsPinned:iM(e.id),thinkingSuffix:ix(e.id)},e.id))]})]})]})})()]}),i3,"kiro"===j?(0,s.jsx)(c.Mh,{isOpen:W,providerInfo:t2,onSuccess:iB,onClose:()=>B(!1)}):"cursor"===j?(0,s.jsx)(c.G9,{isOpen:W,onSuccess:iB,onClose:()=>B(!1)}):"zed"===j?(0,s.jsx)(c.TE,{isOpen:W,providerInfo:t2,onSuccess:iB,onClose:()=>B(!1)}):"gitlab"===j?(0,s.jsx)(c.vj,{isOpen:W,providerInfo:t2,onSuccess:iB,onClose:()=>B(!1)}):(0,s.jsx)(c.LF,{isOpen:W,provider:j,providerInfo:t2,onSuccess:iB,onClose:()=>B(!1)}),("xiaomi-mimo"===j||"mimo-desktop"===j)&&(0,s.jsx)(c.LH,{provider:j,isOpen:H,onSuccess:iB,onClose:()=>G(!1)}),"iflow"===j&&(0,s.jsx)(c.vE,{isOpen:X,onSuccess:()=>{iS(),el(!1)},onClose:()=>el(!1)}),(0,s.jsx)(Q,{isOpen:ea,provider:j,providerName:t2.name,isCompatible:ic,isAnthropic:id,authType:t2?.authType,authHint:t2?.authHint,website:t2?.website,proxyPools:F,error:er,existingNames:E.map(e=>e.name).filter(Boolean),onSave:iH,onBulkDone:i$,onClose:()=>{eo(""),en(!1)}}),(0,s.jsx)(c.wI,{isOpen:ep,connection:eb,proxyPools:F,onSave:iV,onClose:()=>ex(!1)}),ic&&(0,s.jsx)(Y,{isOpen:eh,node:z,onSave:iA,onClose:()=>ef(!1),isAnthropic:id}),!ic&&(0,s.jsx)(Z,{isOpen:eX,providerAlias:ih,providerDisplayAlias:iy,onSave:async(e,t,i,s)=>{await iR(e,i||"llm",ih,t||{},void 0,s),e0(!1)},onClose:()=>e0(!1)}),"codex"===j&&(0,s.jsx)(ee,{isOpen:ed,onClose:()=>ec(!1),onSuccess:iS}),"codebuddy-cn"===j&&(0,s.jsx)(et,{isOpen:eu,password:eK,onClose:()=>em(!1),onSuccess:iS}),(0,s.jsx)(ei,{isOpen:tW,mode:tH,provider:j,providerName:t2?.name,dashboardPassword:tG,onClose:()=>{tB(!1),tQ("")},onSuccess:iS}),(0,s.jsxs)(c.aF,{isOpen:eq.open,onClose:()=>e_({open:!1,action:null,value:""}),title:(0,p.Tl)("Confirm Password"),size:"sm",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.$n,{variant:"ghost",onClick:()=>e_({open:!1,action:null,value:""}),children:(0,p.Tl)("Cancel")}),(0,s.jsx)(c.$n,{variant:"primary",onClick:tJ,disabled:!eq.value||ez,children:ez?(0,p.Tl)("Verifying..."):(0,p.Tl)("Confirm")})]}),children:[(0,s.jsx)("p",{className:"text-text-muted mb-3 text-sm",children:(0,p.Tl)("Enter your dashboard password to export OAuth accounts (the file will be encrypted with the transfer passphrase you pick next).")}),(0,s.jsx)(c.pd,{type:"password",reveal:!0,autoFocus:!0,value:eq.value,onChange:e=>e_(t=>({...t,value:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&eq.value&&tJ()},placeholder:(0,p.Tl)("Password")}),eF&&(0,s.jsx)("p",{className:"text-xs text-red-500 mt-2",children:eF})]}),(0,s.jsx)(c.uo,{isOpen:tb,onClose:()=>tv(!1),onConfirm:()=>{(window.localStorage.setItem(tz,"true"),tv(!1),t3)?tU():tL()},title:"Risk Notice",message:t2?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(c.uo,{isOpen:!!tg,onClose:()=>ty(null),onConfirm:tg?.onConfirm,title:tg?.title||"Confirm",message:tg?.message,variant:"danger"})]})}},90337:(e,t,i)=>{"use strict";i.d(t,{DY:()=>o});var s=i(73006),l=i(22862),a=i(43073);let n=/subscription_quota_exhausted|本周用量已满|本周额度已用完/i;function r(e,t){return(0,s.Tl)(e).replace("{n}",String(t))}function o(e){if(!e||"string"!=typeof e)return e??"";let t=(0,s.Tl)(e);if(t&&t!==e)return t;if(n.test(e))return(0,s.Tl)("Subscription quota used up. Please wait for the quota reset.");if(l.AZ.test(e)){let t=(0,a.l)(e),i=(0,s.Tl)("This account must complete real-name verification before StepFun will serve it. Complete it at {url}, then retry.");return i.replace("{url}",t||(0,s.Tl)("the provider's console"))}if(/Individual quota reached|QUOTA_EXHAUSTED|RESOURCE_EXHAUSTED/i.test(e)){let t,i,l,a,n,o,d,c,{delay:u,timestamp:m,model:p}=(t=String(e||""),i=null,l=null,a=/"quotaResetDelay"\s*:\s*"([^"]+)"/.exec(t),n=/\bResets in\s+([0-9hms.]+)/i.exec(t),i=a&&a[1]||n&&n[1]||null,o=/"quotaResetTimeStamp"\s*:\s*"([^"]+)"/.exec(t),d=/"quotaResetTimeStamp"\s*:\s*(".*?"|\S+)/.exec(t),(l=o&&o[1]||d&&d[1]||null)&&(l=l.replace(/^"|"$/g,"")),{delay:i,timestamp:l,model:/"model"\s*:\s*"([^"]+)"/.exec(t)?.[1]||null}),x=function(e){if(!e)return"";let{h:t,m:i,s}=e;if(s>=60&&(i+=Math.floor(s/60),s%=60),i>=60&&(t+=Math.floor(i/60),i%=60),t>=24){let e=Math.floor(t/24),i=t%24;return i>0?`${r("{n}d",e)} ${r("{n}h",i)}`:r("{n}d",e)}let l=[];return t>0&&l.push(r("{n}h",t)),i>0&&l.push(r("{n}m",i)),(s>0||0===l.length)&&l.push(r("{n}s",s)),l.join(" ")}((c=/^(?:(\d+(?:\.\d+)?)h)?(?:(\d+(?:\.\d+)?)m)?(?:(\d+(?:\.\d+)?)s)?$/i.exec(String(u||"").trim()))&&(c[1]||c[2]||c[3])?{h:Math.floor(parseFloat(c[1]||0)),m:Math.floor(parseFloat(c[2]||0)),s:Math.round(parseFloat(c[3]||0))}:null),h=m?function(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e||"";try{return t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t.toISOString()}}(m):"",f=(0,s.Tl)(p?"Individual quota reached for model {model}. Resets at {time} (in {duration}).":"Individual quota reached. Resets at {time} (in {duration}).");return(f=(f=f.replace("{model}",p||"")).replace("{time}",h||(0,s.Tl)("shortly"))).replace("{duration}",x||(0,s.Tl)("a short while"))}return t}},93578:(e,t,i)=>{Promise.resolve().then(i.bind(i,83204))}},e=>{e.O(0,[3170,305,5772,1321,5497,6109,8441,3794,7358],()=>e(e.s=93578)),_N_E=e.O()}]);